# Interface WorkflowTemplateOrBuilder (4.90.0)

4.90.0 (latest) 4.88.0 4.85.0 4.84.0 4.82.0 4.80.0 4.79.0 4.78.0 4.77.0 4.75.0 4.73.0 4.72.0 4.71.0 4.70.0 4.69.0 4.67.0 4.65.0 4.64.0 4.61.0 4.60.0 4.59.0 4.57.0 4.56.0 4.55.0 4.54.0 4.53.0 4.52.0 4.51.0 4.50.0 4.49.0 4.48.0 4.46.0 4.45.0 4.44.0 4.43.0 4.42.0 4.41.0 4.40.0 4.39.0 4.38.0 4.37.0 4.36.0 4.34.0 4.33.0 4.32.0 4.31.0 4.30.0 4.29.0 4.28.0 4.27.0 4.26.0 4.25.0 4.24.0 4.21.0 4.20.0 4.19.0 4.18.0 4.17.0 4.16.0 4.15.0 4.14.0 4.13.0 4.12.0 4.11.0 4.10.0 4.9.0 4.8.0 4.6.0 4.5.0 4.4.0 4.3.0 4.2.0 4.1.0 4.0.8 3.1.2 3.0.3 2.3.1

    public interface WorkflowTemplateOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsLabels(String key)

    public abstract 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](https://www.ietf.org/rfc/rfc1035.txt).

Label **values** may be empty, but, if present, must contain 1 to 63
characters, and must conform to
[RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).

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` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getCreateTime()

    public abstract Timestamp getCreateTime()

Output only. The time template was created.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The createTime. |

### getCreateTimeOrBuilder()

    public abstract TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time template was created.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getDagTimeout()

    public abstract Duration getDagTimeout()

Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
[JSON representation of
duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
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](https://docs.cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
the cluster is deleted.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Duration.html` | The dagTimeout. |

### getDagTimeoutOrBuilder()

    public abstract DurationOrBuilder getDagTimeoutOrBuilder()

Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
[JSON representation of
duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
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](https://docs.cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
the cluster is deleted.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.DurationOrBuilder.html` |   |

### getEncryptionConfig()

    public abstract WorkflowTemplate.EncryptionConfig getEncryptionConfig()

Optional. Encryption settings for encrypting workflow template job
arguments.

`
.google.cloud.dataproc.v1.WorkflowTemplate.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-dataproc/latest/com.google.cloud.dataproc.v1.WorkflowTemplate.EncryptionConfig` | The encryptionConfig. |

### getEncryptionConfigOrBuilder()

    public abstract WorkflowTemplate.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder()

Optional. Encryption settings for encrypting workflow template job
arguments.

`
.google.cloud.dataproc.v1.WorkflowTemplate.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-dataproc/latest/com.google.cloud.dataproc.v1.WorkflowTemplate.EncryptionConfigOrBuilder` |   |

### getId()

    public abstract String getId()

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The id. |

### getIdBytes()

    public abstract ByteString getIdBytes()

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for id. |

### getJobs(int index)

    public abstract 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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-dataproc/latest/com.google.cloud.dataproc.v1.OrderedJob` |   |

### getJobsCount()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getJobsList()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-dataproc/latest/com.google.cloud.dataproc.v1.OrderedJob>` |   |

### getJobsOrBuilder(int index)

    public abstract 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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-dataproc/latest/com.google.cloud.dataproc.v1.OrderedJobOrBuilder` |   |

### getJobsOrBuilderList()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.cloud.dataproc.v1.OrderedJobOrBuilder>` |   |

### getLabels() (deprecated)

    public abstract Map<String,String> getLabels()

Use [#getLabelsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-dataproc/latest/com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder#com_google_cloud_dataproc_v1_WorkflowTemplateOrBuilder_getLabelsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsCount()

    public abstract 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](https://www.ietf.org/rfc/rfc1035.txt).

Label **values** may be empty, but, if present, must contain 1 to 63
characters, and must conform to
[RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getLabelsMap()

    public abstract 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](https://www.ietf.org/rfc/rfc1035.txt).

Label **values** may be empty, but, if present, must contain 1 to 63
characters, and must conform to
[RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsOrDefault(String key, String defaultValue)

    public abstract 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](https://www.ietf.org/rfc/rfc1035.txt).

Label **values** may be empty, but, if present, must contain 1 to 63
characters, and must conform to
[RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).

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` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getLabelsOrThrow(String key)

    public abstract 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](https://www.ietf.org/rfc/rfc1035.txt).

Label **values** may be empty, but, if present, must contain 1 to 63
characters, and must conform to
[RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).

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` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getName()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract 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** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getParameters(int index)

    public abstract 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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-dataproc/latest/com.google.cloud.dataproc.v1.TemplateParameter` |   |

### getParametersCount()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getParametersList()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-dataproc/latest/com.google.cloud.dataproc.v1.TemplateParameter>` |   |

### getParametersOrBuilder(int index)

    public abstract 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` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-dataproc/latest/com.google.cloud.dataproc.v1.TemplateParameterOrBuilder` |   |

### getParametersOrBuilderList()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.cloud.dataproc.v1.TemplateParameterOrBuilder>` |   |

### getPlacement()

    public abstract WorkflowTemplatePlacement getPlacement()

Required. WorkflowTemplate scheduling information.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-dataproc/latest/com.google.cloud.dataproc.v1.WorkflowTemplatePlacement` | The placement. |

### getPlacementOrBuilder()

    public abstract WorkflowTemplatePlacementOrBuilder getPlacementOrBuilder()

Required. WorkflowTemplate scheduling information.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-dataproc/latest/com.google.cloud.dataproc.v1.WorkflowTemplatePlacementOrBuilder` |   |

### getUpdateTime()

    public abstract 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** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The updateTime. |

### getUpdateTimeOrBuilder()

    public abstract 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** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getVersion()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The version. |

### hasCreateTime()

    public abstract boolean hasCreateTime()

Output only. The time template was created.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the createTime field is set. |

### hasDagTimeout()

    public abstract boolean hasDagTimeout()

Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
[JSON representation of
duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
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](https://docs.cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
the cluster is deleted.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the dagTimeout field is set. |

### hasEncryptionConfig()

    public abstract boolean hasEncryptionConfig()

Optional. Encryption settings for encrypting workflow template job
arguments.

`
.google.cloud.dataproc.v1.WorkflowTemplate.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the encryptionConfig field is set. |

### hasPlacement()

    public abstract boolean hasPlacement()

Required. WorkflowTemplate scheduling information.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the placement field is set. |

### hasUpdateTime()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the updateTime field is set. |