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

/**
 * A load balancer configuration for an availability group listener.
 *
 */
class LoadBalancerConfiguration {
  /**
   * Create a LoadBalancerConfiguration.
   * @property {object} [privateIpAddress] Private IP address.
   * @property {string} [privateIpAddress.ipAddress] Private IP address bound
   * to the availability group listener.
   * @property {string} [privateIpAddress.subnetResourceId] Subnet used to
   * include private IP.
   * @property {string} [publicIpAddressResourceId] Resource id of the public
   * IP.
   * @property {string} [loadBalancerResourceId] Resource id of the load
   * balancer.
   * @property {number} [probePort] Probe port.
   * @property {array} [sqlVirtualMachineInstances] List of the SQL virtual
   * machine instance resource id's that are enrolled into the availability
   * group listener.
   */
  constructor() {
  }

  /**
   * Defines the metadata of LoadBalancerConfiguration
   *
   * @returns {object} metadata of LoadBalancerConfiguration
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'LoadBalancerConfiguration',
      type: {
        name: 'Composite',
        className: 'LoadBalancerConfiguration',
        modelProperties: {
          privateIpAddress: {
            required: false,
            serializedName: 'privateIpAddress',
            type: {
              name: 'Composite',
              className: 'PrivateIPAddress'
            }
          },
          publicIpAddressResourceId: {
            required: false,
            serializedName: 'publicIpAddressResourceId',
            type: {
              name: 'String'
            }
          },
          loadBalancerResourceId: {
            required: false,
            serializedName: 'loadBalancerResourceId',
            type: {
              name: 'String'
            }
          },
          probePort: {
            required: false,
            serializedName: 'probePort',
            type: {
              name: 'Number'
            }
          },
          sqlVirtualMachineInstances: {
            required: false,
            serializedName: 'sqlVirtualMachineInstances',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = LoadBalancerConfiguration;
