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

/**
 * VpnSite Resource.
 *
 * @extends models['Resource']
 */
class VpnSite extends models['Resource'] {
  /**
   * Create a VpnSite.
   * @property {object} [virtualWan] The VirtualWAN to which the vpnSite
   * belongs
   * @property {string} [virtualWan.id] Resource ID.
   * @property {object} [deviceProperties] The device properties
   * @property {string} [deviceProperties.deviceVendor] Name of the device
   * Vendor.
   * @property {string} [deviceProperties.deviceModel] Model of the device.
   * @property {number} [deviceProperties.linkSpeedInMbps] Link speed.
   * @property {string} [ipAddress] The ip-address for the vpn-site.
   * @property {string} [siteKey] The key for vpn-site that can be used for
   * connections.
   * @property {object} [addressSpace] The AddressSpace that contains an array
   * of IP address ranges.
   * @property {array} [addressSpace.addressPrefixes] A list of address blocks
   * reserved for this virtual network in CIDR notation.
   * @property {object} [bgpProperties] The set of bgp properties.
   * @property {number} [bgpProperties.asn] The BGP speaker's ASN.
   * @property {string} [bgpProperties.bgpPeeringAddress] The BGP peering
   * address and BGP identifier of this BGP speaker.
   * @property {number} [bgpProperties.peerWeight] The weight added to routes
   * learned from this BGP speaker.
   * @property {string} [provisioningState] The provisioning state of the
   * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting',
   * 'Failed'
   * @property {boolean} [isSecuritySite] IsSecuritySite flag
   * @property {string} [etag] Gets a unique read-only string that changes
   * whenever the resource is updated.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of VpnSite
   *
   * @returns {object} metadata of VpnSite
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'VpnSite',
      type: {
        name: 'Composite',
        className: 'VpnSite',
        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'
                  }
              }
            }
          },
          virtualWan: {
            required: false,
            serializedName: 'properties.virtualWan',
            type: {
              name: 'Composite',
              className: 'SubResource'
            }
          },
          deviceProperties: {
            required: false,
            serializedName: 'properties.deviceProperties',
            type: {
              name: 'Composite',
              className: 'DeviceProperties'
            }
          },
          ipAddress: {
            required: false,
            serializedName: 'properties.ipAddress',
            type: {
              name: 'String'
            }
          },
          siteKey: {
            required: false,
            serializedName: 'properties.siteKey',
            type: {
              name: 'String'
            }
          },
          addressSpace: {
            required: false,
            serializedName: 'properties.addressSpace',
            type: {
              name: 'Composite',
              className: 'AddressSpace'
            }
          },
          bgpProperties: {
            required: false,
            serializedName: 'properties.bgpProperties',
            type: {
              name: 'Composite',
              className: 'BgpSettings'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          isSecuritySite: {
            required: false,
            serializedName: 'properties.isSecuritySite',
            type: {
              name: 'Boolean'
            }
          },
          etag: {
            required: false,
            readOnly: true,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = VpnSite;
