/*
 * 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 define the operation to create a connection monitor.
 *
 */
class ConnectionMonitorParameters {
  /**
   * Create a ConnectionMonitorParameters.
   * @property {object} source Describes the source of connection monitor.
   * @property {string} [source.resourceId] The ID of the resource used as the
   * source by connection monitor.
   * @property {number} [source.port] The source port used by connection
   * monitor.
   * @property {object} destination Describes the destination of connection
   * monitor.
   * @property {string} [destination.resourceId] The ID of the resource used as
   * the destination by connection monitor.
   * @property {string} [destination.address] Address of the connection monitor
   * destination (IP or domain name).
   * @property {number} [destination.port] The destination port used by
   * connection monitor.
   * @property {boolean} [autoStart] Determines if the connection monitor will
   * start automatically once created. Default value: true .
   * @property {number} [monitoringIntervalInSeconds] Monitoring interval in
   * seconds. Default value: 60 .
   */
  constructor() {
  }

  /**
   * Defines the metadata of ConnectionMonitorParameters
   *
   * @returns {object} metadata of ConnectionMonitorParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ConnectionMonitorParameters',
      type: {
        name: 'Composite',
        className: 'ConnectionMonitorParameters',
        modelProperties: {
          source: {
            required: true,
            serializedName: 'source',
            type: {
              name: 'Composite',
              className: 'ConnectionMonitorSource'
            }
          },
          destination: {
            required: true,
            serializedName: 'destination',
            type: {
              name: 'Composite',
              className: 'ConnectionMonitorDestination'
            }
          },
          autoStart: {
            required: false,
            serializedName: 'autoStart',
            defaultValue: true,
            type: {
              name: 'Boolean'
            }
          },
          monitoringIntervalInSeconds: {
            required: false,
            serializedName: 'monitoringIntervalInSeconds',
            defaultValue: 60,
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = ConnectionMonitorParameters;
