Partager via


FileTaskRunRequest Class

public final class FileTaskRunRequest
extends RunRequest

The request parameters for a scheduling run against a task file.

Constructor Summary

Constructor Description
FileTaskRunRequest()

Creates an instance of FileTaskRunRequest class.

Method Summary

Modifier and Type Method and Description
AgentProperties agentConfiguration()

Get the agentConfiguration property: The machine configuration of the run agent.

Credentials credentials()

Get the credentials property: The properties that describes a set of credentials that will be used when this run is invoked.

static FileTaskRunRequest fromJson(JsonReader jsonReader)

Reads an instance of FileTaskRunRequest from the JsonReader.

PlatformProperties platform()

Get the platform property: The platform properties against which the run has to happen.

String sourceLocation()

Get the sourceLocation property: The URL(absolute or relative) of the source context.

String taskFilePath()

Get the taskFilePath property: The template/definition file path relative to the source.

Integer timeout()

Get the timeout property: Run timeout in seconds.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

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

void validate()

Validates the instance.

List<SetValue> values()

Get the values property: The collection of overridable values that can be passed when running a task.

String valuesFilePath()

Get the valuesFilePath property: The values/parameters file path relative to the source.

FileTaskRunRequest withAgentConfiguration(AgentProperties agentConfiguration)

Set the agentConfiguration property: The machine configuration of the run agent.

FileTaskRunRequest withAgentPoolName(String agentPoolName)

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

FileTaskRunRequest withCredentials(Credentials credentials)

Set the credentials property: The properties that describes a set of credentials that will be used when this run is invoked.

FileTaskRunRequest withIsArchiveEnabled(Boolean isArchiveEnabled)

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

FileTaskRunRequest withLogTemplate(String logTemplate)

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

FileTaskRunRequest withPlatform(PlatformProperties platform)

Set the platform property: The platform properties against which the run has to happen.

FileTaskRunRequest withSourceLocation(String sourceLocation)

Set the sourceLocation property: The URL(absolute or relative) of the source context.

FileTaskRunRequest withTaskFilePath(String taskFilePath)

Set the taskFilePath property: The template/definition file path relative to the source.

FileTaskRunRequest withTimeout(Integer timeout)

Set the timeout property: Run timeout in seconds.

FileTaskRunRequest withValues(List<SetValue> values)

Set the values property: The collection of overridable values that can be passed when running a task.

FileTaskRunRequest withValuesFilePath(String valuesFilePath)

Set the valuesFilePath property: The values/parameters file path relative to the source.

Methods inherited from RunRequest

Methods inherited from java.lang.Object

Constructor Details

FileTaskRunRequest

public FileTaskRunRequest()

Creates an instance of FileTaskRunRequest class.

Method Details

agentConfiguration

public AgentProperties agentConfiguration()

Get the agentConfiguration property: The machine configuration of the run agent.

Returns:

the agentConfiguration value.

credentials

public Credentials credentials()

Get the credentials property: The properties that describes a set of credentials that will be used when this run is invoked.

Returns:

the credentials value.

fromJson

public static FileTaskRunRequest fromJson(JsonReader jsonReader)

Reads an instance of FileTaskRunRequest from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of FileTaskRunRequest 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.

platform

public PlatformProperties platform()

Get the platform property: The platform properties against which the run has to happen.

Returns:

the platform value.

sourceLocation

public String sourceLocation()

Get the sourceLocation property: The URL(absolute or relative) of the source context. It can be an URL to a tar or git repository. If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API.

Returns:

the sourceLocation value.

taskFilePath

public String taskFilePath()

Get the taskFilePath property: The template/definition file path relative to the source.

Returns:

the taskFilePath value.

timeout

public Integer timeout()

Get the timeout property: Run timeout in seconds.

Returns:

the timeout value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

FileTaskRunRequest.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

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

Overrides:

FileTaskRunRequest.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

Overrides:

FileTaskRunRequest.validate()

values

public List<SetValue> values()

Get the values property: The collection of overridable values that can be passed when running a task.

Returns:

the values value.

valuesFilePath

public String valuesFilePath()

Get the valuesFilePath property: The values/parameters file path relative to the source.

Returns:

the valuesFilePath value.

withAgentConfiguration

public FileTaskRunRequest withAgentConfiguration(AgentProperties agentConfiguration)

Set the agentConfiguration property: The machine configuration of the run agent.

Parameters:

agentConfiguration - the agentConfiguration value to set.

Returns:

the FileTaskRunRequest object itself.

withAgentPoolName

public FileTaskRunRequest withAgentPoolName(String agentPoolName)

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

Overrides:

FileTaskRunRequest.withAgentPoolName(String agentPoolName)

Parameters:

agentPoolName

withCredentials

public FileTaskRunRequest withCredentials(Credentials credentials)

Set the credentials property: The properties that describes a set of credentials that will be used when this run is invoked.

Parameters:

credentials - the credentials value to set.

Returns:

the FileTaskRunRequest object itself.

withIsArchiveEnabled

public FileTaskRunRequest withIsArchiveEnabled(Boolean isArchiveEnabled)

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

Overrides:

FileTaskRunRequest.withIsArchiveEnabled(Boolean isArchiveEnabled)

Parameters:

isArchiveEnabled

withLogTemplate

public FileTaskRunRequest withLogTemplate(String logTemplate)

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

Overrides:

FileTaskRunRequest.withLogTemplate(String logTemplate)

Parameters:

logTemplate

withPlatform

public FileTaskRunRequest withPlatform(PlatformProperties platform)

Set the platform property: The platform properties against which the run has to happen.

Parameters:

platform - the platform value to set.

Returns:

the FileTaskRunRequest object itself.

withSourceLocation

public FileTaskRunRequest withSourceLocation(String sourceLocation)

Set the sourceLocation property: The URL(absolute or relative) of the source context. It can be an URL to a tar or git repository. If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API.

Parameters:

sourceLocation - the sourceLocation value to set.

Returns:

the FileTaskRunRequest object itself.

withTaskFilePath

public FileTaskRunRequest withTaskFilePath(String taskFilePath)

Set the taskFilePath property: The template/definition file path relative to the source.

Parameters:

taskFilePath - the taskFilePath value to set.

Returns:

the FileTaskRunRequest object itself.

withTimeout

public FileTaskRunRequest withTimeout(Integer timeout)

Set the timeout property: Run timeout in seconds.

Parameters:

timeout - the timeout value to set.

Returns:

the FileTaskRunRequest object itself.

withValues

public FileTaskRunRequest withValues(List<SetValue> values)

Set the values property: The collection of overridable values that can be passed when running a task.

Parameters:

values - the values value to set.

Returns:

the FileTaskRunRequest object itself.

withValuesFilePath

public FileTaskRunRequest withValuesFilePath(String valuesFilePath)

Set the valuesFilePath property: The values/parameters file path relative to the source.

Parameters:

valuesFilePath - the valuesFilePath value to set.

Returns:

the FileTaskRunRequest object itself.

Applies to