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

/**
 * Describes Batch AI Resource Usage.
 *
 */
class Usage {
  /**
   * Create a Usage.
   * @member {string} [unit] An enum describing the unit of usage measurement.
   * Possible values include: 'Count'
   * @member {number} [currentValue] The current usage of the resource.
   * @member {number} [limit] The maximum permitted usage of the resource.
   * @member {object} [name] The name of the type of usage.
   * @member {string} [name.value] The name of the resource.
   * @member {string} [name.localizedValue] The localized name of the resource.
   */
  constructor() {
  }

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

module.exports = Usage;
