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

/**
 * Parameters that determine how the connectivity check will be performed.
 *
 */
class ConnectivityParameters {
  /**
   * Create a ConnectivityParameters.
   * @property {object} source Describes the source of the connection.
   * @property {string} [source.resourceId] The ID of the resource from which a
   * connectivity check will be initiated.
   * @property {number} [source.port] The source port from which a connectivity
   * check will be performed.
   * @property {object} destination Describes the destination of connection.
   * @property {string} [destination.resourceId] The ID of the resource to
   * which a connection attempt will be made.
   * @property {string} [destination.address] The IP address or URI the
   * resource to which a connection attempt will be made.
   * @property {number} [destination.port] Port on which check connectivity
   * will be performed.
   * @property {string} [protocol] Network protocol. Possible values include:
   * 'Tcp', 'Http', 'Https', 'Icmp'
   * @property {object} [protocolConfiguration] Configuration of the protocol.
   * @property {object} [protocolConfiguration.hTTPConfiguration] HTTP
   * configuration of the connectivity check.
   * @property {string} [protocolConfiguration.hTTPConfiguration.method] HTTP
   * method. Possible values include: 'Get'
   * @property {array} [protocolConfiguration.hTTPConfiguration.headers] List
   * of HTTP headers.
   * @property {array}
   * [protocolConfiguration.hTTPConfiguration.validStatusCodes] Valid status
   * codes.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ConnectivityParameters
   *
   * @returns {object} metadata of ConnectivityParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ConnectivityParameters',
      type: {
        name: 'Composite',
        className: 'ConnectivityParameters',
        modelProperties: {
          source: {
            required: true,
            serializedName: 'source',
            type: {
              name: 'Composite',
              className: 'ConnectivitySource'
            }
          },
          destination: {
            required: true,
            serializedName: 'destination',
            type: {
              name: 'Composite',
              className: 'ConnectivityDestination'
            }
          },
          protocol: {
            required: false,
            serializedName: 'protocol',
            type: {
              name: 'String'
            }
          },
          protocolConfiguration: {
            required: false,
            serializedName: 'protocolConfiguration',
            type: {
              name: 'Composite',
              className: 'ProtocolConfiguration'
            }
          }
        }
      }
    };
  }
}

module.exports = ConnectivityParameters;
