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

/**
 * P2SVpnGateway Resource.
 *
 * @extends models['Resource']
 */
class P2SVpnGateway extends models['Resource'] {
  /**
   * Create a P2SVpnGateway.
   * @property {object} [virtualHub] The VirtualHub to which the gateway
   * belongs
   * @property {string} [virtualHub.id] Resource ID.
   * @property {string} [provisioningState] The provisioning state of the
   * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting',
   * 'Failed'
   * @property {number} [vpnGatewayScaleUnit] The scale unit for this p2s vpn
   * gateway.
   * @property {object} [p2SVpnServerConfiguration] The
   * P2SVpnServerConfiguration to which the p2sVpnGateway is attached to.
   * @property {string} [p2SVpnServerConfiguration.id] Resource ID.
   * @property {object} [vpnClientAddressPool] The reference of the address
   * space resource which represents Address space for P2S VpnClient.
   * @property {array} [vpnClientAddressPool.addressPrefixes] A list of address
   * blocks reserved for this virtual network in CIDR notation.
   * @property {object} [customRoutes] The reference of the address space
   * resource which represents the custom routes specified by the customer for
   * P2SVpnGateway and P2S VpnClient.
   * @property {array} [customRoutes.addressPrefixes] A list of address blocks
   * reserved for this virtual network in CIDR notation.
   * @property {object} [vpnClientConnectionHealth] All P2S VPN clients'
   * connection health status.
   * @property {number}
   * [vpnClientConnectionHealth.totalIngressBytesTransferred] Total of the
   * Ingress Bytes Transferred in this P2S Vpn connection
   * @property {number} [vpnClientConnectionHealth.totalEgressBytesTransferred]
   * Total of the Egress Bytes Transferred in this connection
   * @property {number} [vpnClientConnectionHealth.vpnClientConnectionsCount]
   * The total of p2s vpn clients connected at this time to this P2SVpnGateway.
   * @property {array} [vpnClientConnectionHealth.allocatedIpAddresses] List of
   * allocated ip addresses to the connected p2s vpn clients.
   * @property {string} [etag] Gets a unique read-only string that changes
   * whenever the resource is updated.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of P2SVpnGateway
   *
   * @returns {object} metadata of P2SVpnGateway
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'P2SVpnGateway',
      type: {
        name: 'Composite',
        className: 'P2SVpnGateway',
        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'
                  }
              }
            }
          },
          virtualHub: {
            required: false,
            serializedName: 'properties.virtualHub',
            type: {
              name: 'Composite',
              className: 'SubResource'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          vpnGatewayScaleUnit: {
            required: false,
            serializedName: 'properties.vpnGatewayScaleUnit',
            type: {
              name: 'Number'
            }
          },
          p2SVpnServerConfiguration: {
            required: false,
            serializedName: 'properties.p2SVpnServerConfiguration',
            type: {
              name: 'Composite',
              className: 'SubResource'
            }
          },
          vpnClientAddressPool: {
            required: false,
            serializedName: 'properties.vpnClientAddressPool',
            type: {
              name: 'Composite',
              className: 'AddressSpace'
            }
          },
          customRoutes: {
            required: false,
            serializedName: 'properties.customRoutes',
            type: {
              name: 'Composite',
              className: 'AddressSpace'
            }
          },
          vpnClientConnectionHealth: {
            required: false,
            readOnly: true,
            serializedName: 'properties.vpnClientConnectionHealth',
            type: {
              name: 'Composite',
              className: 'VpnClientConnectionHealth'
            }
          },
          etag: {
            required: false,
            readOnly: true,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = P2SVpnGateway;
