/*
 * 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 of the quota resource.
 *
 * @extends models['ProxyOnlyResource']
 */
class Usage extends models['ProxyOnlyResource'] {
  /**
   * Create a Usage.
   * @member {string} [displayName] Friendly name shown in the UI.
   * @member {string} [resourceName] Name of the quota resource.
   * @member {string} [unit] Units of measurement for the quota resource.
   * @member {number} [currentValue] The current value of the resource counter.
   * @member {number} [limit] The resource limit.
   * @member {date} [nextResetTime] Next reset time for the resource counter.
   * @member {string} [computeMode] Compute mode used for this usage. Possible
   * values include: 'Shared', 'Dedicated', 'Dynamic'
   * @member {string} [siteMode] Site mode used for this usage.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Usage
   *
   * @returns {object} metadata of Usage
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Usage',
      type: {
        name: 'Composite',
        className: 'Usage',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          kind: {
            required: false,
            serializedName: 'kind',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.displayName',
            type: {
              name: 'String'
            }
          },
          resourceName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.resourceName',
            type: {
              name: 'String'
            }
          },
          unit: {
            required: false,
            readOnly: true,
            serializedName: 'properties.unit',
            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'
            }
          },
          nextResetTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.nextResetTime',
            type: {
              name: 'DateTime'
            }
          },
          computeMode: {
            required: false,
            readOnly: true,
            serializedName: 'properties.computeMode',
            type: {
              name: 'Enum',
              allowedValues: [ 'Shared', 'Dedicated', 'Dynamic' ]
            }
          },
          siteMode: {
            required: false,
            readOnly: true,
            serializedName: 'properties.siteMode',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = Usage;
