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

/**
 * A metric request
 *
 */
class MetricsPostBodySchema {
  /**
   * Create a MetricsPostBodySchema.
   * @member {string} id An identifier for this query.  Must be unique within
   * the post body of the request.  This identifier will be the 'id' property
   * of the response object representing this query.
   * @member {object} parameters The parameters for a single metrics query
   * @member {string} [parameters.metricId] Possible values include:
   * 'requests/count', 'requests/duration', 'requests/failed', 'users/count',
   * 'users/authenticated', 'pageViews/count', 'pageViews/duration',
   * 'client/processingDuration', 'client/receiveDuration',
   * 'client/networkDuration', 'client/sendDuration', 'client/totalDuration',
   * 'dependencies/count', 'dependencies/failed', 'dependencies/duration',
   * 'exceptions/count', 'exceptions/browser', 'exceptions/server',
   * 'sessions/count', 'performanceCounters/requestExecutionTime',
   * 'performanceCounters/requestsPerSecond',
   * 'performanceCounters/requestsInQueue',
   * 'performanceCounters/memoryAvailableBytes',
   * 'performanceCounters/exceptionsPerSecond',
   * 'performanceCounters/processCpuPercentage',
   * 'performanceCounters/processIOBytesPerSecond',
   * 'performanceCounters/processPrivateBytes',
   * 'performanceCounters/processorCpuPercentage',
   * 'availabilityResults/availabilityPercentage',
   * 'availabilityResults/duration', 'billing/telemetryCount',
   * 'customEvents/count'
   * @member {string} [parameters.timespan]
   * @member {array} [parameters.aggregation]
   * @member {moment.duration} [parameters.interval]
   * @member {array} [parameters.segment]
   * @member {number} [parameters.top]
   * @member {string} [parameters.orderby]
   * @member {string} [parameters.filter]
   */
  constructor() {
  }

  /**
   * Defines the metadata of MetricsPostBodySchema
   *
   * @returns {object} metadata of MetricsPostBodySchema
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'metricsPostBodySchema',
      type: {
        name: 'Composite',
        className: 'MetricsPostBodySchema',
        modelProperties: {
          id: {
            required: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          parameters: {
            required: true,
            serializedName: 'parameters',
            type: {
              name: 'Composite',
              className: 'MetricsPostBodySchemaParameters'
            }
          }
        }
      }
    };
  }
}

module.exports = MetricsPostBodySchema;
