/*
 * 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 TaskConstraints class.
 * @constructor
 * Constraints to apply to the Job Manager task.
 * @member {moment.duration} [maxWallClockTime] The maximum elapsed time that
 * the task may run, measured from the time the task starts. If the task does
 * not complete within the time limit, the Batch service terminates it.
 * 
 * @member {moment.duration} [retentionTime] The minimum time to retain the
 * working directory for the task on the compute node where it ran, from the
 * time it completes execution. After this time, the Batch service may delete
 * the working directory and all its contents. The default is infinite.
 * 
 * @member {number} [maxTaskRetryCount] The maximum number of times the task
 * may be retried. The Batch service retries a task if its exit code is
 * nonzero.
 * 
 */
function TaskConstraints() {
}

/**
 * Defines the metadata of TaskConstraints
 *
 * @returns {object} metadata of TaskConstraints
 *
 */
TaskConstraints.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'TaskConstraints',
    type: {
      name: 'Composite',
      className: 'TaskConstraints',
      modelProperties: {
        maxWallClockTime: {
          required: false,
          serializedName: 'maxWallClockTime',
          type: {
            name: 'TimeSpan'
          }
        },
        retentionTime: {
          required: false,
          serializedName: 'retentionTime',
          type: {
            name: 'TimeSpan'
          }
        },
        maxTaskRetryCount: {
          required: false,
          serializedName: 'maxTaskRetryCount',
          type: {
            name: 'Number'
          }
        }
      }
    }
  };
};

module.exports = TaskConstraints;
