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

/**
 * @class
 * Initializes a new instance of the JobScheduleStatistics class.
 * @constructor
 * Resource usage statistics for a job schedule.
 * @member {string} url The URL of 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 {moment.duration} userCPUTime The total user mode CPU time (summed
 * across all cores and all compute nodes) consumed by all tasks in all jobs
 * created under the schedule.
 * 
 * @member {moment.duration} kernelCPUTime The total kernel mode CPU time
 * (summed across all cores and all compute nodes) consumed by all tasks in
 * all jobs created under the schedule.
 * 
 * @member {moment.duration} wallClockTime The total wall clock time of all
 * the tasks in all the jobs created under the schedule.
 * 
 * @member {number} readIOps The total number of disk read operations made by
 * all tasks in all jobs created under the schedule.
 * 
 * @member {number} writeIOps The total number of disk write operations made
 * by all tasks in all jobs created under the schedule.
 * 
 * @member {number} readIOGiB The total gibibytes read from disk by all tasks
 * in all jobs created under the schedule.
 * 
 * @member {number} writeIOGiB The total gibibytes written to disk by all
 * tasks in all jobs created under the schedule.
 * 
 * @member {number} numSucceededTasks The total number of tasks successfully
 * completed during the given time range in jobs created under the schedule.
 * A task completes successfully if it returns exit code 0.
 * 
 * @member {number} numFailedTasks The total number of tasks that failed
 * during the given time range in jobs created under the schedule. A task
 * fails if it exhausts its maximum retry count without returning exit code 0.
 * 
 * @member {number} numTaskRetries The total number of retries during the
 * given time range on all tasks in all jobs created under the schedule.
 * 
 * @member {moment.duration} waitTime The total wait time of all tasks in all
 * jobs created under the schedule. The wait time for a task is defined as
 * the elapsed time between the creation of the task and the start of task
 * execution. (If the task is retried due to failures, the wait time is the
 * time to the most recent task execution.)
 * 
 */
function JobScheduleStatistics() {
}

/**
 * Defines the metadata of JobScheduleStatistics
 *
 * @returns {object} metadata of JobScheduleStatistics
 *
 */
JobScheduleStatistics.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'JobScheduleStatistics',
    type: {
      name: 'Composite',
      className: 'JobScheduleStatistics',
      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'
          }
        },
        userCPUTime: {
          required: true,
          serializedName: 'userCPUTime',
          type: {
            name: 'TimeSpan'
          }
        },
        kernelCPUTime: {
          required: true,
          serializedName: 'kernelCPUTime',
          type: {
            name: 'TimeSpan'
          }
        },
        wallClockTime: {
          required: true,
          serializedName: 'wallClockTime',
          type: {
            name: 'TimeSpan'
          }
        },
        readIOps: {
          required: true,
          serializedName: 'readIOps',
          type: {
            name: 'Number'
          }
        },
        writeIOps: {
          required: true,
          serializedName: 'writeIOps',
          type: {
            name: 'Number'
          }
        },
        readIOGiB: {
          required: true,
          serializedName: 'readIOGiB',
          type: {
            name: 'Number'
          }
        },
        writeIOGiB: {
          required: true,
          serializedName: 'writeIOGiB',
          type: {
            name: 'Number'
          }
        },
        numSucceededTasks: {
          required: true,
          serializedName: 'numSucceededTasks',
          type: {
            name: 'Number'
          }
        },
        numFailedTasks: {
          required: true,
          serializedName: 'numFailedTasks',
          type: {
            name: 'Number'
          }
        },
        numTaskRetries: {
          required: true,
          serializedName: 'numTaskRetries',
          type: {
            name: 'Number'
          }
        },
        waitTime: {
          required: true,
          serializedName: 'waitTime',
          type: {
            name: 'TimeSpan'
          }
        }
      }
    }
  };
};

module.exports = JobScheduleStatistics;
