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

var models = require('./index');

/**
 * @class
 * Initializes a new instance of the PoolStatistics class.
 * @constructor
 * Contains utilization and resource usage statistics for the lifetime of a
 * pool.
 * @member {string} url The URL for the statistics.
 * 
 * @member {date} startTime The start time of the time range covered by the
 * statistics.
 * 
 * @member {date} lastUpdateTime The time at which the statistics were last
 * updated. All statistics are limited to the range between startTime and
 * lastUpdateTime.
 * 
 * @member {object} [usageStats] Statistics related to pool usage, such as the
 * amount of core-time used.
 * 
 * @member {date} [usageStats.startTime] The start time of the time range
 * covered by the statistics.
 * 
 * @member {date} [usageStats.lastUpdateTime] The time at which the statistics
 * were last updated. All statistics are limited to the range between
 * startTime and lastUpdateTime.
 * 
 * @member {moment.duration} [usageStats.dedicatedCoreTime] The aggregated
 * wall-clock time of the dedicated compute node cores being part of the pool.
 * 
 * @member {object} [resourceStats] Statistics related to resource consumption
 * by compute nodes in the pool.
 * 
 * @member {date} [resourceStats.startTime] The start time of the time range
 * covered by the statistics.
 * 
 * @member {date} [resourceStats.lastUpdateTime] The time at which the
 * statistics were last updated. All statistics are limited to the range
 * between startTime and lastUpdateTime.
 * 
 * @member {number} [resourceStats.avgCPUPercentage] The average CPU usage
 * across all nodes in the pool (percentage per node).
 * 
 * @member {number} [resourceStats.avgMemoryGiB] The average memory usage in
 * GiB across all nodes in the pool.
 * 
 * @member {number} [resourceStats.peakMemoryGiB] The peak memory usage in GiB
 * across all nodes in the pool.
 * 
 * @member {number} [resourceStats.avgDiskGiB] The average used disk space in
 * GiB across all nodes in the pool.
 * 
 * @member {number} [resourceStats.peakDiskGiB] The peak used disk space in
 * GiB across all nodes in the pool.
 * 
 * @member {number} [resourceStats.diskReadIOps] The total number of disk read
 * operations across all nodes in the pool.
 * 
 * @member {number} [resourceStats.diskWriteIOps] The total number of disk
 * write operations across all nodes in the pool.
 * 
 * @member {number} [resourceStats.diskReadGiB] The total amount of data in
 * GiB of disk reads across all nodes in the pool.
 * 
 * @member {number} [resourceStats.diskWriteGiB] The total amount of data in
 * GiB of disk writes across all nodes in the pool.
 * 
 * @member {number} [resourceStats.networkReadGiB] The total amount of data in
 * GiB of network reads across all nodes in the pool.
 * 
 * @member {number} [resourceStats.networkWriteGiB] The total amount of data
 * in GiB of network writes across all nodes in the pool.
 * 
 */
function PoolStatistics() {
}

/**
 * Defines the metadata of PoolStatistics
 *
 * @returns {object} metadata of PoolStatistics
 *
 */
PoolStatistics.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'PoolStatistics',
    type: {
      name: 'Composite',
      className: 'PoolStatistics',
      modelProperties: {
        url: {
          required: true,
          serializedName: 'url',
          type: {
            name: 'String'
          }
        },
        startTime: {
          required: true,
          serializedName: 'startTime',
          type: {
            name: 'DateTime'
          }
        },
        lastUpdateTime: {
          required: true,
          serializedName: 'lastUpdateTime',
          type: {
            name: 'DateTime'
          }
        },
        usageStats: {
          required: false,
          serializedName: 'usageStats',
          type: {
            name: 'Composite',
            className: 'UsageStatistics'
          }
        },
        resourceStats: {
          required: false,
          serializedName: 'resourceStats',
          type: {
            name: 'Composite',
            className: 'ResourceStatistics'
          }
        }
      }
    }
  };
};

module.exports = PoolStatistics;
