/*
 * 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 VirtualMachineScaleSetVM class.
 * @constructor
 * Describes a virtual machine scale set virtual machine.
 * @member {string} [instanceId] the virtual machine instance id.
 * 
 * @member {object} [sku] the virtual machine sku.
 * 
 * @member {string} [sku.name] the sku name.
 * 
 * @member {string} [sku.tier] the sku tier.
 * 
 * @member {number} [sku.capacity] the sku capacity.
 * 
 * @member {boolean} [latestModelApplied] Specifies whether the latest model
 * has been applied to the virtual machine.
 * 
 * @member {object} [instanceView] the virtual machine instance view.
 * 
 * @member {number} [instanceView.platformUpdateDomain] the Update Domain
 * count.
 * 
 * @member {number} [instanceView.platformFaultDomain] the Fault Domain count.
 * 
 * @member {string} [instanceView.rdpThumbPrint] the Remote desktop
 * certificate thumbprint.
 * 
 * @member {object} [instanceView.vmAgent] the VM Agent running on the virtual
 * machine.
 * 
 * @member {string} [instanceView.vmAgent.vmAgentVersion] the VM Agent full
 * version.
 * 
 * @member {array} [instanceView.vmAgent.extensionHandlers] the virtual
 * machine extension handler instance view.
 * 
 * @member {array} [instanceView.vmAgent.statuses] the resource status
 * information.
 * 
 * @member {array} [instanceView.disks] the disks information.
 * 
 * @member {array} [instanceView.extensions] the extensions information.
 * 
 * @member {object} [instanceView.bootDiagnostics] the boot diagnostics.
 * 
 * @member {string} [instanceView.bootDiagnostics.consoleScreenshotBlobUri]
 * the console screenshot blob Uri.
 * 
 * @member {string} [instanceView.bootDiagnostics.serialConsoleLogBlobUri] the
 * Linux serial console log blob Uri.
 * 
 * @member {array} [instanceView.statuses] the resource status information.
 * 
 * @member {object} [hardwareProfile] the hardware profile.
 * 
 * @member {string} [hardwareProfile.vmSize] The virtual machine size name.
 * Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3',
 * 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3',
 * 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8',
 * 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1',
 * 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11',
 * 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2',
 * 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2',
 * 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2',
 * 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2',
 * 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12',
 * 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2',
 * 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2',
 * 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2',
 * 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_G1', 'Standard_G2',
 * 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1',
 * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5'
 * 
 * @member {object} [storageProfile] the storage profile.
 * 
 * @member {object} [storageProfile.imageReference] the image reference.
 * 
 * @member {string} [storageProfile.imageReference.publisher] the image
 * publisher.
 * 
 * @member {string} [storageProfile.imageReference.offer] the image offer.
 * 
 * @member {string} [storageProfile.imageReference.sku] the image sku.
 * 
 * @member {string} [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} [storageProfile.osDisk] the OS disk.
 * 
 * @member {string} [storageProfile.osDisk.osType] the Operating System type.
 * Possible values include: 'Windows', 'Linux'
 * 
 * @member {object} [storageProfile.osDisk.encryptionSettings] the disk
 * encryption settings.
 * 
 * @member {object}
 * [storageProfile.osDisk.encryptionSettings.diskEncryptionKey] the disk
 * encryption key which is a KeyVault Secret.
 * 
 * @member {string}
 * [storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl] the
 * URL referencing a secret in a Key Vault.
 * 
 * @member {object}
 * [storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault]
 * the Relative URL of the Key Vault containing the secret.
 * 
 * @member {string}
 * [storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault.id]
 * Resource Id
 * 
 * @member {object}
 * [storageProfile.osDisk.encryptionSettings.keyEncryptionKey] the key
 * encryption key which is KeyVault Key.
 * 
 * @member {string}
 * [storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl] the URL
 * referencing a key in a Key Vault.
 * 
 * @member {object}
 * [storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault]
 * the Relative URL of the Key Vault containing the key
 * 
 * @member {string}
 * [storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault.id]
 * Resource Id
 * 
 * @member {boolean} [storageProfile.osDisk.encryptionSettings.enabled]
 * whether disk encryption should be enabled on the Virtual Machine.
 * 
 * @member {string} [storageProfile.osDisk.name] the disk name.
 * 
 * @member {object} [storageProfile.osDisk.vhd] the Virtual Hard Disk.
 * 
 * @member {string} [storageProfile.osDisk.vhd.uri] the virtual hard disk's
 * uri. It should be a valid Uri to a virtual hard disk.
 * 
 * @member {object} [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} [storageProfile.osDisk.image.uri] the virtual hard disk's
 * uri. It should be a valid Uri to a virtual hard disk.
 * 
 * @member {string} [storageProfile.osDisk.caching] the caching type. Possible
 * values include: 'None', 'ReadOnly', 'ReadWrite'
 * 
 * @member {string} [storageProfile.osDisk.createOption] the create option.
 * Possible values include: 'fromImage', 'empty', 'attach'
 * 
 * @member {number} [storageProfile.osDisk.diskSizeGB] the initial disk size
 * in GB for blank data disks, and the new desired size for existing OS and
 * Data disks.
 * 
 * @member {array} [storageProfile.dataDisks] the data disks.
 * 
 * @member {object} [osProfile] the OS profile.
 * 
 * @member {string} [osProfile.computerName] the computer name.
 * 
 * @member {string} [osProfile.adminUsername] the admin user name.
 * 
 * @member {string} [osProfile.adminPassword] the admin user password.
 * 
 * @member {string} [osProfile.customData] a base-64 encoded string of custom
 * data.
 * 
 * @member {object} [osProfile.windowsConfiguration] the Windows Configuration
 * of the OS profile.
 * 
 * @member {boolean} [osProfile.windowsConfiguration.provisionVMAgent] whether
 * VM Agent should be provisioned on the Virtual Machine.
 * 
 * @member {boolean} [osProfile.windowsConfiguration.enableAutomaticUpdates]
 * whether Windows updates are automatically installed on the VM
 * 
 * @member {string} [osProfile.windowsConfiguration.timeZone] the Time Zone of
 * the VM
 * 
 * @member {array} [osProfile.windowsConfiguration.additionalUnattendContent]
 * the additional base-64 encoded XML formatted information that can be
 * included in the Unattend.xml file.
 * 
 * @member {object} [osProfile.windowsConfiguration.winRM] the Windows Remote
 * Management configuration of the VM
 * 
 * @member {array} [osProfile.windowsConfiguration.winRM.listeners] the list
 * of Windows Remote Management listeners
 * 
 * @member {object} [osProfile.linuxConfiguration] the Linux Configuration of
 * the OS profile.
 * 
 * @member {boolean}
 * [osProfile.linuxConfiguration.disablePasswordAuthentication] whether
 * Authentication using user name and password is allowed or not
 * 
 * @member {object} [osProfile.linuxConfiguration.ssh] the SSH configuration
 * for linux VMs
 * 
 * @member {array} [osProfile.linuxConfiguration.ssh.publicKeys] the list of
 * SSH public keys used to authenticate with linux based VMs
 * 
 * @member {array} [osProfile.secrets] the List of certificates for addition
 * to the VM.
 * 
 * @member {object} [networkProfile] the network profile.
 * 
 * @member {array} [networkProfile.networkInterfaces] the network interfaces.
 * 
 * @member {object} [diagnosticsProfile] the diagnostics profile.
 * 
 * @member {object} [diagnosticsProfile.bootDiagnostics] the boot diagnostics.
 * 
 * @member {boolean} [diagnosticsProfile.bootDiagnostics.enabled] whether boot
 * diagnostics should be enabled on the Virtual Machine.
 * 
 * @member {string} [diagnosticsProfile.bootDiagnostics.storageUri] the boot
 * diagnostics storage Uri. It should be a valid Uri
 * 
 * @member {object} [availabilitySet] the reference Id of the availability set
 * to which this virtual machine belongs.
 * 
 * @member {string} [availabilitySet.id] Resource Id
 * 
 * @member {string} [provisioningState] the provisioning state, which only
 * appears in the response.
 * 
 * @member {string} [licenseType] the license type, which is for bring your
 * own license scenario.
 * 
 * @member {object} [plan] the purchase plan when deploying virtual machine
 * from VM Marketplace images.
 * 
 * @member {string} [plan.name] the plan ID.
 * 
 * @member {string} [plan.publisher] the publisher ID.
 * 
 * @member {string} [plan.product] the offer ID.
 * 
 * @member {string} [plan.promotionCode] the promotion code.
 * 
 * @member {array} [resources] the virtual machine child extension resources.
 * 
 */
