/*
 * 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 OutboundNatRule class.
 * @constructor
 * Outbound NAT pool of the loadbalancer
 * @member {number} [allocatedOutboundPorts] Gets or sets the number of
 * outbound ports to be used for SNAT
 * 
 * @member {array} [frontendIPConfigurations] Gets or sets Frontend IP
 * addresses of the load balancer
 * 
 * @member {object} backendAddressPool Gets or sets a reference to a pool of
 * DIPs. Outbound traffic is randomly load balanced across IPs in the backend
 * IPs
 * 
 * @member {string} [backendAddressPool.id] Resource Id
 * 
 * @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 OutboundNatRule() {
  OutboundNatRule['super_'].call(this);
}

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

/**
 * Defines the metadata of OutboundNatRule
 *
 * @returns {object} metadata of OutboundNatRule
 *
 */
OutboundNatRule.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'OutboundNatRule',
    type: {
      name: 'Composite',
      className: 'OutboundNatRule',
      modelProperties: {
        id: {
          required: false,
          serializedName: 'id',
          type: {
            name: 'String'
          }
        },
        allocatedOutboundPorts: {
          required: false,
          serializedName: 'properties.allocatedOutboundPorts',
          type: {
            name: 'Number'
          }
        },
        frontendIPConfigurations: {
          required: false,
          serializedName: 'properties.frontendIPConfigurations',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'SubResourceElementType',
                type: {
                  name: 'Composite',
                  className: 'SubResource'
                }
            }
          }
        },
        backendAddressPool: {
          required: true,
          serializedName: 'properties.backendAddressPool',
          type: {
            name: 'Composite',
            className: 'SubResource'
          }
        },
        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 = OutboundNatRule;
