/*
 * 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';

/**
 * Describes a virtual machine scale set operating system disk.
 *
 */
class VirtualMachineScaleSetOSDisk {
  /**
   * Create a VirtualMachineScaleSetOSDisk.
   * @property {string} [name] The disk name.
   * @property {string} [caching] Specifies the caching requirements. <br><br>
   * Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br>
   * **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for
   * Premium storage**. Possible values include: 'None', 'ReadOnly',
   * 'ReadWrite'
   * @property {boolean} [writeAcceleratorEnabled] Specifies whether
   * writeAccelerator should be enabled or disabled on the disk.
   * @property {string} createOption Specifies how the virtual machines in the
   * scale set should be created.<br><br> The only allowed value is:
   * **FromImage** \u2013 This value is used when you are using an image to
   * create the virtual machine. If you are using a platform image, you also
   * use the imageReference element described above. If you are using a
   * marketplace image, you  also use the plan element previously described.
   * Possible values include: 'FromImage', 'Empty', 'Attach'
   * @property {object} [diffDiskSettings] Specifies the ephemeral disk
   * Settings for the operating system disk used by the virtual machine scale
   * set.
   * @property {string} [diffDiskSettings.option] Specifies the ephemeral disk
   * settings for operating system disk. Possible values include: 'Local'
   * @property {number} [diskSizeGB] Specifies the size of the operating system
   * disk in gigabytes. This element can be used to overwrite the size of the
   * disk in a virtual machine image. <br><br> This value cannot be larger than
   * 1023 GB
   * @property {string} [osType] This property allows you to specify the type
   * of the OS that is included in the disk if creating a VM from user-image or
   * a specialized VHD. <br><br> Possible values are: <br><br> **Windows**
   * <br><br> **Linux**. Possible values include: 'Windows', 'Linux'
   * @property {object} [image] Specifies information about the unmanaged user
   * image to base the scale set on.
   * @property {string} [image.uri] Specifies the virtual hard disk's uri.
   * @property {array} [vhdContainers] Specifies the container urls that are
   * used to store operating system disks for the scale set.
   * @property {object} [managedDisk] The managed disk parameters.
   * @property {string} [managedDisk.storageAccountType] Specifies the storage
   * account type for the managed disk. NOTE: UltraSSD_LRS can only be used
   * with data disks, it cannot be used with OS Disk. Possible values include:
   * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS'
   */
  constructor() {
  }

  /**
   * Defines the metadata of VirtualMachineScaleSetOSDisk
   *
   * @returns {object} metadata of VirtualMachineScaleSetOSDisk
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'VirtualMachineScaleSetOSDisk',
      type: {
        name: 'Composite',
        className: 'VirtualMachineScaleSetOSDisk',
        modelProperties: {
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          caching: {
            required: false,
            serializedName: 'caching',
            type: {
              name: 'Enum',
              allowedValues: [ 'None', 'ReadOnly', 'ReadWrite' ]
            }
          },
          writeAcceleratorEnabled: {
            required: false,
            serializedName: 'writeAcceleratorEnabled',
            type: {
              name: 'Boolean'
            }
          },
          createOption: {
            required: true,
            serializedName: 'createOption',
            type: {
              name: 'String'
            }
          },
          diffDiskSettings: {
            required: false,
            serializedName: 'diffDiskSettings',
            type: {
              name: 'Composite',
              className: 'DiffDiskSettings'
            }
          },
          diskSizeGB: {
            required: false,
            serializedName: 'diskSizeGB',
            type: {
              name: 'Number'
            }
          },
          osType: {
            required: false,
            serializedName: 'osType',
            type: {
              name: 'Enum',
              allowedValues: [ 'Windows', 'Linux' ]
            }
          },
          image: {
            required: false,
            serializedName: 'image',
            type: {
              name: 'Composite',
              className: 'VirtualHardDisk'
            }
          },
          vhdContainers: {
            required: false,
            serializedName: 'vhdContainers',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          managedDisk: {
            required: false,
            serializedName: 'managedDisk',
            type: {
              name: 'Composite',
              className: 'VirtualMachineScaleSetManagedDiskParameters'
            }
          }
        }
      }
    };
  }
}

module.exports = VirtualMachineScaleSetOSDisk;