function VirtualMachineScaleSetVM() {
  VirtualMachineScaleSetVM['super_'].call(this);
}

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

/**
 * Defines the metadata of VirtualMachineScaleSetVM
 *
 * @returns {object} metadata of VirtualMachineScaleSetVM
 *
 */
VirtualMachineScaleSetVM.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'VirtualMachineScaleSetVM',
    type: {
      name: 'Composite',
      className: 'VirtualMachineScaleSetVM',
      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'
                }
            }
          }
        },
        instanceId: {
          required: false,
          readOnly: true,
          serializedName: 'instanceId',
          type: {
            name: 'String'
          }
        },
        sku: {
          required: false,
          readOnly: true,
          serializedName: 'sku',
          type: {
            name: 'Composite',
            className: 'Sku'
          }
        },
        latestModelApplied: {
          required: false,
          readOnly: true,
          serializedName: 'properties.latestModelApplied',
          type: {
            name: 'Boolean'
          }
        },
        instanceView: {
          required: false,
          readOnly: true,
          serializedName: 'properties.instanceView',
          type: {
            name: 'Composite',
            className: 'VirtualMachineInstanceView'
          }
        },
        hardwareProfile: {
          required: false,
          serializedName: 'properties.hardwareProfile',
          type: {
            name: 'Composite',
            className: 'HardwareProfile'
          }
        },
        storageProfile: {
          required: false,
          serializedName: 'properties.storageProfile',
          type: {
            name: 'Composite',
            className: 'StorageProfile'
          }
        },
        osProfile: {
          required: false,
          serializedName: 'properties.osProfile',
          type: {
            name: 'Composite',
            className: 'OSProfile'
          }
        },
        networkProfile: {
          required: false,
          serializedName: 'properties.networkProfile',
          type: {
            name: 'Composite',
            className: 'NetworkProfile'
          }
        },
        diagnosticsProfile: {
          required: false,
          serializedName: 'properties.diagnosticsProfile',
          type: {
            name: 'Composite',
            className: 'DiagnosticsProfile'
          }
        },
        availabilitySet: {
          required: false,
          serializedName: 'properties.availabilitySet',
          type: {
            name: 'Composite',
            className: 'SubResource'
          }
        },
        provisioningState: {
          required: false,
          readOnly: true,
          serializedName: 'properties.provisioningState',
          type: {
            name: 'String'
          }
        },
        licenseType: {
          required: false,
          serializedName: 'properties.licenseType',
          type: {
            name: 'String'
          }
        },
        plan: {
          required: false,
          serializedName: 'plan',
          type: {
            name: 'Composite',
            className: 'Plan'
          }
        },
        resources: {
          required: false,
          readOnly: true,
          serializedName: 'resources',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'VirtualMachineExtensionElementType',
                type: {
                  name: 'Composite',
                  className: 'VirtualMachineExtension'
                }
            }
          }
        }
      }
    }
  };
};

module.exports = VirtualMachineScaleSetVM;
