/*
 * 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 data disk.
 *
 */
class VirtualMachineScaleSetDataDisk {
  /**
   * Create a VirtualMachineScaleSetDataDisk.
   * @property {string} [name] The disk name.
   * @property {number} lun Specifies the logical unit number of the data disk.
   * This value is used to identify data disks within the VM and therefore must
   * be unique for each data disk attached to a VM.
   * @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 The create option. Possible values
   * include: 'FromImage', 'Empty', 'Attach'
   * @property {number} [diskSizeGB] Specifies the size of an empty data 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 {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 VirtualMachineScaleSetDataDisk
   *
   * @returns {object} metadata of VirtualMachineScaleSetDataDisk
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'VirtualMachineScaleSetDataDisk',
      type: {
        name: 'Composite',
        className: 'VirtualMachineScaleSetDataDisk',
        modelProperties: {
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          lun: {
            required: true,
            serializedName: 'lun',
            type: {
              name: 'Number'
            }
          },
          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'
            }
          },
          diskSizeGB: {
            required: false,
            serializedName: 'diskSizeGB',
            type: {
              name: 'Number'
            }
          },
          managedDisk: {
            required: false,
            serializedName: 'managedDisk',
            type: {
              name: 'Composite',
              className: 'VirtualMachineScaleSetManagedDiskParameters'
            }
          }
        }
      }
    };
  }
}

module.exports = VirtualMachineScaleSetDataDisk;
