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

var util = require('util');

/**
 * @class
 * Initializes a new instance of the JobReleaseTask class.
 * @constructor
 * A Job Release task to run on job completion on any compute node where the
 * job has run.
 * @member {string} [id] A string that uniquely identifies the Job Release
 * task within the job. The id can contain any combination of alphanumeric
 * characters including hyphens and underscores and cannot contain more than
 * 64 characters.
 * 
 * @member {string} [commandLine] The command line of the Job Release task.
 * 
 * @member {array} [resourceFiles] A list of files that the Batch service will
 * download to the compute node before running the command line.
 * 
 * @member {array} [environmentSettings] A list of environment variable
 * settings for the Job Release task.
 * 
 * @member {moment.duration} [maxWallClockTime] The maximum elapsed time that
 * the Job Release task may run on a given compute node, measured from the
 * time the task starts. If the task does not complete within the time limit,
 * the Batch service terminates it. The default value is 15 minutes.
 * 
 * @member {moment.duration} [retentionTime] The minimum time to retain the
 * working directory for the Job Release task on the compute node. After this
 * time, the Batch service may delete the working directory and all its
 * contents. The default is infinite.
 * 
 * @member {boolean} [runElevated] Whether to run the Job Release task in
 * elevated mode. The default value is false.
 * 
 */
function JobReleaseTask() {
}

/**
 * Defines the metadata of JobReleaseTask
 *
 * @returns {object} metadata of JobReleaseTask
 *
 */
JobReleaseTask.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'JobReleaseTask',
    type: {
      name: 'Composite',
      className: 'JobReleaseTask',
      modelProperties: {
        id: {
          required: false,
          serializedName: 'id',
          type: {
            name: 'String'
          }
        },
        commandLine: {
          required: false,
          serializedName: 'commandLine',
          type: {
            name: 'String'
          }
        },
        resourceFiles: {
          required: false,
          serializedName: 'resourceFiles',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'ResourceFileElementType',
                type: {
                  name: 'Composite',
                  className: 'ResourceFile'
                }
            }
          }
        },
        environmentSettings: {
          required: false,
          serializedName: 'environmentSettings',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'EnvironmentSettingElementType',
                type: {
                  name: 'Composite',
                  className: 'EnvironmentSetting'
                }
            }
          }
        },
        maxWallClockTime: {
          required: false,
          serializedName: 'maxWallClockTime',
          type: {
            name: 'TimeSpan'
          }
        },
        retentionTime: {
          required: false,
          serializedName: 'retentionTime',
          type: {
            name: 'TimeSpan'
          }
        },
        runElevated: {
          required: false,
          serializedName: 'runElevated',
          type: {
            name: 'Boolean'
          }
        }
      }
    }
  };
};

module.exports = JobReleaseTask;
