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

/**
 * @class
 * Initializes a new instance of the UsageMetric class.
 * @constructor
 * Usage Metric data.
 *
 * @member {object} [name] the usage metric name and display name.
 *
 * @member {string} [name.value] the invariant value.
 *
 * @member {string} [name.localizedValue] the locale specific value.
 *
 * @member {number} [currentValue] the current value for the usage metric.
 *
 * @member {string} [id] the id for the usage metric.
 *
 * @member {number} [limit] the quota limit the usage metric.
 *
 * @member {string} [unit] the unit for the usage metric.
 *
 * @member {date} [nextResetTime] the next reset time for the current value.
 *
 * @member {moment.duration} [quotaPeriod] the amount of time it takes to reset
 * the value.
 *
 */
class UsageMetric {
  constructor() {
  }

  /**
   * Defines the metadata of UsageMetric
   *
   * @returns {object} metadata of UsageMetric
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'UsageMetric',
      type: {
        name: 'Composite',
        className: 'UsageMetric',
        modelProperties: {
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'Composite',
              className: 'LocalizableString'
            }
          },
          currentValue: {
            required: false,
            serializedName: 'currentValue',
            type: {
              name: 'Number'
            }
          },
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          limit: {
            required: false,
            serializedName: 'limit',
            type: {
              name: 'Number'
            }
          },
          unit: {
            required: false,
            serializedName: 'unit',
            type: {
              name: 'String'
            }
          },
          nextResetTime: {
            required: false,
            serializedName: 'nextResetTime',
            type: {
              name: 'DateTime'
            }
          },
          quotaPeriod: {
            required: false,
            serializedName: 'quotaPeriod',
            type: {
              name: 'TimeSpan'
            }
          }
        }
      }
    };
  }
}

module.exports = UsageMetric;
