/*
 * 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 JobPreparationAndReleaseTaskExecutionInformation class.
 * @constructor
 * The status of the Job Preparation and Job Release tasks on a compute node.
 * @member {string} [poolId] The id of the pool containing the compute node to
 * which this entry refers.
 * 
 * @member {string} [nodeId] The id of the compute node to which this entry
 * refers.
 * 
 * @member {string} [nodeUrl] The URL of the compute node to which this entry
 * refers.
 * 
 * @member {object} [jobPreparationTaskExecutionInfo] Information about the
 * execution status of the Job Preparation task on this compute node.
 * 
 * @member {date} [jobPreparationTaskExecutionInfo.startTime] The time at
 * which the task started running. Note that every time the task is
 * restarted, this value is updated.
 * 
 * @member {date} [jobPreparationTaskExecutionInfo.endTime] The time at which
 * the Job Preparation task completed. This property is set only if the task
 * is in the Completed state.
 * 
 * @member {string} [jobPreparationTaskExecutionInfo.state] The current state
 * of the Job Preparation task. Possible values include: 'running',
 * 'completed'
 * 
 * @member {string} [jobPreparationTaskExecutionInfo.taskRootDirectory] The
 * root directory of the Job Preparation task on the compute node. You can
 * use this path to retrieve files created by the task, such as log files.
 * 
 * @member {string} [jobPreparationTaskExecutionInfo.taskRootDirectoryUrl] The
 * URL to the root directory of the Job Preparation task on the compute node.
 * 
 * @member {number} [jobPreparationTaskExecutionInfo.exitCode] The exit code
 * of the Job Preparation task. This property is set only if the task is in
 * the Completed state.
 * 
 * @member {object} [jobPreparationTaskExecutionInfo.schedulingError] The
 * error encountered by the Batch service when starting the task.
 * 
 * @member {string} [jobPreparationTaskExecutionInfo.schedulingError.category]
 * The category of the task scheduling error. Possible values include:
 * 'usererror', 'servererror', 'unmapped'
 * 
 * @member {string} [jobPreparationTaskExecutionInfo.schedulingError.code] An
 * identifier for the task scheduling error. Codes are invariant and are
 * intended to be consumed programmatically.
 * 
 * @member {string} [jobPreparationTaskExecutionInfo.schedulingError.message]
 * A message describing the task scheduling error, intended to be suitable
 * for display in a user interface.
 * 
 * @member {array} [jobPreparationTaskExecutionInfo.schedulingError.details]
 * The list of additional error details related to the scheduling error.
 * 
 * @member {number} [jobPreparationTaskExecutionInfo.retryCount] The number of
 * times the task has been retried by the Batch service. Every time the task
 * exits with a non-zero exit code, it is deemed a task failure. The Batch
 * service will retry the task up to the limit specified by the constraints.
 * 
 * @member {date} [jobPreparationTaskExecutionInfo.lastRetryTime] The most
 * recent time at which a retry of the Job Preparation task started running.
 * This property is set only if the task was retried (i.e. retryCount is
 * nonzero).
 * 
 * @member {object} [jobReleaseTaskExecutionInfo] Information about the
 * execution status of the Job Release task on this compute node. This
 * property is set only if the Job Release task has run on the node.
 * 
 * @member {date} [jobReleaseTaskExecutionInfo.startTime] The time at which
 * the task started running. Note that every time the task is restarted, this
 * value is updated.
 * 
 * @member {date} [jobReleaseTaskExecutionInfo.endTime] The time at which the
 * Job Release task completed. This property is set only if the task is in
 * the Completed state.
 * 
 * @member {string} [jobReleaseTaskExecutionInfo.state] The current state of
 * the Job Release task. Possible values include: 'running', 'completed'
 * 
 * @member {string} [jobReleaseTaskExecutionInfo.taskRootDirectory] The root
 * directory of the Job Release task on the compute node. You can use this
 * path to retrieve files created by the task, such as log files.
 * 
 * @member {string} [jobReleaseTaskExecutionInfo.taskRootDirectoryUrl] The URL
 * to the root directory of the Job Release task on the compute node.
 * 
 * @member {number} [jobReleaseTaskExecutionInfo.exitCode] The exit code of
 * the Job Release task. This property is set only if the task is in the
 * Completed state.
 * 
 * @member {object} [jobReleaseTaskExecutionInfo.schedulingError] The
 * scheduling error encountered by the Batch service when starting the task.
 * 
 * @member {string} [jobReleaseTaskExecutionInfo.schedulingError.category] The
 * category of the task scheduling error. Possible values include:
 * 'usererror', 'servererror', 'unmapped'
 * 
 * @member {string} [jobReleaseTaskExecutionInfo.schedulingError.code] An
 * identifier for the task scheduling error. Codes are invariant and are
 * intended to be consumed programmatically.
 * 
 * @member {string} [jobReleaseTaskExecutionInfo.schedulingError.message] A
 * message describing the task scheduling error, intended to be suitable for
 * display in a user interface.
 * 
 * @member {array} [jobReleaseTaskExecutionInfo.schedulingError.details] The
 * list of additional error details related to the scheduling error.
 * 
 */
function JobPreparationAndReleaseTaskExecutionInformation() {
}

/**
 * Defines the metadata of JobPreparationAndReleaseTaskExecutionInformation
 *
 * @returns {object} metadata of JobPreparationAndReleaseTaskExecutionInformation
 *
 */
JobPreparationAndReleaseTaskExecutionInformation.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'JobPreparationAndReleaseTaskExecutionInformation',
    type: {
      name: 'Composite',
      className: 'JobPreparationAndReleaseTaskExecutionInformation',
      modelProperties: {
        poolId: {
          required: false,
          serializedName: 'poolId',
          type: {
            name: 'String'
          }
        },
        nodeId: {
          required: false,
          serializedName: 'nodeId',
          type: {
            name: 'String'
          }
        },
        nodeUrl: {
          required: false,
          serializedName: 'nodeUrl',
          type: {
            name: 'String'
          }
        },
        jobPreparationTaskExecutionInfo: {
          required: false,
          serializedName: 'jobPreparationTaskExecutionInfo',
          type: {
            name: 'Composite',
            className: 'JobPreparationTaskExecutionInformation'
          }
        },
        jobReleaseTaskExecutionInfo: {
          required: false,
          serializedName: 'jobReleaseTaskExecutionInfo',
          type: {
            name: 'Composite',
            className: 'JobReleaseTaskExecutionInformation'
          }
        }
      }
    }
  };
};

module.exports = JobPreparationAndReleaseTaskExecutionInformation;
