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

/**
 * Quota counter details.
 *
 */
class QuotaCounterContract {
  /**
   * Create a QuotaCounterContract.
   * @property {string} counterKey The Key value of the Counter. Must not be
   * empty.
   * @property {string} periodKey Identifier of the Period for which the
   * counter was collected. Must not be empty.
   * @property {date} periodStartTime The date of the start of Counter Period.
   * The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as
   * specified by the ISO 8601 standard.
   * @property {date} periodEndTime The date of the end of Counter Period. The
   * date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified
   * by the ISO 8601 standard.
   * @property {object} [value] Quota Value Properties
   * @property {number} [value.callsCount] Number of times Counter was called.
   * @property {number} [value.kbTransferred] Data Transferred in KiloBytes.
   */
  constructor() {
  }

  /**
   * Defines the metadata of QuotaCounterContract
   *
   * @returns {object} metadata of QuotaCounterContract
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'QuotaCounterContract',
      type: {
        name: 'Composite',
        className: 'QuotaCounterContract',
        modelProperties: {
          counterKey: {
            required: true,
            serializedName: 'counterKey',
            constraints: {
              MinLength: 1
            },
            type: {
              name: 'String'
            }
          },
          periodKey: {
            required: true,
            serializedName: 'periodKey',
            constraints: {
              MinLength: 1
            },
            type: {
              name: 'String'
            }
          },
          periodStartTime: {
            required: true,
            serializedName: 'periodStartTime',
            type: {
              name: 'DateTime'
            }
          },
          periodEndTime: {
            required: true,
            serializedName: 'periodEndTime',
            type: {
              name: 'DateTime'
            }
          },
          value: {
            required: false,
            serializedName: 'value',
            type: {
              name: 'Composite',
              className: 'QuotaCounterValueContractProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = QuotaCounterContract;
