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

/**
 * Description of an additional API Management resource location.
 *
 */
class AdditionalLocation {
  /**
   * Create a AdditionalLocation.
   * @property {string} location The location name of the additional region
   * among Azure Data center regions.
   * @property {object} sku SKU properties of the API Management service.
   * @property {string} [sku.name] Name of the Sku. Possible values include:
   * 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption'
   * @property {number} [sku.capacity] Capacity of the SKU (number of deployed
   * units of the SKU). For Consumption SKU capacity must be specified as 0.
   * @property {array} [publicIPAddresses] Public Static Load Balanced IP
   * addresses of the API Management service in the additional location.
   * Available only for Basic, Standard and Premium SKU.
   * @property {array} [privateIPAddresses] Private Static Load Balanced IP
   * addresses of the API Management service which is deployed in an Internal
   * Virtual Network in a particular additional location. Available only for
   * Basic, Standard and Premium SKU.
   * @property {object} [virtualNetworkConfiguration] Virtual network
   * configuration for the location.
   * @property {string} [virtualNetworkConfiguration.vnetid] The virtual
   * network ID. This is typically a GUID. Expect a null GUID by default.
   * @property {string} [virtualNetworkConfiguration.subnetname] The name of
   * the subnet.
   * @property {string} [virtualNetworkConfiguration.subnetResourceId] The full
   * resource ID of a subnet in a virtual network to deploy the API Management
   * service in.
   * @property {string} [gatewayRegionalUrl] Gateway URL of the API Management
   * service in the Region.
   * @property {boolean} [disableGateway] Property only valid for an Api
   * Management service deployed in multiple locations. This can be used to
   * disable the gateway in this additional location. Default value: false .
   */
  constructor() {
  }

  /**
   * Defines the metadata of AdditionalLocation
   *
   * @returns {object} metadata of AdditionalLocation
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AdditionalLocation',
      type: {
        name: 'Composite',
        className: 'AdditionalLocation',
        modelProperties: {
          location: {
            required: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          sku: {
            required: true,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'ApiManagementServiceSkuProperties'
            }
          },
          publicIPAddresses: {
            required: false,
            readOnly: true,
            serializedName: 'publicIPAddresses',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          privateIPAddresses: {
            required: false,
            readOnly: true,
            serializedName: 'privateIPAddresses',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          virtualNetworkConfiguration: {
            required: false,
            serializedName: 'virtualNetworkConfiguration',
            type: {
              name: 'Composite',
              className: 'VirtualNetworkConfiguration'
            }
          },
          gatewayRegionalUrl: {
            required: false,
            readOnly: true,
            serializedName: 'gatewayRegionalUrl',
            type: {
              name: 'String'
            }
          },
          disableGateway: {
            required: false,
            serializedName: 'disableGateway',
            defaultValue: false,
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = AdditionalLocation;
