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

/**
 * Query filter option for listing runs.
 *
 */
class RunQueryFilter {
  /**
   * Create a RunQueryFilter.
   * @member {string} operand Parameter name to be used for filter. The allowed
   * operands to query pipeline runs are PipelineName, RunStart, RunEnd and
   * Status; to query activity runs are ActivityName, ActivityRunStart,
   * ActivityRunEnd, ActivityType and Status, and to query trigger runs are
   * TriggerName, TriggerRunTimestamp and Status. Possible values include:
   * 'PipelineName', 'Status', 'RunStart', 'RunEnd', 'ActivityName',
   * 'ActivityRunStart', 'ActivityRunEnd', 'ActivityType', 'TriggerName',
   * 'TriggerRunTimestamp'
   * @member {string} operator Operator to be used for filter. Possible values
   * include: 'Equals', 'NotEquals', 'In', 'NotIn'
   * @member {array} values List of filter values.
   */
  constructor() {
  }

  /**
   * Defines the metadata of RunQueryFilter
   *
   * @returns {object} metadata of RunQueryFilter
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RunQueryFilter',
      type: {
        name: 'Composite',
        className: 'RunQueryFilter',
        modelProperties: {
          operand: {
            required: true,
            serializedName: 'operand',
            type: {
              name: 'String'
            }
          },
          operator: {
            required: true,
            serializedName: 'operator',
            type: {
              name: 'String'
            }
          },
          values: {
            required: true,
            serializedName: 'values',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = RunQueryFilter;
