# Interface Task.ExecutionSpecOrBuilder (0.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.16.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.Task.ExecutionSpecOrBuilder)
- [0.15.0](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.dataplex.v1.Task.ExecutionSpecOrBuilder)
- [0.14.1](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.dataplex.v1.Task.ExecutionSpecOrBuilder)

    public static interface Task.ExecutionSpecOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### containsArgs(String key)

    public abstract boolean containsArgs(String key)

Optional. The arguments to pass to the task.
The args can use placeholders of the format ${placeholder} as
part of key/value string. These will be interpolated before passing the
args to the driver. Currently supported placeholders:

- ${task_id}
- ${job_time} To pass positional args, set the key as TASK_ARGS. The value should be a comma-separated string of all the positional arguments. To use a delimiter other than comma, refer to <https://cloud.google.com/sdk/gcloud/reference/topic/escaping>. In case of other keys being present in the args, then TASK_ARGS will be passed as the last argument.

`map<string, string> args = 4;`

| **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` |   |

### getArgs()

    public abstract Map<String,String> getArgs()

Use [#getArgsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.Task.ExecutionSpecOrBuilder#com_google_events_cloud_dataplex_v1_Task_ExecutionSpecOrBuilder_getArgsMap__) 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>` |   |

### getArgsCount()

    public abstract int getArgsCount()

Optional. The arguments to pass to the task.
The args can use placeholders of the format ${placeholder} as
part of key/value string. These will be interpolated before passing the
args to the driver. Currently supported placeholders:

- ${task_id}
- ${job_time} To pass positional args, set the key as TASK_ARGS. The value should be a comma-separated string of all the positional arguments. To use a delimiter other than comma, refer to <https://cloud.google.com/sdk/gcloud/reference/topic/escaping>. In case of other keys being present in the args, then TASK_ARGS will be passed as the last argument.

`map<string, string> args = 4;`

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

### getArgsMap()

    public abstract Map<String,String> getArgsMap()

Optional. The arguments to pass to the task.
The args can use placeholders of the format ${placeholder} as
part of key/value string. These will be interpolated before passing the
args to the driver. Currently supported placeholders:

- ${task_id}
- ${job_time} To pass positional args, set the key as TASK_ARGS. The value should be a comma-separated string of all the positional arguments. To use a delimiter other than comma, refer to <https://cloud.google.com/sdk/gcloud/reference/topic/escaping>. In case of other keys being present in the args, then TASK_ARGS will be passed as the last argument.

`map<string, string> args = 4;`

| **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>` |   |

### getArgsOrDefault(String key, String defaultValue)

    public abstract String getArgsOrDefault(String key, String defaultValue)

Optional. The arguments to pass to the task.
The args can use placeholders of the format ${placeholder} as
part of key/value string. These will be interpolated before passing the
args to the driver. Currently supported placeholders:

- ${task_id}
- ${job_time} To pass positional args, set the key as TASK_ARGS. The value should be a comma-separated string of all the positional arguments. To use a delimiter other than comma, refer to <https://cloud.google.com/sdk/gcloud/reference/topic/escaping>. In case of other keys being present in the args, then TASK_ARGS will be passed as the last argument.

`map<string, string> args = 4;`

| **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` |   |

### getArgsOrThrow(String key)

    public abstract String getArgsOrThrow(String key)

Optional. The arguments to pass to the task.
The args can use placeholders of the format ${placeholder} as
part of key/value string. These will be interpolated before passing the
args to the driver. Currently supported placeholders:

- ${task_id}
- ${job_time} To pass positional args, set the key as TASK_ARGS. The value should be a comma-separated string of all the positional arguments. To use a delimiter other than comma, refer to <https://cloud.google.com/sdk/gcloud/reference/topic/escaping>. In case of other keys being present in the args, then TASK_ARGS will be passed as the last argument.

`map<string, string> args = 4;`

| **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` |   |

### getKmsKey()

    public abstract String getKmsKey()

Optional. The Cloud KMS key to use for encryption, of the form:
`projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`.

`string kms_key = 9;`

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

### getKmsKeyBytes()

    public abstract ByteString getKmsKeyBytes()

Optional. The Cloud KMS key to use for encryption, of the form:
`projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`.

`string kms_key = 9;`

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

### getMaxJobExecutionLifetime()

    public abstract Duration getMaxJobExecutionLifetime()

Optional. The maximum duration after which the job execution is expired.

`.google.protobuf.Duration max_job_execution_lifetime = 8;`

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

### getMaxJobExecutionLifetimeOrBuilder()

    public abstract DurationOrBuilder getMaxJobExecutionLifetimeOrBuilder()

Optional. The maximum duration after which the job execution is expired.

`.google.protobuf.Duration max_job_execution_lifetime = 8;`

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

### getProject()

    public abstract String getProject()

Optional. The project in which jobs are run. By default, the project
containing the Lake is used. If a project is provided, the
ExecutionSpec.service_account
must belong to this project.

`string project = 7;`

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

### getProjectBytes()

    public abstract ByteString getProjectBytes()

Optional. The project in which jobs are run. By default, the project
containing the Lake is used. If a project is provided, the
ExecutionSpec.service_account
must belong to this project.

`string project = 7;`

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

### getServiceAccount()

    public abstract String getServiceAccount()

Required. Service account to use to execute a task.
If not provided, the default Compute service account for the project is
used.

`string service_account = 5;`

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

### getServiceAccountBytes()

    public abstract ByteString getServiceAccountBytes()

Required. Service account to use to execute a task.
If not provided, the default Compute service account for the project is
used.

`string service_account = 5;`

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

### hasMaxJobExecutionLifetime()

    public abstract boolean hasMaxJobExecutionLifetime()

Optional. The maximum duration after which the job execution is expired.

`.google.protobuf.Duration max_job_execution_lifetime = 8;`

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