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

/**
 * ExpressRouteCrossConnection resource
 *
 * @extends models['Resource']
 */
class ExpressRouteCrossConnection extends models['Resource'] {
  /**
   * Create a ExpressRouteCrossConnection.
   * @property {string} [primaryAzurePort] The name of the primary  port.
   * @property {string} [secondaryAzurePort] The name of the secondary  port.
   * @property {number} [sTag] The identifier of the circuit traffic.
   * @property {string} [peeringLocation] The peering location of the
   * ExpressRoute circuit.
   * @property {number} [bandwidthInMbps] The circuit bandwidth In Mbps.
   * @property {object} [expressRouteCircuit] The ExpressRouteCircuit
   * @property {string} [expressRouteCircuit.id] Corresponding Express Route
   * Circuit Id.
   * @property {string} [serviceProviderProvisioningState] The provisioning
   * state of the circuit in the connectivity provider system. Possible values
   * include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
   * @property {string} [serviceProviderNotes] Additional read only notes set
   * by the connectivity provider.
   * @property {string} [provisioningState] Gets the provisioning state of the
   * public IP resource. Possible values are: 'Updating', 'Deleting', and
   * 'Failed'.
   * @property {array} [peerings] The list of peerings.
   * @property {string} [etag] Gets a unique read-only string that changes
   * whenever the resource is updated.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ExpressRouteCrossConnection
   *
   * @returns {object} metadata of ExpressRouteCrossConnection
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ExpressRouteCrossConnection',
      type: {
        name: 'Composite',
        className: 'ExpressRouteCrossConnection',
        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'
                  }
              }
            }
          },
          primaryAzurePort: {
            required: false,
            readOnly: true,
            serializedName: 'properties.primaryAzurePort',
            type: {
              name: 'String'
            }
          },
          secondaryAzurePort: {
            required: false,
            readOnly: true,
            serializedName: 'properties.secondaryAzurePort',
            type: {
              name: 'String'
            }
          },
          sTag: {
            required: false,
            readOnly: true,
            serializedName: 'properties.sTag',
            type: {
              name: 'Number'
            }
          },
          peeringLocation: {
            required: false,
            serializedName: 'properties.peeringLocation',
            type: {
              name: 'String'
            }
          },
          bandwidthInMbps: {
            required: false,
            serializedName: 'properties.bandwidthInMbps',
            type: {
              name: 'Number'
            }
          },
          expressRouteCircuit: {
            required: false,
            serializedName: 'properties.expressRouteCircuit',
            type: {
              name: 'Composite',
              className: 'ExpressRouteCircuitReference'
            }
          },
          serviceProviderProvisioningState: {
            required: false,
            serializedName: 'properties.serviceProviderProvisioningState',
            type: {
              name: 'String'
            }
          },
          serviceProviderNotes: {
            required: false,
            serializedName: 'properties.serviceProviderNotes',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          peerings: {
            required: false,
            serializedName: 'properties.peerings',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ExpressRouteCrossConnectionPeeringElementType',
                  type: {
                    name: 'Composite',
                    className: 'ExpressRouteCrossConnectionPeering'
                  }
              }
            }
          },
          etag: {
            required: false,
            readOnly: true,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ExpressRouteCrossConnection;
