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

/**
 * Express Route Circuit Connection in an ExpressRouteCircuitPeering resource.
 *
 * @extends models['SubResource']
 */
class ExpressRouteCircuitConnection extends models['SubResource'] {
  /**
   * Create a ExpressRouteCircuitConnection.
   * @property {object} [expressRouteCircuitPeering] Reference to Express Route
   * Circuit Private Peering Resource of the circuit initiating connection.
   * @property {string} [expressRouteCircuitPeering.id] Resource ID.
   * @property {object} [peerExpressRouteCircuitPeering] Reference to Express
   * Route Circuit Private Peering Resource of the peered circuit.
   * @property {string} [peerExpressRouteCircuitPeering.id] Resource ID.
   * @property {string} [addressPrefix] /29 IP address space to carve out
   * Customer addresses for tunnels.
   * @property {string} [authorizationKey] The authorization key.
   * @property {string} [circuitConnectionStatus] Express Route Circuit
   * connection state. Possible values include: 'Connected', 'Connecting',
   * 'Disconnected'
   * @property {string} [provisioningState] Provisioning state of the circuit
   * connection resource. Possible values are: 'Succeeded', 'Updating',
   * 'Deleting', and 'Failed'.
   * @property {string} [name] Gets name of the resource that is unique within
   * a resource group. This name can be used to access the resource.
   * @property {string} [etag] A unique read-only string that changes whenever
   * the resource is updated.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ExpressRouteCircuitConnection
   *
   * @returns {object} metadata of ExpressRouteCircuitConnection
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ExpressRouteCircuitConnection',
      type: {
        name: 'Composite',
        className: 'ExpressRouteCircuitConnection',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          expressRouteCircuitPeering: {
            required: false,
            serializedName: 'properties.expressRouteCircuitPeering',
            type: {
              name: 'Composite',
              className: 'SubResource'
            }
          },
          peerExpressRouteCircuitPeering: {
            required: false,
            serializedName: 'properties.peerExpressRouteCircuitPeering',
            type: {
              name: 'Composite',
              className: 'SubResource'
            }
          },
          addressPrefix: {
            required: false,
            serializedName: 'properties.addressPrefix',
            type: {
              name: 'String'
            }
          },
          authorizationKey: {
            required: false,
            serializedName: 'properties.authorizationKey',
            type: {
              name: 'String'
            }
          },
          circuitConnectionStatus: {
            required: false,
            serializedName: 'properties.circuitConnectionStatus',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          etag: {
            required: false,
            readOnly: true,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ExpressRouteCircuitConnection;
