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

/**
 * Application gateway BackendHealth pool.
 *
 */
class ApplicationGatewayBackendHealthPool {
  /**
   * Create a ApplicationGatewayBackendHealthPool.
   * @property {object} [backendAddressPool] Reference of an
   * ApplicationGatewayBackendAddressPool resource.
   * @property {array} [backendAddressPool.backendIPConfigurations] Collection
   * of references to IPs defined in network interfaces.
   * @property {array} [backendAddressPool.backendAddresses] Backend addresses
   * @property {string} [backendAddressPool.provisioningState] Provisioning
   * state of the backend address pool resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   * @property {string} [backendAddressPool.name] Name of the backend address
   * pool that is unique within an Application Gateway.
   * @property {string} [backendAddressPool.etag] A unique read-only string
   * that changes whenever the resource is updated.
   * @property {string} [backendAddressPool.type] Type of the resource.
   * @property {array} [backendHttpSettingsCollection] List of
   * ApplicationGatewayBackendHealthHttpSettings resources.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ApplicationGatewayBackendHealthPool
   *
   * @returns {object} metadata of ApplicationGatewayBackendHealthPool
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ApplicationGatewayBackendHealthPool',
      type: {
        name: 'Composite',
        className: 'ApplicationGatewayBackendHealthPool',
        modelProperties: {
          backendAddressPool: {
            required: false,
            serializedName: 'backendAddressPool',
            type: {
              name: 'Composite',
              className: 'ApplicationGatewayBackendAddressPool'
            }
          },
          backendHttpSettingsCollection: {
            required: false,
            serializedName: 'backendHttpSettingsCollection',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayBackendHealthHttpSettingsElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayBackendHealthHttpSettings'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ApplicationGatewayBackendHealthPool;
