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

/**
 * A common class for general resource information
 *
 * @extends models['Resource']
 */
class VirtualNetworkGateway extends models['Resource'] {
  /**
   * Create a VirtualNetworkGateway.
   * @property {array} [ipConfigurations] IP configurations for virtual network
   * gateway.
   * @property {string} [gatewayType] The type of this virtual network gateway.
   * Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include:
   * 'Vpn', 'ExpressRoute'
   * @property {string} [vpnType] The type of this virtual network gateway.
   * Possible values are: 'PolicyBased' and 'RouteBased'. Possible values
   * include: 'PolicyBased', 'RouteBased'
   * @property {boolean} [enableBgp] Whether BGP is enabled for this virtual
   * network gateway or not.
   * @property {boolean} [activeActive] ActiveActive flag
   * @property {object} [gatewayDefaultSite] The reference of the
   * LocalNetworkGateway resource which represents local network site having
   * default routes. Assign Null value in case of removing existing default
   * site setting.
   * @property {string} [gatewayDefaultSite.id] Resource ID.
   * @property {object} [sku] The reference of the VirtualNetworkGatewaySku
   * resource which represents the SKU selected for Virtual network gateway.
   * @property {string} [sku.name] Gateway SKU name. Possible values include:
   * 'Basic', 'HighPerformance', 'Standard', 'UltraPerformance', 'VpnGw1',
   * 'VpnGw2', 'VpnGw3', 'VpnGw1AZ', 'VpnGw2AZ', 'VpnGw3AZ', 'ErGw1AZ',
   * 'ErGw2AZ', 'ErGw3AZ'
   * @property {string} [sku.tier] Gateway SKU tier. Possible values include:
   * 'Basic', 'HighPerformance', 'Standard', 'UltraPerformance', 'VpnGw1',
   * 'VpnGw2', 'VpnGw3', 'VpnGw1AZ', 'VpnGw2AZ', 'VpnGw3AZ', 'ErGw1AZ',
   * 'ErGw2AZ', 'ErGw3AZ'
   * @property {number} [sku.capacity] The capacity.
   * @property {object} [vpnClientConfiguration] The reference of the
   * VpnClientConfiguration resource which represents the P2S VpnClient
   * configurations.
   * @property {object} [vpnClientConfiguration.vpnClientAddressPool] The
   * reference of the address space resource which represents Address space for
   * P2S VpnClient.
   * @property {array}
   * [vpnClientConfiguration.vpnClientAddressPool.addressPrefixes] A list of
   * address blocks reserved for this virtual network in CIDR notation.
   * @property {array} [vpnClientConfiguration.vpnClientRootCertificates]
   * VpnClientRootCertificate for virtual network gateway.
   * @property {array} [vpnClientConfiguration.vpnClientRevokedCertificates]
   * VpnClientRevokedCertificate for Virtual network gateway.
   * @property {array} [vpnClientConfiguration.vpnClientProtocols]
   * VpnClientProtocols for Virtual network gateway.
   * @property {array} [vpnClientConfiguration.vpnClientIpsecPolicies]
   * VpnClientIpsecPolicies for virtual network gateway P2S client.
   * @property {string} [vpnClientConfiguration.radiusServerAddress] The radius
   * server address property of the VirtualNetworkGateway resource for vpn
   * client connection.
   * @property {string} [vpnClientConfiguration.radiusServerSecret] The radius
   * secret property of the VirtualNetworkGateway resource for vpn client
   * connection.
   * @property {object} [bgpSettings] Virtual network gateway's BGP speaker
   * settings.
   * @property {number} [bgpSettings.asn] The BGP speaker's ASN.
   * @property {string} [bgpSettings.bgpPeeringAddress] The BGP peering address
   * and BGP identifier of this BGP speaker.
   * @property {number} [bgpSettings.peerWeight] The weight added to routes
   * learned from this BGP speaker.
   * @property {object} [customRoutes] The reference of the address space
   * resource which represents the custom routes address space specified by the
   * the customer for virtual network gateway and VpnClient.
   * @property {array} [customRoutes.addressPrefixes] A list of address blocks
   * reserved for this virtual network in CIDR notation.
   * @property {string} [resourceGuid] The resource GUID property of the
   * VirtualNetworkGateway resource.
   * @property {string} [provisioningState] The provisioning state of the
   * VirtualNetworkGateway resource. Possible values are: 'Updating',
   * 'Deleting', and 'Failed'.
   * @property {string} [etag] Gets a unique read-only string that changes
   * whenever the resource is updated.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of VirtualNetworkGateway
   *
   * @returns {object} metadata of VirtualNetworkGateway
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'VirtualNetworkGateway',
      type: {
        name: 'Composite',
        className: 'VirtualNetworkGateway',
        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'
                  }
              }
            }
          },
          ipConfigurations: {
            required: false,
            serializedName: 'properties.ipConfigurations',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'VirtualNetworkGatewayIPConfigurationElementType',
                  type: {
                    name: 'Composite',
                    className: 'VirtualNetworkGatewayIPConfiguration'
                  }
              }
            }
          },
          gatewayType: {
            required: false,
            serializedName: 'properties.gatewayType',
            type: {
              name: 'String'
            }
          },
          vpnType: {
            required: false,
            serializedName: 'properties.vpnType',
            type: {
              name: 'String'
            }
          },
          enableBgp: {
            required: false,
            serializedName: 'properties.enableBgp',
            type: {
              name: 'Boolean'
            }
          },
          activeActive: {
            required: false,
            serializedName: 'properties.activeActive',
            type: {
              name: 'Boolean'
            }
          },
          gatewayDefaultSite: {
            required: false,
            serializedName: 'properties.gatewayDefaultSite',
            type: {
              name: 'Composite',
              className: 'SubResource'
            }
          },
          sku: {
            required: false,
            serializedName: 'properties.sku',
            type: {
              name: 'Composite',
              className: 'VirtualNetworkGatewaySku'
            }
          },
          vpnClientConfiguration: {
            required: false,
            serializedName: 'properties.vpnClientConfiguration',
            type: {
              name: 'Composite',
              className: 'VpnClientConfiguration'
            }
          },
          bgpSettings: {
            required: false,
            serializedName: 'properties.bgpSettings',
            type: {
              name: 'Composite',
              className: 'BgpSettings'
            }
          },
          customRoutes: {
            required: false,
            serializedName: 'properties.customRoutes',
            type: {
              name: 'Composite',
              className: 'AddressSpace'
            }
          },
          resourceGuid: {
            required: false,
            serializedName: 'properties.resourceGuid',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          etag: {
            required: false,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = VirtualNetworkGateway;
