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

/**
 * @class
 * Initializes a new instance of the OSDisk class.
 * @constructor
 * Describes an Operating System disk.
 * @member {string} [osType] the Operating System type. Possible values
 * include: 'Windows', 'Linux'
 * 
 * @member {object} [encryptionSettings] the disk encryption settings.
 * 
 * @member {object} [encryptionSettings.diskEncryptionKey] the disk encryption
 * key which is a KeyVault Secret.
 * 
 * @member {string} [encryptionSettings.diskEncryptionKey.secretUrl] the URL
 * referencing a secret in a Key Vault.
 * 
 * @member {object} [encryptionSettings.diskEncryptionKey.sourceVault] the
 * Relative URL of the Key Vault containing the secret.
 * 
 * @member {string} [encryptionSettings.diskEncryptionKey.sourceVault.id]
 * Resource Id
 * 
 * @member {object} [encryptionSettings.keyEncryptionKey] the key encryption
 * key which is KeyVault Key.
 * 
 * @member {string} [encryptionSettings.keyEncryptionKey.keyUrl] the URL
 * referencing a key in a Key Vault.
 * 
 * @member {object} [encryptionSettings.keyEncryptionKey.sourceVault] the
 * Relative URL of the Key Vault containing the key
 * 
 * @member {string} [encryptionSettings.keyEncryptionKey.sourceVault.id]
 * Resource Id
 * 
 * @member {boolean} [encryptionSettings.enabled] whether disk encryption
 * should be enabled on the Virtual Machine.
 * 
 * @member {string} name the disk name.
 * 
 * @member {object} vhd the Virtual Hard Disk.
 * 
 * @member {string} [vhd.uri] the virtual hard disk's uri. It should be a
 * valid Uri to a virtual hard disk.
 * 
 * @member {object} [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} [image.uri] the virtual hard disk's uri. It should be a
 * valid Uri to a virtual hard disk.
 * 
 * @member {string} [caching] the caching type. Possible values include:
 * 'None', 'ReadOnly', 'ReadWrite'
 * 
 * @member {string} createOption the create option. Possible values include:
 * 'fromImage', 'empty', 'attach'
 * 
 * @member {number} [diskSizeGB] the initial disk size in GB for blank data
 * disks, and the new desired size for existing OS and Data disks.
 * 
 */
function OSDisk() {
}

/**
 * Defines the metadata of OSDisk
 *
 * @returns {object} metadata of OSDisk
 *
 */
OSDisk.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'OSDisk',
    type: {
      name: 'Composite',
      className: 'OSDisk',
      modelProperties: {
        osType: {
          required: false,
          serializedName: 'osType',
          type: {
            name: 'Enum',
            allowedValues: [ 'Windows', 'Linux' ]
          }
        },
        encryptionSettings: {
          required: false,
          serializedName: 'encryptionSettings',
          type: {
            name: 'Composite',
            className: 'DiskEncryptionSettings'
          }
        },
        name: {
          required: true,
          serializedName: 'name',
          type: {
            name: 'String'
          }
        },
        vhd: {
          required: true,
          serializedName: 'vhd',
          type: {
            name: 'Composite',
            className: 'VirtualHardDisk'
          }
        },
        image: {
          required: false,
          serializedName: 'image',
          type: {
            name: 'Composite',
            className: 'VirtualHardDisk'
          }
        },
        caching: {
          required: false,
          serializedName: 'caching',
          type: {
            name: 'Enum',
            allowedValues: [ 'None', 'ReadOnly', 'ReadWrite' ]
          }
        },
        createOption: {
          required: true,
          serializedName: 'createOption',
          type: {
            name: 'Enum',
            allowedValues: [ 'fromImage', 'empty', 'attach' ]
          }
        },
        diskSizeGB: {
          required: false,
          serializedName: 'diskSizeGB',
          type: {
            name: 'Number'
          }
        }
      }
    }
  };
};

module.exports = OSDisk;
