/*
 * 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';

const models = require('./index');

/**
 * Model of the Resource.
 *
 * @extends models['BaseResource']
 */
class Resource extends models['BaseResource'] {
  /**
   * Create a Resource.
   * @member {string} location The location of the resource. This will be one
   * of the supported and registered Azure Regions (e.g. West US, East US,
   * Southeast Asia, etc.). The region of a resource cannot be changed once it
   * is created, but if an identical region is specified on update the request
   * will succeed.
   * @member {object} [tags] The list of key value pairs that describe the
   * resource. These tags can be used in viewing and grouping this resource
   * (across resource groups).
   * @member {object} sku The sku type.
   * @member {string} [sku.name] The sku name. Possible values include:
   * 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'
   * @member {string} [sku.displayName] The display name of the sku.
   * @member {string} [sku.family] The sku family.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Resource
   *
   * @returns {object} metadata of Resource
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Resource',
      type: {
        name: 'Composite',
        className: 'Resource',
        modelProperties: {
          location: {
            required: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          sku: {
            required: true,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'Sku'
            }
          }
        }
      }
    };
  }
}

module.exports = Resource;
