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

/**
 * Additional parameters for a set of operations.
 *
 */
class QueryOptions {
  /**
   * Create a QueryOptions.
   * @property {number} [top] Maximum number of records to return.
   * @property {string} [filter] OData filter expression.
   * @property {string} [orderBy] Ordering expression using OData notation. One
   * or more comma-separated column names with an optional "desc" (the default)
   * or "asc", e.g. "$orderby=PolicyAssignmentId, ResourceId asc".
   * @property {string} [select] Select expression using OData notation. Limits
   * the columns on each record to just those requested, e.g.
   * "$select=PolicyAssignmentId, ResourceId".
   * @property {date} [from] ISO 8601 formatted timestamp specifying the start
   * time of the interval to query. When not specified, the service uses ($to -
   * 1-day).
   * @property {date} [to] ISO 8601 formatted timestamp specifying the end time
   * of the interval to query. When not specified, the service uses request
   * time.
   * @property {string} [apply] OData apply expression for aggregations.
   * @property {string} [expand] The $expand query parameter. For example, to
   * expand policyEvaluationDetails, use $expand=policyEvaluationDetails
   */
  constructor() {
  }

  /**
   * Defines the metadata of QueryOptions
   *
   * @returns {object} metadata of QueryOptions
   *
   */
  mapper() {
    return {
      required: false,
      type: {
        name: 'Composite',
        className: 'QueryOptions',
        modelProperties: {
          top: {
            required: false,
            type: {
              name: 'Number'
            }
          },
          filter: {
            required: false,
            type: {
              name: 'String'
            }
          },
          orderBy: {
            required: false,
            type: {
              name: 'String'
            }
          },
          select: {
            required: false,
            type: {
              name: 'String'
            }
          },
          from: {
            required: false,
            type: {
              name: 'DateTime'
            }
          },
          to: {
            required: false,
            type: {
              name: 'DateTime'
            }
          },
          apply: {
            required: false,
            type: {
              name: 'String'
            }
          },
          expand: {
            required: false,
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = QueryOptions;
