/*
 * 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 VirtualMachineImage class.
 * @constructor
 * Describes a Virtual Machine Image.
 * @member {object} [plan]
 * 
 * @member {string} [plan.publisher] the publisher ID.
 * 
 * @member {string} [plan.name] the plan ID.
 * 
 * @member {string} [plan.product] the product ID.
 * 
 * @member {object} [osDiskImage]
 * 
 * @member {string} [osDiskImage.operatingSystem] the operating system of the
 * osDiskImage. Possible values include: 'Windows', 'Linux'
 * 
 * @member {array} [dataDiskImages]
 * 
 */
function VirtualMachineImage() {
  VirtualMachineImage['super_'].call(this);
}

util.inherits(VirtualMachineImage, models['VirtualMachineImageResource']);

/**
 * Defines the metadata of VirtualMachineImage
 *
 * @returns {object} metadata of VirtualMachineImage
 *
 */
VirtualMachineImage.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'VirtualMachineImage',
    type: {
      name: 'Composite',
      className: 'VirtualMachineImage',
      modelProperties: {
        id: {
          required: false,
          serializedName: 'id',
          type: {
            name: 'String'
          }
        },
        name: {
          required: true,
          serializedName: 'name',
          type: {
            name: 'String'
          }
        },
        location: {
          required: true,
          serializedName: 'location',
          type: {
            name: 'String'
          }
        },
        tags: {
          required: false,
          serializedName: 'tags',
          type: {
            name: 'Dictionary',
            value: {
                required: false,
                serializedName: 'StringElementType',
                type: {
                  name: 'String'
                }
            }
          }
        },
        plan: {
          required: false,
          serializedName: 'properties.plan',
          type: {
            name: 'Composite',
            className: 'PurchasePlan'
          }
        },
        osDiskImage: {
          required: false,
          serializedName: 'properties.osDiskImage',
          type: {
            name: 'Composite',
            className: 'OSDiskImage'
          }
        },
        dataDiskImages: {
          required: false,
          serializedName: 'properties.dataDiskImages',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'DataDiskImageElementType',
                type: {
                  name: 'Composite',
                  className: 'DataDiskImage'
                }
            }
          }
        }
      }
    }
  };
};

module.exports = VirtualMachineImage;
