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

/**
 * The OData filters to be used for Alert
 *
 */
class AlertFilter {
  /**
   * Create a AlertFilter.
   * @member {string} [status] Specifies the status of the alerts to be
   * filtered. Only 'Equality' operator is supported for this property.
   * Possible values include: 'Active', 'Cleared'
   * @member {string} [severity] Specifies the severity of the alerts to be
   * filtered. Only 'Equality' operator is supported for this property.
   * Possible values include: 'Informational', 'Warning', 'Critical'
   * @member {string} [sourceType] Specifies the source type of the alerts to
   * be filtered. Only 'Equality' operator is supported for this property.
   * Possible values include: 'Resource', 'Device'
   * @member {string} [sourceName] Specifies the source name of the alerts to
   * be filtered. Only 'Equality' operator is supported for this property.
   * @member {date} [appearedOnTime] Specifies the appeared time (in UTC) of
   * the alerts to be filtered. Only 'Greater-Than' and 'Lesser-Than' operators
   * are supported for this property.
   */
  constructor() {
  }

  /**
   * Defines the metadata of AlertFilter
   *
   * @returns {object} metadata of AlertFilter
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AlertFilter',
      type: {
        name: 'Composite',
        className: 'AlertFilter',
        modelProperties: {
          status: {
            required: false,
            serializedName: 'status',
            type: {
              name: 'Enum',
              allowedValues: [ 'Active', 'Cleared' ]
            }
          },
          severity: {
            required: false,
            serializedName: 'severity',
            type: {
              name: 'Enum',
              allowedValues: [ 'Informational', 'Warning', 'Critical' ]
            }
          },
          sourceType: {
            required: false,
            serializedName: 'sourceType',
            type: {
              name: 'Enum',
              allowedValues: [ 'Resource', 'Device' ]
            }
          },
          sourceName: {
            required: false,
            serializedName: 'sourceName',
            type: {
              name: 'String'
            }
          },
          appearedOnTime: {
            required: false,
            serializedName: 'appearedOnTime',
            type: {
              name: 'DateTime'
            }
          }
        }
      }
    };
  }
}

module.exports = AlertFilter;
