/*
 * 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 DataDisk class.
 * @constructor
 * Describes a data disk.
 * @member {number} lun the logical unit number.
 * 
 * @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 DataDisk() {
}

/**
 * Defines the metadata of DataDisk
 *
 * @returns {object} metadata of DataDisk
 *
 */
DataDisk.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'DataDisk',
    type: {
      name: 'Composite',
      className: 'DataDisk',
      modelProperties: {
        lun: {
          required: true,
          serializedName: 'lun',
          type: {
            name: 'Number'
          }
        },
        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 = DataDisk;
