Class Task.ExecutionSpec.Builder

  • All Implemented Interfaces:
    Task.ExecutionSpecOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Task.ExecutionSpec

    public static final class Task.ExecutionSpec.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Task.ExecutionSpec.Builder>
    implements Task.ExecutionSpecOrBuilder
     Execution related settings, like retry and service_account.
     
    Protobuf type google.cloud.dataplex.v1.Task.ExecutionSpec
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Task.ExecutionSpec.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Task.ExecutionSpec.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Task.ExecutionSpec.Builder>
      • clear

        public Task.ExecutionSpec.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Task.ExecutionSpec.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Task.ExecutionSpec.Builder>
      • getDefaultInstanceForType

        public Task.ExecutionSpec getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Task.ExecutionSpec build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Task.ExecutionSpec buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Task.ExecutionSpec.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Task.ExecutionSpec.Builder>
      • setField

        public Task.ExecutionSpec.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Task.ExecutionSpec.Builder>
      • clearField

        public Task.ExecutionSpec.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Task.ExecutionSpec.Builder>
      • clearOneof

        public Task.ExecutionSpec.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Task.ExecutionSpec.Builder>
      • setRepeatedField

        public Task.ExecutionSpec.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                           int index,
                                                           Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Task.ExecutionSpec.Builder>
      • addRepeatedField

        public Task.ExecutionSpec.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                           Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Task.ExecutionSpec.Builder>
      • mergeFrom

        public Task.ExecutionSpec.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Task.ExecutionSpec.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Task.ExecutionSpec.Builder>
      • mergeFrom

        public Task.ExecutionSpec.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Task.ExecutionSpec.Builder>
        Throws:
        IOException
      • getArgsCount

        public int getArgsCount()
        Description copied from interface: Task.ExecutionSpecOrBuilder
         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 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getArgsCount in interface Task.ExecutionSpecOrBuilder
      • containsArgs

        public 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 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        containsArgs in interface Task.ExecutionSpecOrBuilder
      • getArgsMap

        public 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 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getArgsMap in interface Task.ExecutionSpecOrBuilder
      • getArgsOrDefault

        public 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 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getArgsOrDefault in interface Task.ExecutionSpecOrBuilder
      • getArgsOrThrow

        public 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 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getArgsOrThrow in interface Task.ExecutionSpecOrBuilder
      • removeArgs

        public Task.ExecutionSpec.Builder removeArgs​(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 [(.google.api.field_behavior) = OPTIONAL];
      • getMutableArgs

        @Deprecated
        public Map<String,​String> getMutableArgs()
        Deprecated.
        Use alternate mutation accessors instead.
      • putArgs

        public Task.ExecutionSpec.Builder putArgs​(String key,
                                                  String value)
         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 [(.google.api.field_behavior) = OPTIONAL];
      • putAllArgs

        public Task.ExecutionSpec.Builder putAllArgs​(Map<String,​String> values)
         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 [(.google.api.field_behavior) = OPTIONAL];
      • getServiceAccount

        public 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 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getServiceAccount in interface Task.ExecutionSpecOrBuilder
        Returns:
        The serviceAccount.
      • getServiceAccountBytes

        public com.google.protobuf.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 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getServiceAccountBytes in interface Task.ExecutionSpecOrBuilder
        Returns:
        The bytes for serviceAccount.
      • setServiceAccount

        public Task.ExecutionSpec.Builder setServiceAccount​(String value)
         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 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The serviceAccount to set.
        Returns:
        This builder for chaining.
      • clearServiceAccount

        public Task.ExecutionSpec.Builder clearServiceAccount()
         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 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setServiceAccountBytes

        public Task.ExecutionSpec.Builder setServiceAccountBytes​(com.google.protobuf.ByteString value)
         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 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for serviceAccount to set.
        Returns:
        This builder for chaining.
      • getProject

        public 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][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account]
         must belong to this project.
         
        string project = 7 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getProject in interface Task.ExecutionSpecOrBuilder
        Returns:
        The project.
      • getProjectBytes

        public com.google.protobuf.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][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account]
         must belong to this project.
         
        string project = 7 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getProjectBytes in interface Task.ExecutionSpecOrBuilder
        Returns:
        The bytes for project.
      • setProject

        public Task.ExecutionSpec.Builder setProject​(String value)
         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][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account]
         must belong to this project.
         
        string project = 7 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The project to set.
        Returns:
        This builder for chaining.
      • clearProject

        public Task.ExecutionSpec.Builder clearProject()
         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][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account]
         must belong to this project.
         
        string project = 7 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setProjectBytes

        public Task.ExecutionSpec.Builder setProjectBytes​(com.google.protobuf.ByteString value)
         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][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account]
         must belong to this project.
         
        string project = 7 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes for project to set.
        Returns:
        This builder for chaining.
      • hasMaxJobExecutionLifetime

        public boolean hasMaxJobExecutionLifetime()
         Optional. The maximum duration after which the job execution is expired.
         
        .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        hasMaxJobExecutionLifetime in interface Task.ExecutionSpecOrBuilder
        Returns:
        Whether the maxJobExecutionLifetime field is set.
      • getMaxJobExecutionLifetime

        public com.google.protobuf.Duration getMaxJobExecutionLifetime()
         Optional. The maximum duration after which the job execution is expired.
         
        .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getMaxJobExecutionLifetime in interface Task.ExecutionSpecOrBuilder
        Returns:
        The maxJobExecutionLifetime.
      • setMaxJobExecutionLifetime

        public Task.ExecutionSpec.Builder setMaxJobExecutionLifetime​(com.google.protobuf.Duration value)
         Optional. The maximum duration after which the job execution is expired.
         
        .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL];
      • setMaxJobExecutionLifetime

        public Task.ExecutionSpec.Builder setMaxJobExecutionLifetime​(com.google.protobuf.Duration.Builder builderForValue)
         Optional. The maximum duration after which the job execution is expired.
         
        .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL];
      • mergeMaxJobExecutionLifetime

        public Task.ExecutionSpec.Builder mergeMaxJobExecutionLifetime​(com.google.protobuf.Duration value)
         Optional. The maximum duration after which the job execution is expired.
         
        .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL];
      • clearMaxJobExecutionLifetime

        public Task.ExecutionSpec.Builder clearMaxJobExecutionLifetime()
         Optional. The maximum duration after which the job execution is expired.
         
        .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL];
      • getMaxJobExecutionLifetimeBuilder

        public com.google.protobuf.Duration.Builder getMaxJobExecutionLifetimeBuilder()
         Optional. The maximum duration after which the job execution is expired.
         
        .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL];
      • getMaxJobExecutionLifetimeOrBuilder

        public com.google.protobuf.DurationOrBuilder getMaxJobExecutionLifetimeOrBuilder()
         Optional. The maximum duration after which the job execution is expired.
         
        .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getMaxJobExecutionLifetimeOrBuilder in interface Task.ExecutionSpecOrBuilder
      • getKmsKey

        public 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 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getKmsKey in interface Task.ExecutionSpecOrBuilder
        Returns:
        The kmsKey.
      • getKmsKeyBytes

        public com.google.protobuf.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 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getKmsKeyBytes in interface Task.ExecutionSpecOrBuilder
        Returns:
        The bytes for kmsKey.
      • setKmsKey

        public Task.ExecutionSpec.Builder setKmsKey​(String value)
         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 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The kmsKey to set.
        Returns:
        This builder for chaining.
      • clearKmsKey

        public Task.ExecutionSpec.Builder clearKmsKey()
         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 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setKmsKeyBytes

        public Task.ExecutionSpec.Builder setKmsKeyBytes​(com.google.protobuf.ByteString value)
         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 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes for kmsKey to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Task.ExecutionSpec.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Task.ExecutionSpec.Builder>
      • mergeUnknownFields

        public final Task.ExecutionSpec.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Task.ExecutionSpec.Builder>