CommandJobLimits Class

public final class CommandJobLimits
extends JobLimits

Command Job limit class.

Constructor Summary

Constructor Description
CommandJobLimits()

Creates an instance of CommandJobLimits class.

Method Summary

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

Reads an instance of CommandJobLimits from the JsonReader.

JobLimitsType jobLimitsType()

Get the jobLimitsType property: [Required] JobLimit type.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

CommandJobLimits withTimeout(Duration timeout)

Set the timeout property: The max run duration in ISO 8601 format, after which the job will be cancelled.

Methods inherited from JobLimits

Methods inherited from java.lang.Object

Constructor Details

CommandJobLimits

public CommandJobLimits()

Creates an instance of CommandJobLimits class.

Method Details

fromJson

public static CommandJobLimits fromJson(JsonReader jsonReader)

Reads an instance of CommandJobLimits from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If an error occurs while reading the CommandJobLimits.

jobLimitsType

public JobLimitsType jobLimitsType()

Get the jobLimitsType property: [Required] JobLimit type.

Overrides:

CommandJobLimits.jobLimitsType()

Returns:

the jobLimitsType value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

CommandJobLimits.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Overrides:

CommandJobLimits.validate()

withTimeout

public CommandJobLimits withTimeout(Duration timeout)

Set the timeout property: The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds.

Overrides:

CommandJobLimits.withTimeout(Duration timeout)

Parameters:

timeout

Applies to