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

/**
 * How the data that is collected should be combined over time.
 *
 */
class ManagementEventAggregationCondition {
  /**
   * Create a ManagementEventAggregationCondition.
   * @property {string} [operator] the condition operator. Possible values
   * include: 'GreaterThan', 'GreaterThanOrEqual', 'LessThan',
   * 'LessThanOrEqual'
   * @property {number} [threshold] The threshold value that activates the
   * alert.
   * @property {moment.duration} [windowSize] the period of time (in ISO 8601
   * duration format) that is used to monitor alert activity based on the
   * threshold. If specified then it must be between 5 minutes and 1 day.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ManagementEventAggregationCondition
   *
   * @returns {object} metadata of ManagementEventAggregationCondition
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ManagementEventAggregationCondition',
      type: {
        name: 'Composite',
        className: 'ManagementEventAggregationCondition',
        modelProperties: {
          operator: {
            required: false,
            serializedName: 'operator',
            type: {
              name: 'Enum',
              allowedValues: [ 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' ]
            }
          },
          threshold: {
            required: false,
            serializedName: 'threshold',
            type: {
              name: 'Number'
            }
          },
          windowSize: {
            required: false,
            serializedName: 'windowSize',
            type: {
              name: 'TimeSpan'
            }
          }
        }
      }
    };
  }
}

module.exports = ManagementEventAggregationCondition;
