/*
 * 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 0.16.0.0
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

var models = require('./index');

var util = require('util');

/**
 * @class
 * Initializes a new instance of the InboundNatPool class.
 * @constructor
 * Inbound NAT pool of the loadbalancer
 * @member {object} [frontendIPConfiguration] Gets or sets a reference to
 * frontend IP Addresses
 * 
 * @member {string} [frontendIPConfiguration.id] Resource Id
 * 
 * @member {string} protocol Gets or sets the transport potocol for the
 * external endpoint. Possible values are Udp or Tcp. Possible values
 * include: 'Udp', 'Tcp'
 * 
 * @member {number} frontendPortRangeStart Gets or sets the starting port
 * range for the NAT pool. You can spcify any port number you choose, but the
 * port numbers specified for each role in the service must be unique.
 * Possible values range between 1 and 65535, inclusive
 * 
 * @member {number} frontendPortRangeEnd Gets or sets the ending port range
 * for the NAT pool. You can spcify any port number you choose, but the port
 * numbers specified for each role in the service must be unique. Possible
 * values range between 1 and 65535, inclusive
 * 
 * @member {number} backendPort Gets or sets a port used for internal
 * connections on the endpoint. The localPort attribute maps the eternal port
 * of the endpoint to an internal port on a role. This is useful in scenarios
 * where a role must communicate to an internal compotnent on a port that is
 * different from the one that is exposed externally. If not specified, the
 * value of localPort is the same as the port attribute. Set the value of
 * localPort to '*' to automatically assign an unallocated port that is
 * discoverable using the runtime API
 * 
 * @member {string} [provisioningState] Gets or sets Provisioning state of the
 * PublicIP resource Updating/Deleting/Failed
 * 
 * @member {string} [name] Gets name of the resource that is unique within a
 * resource group. This name can be used to access the resource
 * 
 * @member {string} [etag] A unique read-only string that changes whenever the
 * resource is updated
 * 
 */
function InboundNatPool() {
  InboundNatPool['super_'].call(this);
}

util.inherits(InboundNatPool, models['SubResource']);

/**
 * Defines the metadata of InboundNatPool
 *
 * @returns {object} metadata of InboundNatPool
 *
 */
InboundNatPool.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'InboundNatPool',
    type: {
      name: 'Composite',
      className: 'InboundNatPool',
      modelProperties: {
        id: {
          required: false,
          serializedName: 'id',
          type: {
            name: 'String'
          }
        },
        frontendIPConfiguration: {
          required: false,
          serializedName: 'properties.frontendIPConfiguration',
          type: {
            name: 'Composite',
            className: 'SubResource'
          }
        },
        protocol: {
          required: true,
          serializedName: 'properties.protocol',
          type: {
            name: 'String'
          }
        },
        frontendPortRangeStart: {
          required: true,
          serializedName: 'properties.frontendPortRangeStart',
          type: {
            name: 'Number'
          }
        },
        frontendPortRangeEnd: {
          required: true,
          serializedName: 'properties.frontendPortRangeEnd',
          type: {
            name: 'Number'
          }
        },
        backendPort: {
          required: true,
          serializedName: 'properties.backendPort',
          type: {
            name: 'Number'
          }
        },
        provisioningState: {
          required: false,
          serializedName: 'properties.provisioningState',
          type: {
            name: 'String'
          }
        },
        name: {
          required: false,
          serializedName: 'name',
          type: {
            name: 'String'
          }
        },
        etag: {
          required: false,
          serializedName: 'etag',
          type: {
            name: 'String'
          }
        }
      }
    }
  };
};

module.exports = InboundNatPool;
