Class WorkflowTemplate (4.40.0)

public final class WorkflowTemplate extends GeneratedMessageV3 implements WorkflowTemplateOrBuilder

A Dataproc workflow template resource.

Protobuf type google.cloud.dataproc.v1.WorkflowTemplate

Static Fields

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DAG_TIMEOUT_FIELD_NUMBER

public static final int DAG_TIMEOUT_FIELD_NUMBER
Field Value
Type Description
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
Type Description
int

JOBS_FIELD_NUMBER

public static final int JOBS_FIELD_NUMBER
Field Value
Type Description
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PARAMETERS_FIELD_NUMBER

public static final int PARAMETERS_FIELD_NUMBER
Field Value
Type Description
int

PLACEMENT_FIELD_NUMBER

public static final int PLACEMENT_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

VERSION_FIELD_NUMBER

public static final int VERSION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static WorkflowTemplate getDefaultInstance()
Returns
Type Description
WorkflowTemplate

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static WorkflowTemplate.Builder newBuilder()
Returns
Type Description
WorkflowTemplate.Builder

newBuilder(WorkflowTemplate prototype)

public static WorkflowTemplate.Builder newBuilder(WorkflowTemplate prototype)
Parameter
Name Description
prototype WorkflowTemplate
Returns
Type Description
WorkflowTemplate.Builder

parseDelimitedFrom(InputStream input)

public static WorkflowTemplate parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
WorkflowTemplate
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static WorkflowTemplate parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkflowTemplate
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static WorkflowTemplate parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
WorkflowTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static WorkflowTemplate parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkflowTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static WorkflowTemplate parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
WorkflowTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static WorkflowTemplate parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkflowTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static WorkflowTemplate parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
WorkflowTemplate
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static WorkflowTemplate parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkflowTemplate
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static WorkflowTemplate parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
WorkflowTemplate
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static WorkflowTemplate parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkflowTemplate
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static WorkflowTemplate parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
WorkflowTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static WorkflowTemplate parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WorkflowTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<WorkflowTemplate> parser()
Returns
Type Description
Parser<WorkflowTemplate>

Methods

containsLabels(String key)

public boolean containsLabels(String key)

Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance.

Label keys must contain 1 to 63 characters, and must conform to RFC 1035.

Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035.

No more than 32 labels can be associated with a template.

map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCreateTime()

public Timestamp getCreateTime()

Output only. The time template was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time template was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDagTimeout()

public Duration getDagTimeout()

Optional. Timeout duration for the DAG of jobs, expressed in seconds (see JSON representation of duration). The timeout duration must be from 10 minutes ("600s") to 24 hours ("86400s"). The timer begins when the first job is submitted. If the workflow is running at the end of the timeout period, any remaining jobs are cancelled, the workflow is ended, and if the workflow was running on a managed cluster, the cluster is deleted.

.google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Duration

The dagTimeout.

getDagTimeoutOrBuilder()

public DurationOrBuilder getDagTimeoutOrBuilder()

Optional. Timeout duration for the DAG of jobs, expressed in seconds (see JSON representation of duration). The timeout duration must be from 10 minutes ("600s") to 24 hours ("86400s"). The timer begins when the first job is submitted. If the workflow is running at the end of the timeout period, any remaining jobs are cancelled, the workflow is ended, and if the workflow was running on a managed cluster, the cluster is deleted.

.google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DurationOrBuilder

getDefaultInstanceForType()

public WorkflowTemplate getDefaultInstanceForType()
Returns
Type Description
WorkflowTemplate

getId()

public String getId()

string id = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The id.

getIdBytes()

public ByteString getIdBytes()

string id = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for id.

getJobs(int index)

public OrderedJob getJobs(int index)

Required. The Directed Acyclic Graph of Jobs to submit.

repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
OrderedJob

getJobsCount()

public int getJobsCount()

Required. The Directed Acyclic Graph of Jobs to submit.

repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getJobsList()

