/** * 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; /** * An Azure Batch task to add. */ public class TaskAddParameter { /** * A string that uniquely identifies the task within the job. * The id can contain any combination of alphanumeric characters including * hyphens and underscores, and cannot contain more than 64 characters. * It is common to use a GUID for the id. */ @JsonProperty(required = true) private String id; /** * A display name for the task. */ private String displayName; /** * The command line of the task. For multi-instance tasks, the command * line is executed on the primary subtask after all the subtasks have * finished executing the coordianation command line. * 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; /** * How the Batch service should respond when the task completes. */ private ExitConditions exitConditions; /** * A list of files that the Batch service will download to the compute * node before running the command line. * For multi-instance tasks, the resource files will only be downloaded to * the compute node on which the primary subtask is executed. */ private List<ResourceFile> resourceFiles; /** * A list of environment variable settings for the task. */ private List<EnvironmentSetting> environmentSettings; /** * A locality hint that can be used by the Batch service to select a * compute node on which to start the new task. */ private AffinityInformation affinityInfo; /** * The execution constraints that apply to this task. */ private TaskConstraints constraints; /** * Whether to run the task in elevated mode. */ private Boolean runElevated; /** * Information about how to run the multi-instance task. */ private MultiInstanceSettings multiInstanceSettings; /** * Any other tasks that this task depends on. */ private TaskDependencies dependsOn; /** * A list of application packages that the Batch service will deploy to * the compute node before running the command line. */ private List<ApplicationPackageReference> applicationPackageReferences; /** * Get the id value. * * @return the id value */ public String id() { return this.id; } /** * Set the id value. * * @param id the id value to set * @return the TaskAddParameter object itself. */ public TaskAddParameter withId(String id) { this.id = id; return this; } /** * Get the displayName value. * * @return the displayName value */ public String displayName() { return this.displayName; } /** * Set the displayName value. * * @param displayName the displayName value to set * @return the TaskAddParameter object itself. */ public TaskAddParameter withDisplayName(String displayName) { this.displayName = displayName; return this; } /** * 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 TaskAddParameter object itself. */ public TaskAddParameter withCommandLine(String commandLine) { this.commandLine = commandLine; return this; } /** * Get the exitConditions value. * * @return the exitConditions value */ public ExitConditions exitConditions() { return this.exitConditions; } /** * Set the exitConditions value. * * @param exitConditions the exitConditions value to set * @return the TaskAddParameter object itself. */ public TaskAddParameter withExitConditions(ExitConditions exitConditions) { this.exitConditions = exitConditions; 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 TaskAddParameter object itself. */ public TaskAddParameter 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 TaskAddParameter object itself. */ public TaskAddParameter withEnvironmentSettings(List<EnvironmentSetting> environmentSettings) { this.environmentSettings = environmentSettings; return this; } /** * Get the affinityInfo value. * * @return the affinityInfo value */ public AffinityInformation affinityInfo() { return this.affinityInfo; } /** * Set the affinityInfo value. * * @param affinityInfo the affinityInfo value to set * @return the TaskAddParameter object itself. */ public TaskAddParameter withAffinityInfo(AffinityInformation affinityInfo) { this.affinityInfo = affinityInfo; return this; } /** * Get the constraints value. * * @return the constraints value */ public TaskConstraints constraints() { return this.constraints; } /** * Set the constraints value. * * @param constraints the constraints value to set * @return the TaskAddParameter object itself. */ public TaskAddParameter withConstraints(TaskConstraints constraints) { this.constraints = constraints; 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 TaskAddParameter object itself. */ public TaskAddParameter withRunElevated(Boolean runElevated) { this.runElevated = runElevated; return this; } /** * Get the multiInstanceSettings value. * * @return the multiInstanceSettings value */ public MultiInstanceSettings multiInstanceSettings() { return this.multiInstanceSettings; } /** * Set the multiInstanceSettings value. * * @param multiInstanceSettings the multiInstanceSettings value to set * @return the TaskAddParameter object itself. */ public TaskAddParameter withMultiInstanceSettings(MultiInstanceSettings multiInstanceSettings) { this.multiInstanceSettings = multiInstanceSettings; return this; } /** * Get the dependsOn value. * * @return the dependsOn value */ public TaskDependencies dependsOn() { return this.dependsOn; } /** * Set the dependsOn value. * * @param dependsOn the dependsOn value to set * @return the TaskAddParameter object itself. */ public TaskAddParameter withDependsOn(TaskDependencies dependsOn) { this.dependsOn = dependsOn; return this; } /** * Get the applicationPackageReferences value. * * @return the applicationPackageReferences value */ public List<ApplicationPackageReference> applicationPackageReferences() { return this.applicationPackageReferences; } /** * Set the applicationPackageReferences value. * * @param applicationPackageReferences the applicationPackageReferences value to set * @return the TaskAddParameter object itself. */ public TaskAddParameter withApplicationPackageReferences(List<ApplicationPackageReference> applicationPackageReferences) { this.applicationPackageReferences = applicationPackageReferences; return this; } }