Class WorkflowTaskStartedEventAttributes.Builder

    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<WorkflowTaskStartedEventAttributes.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<WorkflowTaskStartedEventAttributes.Builder>
      • getDefaultInstanceForType

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

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

        public WorkflowTaskStartedEventAttributes buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

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

        public WorkflowTaskStartedEventAttributes.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                             throws java.io.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<WorkflowTaskStartedEventAttributes.Builder>
        Throws:
        java.io.IOException
      • setScheduledEventId

        public WorkflowTaskStartedEventAttributes.Builder setScheduledEventId​(long value)
         The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to
         
        int64 scheduled_event_id = 1;
        Parameters:
        value - The scheduledEventId to set.
        Returns:
        This builder for chaining.
      • clearScheduledEventId

        public WorkflowTaskStartedEventAttributes.Builder clearScheduledEventId()
         The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to
         
        int64 scheduled_event_id = 1;
        Returns:
        This builder for chaining.
      • setIdentity

        public WorkflowTaskStartedEventAttributes.Builder setIdentity​(java.lang.String value)
         Identity of the worker who picked up this task
         
        string identity = 2;
        Parameters:
        value - The identity to set.
        Returns:
        This builder for chaining.
      • setIdentityBytes

        public WorkflowTaskStartedEventAttributes.Builder setIdentityBytes​(com.google.protobuf.ByteString value)
         Identity of the worker who picked up this task
         
        string identity = 2;
        Parameters:
        value - The bytes for identity to set.
        Returns:
        This builder for chaining.
      • getRequestId

        public java.lang.String getRequestId()
         This field is populated from the RecordWorkflowTaskStartedRequest. Matching service would
         set the request_id on the RecordWorkflowTaskStartedRequest to a new UUID. This is useful
         in case a RecordWorkflowTaskStarted call succeed but matching doesn't get that response,
         so matching could retry and history service would return success if the request_id matches.
         In that case, matching will continue to deliver the task to worker. Without this field, history
         service would return AlreadyStarted error, and matching would drop the task.
         
        string request_id = 3;
        Specified by:
        getRequestId in interface WorkflowTaskStartedEventAttributesOrBuilder
        Returns:
        The requestId.
      • getRequestIdBytes

        public com.google.protobuf.ByteString getRequestIdBytes()
         This field is populated from the RecordWorkflowTaskStartedRequest. Matching service would
         set the request_id on the RecordWorkflowTaskStartedRequest to a new UUID. This is useful
         in case a RecordWorkflowTaskStarted call succeed but matching doesn't get that response,
         so matching could retry and history service would return success if the request_id matches.
         In that case, matching will continue to deliver the task to worker. Without this field, history
         service would return AlreadyStarted error, and matching would drop the task.
         
        string request_id = 3;
        Specified by:
        getRequestIdBytes in interface WorkflowTaskStartedEventAttributesOrBuilder
        Returns:
        The bytes for requestId.
      • setRequestId

        public WorkflowTaskStartedEventAttributes.Builder setRequestId​(java.lang.String value)
         This field is populated from the RecordWorkflowTaskStartedRequest. Matching service would
         set the request_id on the RecordWorkflowTaskStartedRequest to a new UUID. This is useful
         in case a RecordWorkflowTaskStarted call succeed but matching doesn't get that response,
         so matching could retry and history service would return success if the request_id matches.
         In that case, matching will continue to deliver the task to worker. Without this field, history
         service would return AlreadyStarted error, and matching would drop the task.
         
        string request_id = 3;
        Parameters:
        value - The requestId to set.
        Returns:
        This builder for chaining.
      • clearRequestId

        public WorkflowTaskStartedEventAttributes.Builder clearRequestId()
         This field is populated from the RecordWorkflowTaskStartedRequest. Matching service would
         set the request_id on the RecordWorkflowTaskStartedRequest to a new UUID. This is useful
         in case a RecordWorkflowTaskStarted call succeed but matching doesn't get that response,
         so matching could retry and history service would return success if the request_id matches.
         In that case, matching will continue to deliver the task to worker. Without this field, history
         service would return AlreadyStarted error, and matching would drop the task.
         
        string request_id = 3;
        Returns:
        This builder for chaining.
      • setRequestIdBytes

        public WorkflowTaskStartedEventAttributes.Builder setRequestIdBytes​(com.google.protobuf.ByteString value)
         This field is populated from the RecordWorkflowTaskStartedRequest. Matching service would
         set the request_id on the RecordWorkflowTaskStartedRequest to a new UUID. This is useful
         in case a RecordWorkflowTaskStarted call succeed but matching doesn't get that response,
         so matching could retry and history service would return success if the request_id matches.
         In that case, matching will continue to deliver the task to worker. Without this field, history
         service would return AlreadyStarted error, and matching would drop the task.
         
        string request_id = 3;
        Parameters:
        value - The bytes for requestId to set.
        Returns:
        This builder for chaining.
      • getSuggestContinueAsNew

        public boolean getSuggestContinueAsNew()
         True if this workflow should continue-as-new soon. See `suggest_continue_as_new_reasons` for why.
         
        bool suggest_continue_as_new = 4;
        Specified by:
        getSuggestContinueAsNew in interface WorkflowTaskStartedEventAttributesOrBuilder
        Returns:
        The suggestContinueAsNew.
      • setSuggestContinueAsNew

        public WorkflowTaskStartedEventAttributes.Builder setSuggestContinueAsNew​(boolean value)
         True if this workflow should continue-as-new soon. See `suggest_continue_as_new_reasons` for why.
         
        bool suggest_continue_as_new = 4;
        Parameters:
        value - The suggestContinueAsNew to set.
        Returns:
        This builder for chaining.
      • clearSuggestContinueAsNew

        public WorkflowTaskStartedEventAttributes.Builder clearSuggestContinueAsNew()
         True if this workflow should continue-as-new soon. See `suggest_continue_as_new_reasons` for why.
         
        bool suggest_continue_as_new = 4;
        Returns:
        This builder for chaining.
      • getSuggestContinueAsNewReasonsCount

        public int getSuggestContinueAsNewReasonsCount()
         The reason(s) that suggest_continue_as_new is true, if it is.
         Unset if suggest_continue_as_new is false.
         
        repeated .temporal.api.enums.v1.SuggestContinueAsNewReason suggest_continue_as_new_reasons = 8;
        Specified by:
        getSuggestContinueAsNewReasonsCount in interface WorkflowTaskStartedEventAttributesOrBuilder
        Returns:
        The count of suggestContinueAsNewReasons.
      • getSuggestContinueAsNewReasons

        public SuggestContinueAsNewReason getSuggestContinueAsNewReasons​(int index)
         The reason(s) that suggest_continue_as_new is true, if it is.
         Unset if suggest_continue_as_new is false.
         
        repeated .temporal.api.enums.v1.SuggestContinueAsNewReason suggest_continue_as_new_reasons = 8;
        Specified by:
        getSuggestContinueAsNewReasons in interface WorkflowTaskStartedEventAttributesOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The suggestContinueAsNewReasons at the given index.
      • setSuggestContinueAsNewReasons

        public WorkflowTaskStartedEventAttributes.Builder setSuggestContinueAsNewReasons​(int index,
                                                                                         SuggestContinueAsNewReason value)
         The reason(s) that suggest_continue_as_new is true, if it is.
         Unset if suggest_continue_as_new is false.
         
        repeated .temporal.api.enums.v1.SuggestContinueAsNewReason suggest_continue_as_new_reasons = 8;
        Parameters:
        index - The index to set the value at.
        value - The suggestContinueAsNewReasons to set.
        Returns:
        This builder for chaining.
      • addSuggestContinueAsNewReasons

        public WorkflowTaskStartedEventAttributes.Builder addSuggestContinueAsNewReasons​(SuggestContinueAsNewReason value)
         The reason(s) that suggest_continue_as_new is true, if it is.
         Unset if suggest_continue_as_new is false.
         
        repeated .temporal.api.enums.v1.SuggestContinueAsNewReason suggest_continue_as_new_reasons = 8;
        Parameters:
        value - The suggestContinueAsNewReasons to add.
        Returns:
        This builder for chaining.
      • addAllSuggestContinueAsNewReasons

        public WorkflowTaskStartedEventAttributes.Builder addAllSuggestContinueAsNewReasons​(java.lang.Iterable<? extends SuggestContinueAsNewReason> values)
         The reason(s) that suggest_continue_as_new is true, if it is.
         Unset if suggest_continue_as_new is false.
         
        repeated .temporal.api.enums.v1.SuggestContinueAsNewReason suggest_continue_as_new_reasons = 8;
        Parameters:
        values - The suggestContinueAsNewReasons to add.
        Returns:
        This builder for chaining.
      • clearSuggestContinueAsNewReasons

        public WorkflowTaskStartedEventAttributes.Builder clearSuggestContinueAsNewReasons()
         The reason(s) that suggest_continue_as_new is true, if it is.
         Unset if suggest_continue_as_new is false.
         
        repeated .temporal.api.enums.v1.SuggestContinueAsNewReason suggest_continue_as_new_reasons = 8;
        Returns:
        This builder for chaining.
      • getSuggestContinueAsNewReasonsValueList

        public java.util.List<java.lang.Integer> getSuggestContinueAsNewReasonsValueList()
         The reason(s) that suggest_continue_as_new is true, if it is.
         Unset if suggest_continue_as_new is false.
         
        repeated .temporal.api.enums.v1.SuggestContinueAsNewReason suggest_continue_as_new_reasons = 8;
        Specified by:
        getSuggestContinueAsNewReasonsValueList in interface WorkflowTaskStartedEventAttributesOrBuilder
        Returns:
        A list containing the enum numeric values on the wire for suggestContinueAsNewReasons.
      • getSuggestContinueAsNewReasonsValue

        public int getSuggestContinueAsNewReasonsValue​(int index)
         The reason(s) that suggest_continue_as_new is true, if it is.
         Unset if suggest_continue_as_new is false.
         
        repeated .temporal.api.enums.v1.SuggestContinueAsNewReason suggest_continue_as_new_reasons = 8;
        Specified by:
        getSuggestContinueAsNewReasonsValue in interface WorkflowTaskStartedEventAttributesOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The enum numeric value on the wire of suggestContinueAsNewReasons at the given index.
      • setSuggestContinueAsNewReasonsValue

        public WorkflowTaskStartedEventAttributes.Builder setSuggestContinueAsNewReasonsValue​(int index,
                                                                                              int value)
         The reason(s) that suggest_continue_as_new is true, if it is.
         Unset if suggest_continue_as_new is false.
         
        repeated .temporal.api.enums.v1.SuggestContinueAsNewReason suggest_continue_as_new_reasons = 8;
        Parameters:
        index - The index to set the value at.
        value - The enum numeric value on the wire for suggestContinueAsNewReasons to set.
        Returns:
        This builder for chaining.
      • addSuggestContinueAsNewReasonsValue

        public WorkflowTaskStartedEventAttributes.Builder addSuggestContinueAsNewReasonsValue​(int value)
         The reason(s) that suggest_continue_as_new is true, if it is.
         Unset if suggest_continue_as_new is false.
         
        repeated .temporal.api.enums.v1.SuggestContinueAsNewReason suggest_continue_as_new_reasons = 8;
        Parameters:
        value - The enum numeric value on the wire for suggestContinueAsNewReasons to add.
        Returns:
        This builder for chaining.
      • addAllSuggestContinueAsNewReasonsValue

        public WorkflowTaskStartedEventAttributes.Builder addAllSuggestContinueAsNewReasonsValue​(java.lang.Iterable<java.lang.Integer> values)
         The reason(s) that suggest_continue_as_new is true, if it is.
         Unset if suggest_continue_as_new is false.
         
        repeated .temporal.api.enums.v1.SuggestContinueAsNewReason suggest_continue_as_new_reasons = 8;
        Parameters:
        values - The enum numeric values on the wire for suggestContinueAsNewReasons to add.
        Returns:
        This builder for chaining.
      • getTargetWorkerDeploymentVersionChanged

        public boolean getTargetWorkerDeploymentVersionChanged()
         True if Workflow's Target Worker Deployment Version is different from its Pinned Version and
         the workflow is Pinned.
         Experimental.
         
        bool target_worker_deployment_version_changed = 9;
        Specified by:
        getTargetWorkerDeploymentVersionChanged in interface WorkflowTaskStartedEventAttributesOrBuilder
        Returns:
        The targetWorkerDeploymentVersionChanged.
      • setTargetWorkerDeploymentVersionChanged

        public WorkflowTaskStartedEventAttributes.Builder setTargetWorkerDeploymentVersionChanged​(boolean value)
         True if Workflow's Target Worker Deployment Version is different from its Pinned Version and
         the workflow is Pinned.
         Experimental.
         
        bool target_worker_deployment_version_changed = 9;
        Parameters:
        value - The targetWorkerDeploymentVersionChanged to set.
        Returns:
        This builder for chaining.
      • clearTargetWorkerDeploymentVersionChanged

        public WorkflowTaskStartedEventAttributes.Builder clearTargetWorkerDeploymentVersionChanged()
         True if Workflow's Target Worker Deployment Version is different from its Pinned Version and
         the workflow is Pinned.
         Experimental.
         
        bool target_worker_deployment_version_changed = 9;
        Returns:
        This builder for chaining.
      • getHistorySizeBytes

        public long getHistorySizeBytes()
         Total history size in bytes, which the workflow might use to decide when to
         continue-as-new regardless of the suggestion. Note that history event count is
         just the event id of this event, so we don't include it explicitly here.
         
        int64 history_size_bytes = 5;
        Specified by:
        getHistorySizeBytes in interface WorkflowTaskStartedEventAttributesOrBuilder
        Returns:
        The historySizeBytes.
      • setHistorySizeBytes

        public WorkflowTaskStartedEventAttributes.Builder setHistorySizeBytes​(long value)
         Total history size in bytes, which the workflow might use to decide when to
         continue-as-new regardless of the suggestion. Note that history event count is
         just the event id of this event, so we don't include it explicitly here.
         
        int64 history_size_bytes = 5;
        Parameters:
        value - The historySizeBytes to set.
        Returns:
        This builder for chaining.
      • clearHistorySizeBytes

        public WorkflowTaskStartedEventAttributes.Builder clearHistorySizeBytes()
         Total history size in bytes, which the workflow might use to decide when to
         continue-as-new regardless of the suggestion. Note that history event count is
         just the event id of this event, so we don't include it explicitly here.
         
        int64 history_size_bytes = 5;
        Returns:
        This builder for chaining.
      • hasWorkerVersion

        @Deprecated
        public boolean hasWorkerVersion()
        Deprecated.
        temporal.api.history.v1.WorkflowTaskStartedEventAttributes.worker_version is deprecated. See temporal/api/history/v1/message.proto;l=310
         Version info of the worker to whom this task was dispatched.
         Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
         
        .temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true];
        Specified by:
        hasWorkerVersion in interface WorkflowTaskStartedEventAttributesOrBuilder
        Returns:
        Whether the workerVersion field is set.
      • getWorkerVersion

        @Deprecated
        public WorkerVersionStamp getWorkerVersion()
        Deprecated.
        temporal.api.history.v1.WorkflowTaskStartedEventAttributes.worker_version is deprecated. See temporal/api/history/v1/message.proto;l=310
         Version info of the worker to whom this task was dispatched.
         Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
         
        .temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true];
        Specified by:
        getWorkerVersion in interface WorkflowTaskStartedEventAttributesOrBuilder
        Returns:
        The workerVersion.
      • setWorkerVersion

        @Deprecated
        public WorkflowTaskStartedEventAttributes.Builder setWorkerVersion​(WorkerVersionStamp value)
        Deprecated.
         Version info of the worker to whom this task was dispatched.
         Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
         
        .temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true];
      • setWorkerVersion

        @Deprecated
        public WorkflowTaskStartedEventAttributes.Builder setWorkerVersion​(WorkerVersionStamp.Builder builderForValue)
        Deprecated.
         Version info of the worker to whom this task was dispatched.
         Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
         
        .temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true];
      • mergeWorkerVersion

        @Deprecated
        public WorkflowTaskStartedEventAttributes.Builder mergeWorkerVersion​(WorkerVersionStamp value)
        Deprecated.
         Version info of the worker to whom this task was dispatched.
         Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
         
        .temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true];
      • clearWorkerVersion

        @Deprecated
        public WorkflowTaskStartedEventAttributes.Builder clearWorkerVersion()
        Deprecated.
         Version info of the worker to whom this task was dispatched.
         Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
         
        .temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true];
      • getWorkerVersionBuilder

        @Deprecated
        public WorkerVersionStamp.Builder getWorkerVersionBuilder()
        Deprecated.
         Version info of the worker to whom this task was dispatched.
         Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
         
        .temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true];
      • getBuildIdRedirectCounter

        @Deprecated
        public long getBuildIdRedirectCounter()
        Deprecated.
        temporal.api.history.v1.WorkflowTaskStartedEventAttributes.build_id_redirect_counter is deprecated. See temporal/api/history/v1/message.proto;l=314
         Used by server internally to properly reapply build ID redirects to an execution
         when rebuilding it from events.
         Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
         
        int64 build_id_redirect_counter = 7 [deprecated = true];
        Specified by:
        getBuildIdRedirectCounter in interface WorkflowTaskStartedEventAttributesOrBuilder
        Returns:
        The buildIdRedirectCounter.
      • setBuildIdRedirectCounter

        @Deprecated
        public WorkflowTaskStartedEventAttributes.Builder setBuildIdRedirectCounter​(long value)
        Deprecated.
        temporal.api.history.v1.WorkflowTaskStartedEventAttributes.build_id_redirect_counter is deprecated. See temporal/api/history/v1/message.proto;l=314
         Used by server internally to properly reapply build ID redirects to an execution
         when rebuilding it from events.
         Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
         
        int64 build_id_redirect_counter = 7 [deprecated = true];
        Parameters:
        value - The buildIdRedirectCounter to set.
        Returns:
        This builder for chaining.
      • clearBuildIdRedirectCounter

        @Deprecated
        public WorkflowTaskStartedEventAttributes.Builder clearBuildIdRedirectCounter()
        Deprecated.
        temporal.api.history.v1.WorkflowTaskStartedEventAttributes.build_id_redirect_counter is deprecated. See temporal/api/history/v1/message.proto;l=314
         Used by server internally to properly reapply build ID redirects to an execution
         when rebuilding it from events.
         Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
         
        int64 build_id_redirect_counter = 7 [deprecated = true];
        Returns:
        This builder for chaining.