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

/**
 * An object to provide order by options for listing runs.
 *
 */
class RunQueryOrderBy {
  /**
   * Create a RunQueryOrderBy.
   * @member {string} orderBy Parameter name to be used for order by. The
   * allowed parameters to order by for pipeline runs are PipelineName,
   * RunStart, RunEnd and Status; for activity runs are ActivityName,
   * ActivityRunStart, ActivityRunEnd and Status; for trigger runs are
   * TriggerName, TriggerRunTimestamp and Status. Possible values include:
   * 'RunStart', 'RunEnd', 'PipelineName', 'Status', 'ActivityName',
   * 'ActivityRunStart', 'ActivityRunEnd', 'TriggerName', 'TriggerRunTimestamp'
   * @member {string} order Sorting order of the parameter. Possible values
   * include: 'ASC', 'DESC'
   */
  constructor() {
  }

  /**
   * Defines the metadata of RunQueryOrderBy
   *
   * @returns {object} metadata of RunQueryOrderBy
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RunQueryOrderBy',
      type: {
        name: 'Composite',
        className: 'RunQueryOrderBy',
        modelProperties: {
          orderBy: {
            required: true,
            serializedName: 'orderBy',
            type: {
              name: 'String'
            }
          },
          order: {
            required: true,
            serializedName: 'order',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = RunQueryOrderBy;
