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

/**
 * Result of on demand test probe
 *
 */
class ApplicationGatewayBackendHealthOnDemand {
  /**
   * Create a ApplicationGatewayBackendHealthOnDemand.
   * @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 {object} [backendHealthHttpSettings] Application gateway
   * BackendHealthHttp settings.
   * @property {object} [backendHealthHttpSettings.backendHttpSettings]
   * Reference of an ApplicationGatewayBackendHttpSettings resource.
   * @property {number} [backendHealthHttpSettings.backendHttpSettings.port]
   * The destination port on the backend.
   * @property {string}
   * [backendHealthHttpSettings.backendHttpSettings.protocol] The protocol used
   * to communicate with the backend. Possible values include: 'Http', 'Https'
   * @property {string}
   * [backendHealthHttpSettings.backendHttpSettings.cookieBasedAffinity] Cookie
   * based affinity. Possible values include: 'Enabled', 'Disabled'
   * @property {number}
   * [backendHealthHttpSettings.backendHttpSettings.requestTimeout] Request
   * timeout in seconds. Application Gateway will fail the request if response
   * is not received within RequestTimeout. Acceptable values are from 1 second
   * to 86400 seconds.
   * @property {object} [backendHealthHttpSettings.backendHttpSettings.probe]
   * Probe resource of an application gateway.
   * @property {string}
   * [backendHealthHttpSettings.backendHttpSettings.probe.id] Resource ID.
   * @property {array}
   * [backendHealthHttpSettings.backendHttpSettings.authenticationCertificates]
   * Array of references to application gateway authentication certificates.
   * @property {array}
   * [backendHealthHttpSettings.backendHttpSettings.trustedRootCertificates]
   * Array of references to application gateway trusted root certificates.
   * @property {object}
   * [backendHealthHttpSettings.backendHttpSettings.connectionDraining]
   * Connection draining of the backend http settings resource.
   * @property {boolean}
   * [backendHealthHttpSettings.backendHttpSettings.connectionDraining.enabled]
   * Whether connection draining is enabled or not.
   * @property {number}
   * [backendHealthHttpSettings.backendHttpSettings.connectionDraining.drainTimeoutInSec]
   * The number of seconds connection draining is active. Acceptable values are
   * from 1 second to 3600 seconds.
   * @property {string}
   * [backendHealthHttpSettings.backendHttpSettings.hostName] Host header to be
   * sent to the backend servers.
   * @property {boolean}
   * [backendHealthHttpSettings.backendHttpSettings.pickHostNameFromBackendAddress]
   * Whether to pick host header should be picked from the host name of the
   * backend server. Default value is false.
   * @property {string}
   * [backendHealthHttpSettings.backendHttpSettings.affinityCookieName] Cookie
   * name to use for the affinity cookie.
   * @property {boolean}
   * [backendHealthHttpSettings.backendHttpSettings.probeEnabled] Whether the
   * probe is enabled. Default value is false.
   * @property {string} [backendHealthHttpSettings.backendHttpSettings.path]
   * Path which should be used as a prefix for all HTTP requests. Null means no
   * path will be prefixed. Default value is null.
   * @property {string}
   * [backendHealthHttpSettings.backendHttpSettings.provisioningState]
   * Provisioning state of the backend http settings resource. Possible values
   * are: 'Updating', 'Deleting', and 'Failed'.
   * @property {string} [backendHealthHttpSettings.backendHttpSettings.name]
   * Name of the backend http settings that is unique within an Application
   * Gateway.
   * @property {string} [backendHealthHttpSettings.backendHttpSettings.etag] A
   * unique read-only string that changes whenever the resource is updated.
   * @property {string} [backendHealthHttpSettings.backendHttpSettings.type]
   * Type of the resource.
   * @property {array} [backendHealthHttpSettings.servers] List of
   * ApplicationGatewayBackendHealthServer resources.
   */
  constructor() {
  }

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

module.exports = ApplicationGatewayBackendHealthOnDemand;
