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

/**
 * @summary ExpressRoute Port
  *
 * ExpressRoutePort resource definition.
 *
 * @extends models['Resource']
 */
class ExpressRoutePort extends models['Resource'] {
  /**
   * Create a ExpressRoutePort.
   * @property {string} [peeringLocation] The name of the peering location that
   * the ExpressRoutePort is mapped to physically.
   * @property {number} [bandwidthInGbps] Bandwidth of procured ports in Gbps
   * @property {number} [provisionedBandwidthInGbps] Aggregate Gbps of
   * associated circuit bandwidths.
   * @property {string} [mtu] Maximum transmission unit of the physical port
   * pair(s)
   * @property {string} [encapsulation] Encapsulation method on physical ports.
   * Possible values include: 'Dot1Q', 'QinQ'
   * @property {string} [etherType] Ether type of the physical port.
   * @property {string} [allocationDate] Date of the physical port allocation
   * to be used in Letter of Authorization.
   * @property {array} [links] ExpressRouteLink Sub-Resources. The set of
   * physical links of the ExpressRoutePort resource
   * @property {array} [circuits] Reference the ExpressRoute circuit(s) that
   * are provisioned on this ExpressRoutePort resource.
   * @property {string} [provisioningState] The provisioning state of the
   * ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating',
   * 'Deleting', and 'Failed'.
   * @property {string} [resourceGuid] The resource GUID property of the
   * ExpressRoutePort resource.
   * @property {string} [etag] A unique read-only string that changes whenever
   * the resource is updated.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ExpressRoutePort
   *
   * @returns {object} metadata of ExpressRoutePort
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ExpressRoutePort',
      type: {
        name: 'Composite',
        className: 'ExpressRoutePort',
        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'
                  }
              }
            }
          },
          peeringLocation: {
            required: false,
            serializedName: 'properties.peeringLocation',
            type: {
              name: 'String'
            }
          },
          bandwidthInGbps: {
            required: false,
            serializedName: 'properties.bandwidthInGbps',
            type: {
              name: 'Number'
            }
          },
          provisionedBandwidthInGbps: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisionedBandwidthInGbps',
            type: {
              name: 'Number'
            }
          },
          mtu: {
            required: false,
            readOnly: true,
            serializedName: 'properties.mtu',
            type: {
              name: 'String'
            }
          },
          encapsulation: {
            required: false,
            serializedName: 'properties.encapsulation',
            type: {
              name: 'String'
            }
          },
          etherType: {
            required: false,
            readOnly: true,
            serializedName: 'properties.etherType',
            type: {
              name: 'String'
            }
          },
          allocationDate: {
            required: false,
            readOnly: true,
            serializedName: 'properties.allocationDate',
            type: {
              name: 'String'
            }
          },
          links: {
            required: false,
            serializedName: 'properties.links',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ExpressRouteLinkElementType',
                  type: {
                    name: 'Composite',
                    className: 'ExpressRouteLink'
                  }
              }
            }
          },
          circuits: {
            required: false,
            readOnly: true,
            serializedName: 'properties.circuits',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'SubResourceElementType',
                  type: {
                    name: 'Composite',
                    className: 'SubResource'
                  }
              }
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          resourceGuid: {
            required: false,
            serializedName: 'properties.resourceGuid',
            type: {
              name: 'String'
            }
          },
          etag: {
            required: false,
            readOnly: true,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ExpressRoutePort;
