/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 * 
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

var models = require('./index');

var util = require('util');

/**
 * @class
 * Initializes a new instance of the VirtualMachineScaleSet class.
 * @constructor
 * Describes a Virtual Machine Scale Set.
 * @member {object} [sku] the virtual machine scale set sku.
 * 
 * @member {string} [sku.name] the sku name.
 * 
 * @member {string} [sku.tier] the sku tier.
 * 
 * @member {number} [sku.capacity] the sku capacity.
 * 
 * @member {object} [upgradePolicy] the upgrade policy.
 * 
 * @member {string} [upgradePolicy.mode] the upgrade mode. Possible values
 * include: 'Automatic', 'Manual'
 * 
 * @member {object} [virtualMachineProfile] the virtual machine profile.
 * 
 * @member {object} [virtualMachineProfile.osProfile] the virtual machine
 * scale set OS profile.
 * 
 * @member {string} [virtualMachineProfile.osProfile.computerNamePrefix] the
 * computer name prefix.
 * 
 * @member {string} [virtualMachineProfile.osProfile.adminUsername] the admin
 * user name.
 * 
 * @member {string} [virtualMachineProfile.osProfile.adminPassword] the admin
 * user password.
 * 
 * @member {string} [virtualMachineProfile.osProfile.customData] a base-64
 * encoded string of custom data.
 * 
 * @member {object} [virtualMachineProfile.osProfile.windowsConfiguration] the
 * Windows Configuration of the OS profile.
 * 
 * @member {boolean}
 * [virtualMachineProfile.osProfile.windowsConfiguration.provisionVMAgent]
 * whether VM Agent should be provisioned on the Virtual Machine.
 * 
 * @member {boolean}
 * [virtualMachineProfile.osProfile.windowsConfiguration.enableAutomaticUpdates]
 * whether Windows updates are automatically installed on the VM
 * 
 * @member {string}
 * [virtualMachineProfile.osProfile.windowsConfiguration.timeZone] the Time
 * Zone of the VM
 * 
 * @member {array}
 * [virtualMachineProfile.osProfile.windowsConfiguration.additionalUnattendContent]
 * the additional base-64 encoded XML formatted information that can be
 * included in the Unattend.xml file.
 * 
 * @member {object}
 * [virtualMachineProfile.osProfile.windowsConfiguration.winRM] the Windows
 * Remote Management configuration of the VM
 * 
 * @member {array}
 * [virtualMachineProfile.osProfile.windowsConfiguration.winRM.listeners] the
 * list of Windows Remote Management listeners
 * 
 * @member {object} [virtualMachineProfile.osProfile.linuxConfiguration] the
 * Linux Configuration of the OS profile.
 * 
 * @member {boolean}
 * [virtualMachineProfile.osProfile.linuxConfiguration.disablePasswordAuthentication]
 * whether Authentication using user name and password is allowed or not
 * 
 * @member {object} [virtualMachineProfile.osProfile.linuxConfiguration.ssh]
 * the SSH configuration for linux VMs
 * 
 * @member {array}
 * [virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] the
 * list of SSH public keys used to authenticate with linux based VMs
 * 
 * @member {array} [virtualMachineProfile.osProfile.secrets] the List of
 * certificates for addition to the VM.
 * 
 * @member {object} [virtualMachineProfile.storageProfile] the virtual machine
 * scale set storage profile.
 * 
 * @member {object} [virtualMachineProfile.storageProfile.imageReference] the
 * image reference.
 * 
 * @member {string}
 * [virtualMachineProfile.storageProfile.imageReference.publisher] the image
 * publisher.
 * 
 * @member {string}
 * [virtualMachineProfile.storageProfile.imageReference.offer] the image
 * offer.
 * 
 * @member {string} [virtualMachineProfile.storageProfile.imageReference.sku]
 * the image sku.
 * 
 * @member {string}
 * [virtualMachineProfile.storageProfile.imageReference.version] the image
 * version. The allowed formats are Major.Minor.Build or 'latest'. Major,
 * Minor and Build being decimal numbers. Specify 'latest' to use the latest
 * version of image.
 * 
 * @member {object} [virtualMachineProfile.storageProfile.osDisk] the OS disk.
 * 
 * @member {string} [virtualMachineProfile.storageProfile.osDisk.name] the
 * disk name.
 * 
 * @member {string} [virtualMachineProfile.storageProfile.osDisk.caching] the
 * caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
 * 
 * @member {string} [virtualMachineProfile.storageProfile.osDisk.createOption]
 * the create option. Possible values include: 'fromImage', 'empty', 'attach'
 * 
 * @member {string} [virtualMachineProfile.storageProfile.osDisk.osType] the
 * Operating System type. Possible values include: 'Windows', 'Linux'
 * 
 * @member {object} [virtualMachineProfile.storageProfile.osDisk.image] the
 * Source User Image VirtualHardDisk. This VirtualHardDisk will be copied
 * before using it to attach to the Virtual Machine.If SourceImage is
 * provided, the destination VirtualHardDisk should not exist.
 * 
 * @member {string} [virtualMachineProfile.storageProfile.osDisk.image.uri]
 * the virtual hard disk's uri. It should be a valid Uri to a virtual hard
 * disk.
 * 
 * @member {array} [virtualMachineProfile.storageProfile.osDisk.vhdContainers]
 * the list of virtual hard disk container uris.
 * 
 * @member {object} [virtualMachineProfile.networkProfile] the virtual machine
 * scale set network profile.
 * 
 * @member {array}
 * [virtualMachineProfile.networkProfile.networkInterfaceConfigurations] the
 * list of network configurations.
 * 
 * @member {object} [virtualMachineProfile.extensionProfile] the virtual
 * machine scale set extension profile.
 * 
 * @member {array} [virtualMachineProfile.extensionProfile.extensions] the
 * virtual machine scale set child extension resources.
 * 
 * @member {string} [provisioningState] the provisioning state, which only
 * appears in the response.
 * 
 * @member {boolean} [overProvision] Specifies whether the Virtual Machine
 * Scale Set should be overprovisioned.
 * 
 */
