/*
 * 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 BackendAddressPool class.
 * @constructor
 * Pool of backend IP addresseses
 * @member {array} [backendIPConfigurations] Gets collection of references to
 * IPs defined in NICs
 * 
 * @member {array} [loadBalancingRules] Gets Load Balancing rules that use
 * this Backend Address Pool
 * 
 * @member {object} [outboundNatRule] Gets outbound rules that use this
 * Backend Address Pool
 * 
 * @member {string} [outboundNatRule.id] Resource Id
 * 
 * @member {string} [provisioningState] 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 BackendAddressPool() {
  BackendAddressPool['super_'].call(this);
}

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

/**
 * Defines the metadata of BackendAddressPool
 *
 * @returns {object} metadata of BackendAddressPool
 *
 */
BackendAddressPool.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'BackendAddressPool',
    type: {
      name: 'Composite',
      className: 'BackendAddressPool',
      modelProperties: {
        id: {
          required: false,
          serializedName: 'id',
          type: {
            name: 'String'
          }
        },
        backendIPConfigurations: {
          required: false,
          serializedName: 'properties.backendIPConfigurations',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'NetworkInterfaceIPConfigurationElementType',
                type: {
                  name: 'Composite',
                  className: 'NetworkInterfaceIPConfiguration'
                }
            }
          }
        },
        loadBalancingRules: {
          required: false,
          serializedName: 'properties.loadBalancingRules',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'SubResourceElementType',
                type: {
                  name: 'Composite',
                  className: 'SubResource'
                }
            }
          }
        },
        outboundNatRule: {
          required: false,
          serializedName: 'properties.outboundNatRule',
          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 = BackendAddressPool;
