/*
 * 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 0.16.0.0
 * 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 GenericResource class.
 * @constructor
 * Resource information.
 * @member {object} [plan] Gets or sets the plan of the resource.
 * 
 * @member {string} [plan.name] Gets or sets the plan ID.
 * 
 * @member {string} [plan.publisher] Gets or sets the publisher ID.
 * 
 * @member {string} [plan.product] Gets or sets the offer ID.
 * 
 * @member {string} [plan.promotionCode] Gets or sets the promotion code.
 * 
 * @member {object} [properties] Gets or sets the resource properties.
 * 
 */
function GenericResource() {
  GenericResource['super_'].call(this);
}

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

/**
 * Defines the metadata of GenericResource
 *
 * @returns {object} metadata of GenericResource
 *
 */
GenericResource.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'GenericResource',
    type: {
      name: 'Composite',
      className: 'GenericResource',
      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'
                }
            }
          }
        },
        plan: {
          required: false,
          serializedName: 'plan',
          type: {
            name: 'Composite',
            className: 'Plan'
          }
        },
        properties: {
          required: false,
          serializedName: 'properties',
          type: {
            name: 'Object'
          }
        }
      }
    }
  };
};

module.exports = GenericResource;