public List<OrderedJob> getJobsList()

Required. The Directed Acyclic Graph of Jobs to submit.

repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<OrderedJob>

getJobsOrBuilder(int index)

public OrderedJobOrBuilder getJobsOrBuilder(int index)

Required. The Directed Acyclic Graph of Jobs to submit.

repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
OrderedJobOrBuilder

getJobsOrBuilderList()

public List<? extends OrderedJobOrBuilder> getJobsOrBuilderList()

Required. The Directed Acyclic Graph of Jobs to submit.

repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<? extends com.google.cloud.dataproc.v1.OrderedJobOrBuilder>

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance.

Label keys must contain 1 to 63 characters, and must conform to RFC 1035.

Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035.

No more than 32 labels can be associated with a template.

map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance.

Label keys must contain 1 to 63 characters, and must conform to RFC 1035.

Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035.

No more than 32 labels can be associated with a template.

map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance.

Label keys must contain 1 to 63 characters, and must conform to RFC 1035.

Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035.

No more than 32 labels can be associated with a template.

map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance.

Label keys must contain 1 to 63 characters, and must conform to RFC 1035.

Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035.

No more than 32 labels can be associated with a template.

map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getName()

public String getName()

Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.

  • For projects.regions.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}

  • For projects.locations.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.

  • For projects.regions.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id}

  • For projects.locations.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

getParameters(int index)

public TemplateParameter getParameters(int index)

Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.

repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
TemplateParameter

getParametersCount()

public int getParametersCount()

Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.

repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getParametersList()

public List<TemplateParameter> getParametersList()

Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.

repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<TemplateParameter>

getParametersOrBuilder(int index)

public TemplateParameterOrBuilder getParametersOrBuilder(int index)

Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.

repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
TemplateParameterOrBuilder

getParametersOrBuilderList()

public List<? extends TemplateParameterOrBuilder> getParametersOrBuilderList()

Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.

repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.dataproc.v1.TemplateParameterOrBuilder>

getParserForType()

public Parser<WorkflowTemplate> getParserForType()
Returns
Type Description
Parser<WorkflowTemplate>
Overrides

getPlacement()

public WorkflowTemplatePlacement getPlacement()

Required. WorkflowTemplate scheduling information.

.google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
WorkflowTemplatePlacement

The placement.

getPlacementOrBuilder()

public WorkflowTemplatePlacementOrBuilder getPlacementOrBuilder()

Required. WorkflowTemplate scheduling information.

.google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
WorkflowTemplatePlacementOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The time template was last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time template was last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getVersion()

public int getVersion()

Optional. Used to perform a consistent read-modify-write.

This field should be left blank for a CreateWorkflowTemplate request. It is required for an UpdateWorkflowTemplate request, and must match the current server version. A typical update template flow would fetch the current template with a GetWorkflowTemplate request, which will return the current template with the version field filled in with the current server version. The user updates other fields in the template, then returns it as part of the UpdateWorkflowTemplate request.

int32 version = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The version.

hasCreateTime()

public boolean hasCreateTime()

Output only. The time template was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasDagTimeout()

public boolean hasDagTimeout()

Optional. Timeout duration for the DAG of jobs, expressed in seconds (see JSON representation of duration). The timeout duration must be from 10 minutes ("600s") to 24 hours ("86400s"). The timer begins when the first job is submitted. If the workflow is running at the end of the timeout period, any remaining jobs are cancelled, the workflow is ended, and if the workflow was running on a managed cluster, the cluster is deleted.

.google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the dagTimeout field is set.

hasPlacement()

public boolean hasPlacement()

Required. WorkflowTemplate scheduling information.

.google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the placement field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The time template was last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public WorkflowTemplate.Builder newBuilderForType()
Returns
Type Description
WorkflowTemplate.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected WorkflowTemplate.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
WorkflowTemplate.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public WorkflowTemplate.Builder toBuilder()
Returns
Type Description
WorkflowTemplate.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException