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

/**
 * Usage Metric of a Subscription in a Location.
 *
 * @extends models['ProxyResource']
 */
class SubscriptionUsage extends models['ProxyResource'] {
  /**
   * Create a SubscriptionUsage.
   * @property {string} [displayName] User-readable name of the metric.
   * @property {number} [currentValue] Current value of the metric.
   * @property {number} [limit] Boundary value of the metric.
   * @property {string} [unit] Unit of the metric.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of SubscriptionUsage
   *
   * @returns {object} metadata of SubscriptionUsage
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SubscriptionUsage',
      type: {
        name: 'Composite',
        className: 'SubscriptionUsage',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.displayName',
            type: {
              name: 'String'
            }
          },
          currentValue: {
            required: false,
            readOnly: true,
            serializedName: 'properties.currentValue',
            type: {
              name: 'Number'
            }
          },
          limit: {
            required: false,
            readOnly: true,
            serializedName: 'properties.limit',
            type: {
              name: 'Number'
            }
          },
          unit: {
            required: false,
            readOnly: true,
            serializedName: 'properties.unit',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = SubscriptionUsage;
