Partager via


TaskRunRequest Class

public final class TaskRunRequest
extends RunRequest

The parameters for a task run request.

Constructor Summary

Constructor Description
TaskRunRequest()

Creates an instance of TaskRunRequest class.

Method Summary

Modifier and Type Method and Description
static TaskRunRequest fromJson(JsonReader jsonReader)

Reads an instance of TaskRunRequest from the JsonReader.

OverrideTaskStepProperties overrideTaskStepProperties()

Get the overrideTaskStepProperties property: Set of overridable parameters that can be passed when running a Task.

String taskId()

Get the taskId property: The resource ID of task against which run has to be queued.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The type of the run request.

void validate()

Validates the instance.

TaskRunRequest withAgentPoolName(String agentPoolName)

Set the agentPoolName property: The dedicated agent pool for the run.

TaskRunRequest withIsArchiveEnabled(Boolean isArchiveEnabled)

Set the isArchiveEnabled property: The value that indicates whether archiving is enabled for the run or not.

TaskRunRequest withLogTemplate(String logTemplate)

Set the logTemplate property: The template that describes the repository and tag information for run log artifact.

TaskRunRequest withOverrideTaskStepProperties(OverrideTaskStepProperties overrideTaskStepProperties)

Set the overrideTaskStepProperties property: Set of overridable parameters that can be passed when running a Task.

TaskRunRequest withTaskId(String taskId)

Set the taskId property: The resource ID of task against which run has to be queued.

Methods inherited from RunRequest

Methods inherited from java.lang.Object

Constructor Details

TaskRunRequest

public TaskRunRequest()

Creates an instance of TaskRunRequest class.

Method Details

fromJson

public static TaskRunRequest fromJson(JsonReader jsonReader)

Reads an instance of TaskRunRequest from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of TaskRunRequest if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

overrideTaskStepProperties

public OverrideTaskStepProperties overrideTaskStepProperties()

Get the overrideTaskStepProperties property: Set of overridable parameters that can be passed when running a Task.

Returns:

the overrideTaskStepProperties value.

taskId

public String taskId()

Get the taskId property: The resource ID of task against which run has to be queued.

Returns:

the taskId value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

TaskRunRequest.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The type of the run request.

Overrides:

TaskRunRequest.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

Overrides:

TaskRunRequest.validate()

withAgentPoolName

public TaskRunRequest withAgentPoolName(String agentPoolName)

Set the agentPoolName property: The dedicated agent pool for the run.

Overrides:

TaskRunRequest.withAgentPoolName(String agentPoolName)

Parameters:

agentPoolName

withIsArchiveEnabled

public TaskRunRequest withIsArchiveEnabled(Boolean isArchiveEnabled)

Set the isArchiveEnabled property: The value that indicates whether archiving is enabled for the run or not.

Overrides:

TaskRunRequest.withIsArchiveEnabled(Boolean isArchiveEnabled)

Parameters:

isArchiveEnabled

withLogTemplate

public TaskRunRequest withLogTemplate(String logTemplate)

Set the logTemplate property: The template that describes the repository and tag information for run log artifact.

Overrides:

TaskRunRequest.withLogTemplate(String logTemplate)

Parameters:

logTemplate

withOverrideTaskStepProperties

public TaskRunRequest withOverrideTaskStepProperties(OverrideTaskStepProperties overrideTaskStepProperties)

Set the overrideTaskStepProperties property: Set of overridable parameters that can be passed when running a Task.

Parameters:

overrideTaskStepProperties - the overrideTaskStepProperties value to set.

Returns:

the TaskRunRequest object itself.

withTaskId

public TaskRunRequest withTaskId(String taskId)

Set the taskId property: The resource ID of task against which run has to be queued.

Parameters:

taskId - the taskId value to set.

Returns:

the TaskRunRequest object itself.

Applies to