/*** Generated by streamline 0.10.17 (callbacks) - DO NOT EDIT ***/ "use strict"; var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename, false),__func=__rt.__func,__cb=__rt.__cb; var fs = require("fs");





















































































































var jsonpatch = require("fast-json-patch");

var profile = require("../../../util/profile");
var utils = require("../../../util/utils");

var $ = utils.getLocaleString;function beautify(jsonText) {
  var obj = JSON.parse(jsonText);
  return JSON.stringify(obj, null, 2);};

exports.init = function(cli) {






































  var availabilitySetsCreateOrUpdate = cli.category("availset").description($("Commands to manage your availability sets.  "));

  availabilitySetsCreateOrUpdate.command("create-or-update [resource-group] [name] [parameters]").description($("Create or update an availability set.")).usage("[options] <resource-group> <name> <parameters>").option("-g, --resource-group <resource-group>", $("resource-group")).option("-n, --name <name>", $("name")).option("-p, --parameters <parameters>", $("A string of parameters in JSON format")).option("--parameter-file <parameter-file>", $("The text file that contains input parameter object in JSON format")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __1(resourceGroup, name, parameters, options, _) { var parametersObj, fileContent, subscription, computeManagementClient, result; var __frame = { name: "__1", line: 177 }; return __func(_, this, arguments, __1, 4, __frame, function __$__1() { return (function __$__1(__then) {








        if (!resourceGroup) {
          return cli.interaction.promptIfNotGiven($("resource-group : "), resourceGroup, __cb(_, __frame, 2, 38, function ___(__0, __1) { resourceGroup = __1; __then(); }, true)); } else { __then(); } ; })(function __$__1() {


        cli.output.verbose(("resourceGroup = " + resourceGroup)); return (function __$__1(__then) {
          if (!name) {
            return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 7, 29, function ___(__0, __2) { name = __2; __then(); }, true)); } else { __then(); } ; })(function __$__1() {


          cli.output.verbose(("name = " + name));
          cli.output.verbose(("parameters = " + parameters));
          parametersObj = null;
          if (options.parameterFile) {
            cli.output.verbose((("Reading file content from: \"" + options.parameterFile) + "\""));
            fileContent = fs.readFileSync(options.parameterFile, "utf8");
            parametersObj = JSON.parse(fileContent); }

           else {
            parametersObj = JSON.parse(parameters); } ;

          cli.output.verbose(("parametersObj = " + JSON.stringify(parametersObj)));
          subscription = profile.current.getSubscription(options.subscription);
          computeManagementClient = utils.createComputeManagementClient(subscription);
          return computeManagementClient.availabilitySets.createOrUpdate(resourceGroup, name, parametersObj, __cb(_, __frame, 24, 58, function ___(__0, __3) { result = __3;
            if (result) {
              cli.output.json(result); } ; _(); }, true)); }); }); }); });


  var availabilitySetsCreateOrUpdatecreateOrUpdateParameters2 = availabilitySetsCreateOrUpdate.category("config").description($("Commands to manage configuration of availability-sets in the parameter file."));

  availabilitySetsCreateOrUpdatecreateOrUpdateParameters2.command("create").description($("Generate availabilitySetsCreateOrUpdate parameter string or files.")).usage("[options]").option("--parameter-file <parameter-file>", $("The parameter file path.")).execute(function __2(options, _) { var filePath; var __frame = { name: "__2", line: 212 }; return __func(_, this, arguments, __2, 1, __frame, function __$__2() {




      return cli.output.verbose("{\"platformUpdateDomainCount\":null,\"platformFaultDomainCount\":null,\"virtualMachines\":[{\"id\":\"\"}],\"statuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}],\"managed\":null,\"sku\":{\"name\":\"\",\"tier\":\"\",\"capacity\":null},\"id\":null,\"name\":null,\"type\":null,\"location\":\"\",\"tags\":{}}", __cb(_, __frame, 1, 15, function __$__2() {
        filePath = "availabilitySetsCreateOrUpdate_createOrUpdate.json";
        if (options.parameterFile) {
          filePath = options.parameterFile; } ;

        fs.writeFileSync(filePath, beautify("{\r\n\"platformUpdateDomainCount\":null,\r\n\"platformFaultDomainCount\":null,\r\n\"virtualMachines\":[\r\n{\r\n\"id\":\"\"\r\n}\r\n],\r\n\"statuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n],\r\n\"managed\":null,\r\n\"sku\":{\r\n\"name\":\"\",\r\n\"tier\":\"\",\r\n\"capacity\":null\r\n},\r\n\"id\":null,\r\n\"name\":null,\r\n\"type\":null,\r\n\"location\":\"\",\r\n\"tags\":{\r\n}\r\n}"));
        cli.output.verbose("=====================================");
        cli.output.verbose(("Parameter file output to: " + filePath));
        cli.output.verbose("====================================="); _(); }, true)); }); });


  availabilitySetsCreateOrUpdatecreateOrUpdateParameters2.command("patch").description($("Command to patch availabilitySetsCreateOrUpdate parameter JSON file.")).usage("[options]").option("--parameter-file <parameter-file>", $("The parameter file path.")).option("--operation <operation>", $("The JSON patch operation: add, remove, or replace.")).option("--path <path>", $("The JSON data path, e.g.: \"foo/1\".")).option("--value <value>", $("The JSON value.")).option("--parse", $("Parse the JSON value to object.")).execute(function __3(options, _) { var fileContent, parametersObj, updatedContent; var __frame = { name: "__3", line: 232 }; return __func(_, this, arguments, __3, 1, __frame, function __$__3() {








      return cli.output.verbose(options.parameterFile, __cb(_, __frame, 1, 15, function __$__3() {
        cli.output.verbose(options.operation);
        cli.output.verbose(options.path);
        cli.output.verbose(options.value);
        cli.output.verbose(options.parse);
        if (options.parse) {
          options.value = JSON.parse(options.value); } ;

        cli.output.verbose(options.value);
        cli.output.verbose("=====================================");
        cli.output.verbose((("Reading file content from: \"" + options.parameterFile) + "\""));
        cli.output.verbose("=====================================");
        fileContent = fs.readFileSync(options.parameterFile, "utf8");
        parametersObj = JSON.parse(fileContent);
        cli.output.verbose("JSON object:");
        cli.output.verbose(JSON.stringify(parametersObj));
        if ((options.operation == "add")) {
          jsonpatch.apply(parametersObj, [{ op: options.operation, path: options.path, value: options.value },]); } else {

          if ((options.operation == "remove")) {
            jsonpatch.apply(parametersObj, [{ op: options.operation, path: options.path },]); } else {

            if ((options.operation == "replace")) {
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: options.path, value: options.value },]); } ; } ; } ;

        updatedContent = JSON.stringify(parametersObj);
        cli.output.verbose("=====================================");
        cli.output.verbose("JSON object (updated):");
        cli.output.verbose(JSON.stringify(parametersObj));
        cli.output.verbose("=====================================");
        fs.writeFileSync(options.parameterFile, beautify(updatedContent));
        cli.output.verbose("=====================================");
        cli.output.verbose(("Parameter file updated at: " + options.parameterFile));
        cli.output.verbose("====================================="); _(); }, true)); }); });



  var catparametersCreateOrUpdateAvailabilitySetsAvailabilitySet0 = cli.category("availset");
  var parametersCreateOrUpdateAvailabilitySetsAvailabilitySet0 = catparametersCreateOrUpdateAvailabilitySetsAvailabilitySet0.category("config").description($("Commands to manage configuration of availability-sets in the parameter file."));

  var setparametersCreateOrUpdateAvailabilitySetsAvailabilitySet0 = parametersCreateOrUpdateAvailabilitySetsAvailabilitySet0.category("availability-set").description($("Commands to configure availability-set of availset in config file."));

  setparametersCreateOrUpdateAvailabilitySetsAvailabilitySet0.command("set").description($("Set availability-set in config string or files, e.g. \r\n{\r\n  \"platformUpdateDomainCount\":null,\r\n  \"platformFaultDomainCount\":null,\r\n  \"virtualMachines\":[\r\n    {\r\n      \"id\":\"\"\r\n    }\r\n  ],\r\n  \"statuses\":[\r\n    {\r\n      \"code\":\"\",\r\n      \"level\":null,\r\n      \"displayStatus\":\"\",\r\n      \"message\":\"\",\r\n      \"time\":null\r\n    }\r\n  ],\r\n  \"managed\":null,\r\n  \"sku\":{\r\n    \"name\":\"\",\r\n    \"tier\":\"\",\r\n    \"capacity\":null\r\n  },\r\n  \"id\":null,\r\n  \"name\":null,\r\n  \"type\":null,\r\n  \"location\":\"\",\r\n  \"tags\":{\r\n  }\r\n}\r\n         There are two sets of commands:\r\n           1) function commands that are used to manage Azure resources in the cloud, and \r\n           2) parameter commands that generate & edit input files for the other set of commands.\r\n         For example, 'vmss show/list/stop' are the function commands that call get, list and stop operations of \r\n         virtual machine scale set, whereas 'vmss config * generate/create/set/delete/add' commands \r\n         are used to configure the input parameter file. The 'vmss config' command takes a parameter \r\n         file as for the VM scale set configuration, and creates it online.")).usage("[options]").option("--parameter-file <parameter-file>", $("The parameter file path.")).option("--parse", $("Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).")).option("--platform-update-domain-count <platformUpdateDomainCount>", $("Set the platform-update-domain-count value.")).option("--platform-fault-domain-count <platformFaultDomainCount>", $("Set the platform-fault-domain-count value.")).option("--virtual-machines <virtualMachines>", $("Set the virtual-machines value.")).option("--statuses <statuses>", $("Set the statuses value.")).option("--managed <managed>", $("Set the managed value.")).option("--sku <sku>", $("Set the sku value.")).option("--id <id>", $("Set the id value.")).option("--name <name>", $("Set the name value.")).option("--type <type>", $("Set the type value.")).option("--location <location>", $("Set the location value.")).option("--tags <tags>", $("Set the tags value.")).execute(function __4(options, _) { var fileContent, parametersObj, error, paramPath, updatedContent; var __frame = { name: "__4", line: 291 }; return __func(_, this, arguments, __4, 1, __frame, function __$__4() {
















      return cli.output.verbose(JSON.stringify(options), __cb(_, __frame, 1, 15, function __$__4() { return (function __$__4(__then) {
          if (!options.parameterFile) {
            return cli.interaction.promptIfNotGiven($("parameter-file : "), options.parameterFile, __cb(_, __frame, 3, 46, function ___(__0, __1) { options.parameterFile = __1; __then(); }, true)); } else { __then(); } ; })(function __$__4() {


          cli.output.verbose("=====================================");
          cli.output.verbose((("Reading file content from: \"" + options.parameterFile) + "\""));
          cli.output.verbose("=====================================");
          fileContent = fs.readFileSync(options.parameterFile, "utf8");
          parametersObj = JSON.parse(fileContent);
          cli.output.verbose("JSON object:");
          cli.output.verbose(JSON.stringify(parametersObj));
          options.operation = "replace";
          options.path = "";
          error = jsonpatch.validate([{ op: "remove", path: options.path },], parametersObj);
          if ((typeof error !== "undefined")) {
            jsonpatch.apply(parametersObj, [{ op: "add", path: options.path, value: { } },]); } ;

          paramPath = ((options.path + "/") + "platformUpdateDomainCount");
          if (options.platformUpdateDomainCount) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.platformUpdateDomainCount));
            cli.output.verbose("================================================");
            if ((options.parse && options.platformUpdateDomainCount)) {
              options.platformUpdateDomainCount = JSON.parse(options.platformUpdateDomainCount); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.platformUpdateDomainCount },]); } ;

          paramPath = ((options.path + "/") + "platformFaultDomainCount");
          if (options.platformFaultDomainCount) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.platformFaultDomainCount));
            cli.output.verbose("================================================");
            if ((options.parse && options.platformFaultDomainCount)) {
              options.platformFaultDomainCount = JSON.parse(options.platformFaultDomainCount); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.platformFaultDomainCount },]); } ;

          paramPath = ((options.path + "/") + "virtualMachines");
          if (options.virtualMachines) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.virtualMachines));
            cli.output.verbose("================================================");
            if ((options.parse && options.virtualMachines)) {
              options.virtualMachines = JSON.parse(options.virtualMachines); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.virtualMachines },]); } ;

          paramPath = ((options.path + "/") + "statuses");
          if (options.statuses) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.statuses));
            cli.output.verbose("================================================");
            if ((options.parse && options.statuses)) {
              options.statuses = JSON.parse(options.statuses); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.statuses },]); } ;

          paramPath = ((options.path + "/") + "managed");
          if (options.managed) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.managed));
            cli.output.verbose("================================================");
            if ((options.parse && options.managed)) {
              options.managed = JSON.parse(options.managed); } ;

            options.managed = JSON.parse(options.managed);
            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.managed },]); } ;

          paramPath = ((options.path + "/") + "sku");
          if (options.sku) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.sku));
            cli.output.verbose("================================================");
            if ((options.parse && options.sku)) {
              options.sku = JSON.parse(options.sku); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.sku },]); } ;

          paramPath = ((options.path + "/") + "id");
          if (options.id) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.id));
            cli.output.verbose("================================================");
            if ((options.parse && options.id)) {
              options.id = JSON.parse(options.id); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.id },]); } ;

          paramPath = ((options.path + "/") + "name");
          if (options.name) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.name));
            cli.output.verbose("================================================");
            if ((options.parse && options.name)) {
              options.name = JSON.parse(options.name); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.name },]); } ;

          paramPath = ((options.path + "/") + "type");
          if (options.type) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.type));
            cli.output.verbose("================================================");
            if ((options.parse && options.type)) {
              options.type = JSON.parse(options.type); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.type },]); } ;

          paramPath = ((options.path + "/") + "location");
          if (options.location) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.location));
            cli.output.verbose("================================================");
            if ((options.parse && options.location)) {
              options.location = JSON.parse(options.location); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.location },]); } ;

          paramPath = ((options.path + "/") + "tags");
          if (options.tags) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.tags));
            cli.output.verbose("================================================");
            if ((options.parse && options.tags)) {
              options.tags = JSON.parse(options.tags); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.tags },]); } ;

          updatedContent = JSON.stringify(parametersObj);
          cli.output.verbose("=====================================");
          cli.output.verbose("JSON object (updated):");
          cli.output.verbose(JSON.stringify(parametersObj));
          cli.output.verbose("=====================================");
          fs.writeFileSync(options.parameterFile, beautify(updatedContent));
          cli.output.verbose("=====================================");
          cli.output.verbose(("Parameter file updated at: " + options.parameterFile));
          cli.output.verbose("====================================="); _(); }); }, true)); }); });



  var catparametersCreateOrUpdateAvailabilitySetsAvailabilitySet1 = cli.category("availset");
  var parametersCreateOrUpdateAvailabilitySetsAvailabilitySet1 = catparametersCreateOrUpdateAvailabilitySetsAvailabilitySet1.category("config").description($("Commands to manage configuration of availability-sets in the parameter file."));

  var deleteparametersCreateOrUpdateAvailabilitySetsAvailabilitySet1 = parametersCreateOrUpdateAvailabilitySetsAvailabilitySet1.category("availability-set").description($("Commands to configure availability-set of availset in config file."));

  deleteparametersCreateOrUpdateAvailabilitySetsAvailabilitySet1.command("delete").description($("Remove availability-set in config string or files, e.g. \r\n{\r\n  \"platformUpdateDomainCount\":null,\r\n  \"platformFaultDomainCount\":null,\r\n  \"virtualMachines\":[\r\n    {\r\n      \"id\":\"\"\r\n    }\r\n  ],\r\n  \"statuses\":[\r\n    {\r\n      \"code\":\"\",\r\n      \"level\":null,\r\n      \"displayStatus\":\"\",\r\n      \"message\":\"\",\r\n      \"time\":null\r\n    }\r\n  ],\r\n  \"managed\":null,\r\n  \"sku\":{\r\n    \"name\":\"\",\r\n    \"tier\":\"\",\r\n    \"capacity\":null\r\n  },\r\n  \"id\":null,\r\n  \"name\":null,\r\n  \"type\":null,\r\n  \"location\":\"\",\r\n  \"tags\":{\r\n  }\r\n}\r\n         There are two sets of commands:\r\n           1) function commands that are used to manage Azure resources in the cloud, and \r\n           2) parameter commands that generate & edit input files for the other set of commands.\r\n         For example, 'vmss show/list/stop' are the function commands that call get, list and stop operations of \r\n         virtual machine scale set, whereas 'vmss config * generate/create/set/delete/add' commands \r\n         are used to configure the input parameter file. The 'vmss config' command takes a parameter \r\n         file as for the VM scale set configuration, and creates it online.")).usage("[options]").option("--parameter-file <parameter-file>", $("The parameter file path.")).option("--platform-update-domain-count", $("Remove the platform-update-domain-count value.")).option("--platform-fault-domain-count", $("Remove the platform-fault-domain-count value.")).option("--virtual-machines", $("Remove the virtual-machines value.")).option("--statuses", $("Remove the statuses value.")).option("--managed", $("Remove the managed value.")).option("--sku", $("Remove the sku value.")).option("--id", $("Remove the id value.")).option("--name", $("Remove the name value.")).option("--type", $("Remove the type value.")).option("--location", $("Remove the location value.")).option("--tags", $("Remove the tags value.")).execute(function __5(options, _) { var fileContent, parametersObj, anySubItem, subItemPath, updatedContent; var __frame = { name: "__5", line: 464 }; return __func(_, this, arguments, __5, 1, __frame, function __$__5() {















      return cli.output.verbose(JSON.stringify(options), __cb(_, __frame, 1, 15, function __$__5() { return (function __$__5(__then) {
          if (!options.parameterFile) {
            return cli.interaction.promptIfNotGiven($("parameter-file : "), options.parameterFile, __cb(_, __frame, 3, 46, function ___(__0, __1) { options.parameterFile = __1; __then(); }, true)); } else { __then(); } ; })(function __$__5() {


          cli.output.verbose("=====================================");
          cli.output.verbose((("Reading file content from: \"" + options.parameterFile) + "\""));
          cli.output.verbose("=====================================");
          fileContent = fs.readFileSync(options.parameterFile, "utf8");
          parametersObj = JSON.parse(fileContent);
          cli.output.verbose("JSON object:");
          cli.output.verbose(JSON.stringify(parametersObj));
          options.operation = "remove";
          options.path = "";
          anySubItem = (((((((((((false || options.platformUpdateDomainCount) || options.platformFaultDomainCount) || options.virtualMachines) || options.statuses) || options.managed) || options.sku) || options.id) || options.name) || options.type) || options.location) || options.tags);
          if (anySubItem) {
            subItemPath = null;
            if (options.platformUpdateDomainCount) {
              subItemPath = (options.path + "/platformUpdateDomainCount");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.platformFaultDomainCount) {
              subItemPath = (options.path + "/platformFaultDomainCount");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.virtualMachines) {
              subItemPath = (options.path + "/virtualMachines");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.statuses) {
              subItemPath = (options.path + "/statuses");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.managed) {
              subItemPath = (options.path + "/managed");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.sku) {
              subItemPath = (options.path + "/sku");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.id) {
              subItemPath = (options.path + "/id");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.name) {
              subItemPath = (options.path + "/name");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.type) {
              subItemPath = (options.path + "/type");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.location) {
              subItemPath = (options.path + "/location");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.tags) {
              subItemPath = (options.path + "/tags");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ; }


           else {
            jsonpatch.apply(parametersObj, [{ op: options.operation, path: options.path },]); } ;


          updatedContent = JSON.stringify(parametersObj);
          cli.output.verbose("=====================================");
          cli.output.verbose("JSON object (updated):");
          cli.output.verbose(JSON.stringify(parametersObj));
          cli.output.verbose("=====================================");
          fs.writeFileSync(options.parameterFile, beautify(updatedContent));
          cli.output.verbose("=====================================");
          cli.output.verbose(("Parameter file updated at: " + options.parameterFile));
          cli.output.verbose("====================================="); _(); }); }, true)); }); });


  var catparametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM = cli.category("availset");
  var parametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM = catparametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM.category("config").description($("Commands to manage configuration of availability-sets in the parameter file."));

  var setparametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM = parametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM.category("virtual-machines").description($("Commands to configure virtual-machines of availset in config file."));

  setparametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM.command("set").description($("Set virtual-machines in config string or files, e.g. \r\n         {\r\n           ...\r\n           \"virtualMachines\" : {\r\n             \"id\":\"\"\r\n           }\r\n           ...\r\n         }\r\n\r\n         There are two sets of commands:\r\n           1) function commands that are used to manage Azure resources in the cloud, and \r\n           2) parameter commands that generate & edit input files for the other set of commands.\r\n         For example, 'vmss show/list/stop' are the function commands that call get, list and stop operations of \r\n         virtual machine scale set, whereas 'vmss config * generate/create/set/delete/add' commands \r\n         are used to configure the input parameter file. The 'vmss config' command takes a parameter \r\n         file as for the VM scale set configuration, and creates it online.")).usage("[options]").option("--parameter-file <parameter-file>", $("The parameter file path.")).option("--index <index>", $("Indexer: index.")).option("--value <value>", $("The input string value for the indexed item.")).option("--parse", $("Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).")).option("--id <id>", $("Set the id value.")).execute(function __6(options, _) { var fileContent, parametersObj, error, paramPath, updatedContent; var __frame = { name: "__6", line: 555 }; return __func(_, this, arguments, __6, 1, __frame, function __$__6() {








      return cli.output.verbose(JSON.stringify(options), __cb(_, __frame, 1, 15, function __$__6() { return (function __$__6(__then) {
          if (!options.parameterFile) {
            return cli.interaction.promptIfNotGiven($("parameter-file : "), options.parameterFile, __cb(_, __frame, 3, 46, function ___(__0, __1) { options.parameterFile = __1; __then(); }, true)); } else { __then(); } ; })(function __$__6() {


          cli.output.verbose("=====================================");
          cli.output.verbose((("Reading file content from: \"" + options.parameterFile) + "\""));
          cli.output.verbose("=====================================");
          fileContent = fs.readFileSync(options.parameterFile, "utf8");
          parametersObj = JSON.parse(fileContent);
          cli.output.verbose("JSON object:");
          cli.output.verbose(JSON.stringify(parametersObj));
          options.operation = "replace";
          options.path = ("/virtualMachines" + ((options.index ? (("/" + options.index)) : "")));
          error = jsonpatch.validate([{ op: "remove", path: options.path },], parametersObj);
          if ((typeof error !== "undefined")) {
            jsonpatch.apply(parametersObj, [{ op: "add", path: options.path, value: { } },]); } ;

          if (options.value) {
            cli.output.verbose(options.value);
            jsonpatch.apply(parametersObj, [{ op: options.operation, path: options.path, value: options.value },]); } ;

          paramPath = ((options.path + "/") + "id");
          if (options.id) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.id));
            cli.output.verbose("================================================");
            if ((options.parse && options.id)) {
              options.id = JSON.parse(options.id); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.id },]); } ;

          updatedContent = JSON.stringify(parametersObj);
          cli.output.verbose("=====================================");
          cli.output.verbose("JSON object (updated):");
          cli.output.verbose(JSON.stringify(parametersObj));
          cli.output.verbose("=====================================");
          fs.writeFileSync(options.parameterFile, beautify(updatedContent));
          cli.output.verbose("=====================================");
          cli.output.verbose(("Parameter file updated at: " + options.parameterFile));
          cli.output.verbose("====================================="); _(); }); }, true)); }); });



  var catparametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM = cli.category("availset");
  var parametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM = catparametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM.category("config").description($("Commands to manage configuration of availability-sets in the parameter file."));

  var deleteparametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM = parametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM.category("virtual-machines").description($("Commands to configure virtual-machines of availset in config file."));

  deleteparametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM.command("delete").description($("Remove virtual-machines in config string or files, e.g. \r\n         {\r\n           ...\r\n           \"virtualMachines\" : {\r\n             \"id\":\"\"\r\n           }\r\n           ...\r\n         }\r\n\r\n         There are two sets of commands:\r\n           1) function commands that are used to manage Azure resources in the cloud, and \r\n           2) parameter commands that generate & edit input files for the other set of commands.\r\n         For example, 'vmss show/list/stop' are the function commands that call get, list and stop operations of \r\n         virtual machine scale set, whereas 'vmss config * generate/create/set/delete/add' commands \r\n         are used to configure the input parameter file. The 'vmss config' command takes a parameter \r\n         file as for the VM scale set configuration, and creates it online.")).usage("[options]").option("--parameter-file <parameter-file>", $("The parameter file path.")).option("--index <index>", $("Indexer: index.")).option("--id", $("Remove the id value.")).execute(function __7(options, _) { var fileContent, parametersObj, anySubItem, subItemPath, updatedContent; var __frame = { name: "__7", line: 612 }; return __func(_, this, arguments, __7, 1, __frame, function __$__7() {






      return cli.output.verbose(JSON.stringify(options), __cb(_, __frame, 1, 15, function __$__7() { return (function __$__7(__then) {
          if (!options.parameterFile) {
            return cli.interaction.promptIfNotGiven($("parameter-file : "), options.parameterFile, __cb(_, __frame, 3, 46, function ___(__0, __1) { options.parameterFile = __1; __then(); }, true)); } else { __then(); } ; })(function __$__7() {


          cli.output.verbose("=====================================");
          cli.output.verbose((("Reading file content from: \"" + options.parameterFile) + "\""));
          cli.output.verbose("=====================================");
          fileContent = fs.readFileSync(options.parameterFile, "utf8");
          parametersObj = JSON.parse(fileContent);
          cli.output.verbose("JSON object:");
          cli.output.verbose(JSON.stringify(parametersObj));
          options.operation = "remove";
          options.path = ("/virtualMachines" + ((options.index ? (("/" + options.index)) : "")));
          anySubItem = (false || options.id);
          if (anySubItem) {
            subItemPath = null;
            if (options.id) {
              subItemPath = (options.path + "/id");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ; }


           else {
            jsonpatch.apply(parametersObj, [{ op: options.operation, path: options.path },]); } ;


          updatedContent = JSON.stringify(parametersObj);
          cli.output.verbose("=====================================");
          cli.output.verbose("JSON object (updated):");
          cli.output.verbose(JSON.stringify(parametersObj));
          cli.output.verbose("=====================================");
          fs.writeFileSync(options.parameterFile, beautify(updatedContent));
          cli.output.verbose("=====================================");
          cli.output.verbose(("Parameter file updated at: " + options.parameterFile));
          cli.output.verbose("====================================="); _(); }); }, true)); }); });


  var catparametersCreateOrUpdateAvailabilitySetsStatuses0S = cli.category("availset");
  var parametersCreateOrUpdateAvailabilitySetsStatuses0S = catparametersCreateOrUpdateAvailabilitySetsStatuses0S.category("config").description($("Commands to manage configuration of availability-sets in the parameter file."));

  var setparametersCreateOrUpdateAvailabilitySetsStatuses0S = parametersCreateOrUpdateAvailabilitySetsStatuses0S.category("statuses").description($("Commands to configure statuses of availset in config file."));

  setparametersCreateOrUpdateAvailabilitySetsStatuses0S.command("set").description($("Set statuses in config string or files, e.g. \r\n         {\r\n           ...\r\n           \"statuses\" : {\r\n             \"code\":\"\",\r\n             \"level\":null,\r\n             \"displayStatus\":\"\",\r\n             \"message\":\"\",\r\n             \"time\":null\r\n           }\r\n           ...\r\n         }\r\n\r\n         There are two sets of commands:\r\n           1) function commands that are used to manage Azure resources in the cloud, and \r\n           2) parameter commands that generate & edit input files for the other set of commands.\r\n         For example, 'vmss show/list/stop' are the function commands that call get, list and stop operations of \r\n         virtual machine scale set, whereas 'vmss config * generate/create/set/delete/add' commands \r\n         are used to configure the input parameter file. The 'vmss config' command takes a parameter \r\n         file as for the VM scale set configuration, and creates it online.")).usage("[options]").option("--parameter-file <parameter-file>", $("The parameter file path.")).option("--index <index>", $("Indexer: index.")).option("--value <value>", $("The input string value for the indexed item.")).option("--parse", $("Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).")).option("--code <code>", $("Set the code value.")).option("--level <level>", $("Set the level value.")).option("--display-status <displayStatus>", $("Set the display-status value.")).option("--message <message>", $("Set the message value.")).option("--time <time>", $("Set the time value.")).execute(function __8(options, _) { var fileContent, parametersObj, error, paramPath, updatedContent; var __frame = { name: "__8", line: 667 }; return __func(_, this, arguments, __8, 1, __frame, function __$__8() {












      return cli.output.verbose(JSON.stringify(options), __cb(_, __frame, 1, 15, function __$__8() { return (function __$__8(__then) {
          if (!options.parameterFile) {
            return cli.interaction.promptIfNotGiven($("parameter-file : "), options.parameterFile, __cb(_, __frame, 3, 46, function ___(__0, __1) { options.parameterFile = __1; __then(); }, true)); } else { __then(); } ; })(function __$__8() {


          cli.output.verbose("=====================================");
          cli.output.verbose((("Reading file content from: \"" + options.parameterFile) + "\""));
          cli.output.verbose("=====================================");
          fileContent = fs.readFileSync(options.parameterFile, "utf8");
          parametersObj = JSON.parse(fileContent);
          cli.output.verbose("JSON object:");
          cli.output.verbose(JSON.stringify(parametersObj));
          options.operation = "replace";
          options.path = ("/statuses" + ((options.index ? (("/" + options.index)) : "")));
          error = jsonpatch.validate([{ op: "remove", path: options.path },], parametersObj);
          if ((typeof error !== "undefined")) {
            jsonpatch.apply(parametersObj, [{ op: "add", path: options.path, value: { } },]); } ;

          if (options.value) {
            cli.output.verbose(options.value);
            jsonpatch.apply(parametersObj, [{ op: options.operation, path: options.path, value: options.value },]); } ;

          paramPath = ((options.path + "/") + "code");
          if (options.code) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.code));
            cli.output.verbose("================================================");
            if ((options.parse && options.code)) {
              options.code = JSON.parse(options.code); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.code },]); } ;

          paramPath = ((options.path + "/") + "level");
          if (options.level) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.level));
            cli.output.verbose("================================================");
            if ((options.parse && options.level)) {
              options.level = JSON.parse(options.level); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.level },]); } ;

          paramPath = ((options.path + "/") + "displayStatus");
          if (options.displayStatus) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.displayStatus));
            cli.output.verbose("================================================");
            if ((options.parse && options.displayStatus)) {
              options.displayStatus = JSON.parse(options.displayStatus); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.displayStatus },]); } ;

          paramPath = ((options.path + "/") + "message");
          if (options.message) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.message));
            cli.output.verbose("================================================");
            if ((options.parse && options.message)) {
              options.message = JSON.parse(options.message); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.message },]); } ;

          paramPath = ((options.path + "/") + "time");
          if (options.time) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.time));
            cli.output.verbose("================================================");
            if ((options.parse && options.time)) {
              options.time = JSON.parse(options.time); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.time },]); } ;

          updatedContent = JSON.stringify(parametersObj);
          cli.output.verbose("=====================================");
          cli.output.verbose("JSON object (updated):");
          cli.output.verbose(JSON.stringify(parametersObj));
          cli.output.verbose("=====================================");
          fs.writeFileSync(options.parameterFile, beautify(updatedContent));
          cli.output.verbose("=====================================");
          cli.output.verbose(("Parameter file updated at: " + options.parameterFile));
          cli.output.verbose("====================================="); _(); }); }, true)); }); });



  var catparametersCreateOrUpdateAvailabilitySetsStatuses1S = cli.category("availset");
  var parametersCreateOrUpdateAvailabilitySetsStatuses1S = catparametersCreateOrUpdateAvailabilitySetsStatuses1S.category("config").description($("Commands to manage configuration of availability-sets in the parameter file."));

  var deleteparametersCreateOrUpdateAvailabilitySetsStatuses1S = parametersCreateOrUpdateAvailabilitySetsStatuses1S.category("statuses").description($("Commands to configure statuses of availset in config file."));

  deleteparametersCreateOrUpdateAvailabilitySetsStatuses1S.command("delete").description($("Remove statuses in config string or files, e.g. \r\n         {\r\n           ...\r\n           \"statuses\" : {\r\n             \"code\":\"\",\r\n             \"level\":null,\r\n             \"displayStatus\":\"\",\r\n             \"message\":\"\",\r\n             \"time\":null\r\n           }\r\n           ...\r\n         }\r\n\r\n         There are two sets of commands:\r\n           1) function commands that are used to manage Azure resources in the cloud, and \r\n           2) parameter commands that generate & edit input files for the other set of commands.\r\n         For example, 'vmss show/list/stop' are the function commands that call get, list and stop operations of \r\n         virtual machine scale set, whereas 'vmss config * generate/create/set/delete/add' commands \r\n         are used to configure the input parameter file. The 'vmss config' command takes a parameter \r\n         file as for the VM scale set configuration, and creates it online.")).usage("[options]").option("--parameter-file <parameter-file>", $("The parameter file path.")).option("--index <index>", $("Indexer: index.")).option("--code", $("Remove the code value.")).option("--level", $("Remove the level value.")).option("--display-status", $("Remove the display-status value.")).option("--message", $("Remove the message value.")).option("--time", $("Remove the time value.")).execute(function __9(options, _) { var fileContent, parametersObj, anySubItem, subItemPath, updatedContent; var __frame = { name: "__9", line: 772 }; return __func(_, this, arguments, __9, 1, __frame, function __$__9() {










      return cli.output.verbose(JSON.stringify(options), __cb(_, __frame, 1, 15, function __$__9() { return (function __$__9(__then) {
          if (!options.parameterFile) {
            return cli.interaction.promptIfNotGiven($("parameter-file : "), options.parameterFile, __cb(_, __frame, 3, 46, function ___(__0, __1) { options.parameterFile = __1; __then(); }, true)); } else { __then(); } ; })(function __$__9() {


          cli.output.verbose("=====================================");
          cli.output.verbose((("Reading file content from: \"" + options.parameterFile) + "\""));
          cli.output.verbose("=====================================");
          fileContent = fs.readFileSync(options.parameterFile, "utf8");
          parametersObj = JSON.parse(fileContent);
          cli.output.verbose("JSON object:");
          cli.output.verbose(JSON.stringify(parametersObj));
          options.operation = "remove";
          options.path = ("/statuses" + ((options.index ? (("/" + options.index)) : "")));
          anySubItem = (((((false || options.code) || options.level) || options.displayStatus) || options.message) || options.time);
          if (anySubItem) {
            subItemPath = null;
            if (options.code) {
              subItemPath = (options.path + "/code");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.level) {
              subItemPath = (options.path + "/level");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.displayStatus) {
              subItemPath = (options.path + "/displayStatus");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.message) {
              subItemPath = (options.path + "/message");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.time) {
              subItemPath = (options.path + "/time");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ; }


           else {
            jsonpatch.apply(parametersObj, [{ op: options.operation, path: options.path },]); } ;


          updatedContent = JSON.stringify(parametersObj);
          cli.output.verbose("=====================================");
          cli.output.verbose("JSON object (updated):");
          cli.output.verbose(JSON.stringify(parametersObj));
          cli.output.verbose("=====================================");
          fs.writeFileSync(options.parameterFile, beautify(updatedContent));
          cli.output.verbose("=====================================");
          cli.output.verbose(("Parameter file updated at: " + options.parameterFile));
          cli.output.verbose("====================================="); _(); }); }, true)); }); });


  var catparametersCreateOrUpdateAvailabilitySetsSku0S = cli.category("availset");
  var parametersCreateOrUpdateAvailabilitySetsSku0S = catparametersCreateOrUpdateAvailabilitySetsSku0S.category("config").description($("Commands to manage configuration of availability-sets in the parameter file."));

  var setparametersCreateOrUpdateAvailabilitySetsSku0S = parametersCreateOrUpdateAvailabilitySetsSku0S.category("sku").description($("Commands to configure sku of availset in config file."));

  setparametersCreateOrUpdateAvailabilitySetsSku0S.command("set").description($("Set sku in config string or files, e.g. \r\n         {\r\n           ...\r\n           \"sku\" : {\r\n             \"name\":\"\",\r\n             \"tier\":\"\",\r\n             \"capacity\":null\r\n           }\r\n           ...\r\n         }\r\n\r\n         There are two sets of commands:\r\n           1) function commands that are used to manage Azure resources in the cloud, and \r\n           2) parameter commands that generate & edit input files for the other set of commands.\r\n         For example, 'vmss show/list/stop' are the function commands that call get, list and stop operations of \r\n         virtual machine scale set, whereas 'vmss config * generate/create/set/delete/add' commands \r\n         are used to configure the input parameter file. The 'vmss config' command takes a parameter \r\n         file as for the VM scale set configuration, and creates it online.")).usage("[options]").option("--parameter-file <parameter-file>", $("The parameter file path.")).option("--parse", $("Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).")).option("--name <name>", $("Set the name value.")).option("--tier <tier>", $("Set the tier value.")).option("--capacity <capacity>", $("Set the capacity value.")).execute(function __10(options, _) { var fileContent, parametersObj, error, paramPath, updatedContent; var __frame = { name: "__10", line: 839 }; return __func(_, this, arguments, __10, 1, __frame, function __$__10() {








      return cli.output.verbose(JSON.stringify(options), __cb(_, __frame, 1, 15, function __$__10() { return (function __$__10(__then) {
          if (!options.parameterFile) {
            return cli.interaction.promptIfNotGiven($("parameter-file : "), options.parameterFile, __cb(_, __frame, 3, 46, function ___(__0, __1) { options.parameterFile = __1; __then(); }, true)); } else { __then(); } ; })(function __$__10() {


          cli.output.verbose("=====================================");
          cli.output.verbose((("Reading file content from: \"" + options.parameterFile) + "\""));
          cli.output.verbose("=====================================");
          fileContent = fs.readFileSync(options.parameterFile, "utf8");
          parametersObj = JSON.parse(fileContent);
          cli.output.verbose("JSON object:");
          cli.output.verbose(JSON.stringify(parametersObj));
          options.operation = "replace";
          options.path = "/sku";
          error = jsonpatch.validate([{ op: "remove", path: options.path },], parametersObj);
          if ((typeof error !== "undefined")) {
            jsonpatch.apply(parametersObj, [{ op: "add", path: options.path, value: { } },]); } ;

          paramPath = ((options.path + "/") + "name");
          if (options.name) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.name));
            cli.output.verbose("================================================");
            if ((options.parse && options.name)) {
              options.name = JSON.parse(options.name); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.name },]); } ;

          paramPath = ((options.path + "/") + "tier");
          if (options.tier) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.tier));
            cli.output.verbose("================================================");
            if ((options.parse && options.tier)) {
              options.tier = JSON.parse(options.tier); } ;

            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.tier },]); } ;

          paramPath = ((options.path + "/") + "capacity");
          if (options.capacity) {
            cli.output.verbose("================================================");
            cli.output.verbose(("Path  : " + paramPath));
            cli.output.verbose(("Value : " + options.capacity));
            cli.output.verbose("================================================");
            if ((options.parse && options.capacity)) {
              options.capacity = JSON.parse(options.capacity); } ;

            options.capacity = JSON.parse(options.capacity);
            jsonpatch.apply(parametersObj, [{ op: options.operation, path: paramPath, value: options.capacity },]); } ;

          updatedContent = JSON.stringify(parametersObj);
          cli.output.verbose("=====================================");
          cli.output.verbose("JSON object (updated):");
          cli.output.verbose(JSON.stringify(parametersObj));
          cli.output.verbose("=====================================");
          fs.writeFileSync(options.parameterFile, beautify(updatedContent));
          cli.output.verbose("=====================================");
          cli.output.verbose(("Parameter file updated at: " + options.parameterFile));
          cli.output.verbose("====================================="); _(); }); }, true)); }); });



  var catparametersCreateOrUpdateAvailabilitySetsSku1S = cli.category("availset");
  var parametersCreateOrUpdateAvailabilitySetsSku1S = catparametersCreateOrUpdateAvailabilitySetsSku1S.category("config").description($("Commands to manage configuration of availability-sets in the parameter file."));

  var deleteparametersCreateOrUpdateAvailabilitySetsSku1S = parametersCreateOrUpdateAvailabilitySetsSku1S.category("sku").description($("Commands to configure sku of availset in config file."));

  deleteparametersCreateOrUpdateAvailabilitySetsSku1S.command("delete").description($("Remove sku in config string or files, e.g. \r\n         {\r\n           ...\r\n           \"sku\" : {\r\n             \"name\":\"\",\r\n             \"tier\":\"\",\r\n             \"capacity\":null\r\n           }\r\n           ...\r\n         }\r\n\r\n         There are two sets of commands:\r\n           1) function commands that are used to manage Azure resources in the cloud, and \r\n           2) parameter commands that generate & edit input files for the other set of commands.\r\n         For example, 'vmss show/list/stop' are the function commands that call get, list and stop operations of \r\n         virtual machine scale set, whereas 'vmss config * generate/create/set/delete/add' commands \r\n         are used to configure the input parameter file. The 'vmss config' command takes a parameter \r\n         file as for the VM scale set configuration, and creates it online.")).usage("[options]").option("--parameter-file <parameter-file>", $("The parameter file path.")).option("--name", $("Remove the name value.")).option("--tier", $("Remove the tier value.")).option("--capacity", $("Remove the capacity value.")).execute(function __11(options, _) { var fileContent, parametersObj, anySubItem, subItemPath, updatedContent; var __frame = { name: "__11", line: 916 }; return __func(_, this, arguments, __11, 1, __frame, function __$__11() {







      return cli.output.verbose(JSON.stringify(options), __cb(_, __frame, 1, 15, function __$__11() { return (function __$__11(__then) {
          if (!options.parameterFile) {
            return cli.interaction.promptIfNotGiven($("parameter-file : "), options.parameterFile, __cb(_, __frame, 3, 46, function ___(__0, __1) { options.parameterFile = __1; __then(); }, true)); } else { __then(); } ; })(function __$__11() {


          cli.output.verbose("=====================================");
          cli.output.verbose((("Reading file content from: \"" + options.parameterFile) + "\""));
          cli.output.verbose("=====================================");
          fileContent = fs.readFileSync(options.parameterFile, "utf8");
          parametersObj = JSON.parse(fileContent);
          cli.output.verbose("JSON object:");
          cli.output.verbose(JSON.stringify(parametersObj));
          options.operation = "remove";
          options.path = "/sku";
          anySubItem = (((false || options.name) || options.tier) || options.capacity);
          if (anySubItem) {
            subItemPath = null;
            if (options.name) {
              subItemPath = (options.path + "/name");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.tier) {
              subItemPath = (options.path + "/tier");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ;

            if (options.capacity) {
              subItemPath = (options.path + "/capacity");
              jsonpatch.apply(parametersObj, [{ op: options.operation, path: subItemPath },]); } ; }


           else {
            jsonpatch.apply(parametersObj, [{ op: options.operation, path: options.path },]); } ;


          updatedContent = JSON.stringify(parametersObj);
          cli.output.verbose("=====================================");
          cli.output.verbose("JSON object (updated):");
          cli.output.verbose(JSON.stringify(parametersObj));
          cli.output.verbose("=====================================");
          fs.writeFileSync(options.parameterFile, beautify(updatedContent));
          cli.output.verbose("=====================================");
          cli.output.verbose(("Parameter file updated at: " + options.parameterFile));
          cli.output.verbose("====================================="); _(); }); }, true)); }); });







  var availabilitySetsListAvailableSizes = cli.category("availset").description($("Commands to manage your availability sets.  "));

  availabilitySetsListAvailableSizes.command("list-available-sizes [resource-group] [name]").description($("Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set.")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("resource-group")).option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __12(resourceGroup, name, options, _) { var subscription, computeManagementClient, result; var __frame = { name: "__12", line: 975 }; return __func(_, this, arguments, __12, 3, __frame, function __$__12() { return (function __$__12(__then) {






        if (!resourceGroup) {
          return cli.interaction.promptIfNotGiven($("resource-group : "), resourceGroup, __cb(_, __frame, 2, 38, function ___(__0, __1) { resourceGroup = __1; __then(); }, true)); } else { __then(); } ; })(function __$__12() {


        cli.output.verbose(("resourceGroup = " + resourceGroup)); return (function __$__12(__then) {
          if (!name) {
            return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 7, 29, function ___(__0, __2) { name = __2; __then(); }, true)); } else { __then(); } ; })(function __$__12() {


          cli.output.verbose(("name = " + name));
          subscription = profile.current.getSubscription(options.subscription);
          computeManagementClient = utils.createComputeManagementClient(subscription);
          return computeManagementClient.availabilitySets.listAvailableSizes(resourceGroup, name, __cb(_, __frame, 13, 58, function ___(__0, __3) { result = __3;
            if (result) {
              cli.output.json(result); } ; _(); }, true)); }); }); }); });};
