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

/**
 * The database usages.
 *
 */
class DatabaseUsage {
  /**
   * Create a DatabaseUsage.
   * @property {string} [name] The name of the usage metric.
   * @property {string} [resourceName] The name of the resource.
   * @property {string} [displayName] The usage metric display name.
   * @property {number} [currentValue] The current value of the usage metric.
   * @property {number} [limit] The current limit of the usage metric.
   * @property {string} [unit] The units of the usage metric.
   * @property {date} [nextResetTime] The next reset time for the usage metric
   * (ISO8601 format).
   */
  constructor() {
  }

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

module.exports = DatabaseUsage;
