/*
 * 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 StartTask class.
 * @constructor
 * A task which is run when a compute node joins a pool in the Azure Batch
 * service, or when the compute node is rebooted or reimaged.
 * @member {string} [commandLine] The command line of the start 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 start task.
 * 
 * @member {boolean} [runElevated] Whether to run the start task in elevated
 * mode. The default value is false.
 * 
 * @member {number} [maxTaskRetryCount] The maximum number of times the task
 * may be retried.
 * 
 * @member {boolean} [waitForSuccess] Whether the Batch service should wait
 * for the start task to complete successfully (that is, to exit with exit
 * code 0) before scheduling any tasks on the compute node.
 * 
 */
function StartTask() {
}

/**
 * Defines the metadata of StartTask
 *
 * @returns {object} metadata of StartTask
 *
 */
StartTask.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'StartTask',
    type: {
      name: 'Composite',
      className: 'StartTask',
      modelProperties: {
        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'
                }
            }
          }
        },
        runElevated: {
          required: false,
          serializedName: 'runElevated',
          type: {
            name: 'Boolean'
          }
        },
        maxTaskRetryCount: {
          required: false,
          serializedName: 'maxTaskRetryCount',
          type: {
            name: 'Number'
          }
        },
        waitForSuccess: {
          required: false,
          serializedName: 'waitForSuccess',
          type: {
            name: 'Boolean'
          }
        }
      }
    }
  };
};

module.exports = StartTask;