function VirtualMachineScaleSet() {
  VirtualMachineScaleSet['super_'].call(this);
}

util.inherits(VirtualMachineScaleSet, models['Resource']);

/**
 * Defines the metadata of VirtualMachineScaleSet
 *
 * @returns {object} metadata of VirtualMachineScaleSet
 *
 */
VirtualMachineScaleSet.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'VirtualMachineScaleSet',
    type: {
      name: 'Composite',
      className: 'VirtualMachineScaleSet',
      modelProperties: {
        id: {
          required: false,
          readOnly: true,
          serializedName: 'id',
          type: {
            name: 'String'
          }
        },
        name: {
          required: false,
          readOnly: true,
          serializedName: 'name',
          type: {
            name: 'String'
          }
        },
        type: {
          required: false,
          readOnly: true,
          serializedName: 'type',
          type: {
            name: 'String'
          }
        },
        location: {
          required: true,
          serializedName: 'location',
          type: {
            name: 'String'
          }
        },
        tags: {
          required: false,
          serializedName: 'tags',
          type: {
            name: 'Dictionary',
            value: {
                required: false,
                serializedName: 'StringElementType',
                type: {
                  name: 'String'
                }
            }
          }
        },
        sku: {
          required: false,
          serializedName: 'sku',
          type: {
            name: 'Composite',
            className: 'Sku'
          }
        },
        upgradePolicy: {
          required: false,
          serializedName: 'properties.upgradePolicy',
          type: {
            name: 'Composite',
            className: 'UpgradePolicy'
          }
        },
        virtualMachineProfile: {
          required: false,
          serializedName: 'properties.virtualMachineProfile',
          type: {
            name: 'Composite',
            className: 'VirtualMachineScaleSetVMProfile'
          }
        },
        provisioningState: {
          required: false,
          readOnly: true,
          serializedName: 'properties.provisioningState',
          type: {
            name: 'String'
          }
        },
        overProvision: {
          required: false,
          serializedName: 'properties.overProvision',
          type: {
            name: 'Boolean'
          }
        }
      }
    }
  };
};

module.exports = VirtualMachineScaleSet;
