/*
 * 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 VirtualMachineExtensionImage class.
 * @constructor
 * Describes a Virtual Machine Extension Image.
 * @member {string} operatingSystem the operating system this extension
 * supports.
 * 
 * @member {string} computeRole the type of role (IaaS or PaaS) this extension
 * supports.
 * 
 * @member {string} handlerSchema the schema defined by publisher, where
 * extension consumers should provide settings in a matching schema.
 * 
 * @member {boolean} [vmScaleSetEnabled] whether the extension can be used on
 * xRP VMScaleSets.By default existing extensions are usable on scalesets,
 * but there might be cases where a publisher wants to explicitly indicate
 * the extension is only enabled for CRP VMs but not VMSS.
 * 
 * @member {boolean} [supportsMultipleExtensions] whether the handler can
 * support multiple extensions.
 * 
 */
function VirtualMachineExtensionImage() {
  VirtualMachineExtensionImage['super_'].call(this);
}

util.inherits(VirtualMachineExtensionImage, models['Resource']);

/**
 * Defines the metadata of VirtualMachineExtensionImage
 *
 * @returns {object} metadata of VirtualMachineExtensionImage
 *
 */
VirtualMachineExtensionImage.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'VirtualMachineExtensionImage',
    type: {
      name: 'Composite',
      className: 'VirtualMachineExtensionImage',
      modelProperties: {
        id: {
          required: false,
          readOnly: true,
          serializedName: 'id',
          type: {
            name: 'String'
          }
        },
        name: {
          required: false,
          readOnly: true,
          serializedName: 'name',
          type: {
            name: 'String'
          }
        },
        type: {
          required: false,
          readOnly: true,
          serializedName: 'type',
          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'
                }
            }
          }
        },
        operatingSystem: {
          required: true,
          serializedName: 'properties.operatingSystem',
          type: {
            name: 'String'
          }
        },
        computeRole: {
          required: true,
          serializedName: 'properties.computeRole',
          type: {
            name: 'String'
          }
        },
        handlerSchema: {
          required: true,
          serializedName: 'properties.handlerSchema',
          type: {
            name: 'String'
          }
        },
        vmScaleSetEnabled: {
          required: false,
          serializedName: 'properties.vmScaleSetEnabled',
          type: {
            name: 'Boolean'
          }
        },
        supportsMultipleExtensions: {
          required: false,
          serializedName: 'properties.supportsMultipleExtensions',
          type: {
            name: 'Boolean'
          }
        }
      }
    }
  };
};

module.exports = VirtualMachineExtensionImage;
