/**
* 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.
*/
package com.microsoft.azure.batch.protocol.models;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* 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.
*/
public class StartTask {
/**
* The command line of the start task.
* The command line does not run under a shell, and therefore cannot take
* advantage of shell features such as environment variable expansion. If
* you want to take advantage of such features, you should invoke the
* shell in the command line, for example using "cmd /c MyCommand" in
* Windows or "/bin/sh -c MyCommand" in Linux.
*/
@JsonProperty(required = true)
private String commandLine;
/**
* A list of files that the Batch service will download to the compute
* node before running the command line.
*/
private List<ResourceFile> resourceFiles;
/**
* A list of environment variable settings for the start task.
*/
private List<EnvironmentSetting> environmentSettings;
/**
* Whether to run the start task in elevated mode. The default value is
* false.
*/
private Boolean runElevated;
/**
* The maximum number of times the task may be retried.
*/
private Integer maxTaskRetryCount;
/**
* 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.
*/
private Boolean waitForSuccess;
/**
* Get the commandLine value.
*
* @return the commandLine value
*/
public String commandLine() {
return this.commandLine;
}
/**
* Set the commandLine value.
*
* @param commandLine the commandLine value to set
* @return the StartTask object itself.
*/
public StartTask withCommandLine(String commandLine) {
this.commandLine = commandLine;
return this;
}
/**
* Get the resourceFiles value.
*
* @return the resourceFiles value
*/
public List<ResourceFile> resourceFiles() {
return this.resourceFiles;
}
/**
* Set the resourceFiles value.
*
* @param resourceFiles the resourceFiles value to set
* @return the StartTask object itself.
*/
public StartTask withResourceFiles(List<ResourceFile> resourceFiles) {
this.resourceFiles = resourceFiles;
return this;
}
/**
* Get the environmentSettings value.
*
* @return the environmentSettings value
*/
public List<EnvironmentSetting> environmentSettings() {
return this.environmentSettings;
}
/**
* Set the environmentSettings value.
*
* @param environmentSettings the environmentSettings value to set
* @return the StartTask object itself.
*/
public StartTask withEnvironmentSettings(List<EnvironmentSetting> environmentSettings) {
this.environmentSettings = environmentSettings;
return this;
}
/**
* Get the runElevated value.
*
* @return the runElevated value
*/
public Boolean runElevated() {
return this.runElevated;
}
/**
* Set the runElevated value.
*
* @param runElevated the runElevated value to set
* @return the StartTask object itself.
*/
public StartTask withRunElevated(Boolean runElevated) {
this.runElevated = runElevated;
return this;
}
/**
* Get the maxTaskRetryCount value.
*
* @return the maxTaskRetryCount value
*/
public Integer maxTaskRetryCount() {
return this.maxTaskRetryCount;
}
/**
* Set the maxTaskRetryCount value.
*
* @param maxTaskRetryCount the maxTaskRetryCount value to set
* @return the StartTask object itself.
*/
public StartTask withMaxTaskRetryCount(Integer maxTaskRetryCount) {
this.maxTaskRetryCount = maxTaskRetryCount;
return this;
}
/**
* Get the waitForSuccess value.
*
* @return the waitForSuccess value
*/
public Boolean waitForSuccess() {
return this.waitForSuccess;
}
/**
* Set the waitForSuccess value.
*
* @param waitForSuccess the waitForSuccess value to set
* @return the StartTask object itself.
*/
public StartTask withWaitForSuccess(Boolean waitForSuccess) {
this.waitForSuccess = waitForSuccess;
return this;
}
}