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

const models = require('./index');

/**
 * Represents percentile metrics values.
 *
 * @extends models['MetricValue']
 */
class PercentileMetricValue extends models['MetricValue'] {
  /**
   * Create a PercentileMetricValue.
   * @member {number} [p10] The 10th percentile value for the metric.
   * @member {number} [p25] The 25th percentile value for the metric.
   * @member {number} [p50] The 50th percentile value for the metric.
   * @member {number} [p75] The 75th percentile value for the metric.
   * @member {number} [p90] The 90th percentile value for the metric.
   * @member {number} [p95] The 95th percentile value for the metric.
   * @member {number} [p99] The 99th percentile value for the metric.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of PercentileMetricValue
   *
   * @returns {object} metadata of PercentileMetricValue
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'PercentileMetricValue',
      type: {
        name: 'Composite',
        className: 'PercentileMetricValue',
        modelProperties: {
          _count: {
            required: false,
            readOnly: true,
            serializedName: '_count',
            type: {
              name: 'Number'
            }
          },
          average: {
            required: false,
            readOnly: true,
            serializedName: 'average',
            type: {
              name: 'Number'
            }
          },
          maximum: {
            required: false,
            readOnly: true,
            serializedName: 'maximum',
            type: {
              name: 'Number'
            }
          },
          minimum: {
            required: false,
            readOnly: true,
            serializedName: 'minimum',
            type: {
              name: 'Number'
            }
          },
          timestamp: {
            required: false,
            readOnly: true,
            serializedName: 'timestamp',
            type: {
              name: 'DateTime'
            }
          },
          total: {
            required: false,
            readOnly: true,
            serializedName: 'total',
            type: {
              name: 'Number'
            }
          },
          p10: {
            required: false,
            readOnly: true,
            serializedName: 'P10',
            type: {
              name: 'Number'
            }
          },
          p25: {
            required: false,
            readOnly: true,
            serializedName: 'P25',
            type: {
              name: 'Number'
            }
          },
          p50: {
            required: false,
            readOnly: true,
            serializedName: 'P50',
            type: {
              name: 'Number'
            }
          },
          p75: {
            required: false,
            readOnly: true,
            serializedName: 'P75',
            type: {
              name: 'Number'
            }
          },
          p90: {
            required: false,
            readOnly: true,
            serializedName: 'P90',
            type: {
              name: 'Number'
            }
          },
          p95: {
            required: false,
            readOnly: true,
            serializedName: 'P95',
            type: {
              name: 'Number'
            }
          },
          p99: {
            required: false,
            readOnly: true,
            serializedName: 'P99',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = PercentileMetricValue;
