/*
 * 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 CustomImage class.
 * @constructor
 * A custom image.
 * @member {object} [vm]
 * 
 * @member {string} [vm.sourceVmId] The source vm identifier.
 * 
 * @member {boolean} [vm.sysPrep] Indicates whether sysprep has been run on
 * the VHD.
 * 
 * @member {object} [vm.windowsOsInfo] The Windows OS information of the VM.
 * 
 * @member {string} [vm.windowsOsInfo.windowsOsState] The state of the Windows
 * OS. Possible values include: 'NonSysprepped', 'SysprepRequested',
 * 'SysprepApplied'
 * 
 * @member {object} [vm.linuxOsInfo] The Linux OS information of the VM.
 * 
 * @member {string} [vm.linuxOsInfo.linuxOsState] The state of the Linux OS.
 * Possible values include: 'NonDeprovisioned', 'DeprovisionRequested',
 * 'DeprovisionApplied'
 * 
 * @member {object} [vhd] The VHD from which the image is to be created.
 * 
 * @member {string} [vhd.imageName] The image name.
 * 
 * @member {boolean} [vhd.sysPrep] Indicates whether sysprep has been run on
 * the VHD.
 * 
 * @member {string} [description] The description of the custom image.
 * 
 * @member {string} [osType] The OS type of the custom image. Possible values
 * include: 'Windows', 'Linux', 'None'
 * 
 * @member {string} [author] The author of the custom image.
 * 
 * @member {date} [creationDate] The creation date of the custom image.
 * 
 * @member {string} [provisioningState] The provisioning status of the
 * resource.
 * 
 * @member {string} [id] The identifier of the resource.
 * 
 * @member {string} [name] The name of the resource.
 * 
 * @member {string} [type] The type of the resource.
 * 
 * @member {string} [location] The location of the resource.
 * 
 * @member {object} [tags] The tags of the resource.
 * 
 */
function CustomImage() {
  CustomImage['super_'].call(this);
}

util.inherits(CustomImage, models['BaseResource']);

/**
 * Defines the metadata of CustomImage
 *
 * @returns {object} metadata of CustomImage
 *
 */
CustomImage.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'CustomImage',
    type: {
      name: 'Composite',
      className: 'CustomImage',
      modelProperties: {
        vm: {
          required: false,
          serializedName: 'properties.vm',
          type: {
            name: 'Composite',
            className: 'CustomImagePropertiesFromVm'
          }
        },
        vhd: {
          required: false,
          serializedName: 'properties.vhd',
          type: {
            name: 'Composite',
            className: 'CustomImagePropertiesCustom'
          }
        },
        description: {
          required: false,
          serializedName: 'properties.description',
          type: {
            name: 'String'
          }
        },
        osType: {
          required: false,
          serializedName: 'properties.osType',
          type: {
            name: 'String'
          }
        },
        author: {
          required: false,
          serializedName: 'properties.author',
          type: {
            name: 'String'
          }
        },
        creationDate: {
          required: false,
          serializedName: 'properties.creationDate',
          type: {
            name: 'DateTime'
          }
        },
        provisioningState: {
          required: false,
          serializedName: 'properties.provisioningState',
          type: {
            name: 'String'
          }
        },
        id: {
          required: false,
          serializedName: 'id',
          type: {
            name: 'String'
          }
        },
        name: {
          required: false,
          serializedName: 'name',
          type: {
            name: 'String'
          }
        },
        type: {
          required: false,
          serializedName: 'type',
          type: {
            name: 'String'
          }
        },
        location: {
          required: false,
          serializedName: 'location',
          type: {
            name: 'String'
          }
        },
        tags: {
          required: false,
          serializedName: 'tags',
          type: {
            name: 'Dictionary',
            value: {
                required: false,
                serializedName: 'StringElementType',
                type: {
                  name: 'String'
                }
            }
          }
        }
      }
    }
  };
};

module.exports = CustomImage;
