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

/**
 * P2SVpnServerConfiguration Resource.
 *
 * @extends models['SubResource']
 */
class P2SVpnServerConfiguration extends models['SubResource'] {
  /**
   * Create a P2SVpnServerConfiguration.
   * @property {string} [p2SVpnServerConfigurationPropertiesName] The name of
   * the P2SVpnServerConfiguration that is unique within a VirtualWan in a
   * resource group. This name can be used to access the resource along with
   * Paren VirtualWan resource name.
   * @property {array} [vpnProtocols] VPN protocols for the
   * P2SVpnServerConfiguration.
   * @property {array} [p2SVpnServerConfigVpnClientRootCertificates] VPN client
   * root certificate of P2SVpnServerConfiguration.
   * @property {array} [p2SVpnServerConfigVpnClientRevokedCertificates] VPN
   * client revoked certificate of P2SVpnServerConfiguration.
   * @property {array} [p2SVpnServerConfigRadiusServerRootCertificates] Radius
   * Server root certificate of P2SVpnServerConfiguration.
   * @property {array} [p2SVpnServerConfigRadiusClientRootCertificates] Radius
   * client root certificate of P2SVpnServerConfiguration.
   * @property {array} [vpnClientIpsecPolicies] VpnClientIpsecPolicies for
   * P2SVpnServerConfiguration.
   * @property {string} [radiusServerAddress] The radius server address
   * property of the P2SVpnServerConfiguration resource for point to site
   * client connection.
   * @property {string} [radiusServerSecret] The radius secret property of the
   * P2SVpnServerConfiguration resource for point to site client connection.
   * @property {string} [provisioningState] The provisioning state of the
   * P2SVpnServerConfiguration resource. Possible values are: 'Updating',
   * 'Deleting', and 'Failed'.
   * @property {array} [p2SVpnGateways] List of references to P2SVpnGateways.
   * @property {string} [p2SVpnServerConfigurationPropertiesEtag] A unique
   * read-only string that changes whenever the resource is updated.
   * @property {string} [name] The name of the resource that is unique within a
   * resource group. This name can be used to access the resource.
   * @property {string} [etag] Gets a unique read-only string that changes
   * whenever the resource is updated.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of P2SVpnServerConfiguration
   *
   * @returns {object} metadata of P2SVpnServerConfiguration
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'P2SVpnServerConfiguration',
      type: {
        name: 'Composite',
        className: 'P2SVpnServerConfiguration',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          p2SVpnServerConfigurationPropertiesName: {
            required: false,
            serializedName: 'properties.name',
            type: {
              name: 'String'
            }
          },
          vpnProtocols: {
            required: false,
            serializedName: 'properties.vpnProtocols',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'VpnGatewayTunnelingProtocolElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          p2SVpnServerConfigVpnClientRootCertificates: {
            required: false,
            serializedName: 'properties.p2SVpnServerConfigVpnClientRootCertificates',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'P2SVpnServerConfigVpnClientRootCertificateElementType',
                  type: {
                    name: 'Composite',
                    className: 'P2SVpnServerConfigVpnClientRootCertificate'
                  }
              }
            }
          },
          p2SVpnServerConfigVpnClientRevokedCertificates: {
            required: false,
            serializedName: 'properties.p2SVpnServerConfigVpnClientRevokedCertificates',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'P2SVpnServerConfigVpnClientRevokedCertificateElementType',
                  type: {
                    name: 'Composite',
                    className: 'P2SVpnServerConfigVpnClientRevokedCertificate'
                  }
              }
            }
          },
          p2SVpnServerConfigRadiusServerRootCertificates: {
            required: false,
            serializedName: 'properties.p2SVpnServerConfigRadiusServerRootCertificates',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'P2SVpnServerConfigRadiusServerRootCertificateElementType',
                  type: {
                    name: 'Composite',
                    className: 'P2SVpnServerConfigRadiusServerRootCertificate'
                  }
              }
            }
          },
          p2SVpnServerConfigRadiusClientRootCertificates: {
            required: false,
            serializedName: 'properties.p2SVpnServerConfigRadiusClientRootCertificates',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'P2SVpnServerConfigRadiusClientRootCertificateElementType',
                  type: {
                    name: 'Composite',
                    className: 'P2SVpnServerConfigRadiusClientRootCertificate'
                  }
              }
            }
          },
          vpnClientIpsecPolicies: {
            required: false,
            serializedName: 'properties.vpnClientIpsecPolicies',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'IpsecPolicyElementType',
                  type: {
                    name: 'Composite',
                    className: 'IpsecPolicy'
                  }
              }
            }
          },
          radiusServerAddress: {
            required: false,
            serializedName: 'properties.radiusServerAddress',
            type: {
              name: 'String'
            }
          },
          radiusServerSecret: {
            required: false,
            serializedName: 'properties.radiusServerSecret',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          p2SVpnGateways: {
            required: false,
            readOnly: true,
            serializedName: 'properties.p2SVpnGateways',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'SubResourceElementType',
                  type: {
                    name: 'Composite',
                    className: 'SubResource'
                  }
              }
            }
          },
          p2SVpnServerConfigurationPropertiesEtag: {
            required: false,
            serializedName: 'properties.etag',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          etag: {
            required: false,
            readOnly: true,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = P2SVpnServerConfiguration;
