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

/**
 * ExpressRoute gateway resource.
 *
 * @extends models['Resource']
 */
class ExpressRouteGateway extends models['Resource'] {
  /**
   * Create a ExpressRouteGateway.
   * @property {object} [autoScaleConfiguration] Configuration for auto
   * scaling.
   * @property {object} [autoScaleConfiguration.bounds] Minimum and maximum
   * number of scale units to deploy.
   * @property {number} [autoScaleConfiguration.bounds.min] Minimum number of
   * scale units deployed for ExpressRoute gateway.
   * @property {number} [autoScaleConfiguration.bounds.max] Maximum number of
   * scale units deployed for ExpressRoute gateway.
   * @property {array} [expressRouteConnections] List of ExpressRoute
   * connections to the ExpressRoute gateway.
   * @property {string} [provisioningState] The provisioning state of the
   * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting',
   * 'Failed'
   * @property {object} virtualHub The Virtual Hub where the ExpressRoute
   * gateway is or will be deployed.
   * @property {string} [virtualHub.id] The resource URI for the Virtual Hub
   * where the ExpressRoute gateway is or will be deployed. The Virtual Hub
   * resource and the ExpressRoute gateway resource reside in the same
   * subscription.
   * @property {string} [etag] A unique read-only string that changes whenever
   * the resource is updated.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ExpressRouteGateway
   *
   * @returns {object} metadata of ExpressRouteGateway
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ExpressRouteGateway',
      type: {
        name: 'Composite',
        className: 'ExpressRouteGateway',
        modelProperties: {
          id: {
            required: false,
            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: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          autoScaleConfiguration: {
            required: false,
            serializedName: 'properties.autoScaleConfiguration',
            type: {
              name: 'Composite',
              className: 'ExpressRouteGatewayPropertiesAutoScaleConfiguration'
            }
          },
          expressRouteConnections: {
            required: false,
            readOnly: true,
            serializedName: 'properties.expressRouteConnections',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ExpressRouteConnectionElementType',
                  type: {
                    name: 'Composite',
                    className: 'ExpressRouteConnection'
                  }
              }
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          virtualHub: {
            required: true,
            serializedName: 'properties.virtualHub',
            type: {
              name: 'Composite',
              className: 'VirtualHubId'
            }
          },
          etag: {
            required: false,
            readOnly: true,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ExpressRouteGateway;
