From 6425011258d5b971f2156047c190933f1dfde0fb Mon Sep 17 00:00:00 2001 From: taylan isikdemir Date: Mon, 18 Mar 2024 09:43:08 -0700 Subject: [PATCH 1/2] Update idl and add wrapper implementaton for async start/signalwithstart APIs --- .gen/go/cadence/cadence.go | 2218 ++++++++++++++--- .../cadence/workflowserviceclient/client.go | 58 + .../cadence/workflowserviceserver/server.go | 94 +- .gen/go/cadence/workflowservicetest/client.go | 66 + .gen/go/shared/shared.go | 800 +++++- go.mod | 2 +- go.sum | 2 + idls | 2 +- internal/common/auth/service_wrapper.go | 23 +- internal/common/auth/service_wrapper_test.go | 32 + .../common/isolationgroup/service_wrapper.go | 12 + .../isolationgroup/service_wrapper_test.go | 35 +- internal/common/metrics/constants.go | 4 +- internal/common/metrics/service_wrapper.go | 98 +- .../common/metrics/service_wrapper_test.go | 9 +- internal/internal_event_handlers_test.go | 3 +- internal/internal_utils.go | 3 +- internal/jwt_authorization_test.go | 1 + internal/oauth_authorization.go | 3 +- internal/oauth_authorization_test.go | 20 + internal/workflow_replayer_utils_test.go | 4 +- test/replaytests/continue_as_new_wf.go | 23 +- test/replaytests/sequential_workflow.go | 3 +- 23 files changed, 3136 insertions(+), 379 deletions(-) diff --git a/.gen/go/cadence/cadence.go b/.gen/go/cadence/cadence.go index 8d01964ee..a24c7fa3d 100644 --- a/.gen/go/cadence/cadence.go +++ b/.gen/go/cadence/cadence.go @@ -41,14 +41,14 @@ var ThriftModule = &thriftreflect.ThriftModule{ Name: "cadence", Package: "go.uber.org/cadence/.gen/go/cadence", FilePath: "cadence.thrift", - SHA1: "39303bb2ea5213cb3398e89b39efa71f957b279c", + SHA1: "d3aed495096c071e130c4dd03f2ff16c7a9a2022", Includes: []*thriftreflect.ThriftModule{ shared.ThriftModule, }, Raw: rawIDL, } -const rawIDL = "// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\ninclude \"shared.thrift\"\n\nnamespace java com.uber.cadence\n\n/**\n* WorkflowService API is exposed to provide support for long running applications. Application is expected to call\n* StartWorkflowExecution to create an instance for each instance of long running workflow. Such applications are expected\n* to have a worker which regularly polls for DecisionTask and ActivityTask from the WorkflowService. For each\n* DecisionTask, application is expected to process the history of events for that session and respond back with next\n* decisions. For each ActivityTask, application is expected to execute the actual logic for that task and respond back\n* with completion or failure. Worker is expected to regularly heartbeat while activity task is running.\n**/\nservice WorkflowService {\n /**\n * RegisterDomain creates a new domain which can be used as a container for all resources. Domain is a top level\n * entity within Cadence, used as a container for all resources like workflow executions, tasklists, etc. Domain\n * acts as a sandbox and provides isolation for all resources within the domain. All resources belongs to exactly one\n * domain.\n **/\n void RegisterDomain(1: shared.RegisterDomainRequest registerRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.DomainAlreadyExistsError domainExistsError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * DescribeDomain returns the information and configuration for a registered domain.\n **/\n shared.DescribeDomainResponse DescribeDomain(1: shared.DescribeDomainRequest describeRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * ListDomains returns the information and configuration for all domains.\n **/\n shared.ListDomainsResponse ListDomains(1: shared.ListDomainsRequest listRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * UpdateDomain is used to update the information and configuration for a registered domain.\n **/\n shared.UpdateDomainResponse UpdateDomain(1: shared.UpdateDomainRequest updateRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * DeprecateDomain us used to update status of a registered domain to DEPRECATED. Once the domain is deprecated\n * it cannot be used to start new workflow executions. Existing workflow executions will continue to run on\n * deprecated domains.\n **/\n void DeprecateDomain(1: shared.DeprecateDomainRequest deprecateRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * RestartWorkflowExecution restarts a previous workflow\n * If the workflow is currently running it will terminate and restart\n **/\n shared.RestartWorkflowExecutionResponse RestartWorkflowExecution(1: shared.RestartWorkflowExecutionRequest restartRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 2: shared.ServiceBusyError serviceBusyError,\n 3: shared.DomainNotActiveError domainNotActiveError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.EntityNotExistsError entityNotExistError,\n 6: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n /**\n * StartWorkflowExecution starts a new long running workflow instance. It will create the instance with\n * 'WorkflowExecutionStarted' event in history and also schedule the first DecisionTask for the worker to make the\n * first decision for this instance. It will return 'WorkflowExecutionAlreadyStartedError', if an instance already\n * exists with same workflowId.\n **/\n shared.StartWorkflowExecutionResponse StartWorkflowExecution(1: shared.StartWorkflowExecutionRequest startRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.WorkflowExecutionAlreadyStartedError sessionAlreadyExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.LimitExceededError limitExceededError,\n 7: shared.EntityNotExistsError entityNotExistError,\n 8: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * Returns the history of specified workflow execution. It fails with 'EntityNotExistError' if speficied workflow\n * execution in unknown to the service.\n **/\n shared.GetWorkflowExecutionHistoryResponse GetWorkflowExecutionHistory(1: shared.GetWorkflowExecutionHistoryRequest getRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * PollForDecisionTask is called by application worker to process DecisionTask from a specific taskList. A\n * DecisionTask is dispatched to callers for active workflow executions, with pending decisions.\n * Application is then expected to call 'RespondDecisionTaskCompleted' API when it is done processing the DecisionTask.\n * It will also create a 'DecisionTaskStarted' event in the history for that session before handing off DecisionTask to\n * application worker.\n **/\n shared.PollForDecisionTaskResponse PollForDecisionTask(1: shared.PollForDecisionTaskRequest pollRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.ServiceBusyError serviceBusyError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.EntityNotExistsError entityNotExistError,\n 6: shared.DomainNotActiveError domainNotActiveError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * RespondDecisionTaskCompleted is called by application worker to complete a DecisionTask handed as a result of\n * 'PollForDecisionTask' API call. Completing a DecisionTask will result in new events for the workflow execution and\n * potentially new ActivityTask being created for corresponding decisions. It will also create a DecisionTaskCompleted\n * event in the history for that session. Use the 'taskToken' provided as response of PollForDecisionTask API call\n * for completing the DecisionTask.\n * The response could contain a new decision task if there is one or if the request asking for one.\n **/\n shared.RespondDecisionTaskCompletedResponse RespondDecisionTaskCompleted(1: shared.RespondDecisionTaskCompletedRequest completeRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RespondDecisionTaskFailed is called by application worker to indicate failure. This results in\n * DecisionTaskFailedEvent written to the history and a new DecisionTask created. This API can be used by client to\n * either clear sticky tasklist or report any panics during DecisionTask processing. Cadence will only append first\n * DecisionTaskFailed event to the history of workflow execution for consecutive failures.\n **/\n void RespondDecisionTaskFailed(1: shared.RespondDecisionTaskFailedRequest failedRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * PollForActivityTask is called by application worker to process ActivityTask from a specific taskList. ActivityTask\n * is dispatched to callers whenever a ScheduleTask decision is made for a workflow execution.\n * Application is expected to call 'RespondActivityTaskCompleted' or 'RespondActivityTaskFailed' once it is done\n * processing the task.\n * Application also needs to call 'RecordActivityTaskHeartbeat' API within 'heartbeatTimeoutSeconds' interval to\n * prevent the task from getting timed out. An event 'ActivityTaskStarted' event is also written to workflow execution\n * history before the ActivityTask is dispatched to application worker.\n **/\n shared.PollForActivityTaskResponse PollForActivityTask(1: shared.PollForActivityTaskRequest pollRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.ServiceBusyError serviceBusyError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.EntityNotExistsError entityNotExistError,\n 6: shared.DomainNotActiveError domainNotActiveError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * RecordActivityTaskHeartbeat is called by application worker while it is processing an ActivityTask. If worker fails\n * to heartbeat within 'heartbeatTimeoutSeconds' interval for the ActivityTask, then it will be marked as timedout and\n * 'ActivityTaskTimedOut' event will be written to the workflow history. Calling 'RecordActivityTaskHeartbeat' will\n * fail with 'EntityNotExistsError' in such situations. Use the 'taskToken' provided as response of\n * PollForActivityTask API call for heartbeating.\n **/\n shared.RecordActivityTaskHeartbeatResponse RecordActivityTaskHeartbeat(1: shared.RecordActivityTaskHeartbeatRequest heartbeatRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RecordActivityTaskHeartbeatByID is called by application worker while it is processing an ActivityTask. If worker fails\n * to heartbeat within 'heartbeatTimeoutSeconds' interval for the ActivityTask, then it will be marked as timedout and\n * 'ActivityTaskTimedOut' event will be written to the workflow history. Calling 'RecordActivityTaskHeartbeatByID' will\n * fail with 'EntityNotExistsError' in such situations. Instead of using 'taskToken' like in RecordActivityTaskHeartbeat,\n * use Domain, WorkflowID and ActivityID\n **/\n shared.RecordActivityTaskHeartbeatResponse RecordActivityTaskHeartbeatByID(1: shared.RecordActivityTaskHeartbeatByIDRequest heartbeatRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RespondActivityTaskCompleted is called by application worker when it is done processing an ActivityTask. It will\n * result in a new 'ActivityTaskCompleted' event being written to the workflow history and a new DecisionTask\n * created for the workflow so new decisions could be made. Use the 'taskToken' provided as response of\n * PollForActivityTask API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid\n * anymore due to activity timeout.\n **/\n void RespondActivityTaskCompleted(1: shared.RespondActivityTaskCompletedRequest completeRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RespondActivityTaskCompletedByID is called by application worker when it is done processing an ActivityTask.\n * It will result in a new 'ActivityTaskCompleted' event being written to the workflow history and a new DecisionTask\n * created for the workflow so new decisions could be made. Similar to RespondActivityTaskCompleted but use Domain,\n * WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError'\n * if the these IDs are not valid anymore due to activity timeout.\n **/\n void RespondActivityTaskCompletedByID(1: shared.RespondActivityTaskCompletedByIDRequest completeRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RespondActivityTaskFailed is called by application worker when it is done processing an ActivityTask. It will\n * result in a new 'ActivityTaskFailed' event being written to the workflow history and a new DecisionTask\n * created for the workflow instance so new decisions could be made. Use the 'taskToken' provided as response of\n * PollForActivityTask API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid\n * anymore due to activity timeout.\n **/\n void RespondActivityTaskFailed(1: shared.RespondActivityTaskFailedRequest failRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RespondActivityTaskFailedByID is called by application worker when it is done processing an ActivityTask.\n * It will result in a new 'ActivityTaskFailed' event being written to the workflow history and a new DecisionTask\n * created for the workflow instance so new decisions could be made. Similar to RespondActivityTaskFailed but use\n * Domain, WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError'\n * if the these IDs are not valid anymore due to activity timeout.\n **/\n void RespondActivityTaskFailedByID(1: shared.RespondActivityTaskFailedByIDRequest failRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RespondActivityTaskCanceled is called by application worker when it is successfully canceled an ActivityTask. It will\n * result in a new 'ActivityTaskCanceled' event being written to the workflow history and a new DecisionTask\n * created for the workflow instance so new decisions could be made. Use the 'taskToken' provided as response of\n * PollForActivityTask API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid\n * anymore due to activity timeout.\n **/\n void RespondActivityTaskCanceled(1: shared.RespondActivityTaskCanceledRequest canceledRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RespondActivityTaskCanceledByID is called by application worker when it is successfully canceled an ActivityTask.\n * It will result in a new 'ActivityTaskCanceled' event being written to the workflow history and a new DecisionTask\n * created for the workflow instance so new decisions could be made. Similar to RespondActivityTaskCanceled but use\n * Domain, WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError'\n * if the these IDs are not valid anymore due to activity timeout.\n **/\n void RespondActivityTaskCanceledByID(1: shared.RespondActivityTaskCanceledByIDRequest canceledRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RequestCancelWorkflowExecution is called by application worker when it wants to request cancellation of a workflow instance.\n * It will result in a new 'WorkflowExecutionCancelRequested' event being written to the workflow history and a new DecisionTask\n * created for the workflow instance so new decisions could be made. It fails with 'EntityNotExistsError' if the workflow is not valid\n * anymore due to completion or doesn't exist.\n **/\n void RequestCancelWorkflowExecution(1: shared.RequestCancelWorkflowExecutionRequest cancelRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.CancellationAlreadyRequestedError cancellationAlreadyRequestedError,\n 5: shared.ServiceBusyError serviceBusyError,\n 6: shared.DomainNotActiveError domainNotActiveError,\n 7: shared.LimitExceededError limitExceededError,\n 8: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 9: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * SignalWorkflowExecution is used to send a signal event to running workflow execution. This results in\n * WorkflowExecutionSignaled event recorded in the history and a decision task being created for the execution.\n **/\n void SignalWorkflowExecution(1: shared.SignalWorkflowExecutionRequest signalRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.LimitExceededError limitExceededError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * SignalWithStartWorkflowExecution is used to ensure sending signal to a workflow.\n * If the workflow is running, this results in WorkflowExecutionSignaled event being recorded in the history\n * and a decision task being created for the execution.\n * If the workflow is not running or not found, this results in WorkflowExecutionStarted and WorkflowExecutionSignaled\n * events being recorded in history, and a decision task being created for the execution\n **/\n shared.StartWorkflowExecutionResponse SignalWithStartWorkflowExecution(1: shared.SignalWithStartWorkflowExecutionRequest signalWithStartRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.LimitExceededError limitExceededError,\n 7: shared.WorkflowExecutionAlreadyStartedError workflowAlreadyStartedError,\n 8: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * ResetWorkflowExecution reset an existing workflow execution to DecisionTaskCompleted event(exclusive).\n * And it will immediately terminating the current execution instance.\n **/\n shared.ResetWorkflowExecutionResponse ResetWorkflowExecution(1: shared.ResetWorkflowExecutionRequest resetRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.LimitExceededError limitExceededError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * TerminateWorkflowExecution terminates an existing workflow execution by recording WorkflowExecutionTerminated event\n * in the history and immediately terminating the execution instance.\n **/\n void TerminateWorkflowExecution(1: shared.TerminateWorkflowExecutionRequest terminateRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.LimitExceededError limitExceededError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific domain.\n **/\n shared.ListOpenWorkflowExecutionsResponse ListOpenWorkflowExecutions(1: shared.ListOpenWorkflowExecutionsRequest listRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific domain.\n **/\n shared.ListClosedWorkflowExecutionsResponse ListClosedWorkflowExecutions(1: shared.ListClosedWorkflowExecutionsRequest listRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * ListWorkflowExecutions is a visibility API to list workflow executions in a specific domain.\n **/\n shared.ListWorkflowExecutionsResponse ListWorkflowExecutions(1: shared.ListWorkflowExecutionsRequest listRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific domain.\n **/\n shared.ListArchivedWorkflowExecutionsResponse ListArchivedWorkflowExecutions(1: shared.ListArchivedWorkflowExecutionsRequest listRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * ScanWorkflowExecutions is a visibility API to list large amount of workflow executions in a specific domain without order.\n **/\n shared.ListWorkflowExecutionsResponse ScanWorkflowExecutions(1: shared.ListWorkflowExecutionsRequest listRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * CountWorkflowExecutions is a visibility API to count of workflow executions in a specific domain.\n **/\n shared.CountWorkflowExecutionsResponse CountWorkflowExecutions(1: shared.CountWorkflowExecutionsRequest countRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs\n **/\n shared.GetSearchAttributesResponse GetSearchAttributes()\n throws (\n 2: shared.ServiceBusyError serviceBusyError,\n 3: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * RespondQueryTaskCompleted is called by application worker to complete a QueryTask (which is a DecisionTask for query)\n * as a result of 'PollForDecisionTask' API call. Completing a QueryTask will unblock the client call to 'QueryWorkflow'\n * API and return the query result to client as a response to 'QueryWorkflow' API call.\n **/\n void RespondQueryTaskCompleted(1: shared.RespondQueryTaskCompletedRequest completeRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.ServiceBusyError serviceBusyError,\n 6: shared.DomainNotActiveError domainNotActiveError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * Reset the sticky tasklist related information in mutable state of a given workflow.\n * Things cleared are:\n * 1. StickyTaskList\n * 2. StickyScheduleToStartTimeout\n * 3. ClientLibraryVersion\n * 4. ClientFeatureVersion\n * 5. ClientImpl\n **/\n shared.ResetStickyTaskListResponse ResetStickyTaskList(1: shared.ResetStickyTaskListRequest resetRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.ServiceBusyError serviceBusyError,\n 6: shared.DomainNotActiveError domainNotActiveError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * QueryWorkflow returns query result for a specified workflow execution\n **/\n shared.QueryWorkflowResponse QueryWorkflow(1: shared.QueryWorkflowRequest queryRequest)\n\tthrows (\n\t 1: shared.BadRequestError badRequestError,\n\t 3: shared.EntityNotExistsError entityNotExistError,\n\t 4: shared.QueryFailedError queryFailedError,\n\t 5: shared.LimitExceededError limitExceededError,\n\t 6: shared.ServiceBusyError serviceBusyError,\n\t 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n\t)\n\n /**\n * DescribeWorkflowExecution returns information about the specified workflow execution.\n **/\n shared.DescribeWorkflowExecutionResponse DescribeWorkflowExecution(1: shared.DescribeWorkflowExecutionRequest describeRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.ServiceBusyError serviceBusyError,\n 6: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * DescribeTaskList returns information about the target tasklist, right now this API returns the\n * pollers which polled this tasklist in last few minutes.\n **/\n shared.DescribeTaskListResponse DescribeTaskList(1: shared.DescribeTaskListRequest request)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.ServiceBusyError serviceBusyError,\n 6: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * GetClusterInfo returns information about cadence cluster\n **/\n shared.ClusterInfo GetClusterInfo()\n throws (\n 1: shared.InternalServiceError internalServiceError,\n 2: shared.ServiceBusyError serviceBusyError,\n )\n\n /**\n * GetTaskListsByDomain returns the list of all the task lists for a domainName.\n **/\n shared.GetTaskListsByDomainResponse GetTaskListsByDomain(1: shared.GetTaskListsByDomainRequest request)\n throws (\n 1: shared.BadRequestError badRequestError,\n 2: shared.EntityNotExistsError entityNotExistError,\n 3: shared.LimitExceededError limitExceededError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * ReapplyEvents applies stale events to the current workflow and current run\n **/\n shared.ListTaskListPartitionsResponse ListTaskListPartitions(1: shared.ListTaskListPartitionsRequest request)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.ServiceBusyError serviceBusyError,\n )\n\n /**\n * RefreshWorkflowTasks refreshes all tasks of a workflow\n **/\n void RefreshWorkflowTasks(1: shared.RefreshWorkflowTasksRequest request)\n throws (\n 1: shared.BadRequestError badRequestError,\n 2: shared.DomainNotActiveError domainNotActiveError,\n 3: shared.ServiceBusyError serviceBusyError,\n 4: shared.EntityNotExistsError entityNotExistError,\n )\n}\n" +const rawIDL = "// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\ninclude \"shared.thrift\"\n\nnamespace java com.uber.cadence\n\n/**\n* WorkflowService API is exposed to provide support for long running applications. Application is expected to call\n* StartWorkflowExecution to create an instance for each instance of long running workflow. Such applications are expected\n* to have a worker which regularly polls for DecisionTask and ActivityTask from the WorkflowService. For each\n* DecisionTask, application is expected to process the history of events for that session and respond back with next\n* decisions. For each ActivityTask, application is expected to execute the actual logic for that task and respond back\n* with completion or failure. Worker is expected to regularly heartbeat while activity task is running.\n**/\nservice WorkflowService {\n /**\n * RegisterDomain creates a new domain which can be used as a container for all resources. Domain is a top level\n * entity within Cadence, used as a container for all resources like workflow executions, tasklists, etc. Domain\n * acts as a sandbox and provides isolation for all resources within the domain. All resources belongs to exactly one\n * domain.\n **/\n void RegisterDomain(1: shared.RegisterDomainRequest registerRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.DomainAlreadyExistsError domainExistsError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * DescribeDomain returns the information and configuration for a registered domain.\n **/\n shared.DescribeDomainResponse DescribeDomain(1: shared.DescribeDomainRequest describeRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * ListDomains returns the information and configuration for all domains.\n **/\n shared.ListDomainsResponse ListDomains(1: shared.ListDomainsRequest listRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * UpdateDomain is used to update the information and configuration for a registered domain.\n **/\n shared.UpdateDomainResponse UpdateDomain(1: shared.UpdateDomainRequest updateRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * DeprecateDomain us used to update status of a registered domain to DEPRECATED. Once the domain is deprecated\n * it cannot be used to start new workflow executions. Existing workflow executions will continue to run on\n * deprecated domains.\n **/\n void DeprecateDomain(1: shared.DeprecateDomainRequest deprecateRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * RestartWorkflowExecution restarts a previous workflow\n * If the workflow is currently running it will terminate and restart\n **/\n shared.RestartWorkflowExecutionResponse RestartWorkflowExecution(1: shared.RestartWorkflowExecutionRequest restartRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 2: shared.ServiceBusyError serviceBusyError,\n 3: shared.DomainNotActiveError domainNotActiveError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.EntityNotExistsError entityNotExistError,\n 6: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n /**\n * StartWorkflowExecution starts a new long running workflow instance. It will create the instance with\n * 'WorkflowExecutionStarted' event in history and also schedule the first DecisionTask for the worker to make the\n * first decision for this instance. It will return 'WorkflowExecutionAlreadyStartedError', if an instance already\n * exists with same workflowId.\n **/\n shared.StartWorkflowExecutionResponse StartWorkflowExecution(1: shared.StartWorkflowExecutionRequest startRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.WorkflowExecutionAlreadyStartedError sessionAlreadyExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.LimitExceededError limitExceededError,\n 7: shared.EntityNotExistsError entityNotExistError,\n 8: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n /**\n * StartWorkflowExecutionAsync starts a new long running workflow instance asynchronously. It will push a StartWorkflowExecutionRequest to a queue\n * and immediately return a response. The request will be processed by a separate consumer eventually.\n **/\n shared.StartWorkflowExecutionAsyncResponse StartWorkflowExecutionAsync(1: shared.StartWorkflowExecutionAsyncRequest startRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.WorkflowExecutionAlreadyStartedError sessionAlreadyExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.LimitExceededError limitExceededError,\n 7: shared.EntityNotExistsError entityNotExistError,\n 8: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n /**\n * Returns the history of specified workflow execution. It fails with 'EntityNotExistError' if speficied workflow\n * execution in unknown to the service.\n **/\n shared.GetWorkflowExecutionHistoryResponse GetWorkflowExecutionHistory(1: shared.GetWorkflowExecutionHistoryRequest getRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * PollForDecisionTask is called by application worker to process DecisionTask from a specific taskList. A\n * DecisionTask is dispatched to callers for active workflow executions, with pending decisions.\n * Application is then expected to call 'RespondDecisionTaskCompleted' API when it is done processing the DecisionTask.\n * It will also create a 'DecisionTaskStarted' event in the history for that session before handing off DecisionTask to\n * application worker.\n **/\n shared.PollForDecisionTaskResponse PollForDecisionTask(1: shared.PollForDecisionTaskRequest pollRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.ServiceBusyError serviceBusyError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.EntityNotExistsError entityNotExistError,\n 6: shared.DomainNotActiveError domainNotActiveError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * RespondDecisionTaskCompleted is called by application worker to complete a DecisionTask handed as a result of\n * 'PollForDecisionTask' API call. Completing a DecisionTask will result in new events for the workflow execution and\n * potentially new ActivityTask being created for corresponding decisions. It will also create a DecisionTaskCompleted\n * event in the history for that session. Use the 'taskToken' provided as response of PollForDecisionTask API call\n * for completing the DecisionTask.\n * The response could contain a new decision task if there is one or if the request asking for one.\n **/\n shared.RespondDecisionTaskCompletedResponse RespondDecisionTaskCompleted(1: shared.RespondDecisionTaskCompletedRequest completeRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RespondDecisionTaskFailed is called by application worker to indicate failure. This results in\n * DecisionTaskFailedEvent written to the history and a new DecisionTask created. This API can be used by client to\n * either clear sticky tasklist or report any panics during DecisionTask processing. Cadence will only append first\n * DecisionTaskFailed event to the history of workflow execution for consecutive failures.\n **/\n void RespondDecisionTaskFailed(1: shared.RespondDecisionTaskFailedRequest failedRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * PollForActivityTask is called by application worker to process ActivityTask from a specific taskList. ActivityTask\n * is dispatched to callers whenever a ScheduleTask decision is made for a workflow execution.\n * Application is expected to call 'RespondActivityTaskCompleted' or 'RespondActivityTaskFailed' once it is done\n * processing the task.\n * Application also needs to call 'RecordActivityTaskHeartbeat' API within 'heartbeatTimeoutSeconds' interval to\n * prevent the task from getting timed out. An event 'ActivityTaskStarted' event is also written to workflow execution\n * history before the ActivityTask is dispatched to application worker.\n **/\n shared.PollForActivityTaskResponse PollForActivityTask(1: shared.PollForActivityTaskRequest pollRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.ServiceBusyError serviceBusyError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.EntityNotExistsError entityNotExistError,\n 6: shared.DomainNotActiveError domainNotActiveError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * RecordActivityTaskHeartbeat is called by application worker while it is processing an ActivityTask. If worker fails\n * to heartbeat within 'heartbeatTimeoutSeconds' interval for the ActivityTask, then it will be marked as timedout and\n * 'ActivityTaskTimedOut' event will be written to the workflow history. Calling 'RecordActivityTaskHeartbeat' will\n * fail with 'EntityNotExistsError' in such situations. Use the 'taskToken' provided as response of\n * PollForActivityTask API call for heartbeating.\n **/\n shared.RecordActivityTaskHeartbeatResponse RecordActivityTaskHeartbeat(1: shared.RecordActivityTaskHeartbeatRequest heartbeatRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RecordActivityTaskHeartbeatByID is called by application worker while it is processing an ActivityTask. If worker fails\n * to heartbeat within 'heartbeatTimeoutSeconds' interval for the ActivityTask, then it will be marked as timedout and\n * 'ActivityTaskTimedOut' event will be written to the workflow history. Calling 'RecordActivityTaskHeartbeatByID' will\n * fail with 'EntityNotExistsError' in such situations. Instead of using 'taskToken' like in RecordActivityTaskHeartbeat,\n * use Domain, WorkflowID and ActivityID\n **/\n shared.RecordActivityTaskHeartbeatResponse RecordActivityTaskHeartbeatByID(1: shared.RecordActivityTaskHeartbeatByIDRequest heartbeatRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RespondActivityTaskCompleted is called by application worker when it is done processing an ActivityTask. It will\n * result in a new 'ActivityTaskCompleted' event being written to the workflow history and a new DecisionTask\n * created for the workflow so new decisions could be made. Use the 'taskToken' provided as response of\n * PollForActivityTask API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid\n * anymore due to activity timeout.\n **/\n void RespondActivityTaskCompleted(1: shared.RespondActivityTaskCompletedRequest completeRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RespondActivityTaskCompletedByID is called by application worker when it is done processing an ActivityTask.\n * It will result in a new 'ActivityTaskCompleted' event being written to the workflow history and a new DecisionTask\n * created for the workflow so new decisions could be made. Similar to RespondActivityTaskCompleted but use Domain,\n * WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError'\n * if the these IDs are not valid anymore due to activity timeout.\n **/\n void RespondActivityTaskCompletedByID(1: shared.RespondActivityTaskCompletedByIDRequest completeRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RespondActivityTaskFailed is called by application worker when it is done processing an ActivityTask. It will\n * result in a new 'ActivityTaskFailed' event being written to the workflow history and a new DecisionTask\n * created for the workflow instance so new decisions could be made. Use the 'taskToken' provided as response of\n * PollForActivityTask API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid\n * anymore due to activity timeout.\n **/\n void RespondActivityTaskFailed(1: shared.RespondActivityTaskFailedRequest failRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RespondActivityTaskFailedByID is called by application worker when it is done processing an ActivityTask.\n * It will result in a new 'ActivityTaskFailed' event being written to the workflow history and a new DecisionTask\n * created for the workflow instance so new decisions could be made. Similar to RespondActivityTaskFailed but use\n * Domain, WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError'\n * if the these IDs are not valid anymore due to activity timeout.\n **/\n void RespondActivityTaskFailedByID(1: shared.RespondActivityTaskFailedByIDRequest failRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RespondActivityTaskCanceled is called by application worker when it is successfully canceled an ActivityTask. It will\n * result in a new 'ActivityTaskCanceled' event being written to the workflow history and a new DecisionTask\n * created for the workflow instance so new decisions could be made. Use the 'taskToken' provided as response of\n * PollForActivityTask API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid\n * anymore due to activity timeout.\n **/\n void RespondActivityTaskCanceled(1: shared.RespondActivityTaskCanceledRequest canceledRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RespondActivityTaskCanceledByID is called by application worker when it is successfully canceled an ActivityTask.\n * It will result in a new 'ActivityTaskCanceled' event being written to the workflow history and a new DecisionTask\n * created for the workflow instance so new decisions could be made. Similar to RespondActivityTaskCanceled but use\n * Domain, WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError'\n * if the these IDs are not valid anymore due to activity timeout.\n **/\n void RespondActivityTaskCanceledByID(1: shared.RespondActivityTaskCanceledByIDRequest canceledRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.DomainNotActiveError domainNotActiveError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ServiceBusyError serviceBusyError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * RequestCancelWorkflowExecution is called by application worker when it wants to request cancellation of a workflow instance.\n * It will result in a new 'WorkflowExecutionCancelRequested' event being written to the workflow history and a new DecisionTask\n * created for the workflow instance so new decisions could be made. It fails with 'EntityNotExistsError' if the workflow is not valid\n * anymore due to completion or doesn't exist.\n **/\n void RequestCancelWorkflowExecution(1: shared.RequestCancelWorkflowExecutionRequest cancelRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.CancellationAlreadyRequestedError cancellationAlreadyRequestedError,\n 5: shared.ServiceBusyError serviceBusyError,\n 6: shared.DomainNotActiveError domainNotActiveError,\n 7: shared.LimitExceededError limitExceededError,\n 8: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 9: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * SignalWorkflowExecution is used to send a signal event to running workflow execution. This results in\n * WorkflowExecutionSignaled event recorded in the history and a decision task being created for the execution.\n **/\n void SignalWorkflowExecution(1: shared.SignalWorkflowExecutionRequest signalRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.LimitExceededError limitExceededError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * SignalWithStartWorkflowExecution is used to ensure sending signal to a workflow.\n * If the workflow is running, this results in WorkflowExecutionSignaled event being recorded in the history\n * and a decision task being created for the execution.\n * If the workflow is not running or not found, this results in WorkflowExecutionStarted and WorkflowExecutionSignaled\n * events being recorded in history, and a decision task being created for the execution\n **/\n shared.StartWorkflowExecutionResponse SignalWithStartWorkflowExecution(1: shared.SignalWithStartWorkflowExecutionRequest signalWithStartRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.LimitExceededError limitExceededError,\n 7: shared.WorkflowExecutionAlreadyStartedError workflowAlreadyStartedError,\n 8: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * SignalWithStartWorkflowExecutionAsync is used to ensure sending signal to a workflow asynchronously. It will push a SignalWithStartWorkflowExecutionRequest to a queue\n * and immediately return a response. The request will be processed by a separate consumer eventually.\n **/\n shared.SignalWithStartWorkflowExecutionAsyncResponse SignalWithStartWorkflowExecutionAsync(1: shared.SignalWithStartWorkflowExecutionAsyncRequest signalWithStartRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.WorkflowExecutionAlreadyStartedError sessionAlreadyExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.LimitExceededError limitExceededError,\n 7: shared.EntityNotExistsError entityNotExistError,\n 8: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n /**\n * ResetWorkflowExecution reset an existing workflow execution to DecisionTaskCompleted event(exclusive).\n * And it will immediately terminating the current execution instance.\n **/\n shared.ResetWorkflowExecutionResponse ResetWorkflowExecution(1: shared.ResetWorkflowExecutionRequest resetRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.LimitExceededError limitExceededError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * TerminateWorkflowExecution terminates an existing workflow execution by recording WorkflowExecutionTerminated event\n * in the history and immediately terminating the execution instance.\n **/\n void TerminateWorkflowExecution(1: shared.TerminateWorkflowExecutionRequest terminateRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.DomainNotActiveError domainNotActiveError,\n 6: shared.LimitExceededError limitExceededError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific domain.\n **/\n shared.ListOpenWorkflowExecutionsResponse ListOpenWorkflowExecutions(1: shared.ListOpenWorkflowExecutionsRequest listRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.LimitExceededError limitExceededError,\n 6: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific domain.\n **/\n shared.ListClosedWorkflowExecutionsResponse ListClosedWorkflowExecutions(1: shared.ListClosedWorkflowExecutionsRequest listRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * ListWorkflowExecutions is a visibility API to list workflow executions in a specific domain.\n **/\n shared.ListWorkflowExecutionsResponse ListWorkflowExecutions(1: shared.ListWorkflowExecutionsRequest listRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific domain.\n **/\n shared.ListArchivedWorkflowExecutionsResponse ListArchivedWorkflowExecutions(1: shared.ListArchivedWorkflowExecutionsRequest listRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * ScanWorkflowExecutions is a visibility API to list large amount of workflow executions in a specific domain without order.\n **/\n shared.ListWorkflowExecutionsResponse ScanWorkflowExecutions(1: shared.ListWorkflowExecutionsRequest listRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * CountWorkflowExecutions is a visibility API to count of workflow executions in a specific domain.\n **/\n shared.CountWorkflowExecutionsResponse CountWorkflowExecutions(1: shared.CountWorkflowExecutionsRequest countRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs\n **/\n shared.GetSearchAttributesResponse GetSearchAttributes()\n throws (\n 2: shared.ServiceBusyError serviceBusyError,\n 3: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * RespondQueryTaskCompleted is called by application worker to complete a QueryTask (which is a DecisionTask for query)\n * as a result of 'PollForDecisionTask' API call. Completing a QueryTask will unblock the client call to 'QueryWorkflow'\n * API and return the query result to client as a response to 'QueryWorkflow' API call.\n **/\n void RespondQueryTaskCompleted(1: shared.RespondQueryTaskCompletedRequest completeRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.ServiceBusyError serviceBusyError,\n 6: shared.DomainNotActiveError domainNotActiveError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * Reset the sticky tasklist related information in mutable state of a given workflow.\n * Things cleared are:\n * 1. StickyTaskList\n * 2. StickyScheduleToStartTimeout\n * 3. ClientLibraryVersion\n * 4. ClientFeatureVersion\n * 5. ClientImpl\n **/\n shared.ResetStickyTaskListResponse ResetStickyTaskList(1: shared.ResetStickyTaskListRequest resetRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.ServiceBusyError serviceBusyError,\n 6: shared.DomainNotActiveError domainNotActiveError,\n 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 8: shared.WorkflowExecutionAlreadyCompletedError workflowExecutionAlreadyCompletedError,\n )\n\n /**\n * QueryWorkflow returns query result for a specified workflow execution\n **/\n shared.QueryWorkflowResponse QueryWorkflow(1: shared.QueryWorkflowRequest queryRequest)\n\tthrows (\n\t 1: shared.BadRequestError badRequestError,\n\t 3: shared.EntityNotExistsError entityNotExistError,\n\t 4: shared.QueryFailedError queryFailedError,\n\t 5: shared.LimitExceededError limitExceededError,\n\t 6: shared.ServiceBusyError serviceBusyError,\n\t 7: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n\t)\n\n /**\n * DescribeWorkflowExecution returns information about the specified workflow execution.\n **/\n shared.DescribeWorkflowExecutionResponse DescribeWorkflowExecution(1: shared.DescribeWorkflowExecutionRequest describeRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.ServiceBusyError serviceBusyError,\n 6: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * DescribeTaskList returns information about the target tasklist, right now this API returns the\n * pollers which polled this tasklist in last few minutes.\n **/\n shared.DescribeTaskListResponse DescribeTaskList(1: shared.DescribeTaskListRequest request)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.ServiceBusyError serviceBusyError,\n 6: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * GetClusterInfo returns information about cadence cluster\n **/\n shared.ClusterInfo GetClusterInfo()\n throws (\n 1: shared.InternalServiceError internalServiceError,\n 2: shared.ServiceBusyError serviceBusyError,\n )\n\n /**\n * GetTaskListsByDomain returns the list of all the task lists for a domainName.\n **/\n shared.GetTaskListsByDomainResponse GetTaskListsByDomain(1: shared.GetTaskListsByDomainRequest request)\n throws (\n 1: shared.BadRequestError badRequestError,\n 2: shared.EntityNotExistsError entityNotExistError,\n 3: shared.LimitExceededError limitExceededError,\n 4: shared.ServiceBusyError serviceBusyError,\n 5: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n )\n\n /**\n * ReapplyEvents applies stale events to the current workflow and current run\n **/\n shared.ListTaskListPartitionsResponse ListTaskListPartitions(1: shared.ListTaskListPartitionsRequest request)\n throws (\n 1: shared.BadRequestError badRequestError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.LimitExceededError limitExceededError,\n 5: shared.ServiceBusyError serviceBusyError,\n )\n\n /**\n * RefreshWorkflowTasks refreshes all tasks of a workflow\n **/\n void RefreshWorkflowTasks(1: shared.RefreshWorkflowTasksRequest request)\n throws (\n 1: shared.BadRequestError badRequestError,\n 2: shared.DomainNotActiveError domainNotActiveError,\n 3: shared.ServiceBusyError serviceBusyError,\n 4: shared.EntityNotExistsError entityNotExistError,\n )\n}\n" // WorkflowService_CountWorkflowExecutions_Args represents the arguments for the WorkflowService.CountWorkflowExecutions function. // @@ -26027,14 +26027,14 @@ func (v *WorkflowService_SignalWithStartWorkflowExecution_Result) EnvelopeType() return wire.Reply } -// WorkflowService_SignalWorkflowExecution_Args represents the arguments for the WorkflowService.SignalWorkflowExecution function. +// WorkflowService_SignalWithStartWorkflowExecutionAsync_Args represents the arguments for the WorkflowService.SignalWithStartWorkflowExecutionAsync function. // -// The arguments for SignalWorkflowExecution are sent and received over the wire as this struct. -type WorkflowService_SignalWorkflowExecution_Args struct { - SignalRequest *shared.SignalWorkflowExecutionRequest `json:"signalRequest,omitempty"` +// The arguments for SignalWithStartWorkflowExecutionAsync are sent and received over the wire as this struct. +type WorkflowService_SignalWithStartWorkflowExecutionAsync_Args struct { + SignalWithStartRequest *shared.SignalWithStartWorkflowExecutionAsyncRequest `json:"signalWithStartRequest,omitempty"` } -// ToWire translates a WorkflowService_SignalWorkflowExecution_Args struct into a Thrift-level intermediate +// ToWire translates a WorkflowService_SignalWithStartWorkflowExecutionAsync_Args struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -26049,7 +26049,7 @@ type WorkflowService_SignalWorkflowExecution_Args struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_SignalWorkflowExecution_Args) ToWire() (wire.Value, error) { +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) ToWire() (wire.Value, error) { var ( fields [1]wire.Field i int = 0 @@ -26057,8 +26057,8 @@ func (v *WorkflowService_SignalWorkflowExecution_Args) ToWire() (wire.Value, err err error ) - if v.SignalRequest != nil { - w, err = v.SignalRequest.ToWire() + if v.SignalWithStartRequest != nil { + w, err = v.SignalWithStartRequest.ToWire() if err != nil { return w, err } @@ -26069,17 +26069,17 @@ func (v *WorkflowService_SignalWorkflowExecution_Args) ToWire() (wire.Value, err return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _SignalWorkflowExecutionRequest_Read(w wire.Value) (*shared.SignalWorkflowExecutionRequest, error) { - var v shared.SignalWorkflowExecutionRequest +func _SignalWithStartWorkflowExecutionAsyncRequest_Read(w wire.Value) (*shared.SignalWithStartWorkflowExecutionAsyncRequest, error) { + var v shared.SignalWithStartWorkflowExecutionAsyncRequest err := v.FromWire(w) return &v, err } -// FromWire deserializes a WorkflowService_SignalWorkflowExecution_Args struct from its Thrift-level +// FromWire deserializes a WorkflowService_SignalWithStartWorkflowExecutionAsync_Args struct from its Thrift-level // representation. The Thrift-level representation may be obtained // from a ThriftRW protocol implementation. // -// An error is returned if we were unable to build a WorkflowService_SignalWorkflowExecution_Args struct +// An error is returned if we were unable to build a WorkflowService_SignalWithStartWorkflowExecutionAsync_Args struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -26087,19 +26087,19 @@ func _SignalWorkflowExecutionRequest_Read(w wire.Value) (*shared.SignalWorkflowE // return nil, err // } // -// var v WorkflowService_SignalWorkflowExecution_Args +// var v WorkflowService_SignalWithStartWorkflowExecutionAsync_Args // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_SignalWorkflowExecution_Args) FromWire(w wire.Value) error { +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) FromWire(w wire.Value) error { var err error for _, field := range w.GetStruct().Fields { switch field.ID { case 1: if field.Value.Type() == wire.TStruct { - v.SignalRequest, err = _SignalWorkflowExecutionRequest_Read(field.Value) + v.SignalWithStartRequest, err = _SignalWithStartWorkflowExecutionAsyncRequest_Read(field.Value) if err != nil { return err } @@ -26111,34 +26111,34 @@ func (v *WorkflowService_SignalWorkflowExecution_Args) FromWire(w wire.Value) er return nil } -// String returns a readable string representation of a WorkflowService_SignalWorkflowExecution_Args +// String returns a readable string representation of a WorkflowService_SignalWithStartWorkflowExecutionAsync_Args // struct. -func (v *WorkflowService_SignalWorkflowExecution_Args) String() string { +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) String() string { if v == nil { return "" } var fields [1]string i := 0 - if v.SignalRequest != nil { - fields[i] = fmt.Sprintf("SignalRequest: %v", v.SignalRequest) + if v.SignalWithStartRequest != nil { + fields[i] = fmt.Sprintf("SignalWithStartRequest: %v", v.SignalWithStartRequest) i++ } - return fmt.Sprintf("WorkflowService_SignalWorkflowExecution_Args{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_SignalWithStartWorkflowExecutionAsync_Args{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_SignalWorkflowExecution_Args match the -// provided WorkflowService_SignalWorkflowExecution_Args. +// Equals returns true if all the fields of this WorkflowService_SignalWithStartWorkflowExecutionAsync_Args match the +// provided WorkflowService_SignalWithStartWorkflowExecutionAsync_Args. // // This function performs a deep comparison. -func (v *WorkflowService_SignalWorkflowExecution_Args) Equals(rhs *WorkflowService_SignalWorkflowExecution_Args) bool { +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) Equals(rhs *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) bool { if v == nil { return rhs == nil } else if rhs == nil { return false } - if !((v.SignalRequest == nil && rhs.SignalRequest == nil) || (v.SignalRequest != nil && rhs.SignalRequest != nil && v.SignalRequest.Equals(rhs.SignalRequest))) { + if !((v.SignalWithStartRequest == nil && rhs.SignalWithStartRequest == nil) || (v.SignalWithStartRequest != nil && rhs.SignalWithStartRequest != nil && v.SignalWithStartRequest.Equals(rhs.SignalWithStartRequest))) { return false } @@ -26146,107 +26146,106 @@ func (v *WorkflowService_SignalWorkflowExecution_Args) Equals(rhs *WorkflowServi } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_SignalWorkflowExecution_Args. -func (v *WorkflowService_SignalWorkflowExecution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_SignalWithStartWorkflowExecutionAsync_Args. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } - if v.SignalRequest != nil { - err = multierr.Append(err, enc.AddObject("signalRequest", v.SignalRequest)) + if v.SignalWithStartRequest != nil { + err = multierr.Append(err, enc.AddObject("signalWithStartRequest", v.SignalWithStartRequest)) } return err } -// GetSignalRequest returns the value of SignalRequest if it is set or its +// GetSignalWithStartRequest returns the value of SignalWithStartRequest if it is set or its // zero value if it is unset. -func (v *WorkflowService_SignalWorkflowExecution_Args) GetSignalRequest() (o *shared.SignalWorkflowExecutionRequest) { - if v != nil && v.SignalRequest != nil { - return v.SignalRequest +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) GetSignalWithStartRequest() (o *shared.SignalWithStartWorkflowExecutionAsyncRequest) { + if v != nil && v.SignalWithStartRequest != nil { + return v.SignalWithStartRequest } return } -// IsSetSignalRequest returns true if SignalRequest is not nil. -func (v *WorkflowService_SignalWorkflowExecution_Args) IsSetSignalRequest() bool { - return v != nil && v.SignalRequest != nil +// IsSetSignalWithStartRequest returns true if SignalWithStartRequest is not nil. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) IsSetSignalWithStartRequest() bool { + return v != nil && v.SignalWithStartRequest != nil } // MethodName returns the name of the Thrift function as specified in // the IDL, for which this struct represent the arguments. // -// This will always be "SignalWorkflowExecution" for this struct. -func (v *WorkflowService_SignalWorkflowExecution_Args) MethodName() string { - return "SignalWorkflowExecution" +// This will always be "SignalWithStartWorkflowExecutionAsync" for this struct. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) MethodName() string { + return "SignalWithStartWorkflowExecutionAsync" } // EnvelopeType returns the kind of value inside this struct. // // This will always be Call for this struct. -func (v *WorkflowService_SignalWorkflowExecution_Args) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) EnvelopeType() wire.EnvelopeType { return wire.Call } -// WorkflowService_SignalWorkflowExecution_Helper provides functions that aid in handling the -// parameters and return values of the WorkflowService.SignalWorkflowExecution +// WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper provides functions that aid in handling the +// parameters and return values of the WorkflowService.SignalWithStartWorkflowExecutionAsync // function. -var WorkflowService_SignalWorkflowExecution_Helper = struct { - // Args accepts the parameters of SignalWorkflowExecution in-order and returns +var WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper = struct { + // Args accepts the parameters of SignalWithStartWorkflowExecutionAsync in-order and returns // the arguments struct for the function. Args func( - signalRequest *shared.SignalWorkflowExecutionRequest, - ) *WorkflowService_SignalWorkflowExecution_Args + signalWithStartRequest *shared.SignalWithStartWorkflowExecutionAsyncRequest, + ) *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args // IsException returns true if the given error can be thrown - // by SignalWorkflowExecution. + // by SignalWithStartWorkflowExecutionAsync. // - // An error can be thrown by SignalWorkflowExecution only if the + // An error can be thrown by SignalWithStartWorkflowExecutionAsync only if the // corresponding exception type was mentioned in the 'throws' // section for it in the Thrift file. IsException func(error) bool - // WrapResponse returns the result struct for SignalWorkflowExecution - // given the error returned by it. The provided error may - // be nil if SignalWorkflowExecution did not fail. + // WrapResponse returns the result struct for SignalWithStartWorkflowExecutionAsync + // given its return value and error. // - // This allows mapping errors returned by SignalWorkflowExecution into a - // serializable result struct. WrapResponse returns a - // non-nil error if the provided error cannot be thrown by - // SignalWorkflowExecution + // This allows mapping values and errors returned by + // SignalWithStartWorkflowExecutionAsync into a serializable result struct. + // WrapResponse returns a non-nil error if the provided + // error cannot be thrown by SignalWithStartWorkflowExecutionAsync // - // err := SignalWorkflowExecution(args) - // result, err := WorkflowService_SignalWorkflowExecution_Helper.WrapResponse(err) + // value, err := SignalWithStartWorkflowExecutionAsync(args) + // result, err := WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper.WrapResponse(value, err) // if err != nil { - // return fmt.Errorf("unexpected error from SignalWorkflowExecution: %v", err) + // return fmt.Errorf("unexpected error from SignalWithStartWorkflowExecutionAsync: %v", err) // } // serialize(result) - WrapResponse func(error) (*WorkflowService_SignalWorkflowExecution_Result, error) + WrapResponse func(*shared.SignalWithStartWorkflowExecutionAsyncResponse, error) (*WorkflowService_SignalWithStartWorkflowExecutionAsync_Result, error) - // UnwrapResponse takes the result struct for SignalWorkflowExecution - // and returns the erorr returned by it (if any). + // UnwrapResponse takes the result struct for SignalWithStartWorkflowExecutionAsync + // and returns the value or error returned by it. // - // The error is non-nil only if SignalWorkflowExecution threw an + // The error is non-nil only if SignalWithStartWorkflowExecutionAsync threw an // exception. // // result := deserialize(bytes) - // err := WorkflowService_SignalWorkflowExecution_Helper.UnwrapResponse(result) - UnwrapResponse func(*WorkflowService_SignalWorkflowExecution_Result) error + // value, err := WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper.UnwrapResponse(result) + UnwrapResponse func(*WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) (*shared.SignalWithStartWorkflowExecutionAsyncResponse, error) }{} func init() { - WorkflowService_SignalWorkflowExecution_Helper.Args = func( - signalRequest *shared.SignalWorkflowExecutionRequest, - ) *WorkflowService_SignalWorkflowExecution_Args { - return &WorkflowService_SignalWorkflowExecution_Args{ - SignalRequest: signalRequest, + WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper.Args = func( + signalWithStartRequest *shared.SignalWithStartWorkflowExecutionAsyncRequest, + ) *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args { + return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Args{ + SignalWithStartRequest: signalWithStartRequest, } } - WorkflowService_SignalWorkflowExecution_Helper.IsException = func(err error) bool { + WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper.IsException = func(err error) bool { switch err.(type) { case *shared.BadRequestError: return true - case *shared.EntityNotExistsError: + case *shared.WorkflowExecutionAlreadyStartedError: return true case *shared.ServiceBusyError: return true @@ -26254,67 +26253,67 @@ func init() { return true case *shared.LimitExceededError: return true - case *shared.ClientVersionNotSupportedError: + case *shared.EntityNotExistsError: return true - case *shared.WorkflowExecutionAlreadyCompletedError: + case *shared.ClientVersionNotSupportedError: return true default: return false } } - WorkflowService_SignalWorkflowExecution_Helper.WrapResponse = func(err error) (*WorkflowService_SignalWorkflowExecution_Result, error) { + WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper.WrapResponse = func(success *shared.SignalWithStartWorkflowExecutionAsyncResponse, err error) (*WorkflowService_SignalWithStartWorkflowExecutionAsync_Result, error) { if err == nil { - return &WorkflowService_SignalWorkflowExecution_Result{}, nil + return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{Success: success}, nil } switch e := err.(type) { case *shared.BadRequestError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.BadRequestError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecutionAsync_Result.BadRequestError") } - return &WorkflowService_SignalWorkflowExecution_Result{BadRequestError: e}, nil - case *shared.EntityNotExistsError: + return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{BadRequestError: e}, nil + case *shared.WorkflowExecutionAlreadyStartedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.EntityNotExistError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecutionAsync_Result.SessionAlreadyExistError") } - return &WorkflowService_SignalWorkflowExecution_Result{EntityNotExistError: e}, nil + return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{SessionAlreadyExistError: e}, nil case *shared.ServiceBusyError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.ServiceBusyError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecutionAsync_Result.ServiceBusyError") } - return &WorkflowService_SignalWorkflowExecution_Result{ServiceBusyError: e}, nil + return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{ServiceBusyError: e}, nil case *shared.DomainNotActiveError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.DomainNotActiveError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecutionAsync_Result.DomainNotActiveError") } - return &WorkflowService_SignalWorkflowExecution_Result{DomainNotActiveError: e}, nil + return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{DomainNotActiveError: e}, nil case *shared.LimitExceededError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.LimitExceededError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecutionAsync_Result.LimitExceededError") } - return &WorkflowService_SignalWorkflowExecution_Result{LimitExceededError: e}, nil - case *shared.ClientVersionNotSupportedError: + return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{LimitExceededError: e}, nil + case *shared.EntityNotExistsError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.ClientVersionNotSupportedError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecutionAsync_Result.EntityNotExistError") } - return &WorkflowService_SignalWorkflowExecution_Result{ClientVersionNotSupportedError: e}, nil - case *shared.WorkflowExecutionAlreadyCompletedError: + return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{EntityNotExistError: e}, nil + case *shared.ClientVersionNotSupportedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.WorkflowExecutionAlreadyCompletedError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecutionAsync_Result.ClientVersionNotSupportedError") } - return &WorkflowService_SignalWorkflowExecution_Result{WorkflowExecutionAlreadyCompletedError: e}, nil + return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{ClientVersionNotSupportedError: e}, nil } return nil, err } - WorkflowService_SignalWorkflowExecution_Helper.UnwrapResponse = func(result *WorkflowService_SignalWorkflowExecution_Result) (err error) { + WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper.UnwrapResponse = func(result *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) (success *shared.SignalWithStartWorkflowExecutionAsyncResponse, err error) { if result.BadRequestError != nil { err = result.BadRequestError return } - if result.EntityNotExistError != nil { - err = result.EntityNotExistError + if result.SessionAlreadyExistError != nil { + err = result.SessionAlreadyExistError return } if result.ServiceBusyError != nil { @@ -26329,33 +26328,44 @@ func init() { err = result.LimitExceededError return } + if result.EntityNotExistError != nil { + err = result.EntityNotExistError + return + } if result.ClientVersionNotSupportedError != nil { err = result.ClientVersionNotSupportedError return } - if result.WorkflowExecutionAlreadyCompletedError != nil { - err = result.WorkflowExecutionAlreadyCompletedError + + if result.Success != nil { + success = result.Success return } + + err = errors.New("expected a non-void result") return } } -// WorkflowService_SignalWorkflowExecution_Result represents the result of a WorkflowService.SignalWorkflowExecution function call. +// WorkflowService_SignalWithStartWorkflowExecutionAsync_Result represents the result of a WorkflowService.SignalWithStartWorkflowExecutionAsync function call. // -// The result of a SignalWorkflowExecution execution is sent and received over the wire as this struct. -type WorkflowService_SignalWorkflowExecution_Result struct { - BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` - EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"` - ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` - DomainNotActiveError *shared.DomainNotActiveError `json:"domainNotActiveError,omitempty"` - LimitExceededError *shared.LimitExceededError `json:"limitExceededError,omitempty"` - ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` - WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"` -} - -// ToWire translates a WorkflowService_SignalWorkflowExecution_Result struct into a Thrift-level intermediate +// The result of a SignalWithStartWorkflowExecutionAsync execution is sent and received over the wire as this struct. +// +// Success is set only if the function did not throw an exception. +type WorkflowService_SignalWithStartWorkflowExecutionAsync_Result struct { + // Value returned by SignalWithStartWorkflowExecutionAsync after a successful execution. + Success *shared.SignalWithStartWorkflowExecutionAsyncResponse `json:"success,omitempty"` + BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` + SessionAlreadyExistError *shared.WorkflowExecutionAlreadyStartedError `json:"sessionAlreadyExistError,omitempty"` + ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` + DomainNotActiveError *shared.DomainNotActiveError `json:"domainNotActiveError,omitempty"` + LimitExceededError *shared.LimitExceededError `json:"limitExceededError,omitempty"` + EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"` + ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` +} + +// ToWire translates a WorkflowService_SignalWithStartWorkflowExecutionAsync_Result struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -26370,14 +26380,22 @@ type WorkflowService_SignalWorkflowExecution_Result struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_SignalWorkflowExecution_Result) ToWire() (wire.Value, error) { +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) ToWire() (wire.Value, error) { var ( - fields [7]wire.Field + fields [8]wire.Field i int = 0 w wire.Value err error ) + if v.Success != nil { + w, err = v.Success.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 0, Value: w} + i++ + } if v.BadRequestError != nil { w, err = v.BadRequestError.ToWire() if err != nil { @@ -26386,8 +26404,8 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) ToWire() (wire.Value, e fields[i] = wire.Field{ID: 1, Value: w} i++ } - if v.EntityNotExistError != nil { - w, err = v.EntityNotExistError.ToWire() + if v.SessionAlreadyExistError != nil { + w, err = v.SessionAlreadyExistError.ToWire() if err != nil { return w, err } @@ -26418,16 +26436,16 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) ToWire() (wire.Value, e fields[i] = wire.Field{ID: 6, Value: w} i++ } - if v.ClientVersionNotSupportedError != nil { - w, err = v.ClientVersionNotSupportedError.ToWire() + if v.EntityNotExistError != nil { + w, err = v.EntityNotExistError.ToWire() if err != nil { return w, err } fields[i] = wire.Field{ID: 7, Value: w} i++ } - if v.WorkflowExecutionAlreadyCompletedError != nil { - w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire() + if v.ClientVersionNotSupportedError != nil { + w, err = v.ClientVersionNotSupportedError.ToWire() if err != nil { return w, err } @@ -26435,18 +26453,24 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) ToWire() (wire.Value, e i++ } - if i > 1 { - return wire.Value{}, fmt.Errorf("WorkflowService_SignalWorkflowExecution_Result should have at most one field: got %v fields", i) + if i != 1 { + return wire.Value{}, fmt.Errorf("WorkflowService_SignalWithStartWorkflowExecutionAsync_Result should have exactly one field: got %v fields", i) } return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -// FromWire deserializes a WorkflowService_SignalWorkflowExecution_Result struct from its Thrift-level +func _SignalWithStartWorkflowExecutionAsyncResponse_Read(w wire.Value) (*shared.SignalWithStartWorkflowExecutionAsyncResponse, error) { + var v shared.SignalWithStartWorkflowExecutionAsyncResponse + err := v.FromWire(w) + return &v, err +} + +// FromWire deserializes a WorkflowService_SignalWithStartWorkflowExecutionAsync_Result struct from its Thrift-level // representation. The Thrift-level representation may be obtained // from a ThriftRW protocol implementation. // -// An error is returned if we were unable to build a WorkflowService_SignalWorkflowExecution_Result struct +// An error is returned if we were unable to build a WorkflowService_SignalWithStartWorkflowExecutionAsync_Result struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -26454,16 +26478,24 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) ToWire() (wire.Value, e // return nil, err // } // -// var v WorkflowService_SignalWorkflowExecution_Result +// var v WorkflowService_SignalWithStartWorkflowExecutionAsync_Result // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_SignalWorkflowExecution_Result) FromWire(w wire.Value) error { +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) FromWire(w wire.Value) error { var err error for _, field := range w.GetStruct().Fields { switch field.ID { + case 0: + if field.Value.Type() == wire.TStruct { + v.Success, err = _SignalWithStartWorkflowExecutionAsyncResponse_Read(field.Value) + if err != nil { + return err + } + + } case 1: if field.Value.Type() == wire.TStruct { v.BadRequestError, err = _BadRequestError_Read(field.Value) @@ -26474,7 +26506,7 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) FromWire(w wire.Value) } case 3: if field.Value.Type() == wire.TStruct { - v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value) + v.SessionAlreadyExistError, err = _WorkflowExecutionAlreadyStartedError_Read(field.Value) if err != nil { return err } @@ -26506,7 +26538,7 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) FromWire(w wire.Value) } case 7: if field.Value.Type() == wire.TStruct { - v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value) + v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value) if err != nil { return err } @@ -26514,7 +26546,7 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) FromWire(w wire.Value) } case 8: if field.Value.Type() == wire.TStruct { - v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value) + v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value) if err != nil { return err } @@ -26524,10 +26556,13 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) FromWire(w wire.Value) } count := 0 + if v.Success != nil { + count++ + } if v.BadRequestError != nil { count++ } - if v.EntityNotExistError != nil { + if v.SessionAlreadyExistError != nil { count++ } if v.ServiceBusyError != nil { @@ -26539,34 +26574,1594 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) FromWire(w wire.Value) if v.LimitExceededError != nil { count++ } + if v.EntityNotExistError != nil { + count++ + } if v.ClientVersionNotSupportedError != nil { count++ } - if v.WorkflowExecutionAlreadyCompletedError != nil { + if count != 1 { + return fmt.Errorf("WorkflowService_SignalWithStartWorkflowExecutionAsync_Result should have exactly one field: got %v fields", count) + } + + return nil +} + +// String returns a readable string representation of a WorkflowService_SignalWithStartWorkflowExecutionAsync_Result +// struct. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) String() string { + if v == nil { + return "" + } + + var fields [8]string + i := 0 + if v.Success != nil { + fields[i] = fmt.Sprintf("Success: %v", v.Success) + i++ + } + if v.BadRequestError != nil { + fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError) + i++ + } + if v.SessionAlreadyExistError != nil { + fields[i] = fmt.Sprintf("SessionAlreadyExistError: %v", v.SessionAlreadyExistError) + i++ + } + if v.ServiceBusyError != nil { + fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError) + i++ + } + if v.DomainNotActiveError != nil { + fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError) + i++ + } + if v.LimitExceededError != nil { + fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError) + i++ + } + if v.EntityNotExistError != nil { + fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError) + i++ + } + if v.ClientVersionNotSupportedError != nil { + fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError) + i++ + } + + return fmt.Sprintf("WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this WorkflowService_SignalWithStartWorkflowExecutionAsync_Result match the +// provided WorkflowService_SignalWithStartWorkflowExecutionAsync_Result. +// +// This function performs a deep comparison. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) Equals(rhs *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) { + return false + } + if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) { + return false + } + if !((v.SessionAlreadyExistError == nil && rhs.SessionAlreadyExistError == nil) || (v.SessionAlreadyExistError != nil && rhs.SessionAlreadyExistError != nil && v.SessionAlreadyExistError.Equals(rhs.SessionAlreadyExistError))) { + return false + } + if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) { + return false + } + if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) { + return false + } + if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) { + return false + } + if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) { + return false + } + if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of WorkflowService_SignalWithStartWorkflowExecutionAsync_Result. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + if v.Success != nil { + err = multierr.Append(err, enc.AddObject("success", v.Success)) + } + if v.BadRequestError != nil { + err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError)) + } + if v.SessionAlreadyExistError != nil { + err = multierr.Append(err, enc.AddObject("sessionAlreadyExistError", v.SessionAlreadyExistError)) + } + if v.ServiceBusyError != nil { + err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError)) + } + if v.DomainNotActiveError != nil { + err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError)) + } + if v.LimitExceededError != nil { + err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError)) + } + if v.EntityNotExistError != nil { + err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError)) + } + if v.ClientVersionNotSupportedError != nil { + err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError)) + } + return err +} + +// GetSuccess returns the value of Success if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) GetSuccess() (o *shared.SignalWithStartWorkflowExecutionAsyncResponse) { + if v != nil && v.Success != nil { + return v.Success + } + + return +} + +// IsSetSuccess returns true if Success is not nil. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetSuccess() bool { + return v != nil && v.Success != nil +} + +// GetBadRequestError returns the value of BadRequestError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) GetBadRequestError() (o *shared.BadRequestError) { + if v != nil && v.BadRequestError != nil { + return v.BadRequestError + } + + return +} + +// IsSetBadRequestError returns true if BadRequestError is not nil. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetBadRequestError() bool { + return v != nil && v.BadRequestError != nil +} + +// GetSessionAlreadyExistError returns the value of SessionAlreadyExistError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) GetSessionAlreadyExistError() (o *shared.WorkflowExecutionAlreadyStartedError) { + if v != nil && v.SessionAlreadyExistError != nil { + return v.SessionAlreadyExistError + } + + return +} + +// IsSetSessionAlreadyExistError returns true if SessionAlreadyExistError is not nil. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetSessionAlreadyExistError() bool { + return v != nil && v.SessionAlreadyExistError != nil +} + +// GetServiceBusyError returns the value of ServiceBusyError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { + if v != nil && v.ServiceBusyError != nil { + return v.ServiceBusyError + } + + return +} + +// IsSetServiceBusyError returns true if ServiceBusyError is not nil. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetServiceBusyError() bool { + return v != nil && v.ServiceBusyError != nil +} + +// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) { + if v != nil && v.DomainNotActiveError != nil { + return v.DomainNotActiveError + } + + return +} + +// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetDomainNotActiveError() bool { + return v != nil && v.DomainNotActiveError != nil +} + +// GetLimitExceededError returns the value of LimitExceededError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) GetLimitExceededError() (o *shared.LimitExceededError) { + if v != nil && v.LimitExceededError != nil { + return v.LimitExceededError + } + + return +} + +// IsSetLimitExceededError returns true if LimitExceededError is not nil. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetLimitExceededError() bool { + return v != nil && v.LimitExceededError != nil +} + +// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) { + if v != nil && v.EntityNotExistError != nil { + return v.EntityNotExistError + } + + return +} + +// IsSetEntityNotExistError returns true if EntityNotExistError is not nil. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetEntityNotExistError() bool { + return v != nil && v.EntityNotExistError != nil +} + +// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { + if v != nil && v.ClientVersionNotSupportedError != nil { + return v.ClientVersionNotSupportedError + } + + return +} + +// IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetClientVersionNotSupportedError() bool { + return v != nil && v.ClientVersionNotSupportedError != nil +} + +// MethodName returns the name of the Thrift function as specified in +// the IDL, for which this struct represent the result. +// +// This will always be "SignalWithStartWorkflowExecutionAsync" for this struct. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) MethodName() string { + return "SignalWithStartWorkflowExecutionAsync" +} + +// EnvelopeType returns the kind of value inside this struct. +// +// This will always be Reply for this struct. +func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) EnvelopeType() wire.EnvelopeType { + return wire.Reply +} + +// WorkflowService_SignalWorkflowExecution_Args represents the arguments for the WorkflowService.SignalWorkflowExecution function. +// +// The arguments for SignalWorkflowExecution are sent and received over the wire as this struct. +type WorkflowService_SignalWorkflowExecution_Args struct { + SignalRequest *shared.SignalWorkflowExecutionRequest `json:"signalRequest,omitempty"` +} + +// ToWire translates a WorkflowService_SignalWorkflowExecution_Args struct into a Thrift-level intermediate +// representation. This intermediate representation may be serialized +// into bytes using a ThriftRW protocol implementation. +// +// An error is returned if the struct or any of its fields failed to +// validate. +// +// x, err := v.ToWire() +// if err != nil { +// return err +// } +// +// if err := binaryProtocol.Encode(x, writer); err != nil { +// return err +// } +func (v *WorkflowService_SignalWorkflowExecution_Args) ToWire() (wire.Value, error) { + var ( + fields [1]wire.Field + i int = 0 + w wire.Value + err error + ) + + if v.SignalRequest != nil { + w, err = v.SignalRequest.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 1, Value: w} + i++ + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +func _SignalWorkflowExecutionRequest_Read(w wire.Value) (*shared.SignalWorkflowExecutionRequest, error) { + var v shared.SignalWorkflowExecutionRequest + err := v.FromWire(w) + return &v, err +} + +// FromWire deserializes a WorkflowService_SignalWorkflowExecution_Args struct from its Thrift-level +// representation. The Thrift-level representation may be obtained +// from a ThriftRW protocol implementation. +// +// An error is returned if we were unable to build a WorkflowService_SignalWorkflowExecution_Args struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v WorkflowService_SignalWorkflowExecution_Args +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *WorkflowService_SignalWorkflowExecution_Args) FromWire(w wire.Value) error { + var err error + + for _, field := range w.GetStruct().Fields { + switch field.ID { + case 1: + if field.Value.Type() == wire.TStruct { + v.SignalRequest, err = _SignalWorkflowExecutionRequest_Read(field.Value) + if err != nil { + return err + } + + } + } + } + + return nil +} + +// String returns a readable string representation of a WorkflowService_SignalWorkflowExecution_Args +// struct. +func (v *WorkflowService_SignalWorkflowExecution_Args) String() string { + if v == nil { + return "" + } + + var fields [1]string + i := 0 + if v.SignalRequest != nil { + fields[i] = fmt.Sprintf("SignalRequest: %v", v.SignalRequest) + i++ + } + + return fmt.Sprintf("WorkflowService_SignalWorkflowExecution_Args{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this WorkflowService_SignalWorkflowExecution_Args match the +// provided WorkflowService_SignalWorkflowExecution_Args. +// +// This function performs a deep comparison. +func (v *WorkflowService_SignalWorkflowExecution_Args) Equals(rhs *WorkflowService_SignalWorkflowExecution_Args) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !((v.SignalRequest == nil && rhs.SignalRequest == nil) || (v.SignalRequest != nil && rhs.SignalRequest != nil && v.SignalRequest.Equals(rhs.SignalRequest))) { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of WorkflowService_SignalWorkflowExecution_Args. +func (v *WorkflowService_SignalWorkflowExecution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + if v.SignalRequest != nil { + err = multierr.Append(err, enc.AddObject("signalRequest", v.SignalRequest)) + } + return err +} + +// GetSignalRequest returns the value of SignalRequest if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWorkflowExecution_Args) GetSignalRequest() (o *shared.SignalWorkflowExecutionRequest) { + if v != nil && v.SignalRequest != nil { + return v.SignalRequest + } + + return +} + +// IsSetSignalRequest returns true if SignalRequest is not nil. +func (v *WorkflowService_SignalWorkflowExecution_Args) IsSetSignalRequest() bool { + return v != nil && v.SignalRequest != nil +} + +// MethodName returns the name of the Thrift function as specified in +// the IDL, for which this struct represent the arguments. +// +// This will always be "SignalWorkflowExecution" for this struct. +func (v *WorkflowService_SignalWorkflowExecution_Args) MethodName() string { + return "SignalWorkflowExecution" +} + +// EnvelopeType returns the kind of value inside this struct. +// +// This will always be Call for this struct. +func (v *WorkflowService_SignalWorkflowExecution_Args) EnvelopeType() wire.EnvelopeType { + return wire.Call +} + +// WorkflowService_SignalWorkflowExecution_Helper provides functions that aid in handling the +// parameters and return values of the WorkflowService.SignalWorkflowExecution +// function. +var WorkflowService_SignalWorkflowExecution_Helper = struct { + // Args accepts the parameters of SignalWorkflowExecution in-order and returns + // the arguments struct for the function. + Args func( + signalRequest *shared.SignalWorkflowExecutionRequest, + ) *WorkflowService_SignalWorkflowExecution_Args + + // IsException returns true if the given error can be thrown + // by SignalWorkflowExecution. + // + // An error can be thrown by SignalWorkflowExecution only if the + // corresponding exception type was mentioned in the 'throws' + // section for it in the Thrift file. + IsException func(error) bool + + // WrapResponse returns the result struct for SignalWorkflowExecution + // given the error returned by it. The provided error may + // be nil if SignalWorkflowExecution did not fail. + // + // This allows mapping errors returned by SignalWorkflowExecution into a + // serializable result struct. WrapResponse returns a + // non-nil error if the provided error cannot be thrown by + // SignalWorkflowExecution + // + // err := SignalWorkflowExecution(args) + // result, err := WorkflowService_SignalWorkflowExecution_Helper.WrapResponse(err) + // if err != nil { + // return fmt.Errorf("unexpected error from SignalWorkflowExecution: %v", err) + // } + // serialize(result) + WrapResponse func(error) (*WorkflowService_SignalWorkflowExecution_Result, error) + + // UnwrapResponse takes the result struct for SignalWorkflowExecution + // and returns the erorr returned by it (if any). + // + // The error is non-nil only if SignalWorkflowExecution threw an + // exception. + // + // result := deserialize(bytes) + // err := WorkflowService_SignalWorkflowExecution_Helper.UnwrapResponse(result) + UnwrapResponse func(*WorkflowService_SignalWorkflowExecution_Result) error +}{} + +func init() { + WorkflowService_SignalWorkflowExecution_Helper.Args = func( + signalRequest *shared.SignalWorkflowExecutionRequest, + ) *WorkflowService_SignalWorkflowExecution_Args { + return &WorkflowService_SignalWorkflowExecution_Args{ + SignalRequest: signalRequest, + } + } + + WorkflowService_SignalWorkflowExecution_Helper.IsException = func(err error) bool { + switch err.(type) { + case *shared.BadRequestError: + return true + case *shared.EntityNotExistsError: + return true + case *shared.ServiceBusyError: + return true + case *shared.DomainNotActiveError: + return true + case *shared.LimitExceededError: + return true + case *shared.ClientVersionNotSupportedError: + return true + case *shared.WorkflowExecutionAlreadyCompletedError: + return true + default: + return false + } + } + + WorkflowService_SignalWorkflowExecution_Helper.WrapResponse = func(err error) (*WorkflowService_SignalWorkflowExecution_Result, error) { + if err == nil { + return &WorkflowService_SignalWorkflowExecution_Result{}, nil + } + + switch e := err.(type) { + case *shared.BadRequestError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.BadRequestError") + } + return &WorkflowService_SignalWorkflowExecution_Result{BadRequestError: e}, nil + case *shared.EntityNotExistsError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.EntityNotExistError") + } + return &WorkflowService_SignalWorkflowExecution_Result{EntityNotExistError: e}, nil + case *shared.ServiceBusyError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.ServiceBusyError") + } + return &WorkflowService_SignalWorkflowExecution_Result{ServiceBusyError: e}, nil + case *shared.DomainNotActiveError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.DomainNotActiveError") + } + return &WorkflowService_SignalWorkflowExecution_Result{DomainNotActiveError: e}, nil + case *shared.LimitExceededError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.LimitExceededError") + } + return &WorkflowService_SignalWorkflowExecution_Result{LimitExceededError: e}, nil + case *shared.ClientVersionNotSupportedError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.ClientVersionNotSupportedError") + } + return &WorkflowService_SignalWorkflowExecution_Result{ClientVersionNotSupportedError: e}, nil + case *shared.WorkflowExecutionAlreadyCompletedError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.WorkflowExecutionAlreadyCompletedError") + } + return &WorkflowService_SignalWorkflowExecution_Result{WorkflowExecutionAlreadyCompletedError: e}, nil + } + + return nil, err + } + WorkflowService_SignalWorkflowExecution_Helper.UnwrapResponse = func(result *WorkflowService_SignalWorkflowExecution_Result) (err error) { + if result.BadRequestError != nil { + err = result.BadRequestError + return + } + if result.EntityNotExistError != nil { + err = result.EntityNotExistError + return + } + if result.ServiceBusyError != nil { + err = result.ServiceBusyError + return + } + if result.DomainNotActiveError != nil { + err = result.DomainNotActiveError + return + } + if result.LimitExceededError != nil { + err = result.LimitExceededError + return + } + if result.ClientVersionNotSupportedError != nil { + err = result.ClientVersionNotSupportedError + return + } + if result.WorkflowExecutionAlreadyCompletedError != nil { + err = result.WorkflowExecutionAlreadyCompletedError + return + } + return + } + +} + +// WorkflowService_SignalWorkflowExecution_Result represents the result of a WorkflowService.SignalWorkflowExecution function call. +// +// The result of a SignalWorkflowExecution execution is sent and received over the wire as this struct. +type WorkflowService_SignalWorkflowExecution_Result struct { + BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` + EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"` + ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` + DomainNotActiveError *shared.DomainNotActiveError `json:"domainNotActiveError,omitempty"` + LimitExceededError *shared.LimitExceededError `json:"limitExceededError,omitempty"` + ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` + WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"` +} + +// ToWire translates a WorkflowService_SignalWorkflowExecution_Result struct into a Thrift-level intermediate +// representation. This intermediate representation may be serialized +// into bytes using a ThriftRW protocol implementation. +// +// An error is returned if the struct or any of its fields failed to +// validate. +// +// x, err := v.ToWire() +// if err != nil { +// return err +// } +// +// if err := binaryProtocol.Encode(x, writer); err != nil { +// return err +// } +func (v *WorkflowService_SignalWorkflowExecution_Result) ToWire() (wire.Value, error) { + var ( + fields [7]wire.Field + i int = 0 + w wire.Value + err error + ) + + if v.BadRequestError != nil { + w, err = v.BadRequestError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 1, Value: w} + i++ + } + if v.EntityNotExistError != nil { + w, err = v.EntityNotExistError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 3, Value: w} + i++ + } + if v.ServiceBusyError != nil { + w, err = v.ServiceBusyError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 4, Value: w} + i++ + } + if v.DomainNotActiveError != nil { + w, err = v.DomainNotActiveError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 5, Value: w} + i++ + } + if v.LimitExceededError != nil { + w, err = v.LimitExceededError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 6, Value: w} + i++ + } + if v.ClientVersionNotSupportedError != nil { + w, err = v.ClientVersionNotSupportedError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 7, Value: w} + i++ + } + if v.WorkflowExecutionAlreadyCompletedError != nil { + w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 8, Value: w} + i++ + } + + if i > 1 { + return wire.Value{}, fmt.Errorf("WorkflowService_SignalWorkflowExecution_Result should have at most one field: got %v fields", i) + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +// FromWire deserializes a WorkflowService_SignalWorkflowExecution_Result struct from its Thrift-level +// representation. The Thrift-level representation may be obtained +// from a ThriftRW protocol implementation. +// +// An error is returned if we were unable to build a WorkflowService_SignalWorkflowExecution_Result struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v WorkflowService_SignalWorkflowExecution_Result +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *WorkflowService_SignalWorkflowExecution_Result) FromWire(w wire.Value) error { + var err error + + for _, field := range w.GetStruct().Fields { + switch field.ID { + case 1: + if field.Value.Type() == wire.TStruct { + v.BadRequestError, err = _BadRequestError_Read(field.Value) + if err != nil { + return err + } + + } + case 3: + if field.Value.Type() == wire.TStruct { + v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value) + if err != nil { + return err + } + + } + case 4: + if field.Value.Type() == wire.TStruct { + v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value) + if err != nil { + return err + } + + } + case 5: + if field.Value.Type() == wire.TStruct { + v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value) + if err != nil { + return err + } + + } + case 6: + if field.Value.Type() == wire.TStruct { + v.LimitExceededError, err = _LimitExceededError_Read(field.Value) + if err != nil { + return err + } + + } + case 7: + if field.Value.Type() == wire.TStruct { + v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value) + if err != nil { + return err + } + + } + case 8: + if field.Value.Type() == wire.TStruct { + v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value) + if err != nil { + return err + } + + } + } + } + + count := 0 + if v.BadRequestError != nil { + count++ + } + if v.EntityNotExistError != nil { + count++ + } + if v.ServiceBusyError != nil { + count++ + } + if v.DomainNotActiveError != nil { + count++ + } + if v.LimitExceededError != nil { + count++ + } + if v.ClientVersionNotSupportedError != nil { + count++ + } + if v.WorkflowExecutionAlreadyCompletedError != nil { + count++ + } + if count > 1 { + return fmt.Errorf("WorkflowService_SignalWorkflowExecution_Result should have at most one field: got %v fields", count) + } + + return nil +} + +// String returns a readable string representation of a WorkflowService_SignalWorkflowExecution_Result +// struct. +func (v *WorkflowService_SignalWorkflowExecution_Result) String() string { + if v == nil { + return "" + } + + var fields [7]string + i := 0 + if v.BadRequestError != nil { + fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError) + i++ + } + if v.EntityNotExistError != nil { + fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError) + i++ + } + if v.ServiceBusyError != nil { + fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError) + i++ + } + if v.DomainNotActiveError != nil { + fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError) + i++ + } + if v.LimitExceededError != nil { + fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError) + i++ + } + if v.ClientVersionNotSupportedError != nil { + fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError) + i++ + } + if v.WorkflowExecutionAlreadyCompletedError != nil { + fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError) + i++ + } + + return fmt.Sprintf("WorkflowService_SignalWorkflowExecution_Result{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this WorkflowService_SignalWorkflowExecution_Result match the +// provided WorkflowService_SignalWorkflowExecution_Result. +// +// This function performs a deep comparison. +func (v *WorkflowService_SignalWorkflowExecution_Result) Equals(rhs *WorkflowService_SignalWorkflowExecution_Result) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) { + return false + } + if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) { + return false + } + if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) { + return false + } + if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) { + return false + } + if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) { + return false + } + if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) { + return false + } + if !((v.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of WorkflowService_SignalWorkflowExecution_Result. +func (v *WorkflowService_SignalWorkflowExecution_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + if v.BadRequestError != nil { + err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError)) + } + if v.EntityNotExistError != nil { + err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError)) + } + if v.ServiceBusyError != nil { + err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError)) + } + if v.DomainNotActiveError != nil { + err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError)) + } + if v.LimitExceededError != nil { + err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError)) + } + if v.ClientVersionNotSupportedError != nil { + err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError)) + } + if v.WorkflowExecutionAlreadyCompletedError != nil { + err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError)) + } + return err +} + +// GetBadRequestError returns the value of BadRequestError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWorkflowExecution_Result) GetBadRequestError() (o *shared.BadRequestError) { + if v != nil && v.BadRequestError != nil { + return v.BadRequestError + } + + return +} + +// IsSetBadRequestError returns true if BadRequestError is not nil. +func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetBadRequestError() bool { + return v != nil && v.BadRequestError != nil +} + +// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWorkflowExecution_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) { + if v != nil && v.EntityNotExistError != nil { + return v.EntityNotExistError + } + + return +} + +// IsSetEntityNotExistError returns true if EntityNotExistError is not nil. +func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetEntityNotExistError() bool { + return v != nil && v.EntityNotExistError != nil +} + +// GetServiceBusyError returns the value of ServiceBusyError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWorkflowExecution_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { + if v != nil && v.ServiceBusyError != nil { + return v.ServiceBusyError + } + + return +} + +// IsSetServiceBusyError returns true if ServiceBusyError is not nil. +func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetServiceBusyError() bool { + return v != nil && v.ServiceBusyError != nil +} + +// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWorkflowExecution_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) { + if v != nil && v.DomainNotActiveError != nil { + return v.DomainNotActiveError + } + + return +} + +// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil. +func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetDomainNotActiveError() bool { + return v != nil && v.DomainNotActiveError != nil +} + +// GetLimitExceededError returns the value of LimitExceededError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWorkflowExecution_Result) GetLimitExceededError() (o *shared.LimitExceededError) { + if v != nil && v.LimitExceededError != nil { + return v.LimitExceededError + } + + return +} + +// IsSetLimitExceededError returns true if LimitExceededError is not nil. +func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetLimitExceededError() bool { + return v != nil && v.LimitExceededError != nil +} + +// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWorkflowExecution_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { + if v != nil && v.ClientVersionNotSupportedError != nil { + return v.ClientVersionNotSupportedError + } + + return +} + +// IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil. +func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetClientVersionNotSupportedError() bool { + return v != nil && v.ClientVersionNotSupportedError != nil +} + +// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_SignalWorkflowExecution_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) { + if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil { + return v.WorkflowExecutionAlreadyCompletedError + } + + return +} + +// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil. +func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool { + return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil +} + +// MethodName returns the name of the Thrift function as specified in +// the IDL, for which this struct represent the result. +// +// This will always be "SignalWorkflowExecution" for this struct. +func (v *WorkflowService_SignalWorkflowExecution_Result) MethodName() string { + return "SignalWorkflowExecution" +} + +// EnvelopeType returns the kind of value inside this struct. +// +// This will always be Reply for this struct. +func (v *WorkflowService_SignalWorkflowExecution_Result) EnvelopeType() wire.EnvelopeType { + return wire.Reply +} + +// WorkflowService_StartWorkflowExecution_Args represents the arguments for the WorkflowService.StartWorkflowExecution function. +// +// The arguments for StartWorkflowExecution are sent and received over the wire as this struct. +type WorkflowService_StartWorkflowExecution_Args struct { + StartRequest *shared.StartWorkflowExecutionRequest `json:"startRequest,omitempty"` +} + +// ToWire translates a WorkflowService_StartWorkflowExecution_Args struct into a Thrift-level intermediate +// representation. This intermediate representation may be serialized +// into bytes using a ThriftRW protocol implementation. +// +// An error is returned if the struct or any of its fields failed to +// validate. +// +// x, err := v.ToWire() +// if err != nil { +// return err +// } +// +// if err := binaryProtocol.Encode(x, writer); err != nil { +// return err +// } +func (v *WorkflowService_StartWorkflowExecution_Args) ToWire() (wire.Value, error) { + var ( + fields [1]wire.Field + i int = 0 + w wire.Value + err error + ) + + if v.StartRequest != nil { + w, err = v.StartRequest.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 1, Value: w} + i++ + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +func _StartWorkflowExecutionRequest_Read(w wire.Value) (*shared.StartWorkflowExecutionRequest, error) { + var v shared.StartWorkflowExecutionRequest + err := v.FromWire(w) + return &v, err +} + +// FromWire deserializes a WorkflowService_StartWorkflowExecution_Args struct from its Thrift-level +// representation. The Thrift-level representation may be obtained +// from a ThriftRW protocol implementation. +// +// An error is returned if we were unable to build a WorkflowService_StartWorkflowExecution_Args struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v WorkflowService_StartWorkflowExecution_Args +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *WorkflowService_StartWorkflowExecution_Args) FromWire(w wire.Value) error { + var err error + + for _, field := range w.GetStruct().Fields { + switch field.ID { + case 1: + if field.Value.Type() == wire.TStruct { + v.StartRequest, err = _StartWorkflowExecutionRequest_Read(field.Value) + if err != nil { + return err + } + + } + } + } + + return nil +} + +// String returns a readable string representation of a WorkflowService_StartWorkflowExecution_Args +// struct. +func (v *WorkflowService_StartWorkflowExecution_Args) String() string { + if v == nil { + return "" + } + + var fields [1]string + i := 0 + if v.StartRequest != nil { + fields[i] = fmt.Sprintf("StartRequest: %v", v.StartRequest) + i++ + } + + return fmt.Sprintf("WorkflowService_StartWorkflowExecution_Args{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this WorkflowService_StartWorkflowExecution_Args match the +// provided WorkflowService_StartWorkflowExecution_Args. +// +// This function performs a deep comparison. +func (v *WorkflowService_StartWorkflowExecution_Args) Equals(rhs *WorkflowService_StartWorkflowExecution_Args) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !((v.StartRequest == nil && rhs.StartRequest == nil) || (v.StartRequest != nil && rhs.StartRequest != nil && v.StartRequest.Equals(rhs.StartRequest))) { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of WorkflowService_StartWorkflowExecution_Args. +func (v *WorkflowService_StartWorkflowExecution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + if v.StartRequest != nil { + err = multierr.Append(err, enc.AddObject("startRequest", v.StartRequest)) + } + return err +} + +// GetStartRequest returns the value of StartRequest if it is set or its +// zero value if it is unset. +func (v *WorkflowService_StartWorkflowExecution_Args) GetStartRequest() (o *shared.StartWorkflowExecutionRequest) { + if v != nil && v.StartRequest != nil { + return v.StartRequest + } + + return +} + +// IsSetStartRequest returns true if StartRequest is not nil. +func (v *WorkflowService_StartWorkflowExecution_Args) IsSetStartRequest() bool { + return v != nil && v.StartRequest != nil +} + +// MethodName returns the name of the Thrift function as specified in +// the IDL, for which this struct represent the arguments. +// +// This will always be "StartWorkflowExecution" for this struct. +func (v *WorkflowService_StartWorkflowExecution_Args) MethodName() string { + return "StartWorkflowExecution" +} + +// EnvelopeType returns the kind of value inside this struct. +// +// This will always be Call for this struct. +func (v *WorkflowService_StartWorkflowExecution_Args) EnvelopeType() wire.EnvelopeType { + return wire.Call +} + +// WorkflowService_StartWorkflowExecution_Helper provides functions that aid in handling the +// parameters and return values of the WorkflowService.StartWorkflowExecution +// function. +var WorkflowService_StartWorkflowExecution_Helper = struct { + // Args accepts the parameters of StartWorkflowExecution in-order and returns + // the arguments struct for the function. + Args func( + startRequest *shared.StartWorkflowExecutionRequest, + ) *WorkflowService_StartWorkflowExecution_Args + + // IsException returns true if the given error can be thrown + // by StartWorkflowExecution. + // + // An error can be thrown by StartWorkflowExecution only if the + // corresponding exception type was mentioned in the 'throws' + // section for it in the Thrift file. + IsException func(error) bool + + // WrapResponse returns the result struct for StartWorkflowExecution + // given its return value and error. + // + // This allows mapping values and errors returned by + // StartWorkflowExecution into a serializable result struct. + // WrapResponse returns a non-nil error if the provided + // error cannot be thrown by StartWorkflowExecution + // + // value, err := StartWorkflowExecution(args) + // result, err := WorkflowService_StartWorkflowExecution_Helper.WrapResponse(value, err) + // if err != nil { + // return fmt.Errorf("unexpected error from StartWorkflowExecution: %v", err) + // } + // serialize(result) + WrapResponse func(*shared.StartWorkflowExecutionResponse, error) (*WorkflowService_StartWorkflowExecution_Result, error) + + // UnwrapResponse takes the result struct for StartWorkflowExecution + // and returns the value or error returned by it. + // + // The error is non-nil only if StartWorkflowExecution threw an + // exception. + // + // result := deserialize(bytes) + // value, err := WorkflowService_StartWorkflowExecution_Helper.UnwrapResponse(result) + UnwrapResponse func(*WorkflowService_StartWorkflowExecution_Result) (*shared.StartWorkflowExecutionResponse, error) +}{} + +func init() { + WorkflowService_StartWorkflowExecution_Helper.Args = func( + startRequest *shared.StartWorkflowExecutionRequest, + ) *WorkflowService_StartWorkflowExecution_Args { + return &WorkflowService_StartWorkflowExecution_Args{ + StartRequest: startRequest, + } + } + + WorkflowService_StartWorkflowExecution_Helper.IsException = func(err error) bool { + switch err.(type) { + case *shared.BadRequestError: + return true + case *shared.WorkflowExecutionAlreadyStartedError: + return true + case *shared.ServiceBusyError: + return true + case *shared.DomainNotActiveError: + return true + case *shared.LimitExceededError: + return true + case *shared.EntityNotExistsError: + return true + case *shared.ClientVersionNotSupportedError: + return true + default: + return false + } + } + + WorkflowService_StartWorkflowExecution_Helper.WrapResponse = func(success *shared.StartWorkflowExecutionResponse, err error) (*WorkflowService_StartWorkflowExecution_Result, error) { + if err == nil { + return &WorkflowService_StartWorkflowExecution_Result{Success: success}, nil + } + + switch e := err.(type) { + case *shared.BadRequestError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.BadRequestError") + } + return &WorkflowService_StartWorkflowExecution_Result{BadRequestError: e}, nil + case *shared.WorkflowExecutionAlreadyStartedError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.SessionAlreadyExistError") + } + return &WorkflowService_StartWorkflowExecution_Result{SessionAlreadyExistError: e}, nil + case *shared.ServiceBusyError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.ServiceBusyError") + } + return &WorkflowService_StartWorkflowExecution_Result{ServiceBusyError: e}, nil + case *shared.DomainNotActiveError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.DomainNotActiveError") + } + return &WorkflowService_StartWorkflowExecution_Result{DomainNotActiveError: e}, nil + case *shared.LimitExceededError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.LimitExceededError") + } + return &WorkflowService_StartWorkflowExecution_Result{LimitExceededError: e}, nil + case *shared.EntityNotExistsError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.EntityNotExistError") + } + return &WorkflowService_StartWorkflowExecution_Result{EntityNotExistError: e}, nil + case *shared.ClientVersionNotSupportedError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.ClientVersionNotSupportedError") + } + return &WorkflowService_StartWorkflowExecution_Result{ClientVersionNotSupportedError: e}, nil + } + + return nil, err + } + WorkflowService_StartWorkflowExecution_Helper.UnwrapResponse = func(result *WorkflowService_StartWorkflowExecution_Result) (success *shared.StartWorkflowExecutionResponse, err error) { + if result.BadRequestError != nil { + err = result.BadRequestError + return + } + if result.SessionAlreadyExistError != nil { + err = result.SessionAlreadyExistError + return + } + if result.ServiceBusyError != nil { + err = result.ServiceBusyError + return + } + if result.DomainNotActiveError != nil { + err = result.DomainNotActiveError + return + } + if result.LimitExceededError != nil { + err = result.LimitExceededError + return + } + if result.EntityNotExistError != nil { + err = result.EntityNotExistError + return + } + if result.ClientVersionNotSupportedError != nil { + err = result.ClientVersionNotSupportedError + return + } + + if result.Success != nil { + success = result.Success + return + } + + err = errors.New("expected a non-void result") + return + } + +} + +// WorkflowService_StartWorkflowExecution_Result represents the result of a WorkflowService.StartWorkflowExecution function call. +// +// The result of a StartWorkflowExecution execution is sent and received over the wire as this struct. +// +// Success is set only if the function did not throw an exception. +type WorkflowService_StartWorkflowExecution_Result struct { + // Value returned by StartWorkflowExecution after a successful execution. + Success *shared.StartWorkflowExecutionResponse `json:"success,omitempty"` + BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` + SessionAlreadyExistError *shared.WorkflowExecutionAlreadyStartedError `json:"sessionAlreadyExistError,omitempty"` + ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` + DomainNotActiveError *shared.DomainNotActiveError `json:"domainNotActiveError,omitempty"` + LimitExceededError *shared.LimitExceededError `json:"limitExceededError,omitempty"` + EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"` + ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` +} + +// ToWire translates a WorkflowService_StartWorkflowExecution_Result struct into a Thrift-level intermediate +// representation. This intermediate representation may be serialized +// into bytes using a ThriftRW protocol implementation. +// +// An error is returned if the struct or any of its fields failed to +// validate. +// +// x, err := v.ToWire() +// if err != nil { +// return err +// } +// +// if err := binaryProtocol.Encode(x, writer); err != nil { +// return err +// } +func (v *WorkflowService_StartWorkflowExecution_Result) ToWire() (wire.Value, error) { + var ( + fields [8]wire.Field + i int = 0 + w wire.Value + err error + ) + + if v.Success != nil { + w, err = v.Success.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 0, Value: w} + i++ + } + if v.BadRequestError != nil { + w, err = v.BadRequestError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 1, Value: w} + i++ + } + if v.SessionAlreadyExistError != nil { + w, err = v.SessionAlreadyExistError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 3, Value: w} + i++ + } + if v.ServiceBusyError != nil { + w, err = v.ServiceBusyError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 4, Value: w} + i++ + } + if v.DomainNotActiveError != nil { + w, err = v.DomainNotActiveError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 5, Value: w} + i++ + } + if v.LimitExceededError != nil { + w, err = v.LimitExceededError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 6, Value: w} + i++ + } + if v.EntityNotExistError != nil { + w, err = v.EntityNotExistError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 7, Value: w} + i++ + } + if v.ClientVersionNotSupportedError != nil { + w, err = v.ClientVersionNotSupportedError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 8, Value: w} + i++ + } + + if i != 1 { + return wire.Value{}, fmt.Errorf("WorkflowService_StartWorkflowExecution_Result should have exactly one field: got %v fields", i) + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +// FromWire deserializes a WorkflowService_StartWorkflowExecution_Result struct from its Thrift-level +// representation. The Thrift-level representation may be obtained +// from a ThriftRW protocol implementation. +// +// An error is returned if we were unable to build a WorkflowService_StartWorkflowExecution_Result struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v WorkflowService_StartWorkflowExecution_Result +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *WorkflowService_StartWorkflowExecution_Result) FromWire(w wire.Value) error { + var err error + + for _, field := range w.GetStruct().Fields { + switch field.ID { + case 0: + if field.Value.Type() == wire.TStruct { + v.Success, err = _StartWorkflowExecutionResponse_Read(field.Value) + if err != nil { + return err + } + + } + case 1: + if field.Value.Type() == wire.TStruct { + v.BadRequestError, err = _BadRequestError_Read(field.Value) + if err != nil { + return err + } + + } + case 3: + if field.Value.Type() == wire.TStruct { + v.SessionAlreadyExistError, err = _WorkflowExecutionAlreadyStartedError_Read(field.Value) + if err != nil { + return err + } + + } + case 4: + if field.Value.Type() == wire.TStruct { + v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value) + if err != nil { + return err + } + + } + case 5: + if field.Value.Type() == wire.TStruct { + v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value) + if err != nil { + return err + } + + } + case 6: + if field.Value.Type() == wire.TStruct { + v.LimitExceededError, err = _LimitExceededError_Read(field.Value) + if err != nil { + return err + } + + } + case 7: + if field.Value.Type() == wire.TStruct { + v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value) + if err != nil { + return err + } + + } + case 8: + if field.Value.Type() == wire.TStruct { + v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value) + if err != nil { + return err + } + + } + } + } + + count := 0 + if v.Success != nil { + count++ + } + if v.BadRequestError != nil { + count++ + } + if v.SessionAlreadyExistError != nil { + count++ + } + if v.ServiceBusyError != nil { + count++ + } + if v.DomainNotActiveError != nil { + count++ + } + if v.LimitExceededError != nil { + count++ + } + if v.EntityNotExistError != nil { + count++ + } + if v.ClientVersionNotSupportedError != nil { count++ } - if count > 1 { - return fmt.Errorf("WorkflowService_SignalWorkflowExecution_Result should have at most one field: got %v fields", count) + if count != 1 { + return fmt.Errorf("WorkflowService_StartWorkflowExecution_Result should have exactly one field: got %v fields", count) } return nil } -// String returns a readable string representation of a WorkflowService_SignalWorkflowExecution_Result +// String returns a readable string representation of a WorkflowService_StartWorkflowExecution_Result // struct. -func (v *WorkflowService_SignalWorkflowExecution_Result) String() string { +func (v *WorkflowService_StartWorkflowExecution_Result) String() string { if v == nil { return "" } - var fields [7]string + var fields [8]string i := 0 + if v.Success != nil { + fields[i] = fmt.Sprintf("Success: %v", v.Success) + i++ + } if v.BadRequestError != nil { fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError) i++ } - if v.EntityNotExistError != nil { - fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError) + if v.SessionAlreadyExistError != nil { + fields[i] = fmt.Sprintf("SessionAlreadyExistError: %v", v.SessionAlreadyExistError) i++ } if v.ServiceBusyError != nil { @@ -26581,32 +28176,35 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) String() string { fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError) i++ } - if v.ClientVersionNotSupportedError != nil { - fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError) + if v.EntityNotExistError != nil { + fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError) i++ } - if v.WorkflowExecutionAlreadyCompletedError != nil { - fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError) + if v.ClientVersionNotSupportedError != nil { + fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError) i++ } - return fmt.Sprintf("WorkflowService_SignalWorkflowExecution_Result{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_StartWorkflowExecution_Result{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_SignalWorkflowExecution_Result match the -// provided WorkflowService_SignalWorkflowExecution_Result. +// Equals returns true if all the fields of this WorkflowService_StartWorkflowExecution_Result match the +// provided WorkflowService_StartWorkflowExecution_Result. // // This function performs a deep comparison. -func (v *WorkflowService_SignalWorkflowExecution_Result) Equals(rhs *WorkflowService_SignalWorkflowExecution_Result) bool { +func (v *WorkflowService_StartWorkflowExecution_Result) Equals(rhs *WorkflowService_StartWorkflowExecution_Result) bool { if v == nil { return rhs == nil } else if rhs == nil { return false } + if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) { + return false + } if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) { return false } - if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) { + if !((v.SessionAlreadyExistError == nil && rhs.SessionAlreadyExistError == nil) || (v.SessionAlreadyExistError != nil && rhs.SessionAlreadyExistError != nil && v.SessionAlreadyExistError.Equals(rhs.SessionAlreadyExistError))) { return false } if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) { @@ -26618,10 +28216,10 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) Equals(rhs *WorkflowSer if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) { return false } - if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) { + if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) { return false } - if !((v.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) { + if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) { return false } @@ -26629,16 +28227,19 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) Equals(rhs *WorkflowSer } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_SignalWorkflowExecution_Result. -func (v *WorkflowService_SignalWorkflowExecution_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_StartWorkflowExecution_Result. +func (v *WorkflowService_StartWorkflowExecution_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } + if v.Success != nil { + err = multierr.Append(err, enc.AddObject("success", v.Success)) + } if v.BadRequestError != nil { err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError)) } - if v.EntityNotExistError != nil { - err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError)) + if v.SessionAlreadyExistError != nil { + err = multierr.Append(err, enc.AddObject("sessionAlreadyExistError", v.SessionAlreadyExistError)) } if v.ServiceBusyError != nil { err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError)) @@ -26649,18 +28250,33 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) MarshalLogObject(enc za if v.LimitExceededError != nil { err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError)) } + if v.EntityNotExistError != nil { + err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError)) + } if v.ClientVersionNotSupportedError != nil { err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError)) } - if v.WorkflowExecutionAlreadyCompletedError != nil { - err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError)) - } return err } +// GetSuccess returns the value of Success if it is set or its +// zero value if it is unset. +func (v *WorkflowService_StartWorkflowExecution_Result) GetSuccess() (o *shared.StartWorkflowExecutionResponse) { + if v != nil && v.Success != nil { + return v.Success + } + + return +} + +// IsSetSuccess returns true if Success is not nil. +func (v *WorkflowService_StartWorkflowExecution_Result) IsSetSuccess() bool { + return v != nil && v.Success != nil +} + // GetBadRequestError returns the value of BadRequestError if it is set or its // zero value if it is unset. -func (v *WorkflowService_SignalWorkflowExecution_Result) GetBadRequestError() (o *shared.BadRequestError) { +func (v *WorkflowService_StartWorkflowExecution_Result) GetBadRequestError() (o *shared.BadRequestError) { if v != nil && v.BadRequestError != nil { return v.BadRequestError } @@ -26669,28 +28285,28 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) GetBadRequestError() (o } // IsSetBadRequestError returns true if BadRequestError is not nil. -func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetBadRequestError() bool { +func (v *WorkflowService_StartWorkflowExecution_Result) IsSetBadRequestError() bool { return v != nil && v.BadRequestError != nil } -// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its +// GetSessionAlreadyExistError returns the value of SessionAlreadyExistError if it is set or its // zero value if it is unset. -func (v *WorkflowService_SignalWorkflowExecution_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) { - if v != nil && v.EntityNotExistError != nil { - return v.EntityNotExistError +func (v *WorkflowService_StartWorkflowExecution_Result) GetSessionAlreadyExistError() (o *shared.WorkflowExecutionAlreadyStartedError) { + if v != nil && v.SessionAlreadyExistError != nil { + return v.SessionAlreadyExistError } return } -// IsSetEntityNotExistError returns true if EntityNotExistError is not nil. -func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetEntityNotExistError() bool { - return v != nil && v.EntityNotExistError != nil +// IsSetSessionAlreadyExistError returns true if SessionAlreadyExistError is not nil. +func (v *WorkflowService_StartWorkflowExecution_Result) IsSetSessionAlreadyExistError() bool { + return v != nil && v.SessionAlreadyExistError != nil } // GetServiceBusyError returns the value of ServiceBusyError if it is set or its // zero value if it is unset. -func (v *WorkflowService_SignalWorkflowExecution_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { +func (v *WorkflowService_StartWorkflowExecution_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { if v != nil && v.ServiceBusyError != nil { return v.ServiceBusyError } @@ -26699,13 +28315,13 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) GetServiceBusyError() ( } // IsSetServiceBusyError returns true if ServiceBusyError is not nil. -func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetServiceBusyError() bool { +func (v *WorkflowService_StartWorkflowExecution_Result) IsSetServiceBusyError() bool { return v != nil && v.ServiceBusyError != nil } // GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its // zero value if it is unset. -func (v *WorkflowService_SignalWorkflowExecution_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) { +func (v *WorkflowService_StartWorkflowExecution_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) { if v != nil && v.DomainNotActiveError != nil { return v.DomainNotActiveError } @@ -26714,13 +28330,13 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) GetDomainNotActiveError } // IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil. -func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetDomainNotActiveError() bool { +func (v *WorkflowService_StartWorkflowExecution_Result) IsSetDomainNotActiveError() bool { return v != nil && v.DomainNotActiveError != nil } // GetLimitExceededError returns the value of LimitExceededError if it is set or its // zero value if it is unset. -func (v *WorkflowService_SignalWorkflowExecution_Result) GetLimitExceededError() (o *shared.LimitExceededError) { +func (v *WorkflowService_StartWorkflowExecution_Result) GetLimitExceededError() (o *shared.LimitExceededError) { if v != nil && v.LimitExceededError != nil { return v.LimitExceededError } @@ -26729,63 +28345,63 @@ func (v *WorkflowService_SignalWorkflowExecution_Result) GetLimitExceededError() } // IsSetLimitExceededError returns true if LimitExceededError is not nil. -func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetLimitExceededError() bool { +func (v *WorkflowService_StartWorkflowExecution_Result) IsSetLimitExceededError() bool { return v != nil && v.LimitExceededError != nil } -// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its +// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its // zero value if it is unset. -func (v *WorkflowService_SignalWorkflowExecution_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { - if v != nil && v.ClientVersionNotSupportedError != nil { - return v.ClientVersionNotSupportedError +func (v *WorkflowService_StartWorkflowExecution_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) { + if v != nil && v.EntityNotExistError != nil { + return v.EntityNotExistError } return } -// IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil. -func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetClientVersionNotSupportedError() bool { - return v != nil && v.ClientVersionNotSupportedError != nil +// IsSetEntityNotExistError returns true if EntityNotExistError is not nil. +func (v *WorkflowService_StartWorkflowExecution_Result) IsSetEntityNotExistError() bool { + return v != nil && v.EntityNotExistError != nil } -// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its +// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its // zero value if it is unset. -func (v *WorkflowService_SignalWorkflowExecution_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) { - if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil { - return v.WorkflowExecutionAlreadyCompletedError +func (v *WorkflowService_StartWorkflowExecution_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { + if v != nil && v.ClientVersionNotSupportedError != nil { + return v.ClientVersionNotSupportedError } return } -// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil. -func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool { - return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil +// IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil. +func (v *WorkflowService_StartWorkflowExecution_Result) IsSetClientVersionNotSupportedError() bool { + return v != nil && v.ClientVersionNotSupportedError != nil } // MethodName returns the name of the Thrift function as specified in // the IDL, for which this struct represent the result. // -// This will always be "SignalWorkflowExecution" for this struct. -func (v *WorkflowService_SignalWorkflowExecution_Result) MethodName() string { - return "SignalWorkflowExecution" +// This will always be "StartWorkflowExecution" for this struct. +func (v *WorkflowService_StartWorkflowExecution_Result) MethodName() string { + return "StartWorkflowExecution" } // EnvelopeType returns the kind of value inside this struct. // // This will always be Reply for this struct. -func (v *WorkflowService_SignalWorkflowExecution_Result) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_StartWorkflowExecution_Result) EnvelopeType() wire.EnvelopeType { return wire.Reply } -// WorkflowService_StartWorkflowExecution_Args represents the arguments for the WorkflowService.StartWorkflowExecution function. +// WorkflowService_StartWorkflowExecutionAsync_Args represents the arguments for the WorkflowService.StartWorkflowExecutionAsync function. // -// The arguments for StartWorkflowExecution are sent and received over the wire as this struct. -type WorkflowService_StartWorkflowExecution_Args struct { - StartRequest *shared.StartWorkflowExecutionRequest `json:"startRequest,omitempty"` +// The arguments for StartWorkflowExecutionAsync are sent and received over the wire as this struct. +type WorkflowService_StartWorkflowExecutionAsync_Args struct { + StartRequest *shared.StartWorkflowExecutionAsyncRequest `json:"startRequest,omitempty"` } -// ToWire translates a WorkflowService_StartWorkflowExecution_Args struct into a Thrift-level intermediate +// ToWire translates a WorkflowService_StartWorkflowExecutionAsync_Args struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -26800,7 +28416,7 @@ type WorkflowService_StartWorkflowExecution_Args struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_StartWorkflowExecution_Args) ToWire() (wire.Value, error) { +func (v *WorkflowService_StartWorkflowExecutionAsync_Args) ToWire() (wire.Value, error) { var ( fields [1]wire.Field i int = 0 @@ -26820,17 +28436,17 @@ func (v *WorkflowService_StartWorkflowExecution_Args) ToWire() (wire.Value, erro return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _StartWorkflowExecutionRequest_Read(w wire.Value) (*shared.StartWorkflowExecutionRequest, error) { - var v shared.StartWorkflowExecutionRequest +func _StartWorkflowExecutionAsyncRequest_Read(w wire.Value) (*shared.StartWorkflowExecutionAsyncRequest, error) { + var v shared.StartWorkflowExecutionAsyncRequest err := v.FromWire(w) return &v, err } -// FromWire deserializes a WorkflowService_StartWorkflowExecution_Args struct from its Thrift-level +// FromWire deserializes a WorkflowService_StartWorkflowExecutionAsync_Args struct from its Thrift-level // representation. The Thrift-level representation may be obtained // from a ThriftRW protocol implementation. // -// An error is returned if we were unable to build a WorkflowService_StartWorkflowExecution_Args struct +// An error is returned if we were unable to build a WorkflowService_StartWorkflowExecutionAsync_Args struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -26838,19 +28454,19 @@ func _StartWorkflowExecutionRequest_Read(w wire.Value) (*shared.StartWorkflowExe // return nil, err // } // -// var v WorkflowService_StartWorkflowExecution_Args +// var v WorkflowService_StartWorkflowExecutionAsync_Args // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_StartWorkflowExecution_Args) FromWire(w wire.Value) error { +func (v *WorkflowService_StartWorkflowExecutionAsync_Args) FromWire(w wire.Value) error { var err error for _, field := range w.GetStruct().Fields { switch field.ID { case 1: if field.Value.Type() == wire.TStruct { - v.StartRequest, err = _StartWorkflowExecutionRequest_Read(field.Value) + v.StartRequest, err = _StartWorkflowExecutionAsyncRequest_Read(field.Value) if err != nil { return err } @@ -26862,9 +28478,9 @@ func (v *WorkflowService_StartWorkflowExecution_Args) FromWire(w wire.Value) err return nil } -// String returns a readable string representation of a WorkflowService_StartWorkflowExecution_Args +// String returns a readable string representation of a WorkflowService_StartWorkflowExecutionAsync_Args // struct. -func (v *WorkflowService_StartWorkflowExecution_Args) String() string { +func (v *WorkflowService_StartWorkflowExecutionAsync_Args) String() string { if v == nil { return "" } @@ -26876,14 +28492,14 @@ func (v *WorkflowService_StartWorkflowExecution_Args) String() string { i++ } - return fmt.Sprintf("WorkflowService_StartWorkflowExecution_Args{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_StartWorkflowExecutionAsync_Args{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_StartWorkflowExecution_Args match the -// provided WorkflowService_StartWorkflowExecution_Args. +// Equals returns true if all the fields of this WorkflowService_StartWorkflowExecutionAsync_Args match the +// provided WorkflowService_StartWorkflowExecutionAsync_Args. // // This function performs a deep comparison. -func (v *WorkflowService_StartWorkflowExecution_Args) Equals(rhs *WorkflowService_StartWorkflowExecution_Args) bool { +func (v *WorkflowService_StartWorkflowExecutionAsync_Args) Equals(rhs *WorkflowService_StartWorkflowExecutionAsync_Args) bool { if v == nil { return rhs == nil } else if rhs == nil { @@ -26897,8 +28513,8 @@ func (v *WorkflowService_StartWorkflowExecution_Args) Equals(rhs *WorkflowServic } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_StartWorkflowExecution_Args. -func (v *WorkflowService_StartWorkflowExecution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_StartWorkflowExecutionAsync_Args. +func (v *WorkflowService_StartWorkflowExecutionAsync_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } @@ -26910,7 +28526,7 @@ func (v *WorkflowService_StartWorkflowExecution_Args) MarshalLogObject(enc zapco // GetStartRequest returns the value of StartRequest if it is set or its // zero value if it is unset. -func (v *WorkflowService_StartWorkflowExecution_Args) GetStartRequest() (o *shared.StartWorkflowExecutionRequest) { +func (v *WorkflowService_StartWorkflowExecutionAsync_Args) GetStartRequest() (o *shared.StartWorkflowExecutionAsyncRequest) { if v != nil && v.StartRequest != nil { return v.StartRequest } @@ -26919,80 +28535,80 @@ func (v *WorkflowService_StartWorkflowExecution_Args) GetStartRequest() (o *shar } // IsSetStartRequest returns true if StartRequest is not nil. -func (v *WorkflowService_StartWorkflowExecution_Args) IsSetStartRequest() bool { +func (v *WorkflowService_StartWorkflowExecutionAsync_Args) IsSetStartRequest() bool { return v != nil && v.StartRequest != nil } // MethodName returns the name of the Thrift function as specified in // the IDL, for which this struct represent the arguments. // -// This will always be "StartWorkflowExecution" for this struct. -func (v *WorkflowService_StartWorkflowExecution_Args) MethodName() string { - return "StartWorkflowExecution" +// This will always be "StartWorkflowExecutionAsync" for this struct. +func (v *WorkflowService_StartWorkflowExecutionAsync_Args) MethodName() string { + return "StartWorkflowExecutionAsync" } // EnvelopeType returns the kind of value inside this struct. // // This will always be Call for this struct. -func (v *WorkflowService_StartWorkflowExecution_Args) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_StartWorkflowExecutionAsync_Args) EnvelopeType() wire.EnvelopeType { return wire.Call } -// WorkflowService_StartWorkflowExecution_Helper provides functions that aid in handling the -// parameters and return values of the WorkflowService.StartWorkflowExecution +// WorkflowService_StartWorkflowExecutionAsync_Helper provides functions that aid in handling the +// parameters and return values of the WorkflowService.StartWorkflowExecutionAsync // function. -var WorkflowService_StartWorkflowExecution_Helper = struct { - // Args accepts the parameters of StartWorkflowExecution in-order and returns +var WorkflowService_StartWorkflowExecutionAsync_Helper = struct { + // Args accepts the parameters of StartWorkflowExecutionAsync in-order and returns // the arguments struct for the function. Args func( - startRequest *shared.StartWorkflowExecutionRequest, - ) *WorkflowService_StartWorkflowExecution_Args + startRequest *shared.StartWorkflowExecutionAsyncRequest, + ) *WorkflowService_StartWorkflowExecutionAsync_Args // IsException returns true if the given error can be thrown - // by StartWorkflowExecution. + // by StartWorkflowExecutionAsync. // - // An error can be thrown by StartWorkflowExecution only if the + // An error can be thrown by StartWorkflowExecutionAsync only if the // corresponding exception type was mentioned in the 'throws' // section for it in the Thrift file. IsException func(error) bool - // WrapResponse returns the result struct for StartWorkflowExecution + // WrapResponse returns the result struct for StartWorkflowExecutionAsync // given its return value and error. // // This allows mapping values and errors returned by - // StartWorkflowExecution into a serializable result struct. + // StartWorkflowExecutionAsync into a serializable result struct. // WrapResponse returns a non-nil error if the provided - // error cannot be thrown by StartWorkflowExecution + // error cannot be thrown by StartWorkflowExecutionAsync // - // value, err := StartWorkflowExecution(args) - // result, err := WorkflowService_StartWorkflowExecution_Helper.WrapResponse(value, err) + // value, err := StartWorkflowExecutionAsync(args) + // result, err := WorkflowService_StartWorkflowExecutionAsync_Helper.WrapResponse(value, err) // if err != nil { - // return fmt.Errorf("unexpected error from StartWorkflowExecution: %v", err) + // return fmt.Errorf("unexpected error from StartWorkflowExecutionAsync: %v", err) // } // serialize(result) - WrapResponse func(*shared.StartWorkflowExecutionResponse, error) (*WorkflowService_StartWorkflowExecution_Result, error) + WrapResponse func(*shared.StartWorkflowExecutionAsyncResponse, error) (*WorkflowService_StartWorkflowExecutionAsync_Result, error) - // UnwrapResponse takes the result struct for StartWorkflowExecution + // UnwrapResponse takes the result struct for StartWorkflowExecutionAsync // and returns the value or error returned by it. // - // The error is non-nil only if StartWorkflowExecution threw an + // The error is non-nil only if StartWorkflowExecutionAsync threw an // exception. // // result := deserialize(bytes) - // value, err := WorkflowService_StartWorkflowExecution_Helper.UnwrapResponse(result) - UnwrapResponse func(*WorkflowService_StartWorkflowExecution_Result) (*shared.StartWorkflowExecutionResponse, error) + // value, err := WorkflowService_StartWorkflowExecutionAsync_Helper.UnwrapResponse(result) + UnwrapResponse func(*WorkflowService_StartWorkflowExecutionAsync_Result) (*shared.StartWorkflowExecutionAsyncResponse, error) }{} func init() { - WorkflowService_StartWorkflowExecution_Helper.Args = func( - startRequest *shared.StartWorkflowExecutionRequest, - ) *WorkflowService_StartWorkflowExecution_Args { - return &WorkflowService_StartWorkflowExecution_Args{ + WorkflowService_StartWorkflowExecutionAsync_Helper.Args = func( + startRequest *shared.StartWorkflowExecutionAsyncRequest, + ) *WorkflowService_StartWorkflowExecutionAsync_Args { + return &WorkflowService_StartWorkflowExecutionAsync_Args{ StartRequest: startRequest, } } - WorkflowService_StartWorkflowExecution_Helper.IsException = func(err error) bool { + WorkflowService_StartWorkflowExecutionAsync_Helper.IsException = func(err error) bool { switch err.(type) { case *shared.BadRequestError: return true @@ -27013,52 +28629,52 @@ func init() { } } - WorkflowService_StartWorkflowExecution_Helper.WrapResponse = func(success *shared.StartWorkflowExecutionResponse, err error) (*WorkflowService_StartWorkflowExecution_Result, error) { + WorkflowService_StartWorkflowExecutionAsync_Helper.WrapResponse = func(success *shared.StartWorkflowExecutionAsyncResponse, err error) (*WorkflowService_StartWorkflowExecutionAsync_Result, error) { if err == nil { - return &WorkflowService_StartWorkflowExecution_Result{Success: success}, nil + return &WorkflowService_StartWorkflowExecutionAsync_Result{Success: success}, nil } switch e := err.(type) { case *shared.BadRequestError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.BadRequestError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecutionAsync_Result.BadRequestError") } - return &WorkflowService_StartWorkflowExecution_Result{BadRequestError: e}, nil + return &WorkflowService_StartWorkflowExecutionAsync_Result{BadRequestError: e}, nil case *shared.WorkflowExecutionAlreadyStartedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.SessionAlreadyExistError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecutionAsync_Result.SessionAlreadyExistError") } - return &WorkflowService_StartWorkflowExecution_Result{SessionAlreadyExistError: e}, nil + return &WorkflowService_StartWorkflowExecutionAsync_Result{SessionAlreadyExistError: e}, nil case *shared.ServiceBusyError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.ServiceBusyError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecutionAsync_Result.ServiceBusyError") } - return &WorkflowService_StartWorkflowExecution_Result{ServiceBusyError: e}, nil + return &WorkflowService_StartWorkflowExecutionAsync_Result{ServiceBusyError: e}, nil case *shared.DomainNotActiveError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.DomainNotActiveError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecutionAsync_Result.DomainNotActiveError") } - return &WorkflowService_StartWorkflowExecution_Result{DomainNotActiveError: e}, nil + return &WorkflowService_StartWorkflowExecutionAsync_Result{DomainNotActiveError: e}, nil case *shared.LimitExceededError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.LimitExceededError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecutionAsync_Result.LimitExceededError") } - return &WorkflowService_StartWorkflowExecution_Result{LimitExceededError: e}, nil + return &WorkflowService_StartWorkflowExecutionAsync_Result{LimitExceededError: e}, nil case *shared.EntityNotExistsError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.EntityNotExistError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecutionAsync_Result.EntityNotExistError") } - return &WorkflowService_StartWorkflowExecution_Result{EntityNotExistError: e}, nil + return &WorkflowService_StartWorkflowExecutionAsync_Result{EntityNotExistError: e}, nil case *shared.ClientVersionNotSupportedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.ClientVersionNotSupportedError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecutionAsync_Result.ClientVersionNotSupportedError") } - return &WorkflowService_StartWorkflowExecution_Result{ClientVersionNotSupportedError: e}, nil + return &WorkflowService_StartWorkflowExecutionAsync_Result{ClientVersionNotSupportedError: e}, nil } return nil, err } - WorkflowService_StartWorkflowExecution_Helper.UnwrapResponse = func(result *WorkflowService_StartWorkflowExecution_Result) (success *shared.StartWorkflowExecutionResponse, err error) { + WorkflowService_StartWorkflowExecutionAsync_Helper.UnwrapResponse = func(result *WorkflowService_StartWorkflowExecutionAsync_Result) (success *shared.StartWorkflowExecutionAsyncResponse, err error) { if result.BadRequestError != nil { err = result.BadRequestError return @@ -27099,14 +28715,14 @@ func init() { } -// WorkflowService_StartWorkflowExecution_Result represents the result of a WorkflowService.StartWorkflowExecution function call. +// WorkflowService_StartWorkflowExecutionAsync_Result represents the result of a WorkflowService.StartWorkflowExecutionAsync function call. // -// The result of a StartWorkflowExecution execution is sent and received over the wire as this struct. +// The result of a StartWorkflowExecutionAsync execution is sent and received over the wire as this struct. // // Success is set only if the function did not throw an exception. -type WorkflowService_StartWorkflowExecution_Result struct { - // Value returned by StartWorkflowExecution after a successful execution. - Success *shared.StartWorkflowExecutionResponse `json:"success,omitempty"` +type WorkflowService_StartWorkflowExecutionAsync_Result struct { + // Value returned by StartWorkflowExecutionAsync after a successful execution. + Success *shared.StartWorkflowExecutionAsyncResponse `json:"success,omitempty"` BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` SessionAlreadyExistError *shared.WorkflowExecutionAlreadyStartedError `json:"sessionAlreadyExistError,omitempty"` ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` @@ -27116,7 +28732,7 @@ type WorkflowService_StartWorkflowExecution_Result struct { ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` } -// ToWire translates a WorkflowService_StartWorkflowExecution_Result struct into a Thrift-level intermediate +// ToWire translates a WorkflowService_StartWorkflowExecutionAsync_Result struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -27131,7 +28747,7 @@ type WorkflowService_StartWorkflowExecution_Result struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_StartWorkflowExecution_Result) ToWire() (wire.Value, error) { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) ToWire() (wire.Value, error) { var ( fields [8]wire.Field i int = 0 @@ -27205,17 +28821,23 @@ func (v *WorkflowService_StartWorkflowExecution_Result) ToWire() (wire.Value, er } if i != 1 { - return wire.Value{}, fmt.Errorf("WorkflowService_StartWorkflowExecution_Result should have exactly one field: got %v fields", i) + return wire.Value{}, fmt.Errorf("WorkflowService_StartWorkflowExecutionAsync_Result should have exactly one field: got %v fields", i) } return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -// FromWire deserializes a WorkflowService_StartWorkflowExecution_Result struct from its Thrift-level +func _StartWorkflowExecutionAsyncResponse_Read(w wire.Value) (*shared.StartWorkflowExecutionAsyncResponse, error) { + var v shared.StartWorkflowExecutionAsyncResponse + err := v.FromWire(w) + return &v, err +} + +// FromWire deserializes a WorkflowService_StartWorkflowExecutionAsync_Result struct from its Thrift-level // representation. The Thrift-level representation may be obtained // from a ThriftRW protocol implementation. // -// An error is returned if we were unable to build a WorkflowService_StartWorkflowExecution_Result struct +// An error is returned if we were unable to build a WorkflowService_StartWorkflowExecutionAsync_Result struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -27223,19 +28845,19 @@ func (v *WorkflowService_StartWorkflowExecution_Result) ToWire() (wire.Value, er // return nil, err // } // -// var v WorkflowService_StartWorkflowExecution_Result +// var v WorkflowService_StartWorkflowExecutionAsync_Result // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_StartWorkflowExecution_Result) FromWire(w wire.Value) error { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) FromWire(w wire.Value) error { var err error for _, field := range w.GetStruct().Fields { switch field.ID { case 0: if field.Value.Type() == wire.TStruct { - v.Success, err = _StartWorkflowExecutionResponse_Read(field.Value) + v.Success, err = _StartWorkflowExecutionAsyncResponse_Read(field.Value) if err != nil { return err } @@ -27326,15 +28948,15 @@ func (v *WorkflowService_StartWorkflowExecution_Result) FromWire(w wire.Value) e count++ } if count != 1 { - return fmt.Errorf("WorkflowService_StartWorkflowExecution_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_StartWorkflowExecutionAsync_Result should have exactly one field: got %v fields", count) } return nil } -// String returns a readable string representation of a WorkflowService_StartWorkflowExecution_Result +// String returns a readable string representation of a WorkflowService_StartWorkflowExecutionAsync_Result // struct. -func (v *WorkflowService_StartWorkflowExecution_Result) String() string { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) String() string { if v == nil { return "" } @@ -27374,14 +28996,14 @@ func (v *WorkflowService_StartWorkflowExecution_Result) String() string { i++ } - return fmt.Sprintf("WorkflowService_StartWorkflowExecution_Result{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_StartWorkflowExecutionAsync_Result{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_StartWorkflowExecution_Result match the -// provided WorkflowService_StartWorkflowExecution_Result. +// Equals returns true if all the fields of this WorkflowService_StartWorkflowExecutionAsync_Result match the +// provided WorkflowService_StartWorkflowExecutionAsync_Result. // // This function performs a deep comparison. -func (v *WorkflowService_StartWorkflowExecution_Result) Equals(rhs *WorkflowService_StartWorkflowExecution_Result) bool { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) Equals(rhs *WorkflowService_StartWorkflowExecutionAsync_Result) bool { if v == nil { return rhs == nil } else if rhs == nil { @@ -27416,8 +29038,8 @@ func (v *WorkflowService_StartWorkflowExecution_Result) Equals(rhs *WorkflowServ } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_StartWorkflowExecution_Result. -func (v *WorkflowService_StartWorkflowExecution_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_StartWorkflowExecutionAsync_Result. +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } @@ -27450,7 +29072,7 @@ func (v *WorkflowService_StartWorkflowExecution_Result) MarshalLogObject(enc zap // GetSuccess returns the value of Success if it is set or its // zero value if it is unset. -func (v *WorkflowService_StartWorkflowExecution_Result) GetSuccess() (o *shared.StartWorkflowExecutionResponse) { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) GetSuccess() (o *shared.StartWorkflowExecutionAsyncResponse) { if v != nil && v.Success != nil { return v.Success } @@ -27459,13 +29081,13 @@ func (v *WorkflowService_StartWorkflowExecution_Result) GetSuccess() (o *shared. } // IsSetSuccess returns true if Success is not nil. -func (v *WorkflowService_StartWorkflowExecution_Result) IsSetSuccess() bool { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) IsSetSuccess() bool { return v != nil && v.Success != nil } // GetBadRequestError returns the value of BadRequestError if it is set or its // zero value if it is unset. -func (v *WorkflowService_StartWorkflowExecution_Result) GetBadRequestError() (o *shared.BadRequestError) { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) GetBadRequestError() (o *shared.BadRequestError) { if v != nil && v.BadRequestError != nil { return v.BadRequestError } @@ -27474,13 +29096,13 @@ func (v *WorkflowService_StartWorkflowExecution_Result) GetBadRequestError() (o } // IsSetBadRequestError returns true if BadRequestError is not nil. -func (v *WorkflowService_StartWorkflowExecution_Result) IsSetBadRequestError() bool { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) IsSetBadRequestError() bool { return v != nil && v.BadRequestError != nil } // GetSessionAlreadyExistError returns the value of SessionAlreadyExistError if it is set or its // zero value if it is unset. -func (v *WorkflowService_StartWorkflowExecution_Result) GetSessionAlreadyExistError() (o *shared.WorkflowExecutionAlreadyStartedError) { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) GetSessionAlreadyExistError() (o *shared.WorkflowExecutionAlreadyStartedError) { if v != nil && v.SessionAlreadyExistError != nil { return v.SessionAlreadyExistError } @@ -27489,13 +29111,13 @@ func (v *WorkflowService_StartWorkflowExecution_Result) GetSessionAlreadyExistEr } // IsSetSessionAlreadyExistError returns true if SessionAlreadyExistError is not nil. -func (v *WorkflowService_StartWorkflowExecution_Result) IsSetSessionAlreadyExistError() bool { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) IsSetSessionAlreadyExistError() bool { return v != nil && v.SessionAlreadyExistError != nil } // GetServiceBusyError returns the value of ServiceBusyError if it is set or its // zero value if it is unset. -func (v *WorkflowService_StartWorkflowExecution_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { if v != nil && v.ServiceBusyError != nil { return v.ServiceBusyError } @@ -27504,13 +29126,13 @@ func (v *WorkflowService_StartWorkflowExecution_Result) GetServiceBusyError() (o } // IsSetServiceBusyError returns true if ServiceBusyError is not nil. -func (v *WorkflowService_StartWorkflowExecution_Result) IsSetServiceBusyError() bool { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) IsSetServiceBusyError() bool { return v != nil && v.ServiceBusyError != nil } // GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its // zero value if it is unset. -func (v *WorkflowService_StartWorkflowExecution_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) { if v != nil && v.DomainNotActiveError != nil { return v.DomainNotActiveError } @@ -27519,13 +29141,13 @@ func (v *WorkflowService_StartWorkflowExecution_Result) GetDomainNotActiveError( } // IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil. -func (v *WorkflowService_StartWorkflowExecution_Result) IsSetDomainNotActiveError() bool { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) IsSetDomainNotActiveError() bool { return v != nil && v.DomainNotActiveError != nil } // GetLimitExceededError returns the value of LimitExceededError if it is set or its // zero value if it is unset. -func (v *WorkflowService_StartWorkflowExecution_Result) GetLimitExceededError() (o *shared.LimitExceededError) { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) GetLimitExceededError() (o *shared.LimitExceededError) { if v != nil && v.LimitExceededError != nil { return v.LimitExceededError } @@ -27534,13 +29156,13 @@ func (v *WorkflowService_StartWorkflowExecution_Result) GetLimitExceededError() } // IsSetLimitExceededError returns true if LimitExceededError is not nil. -func (v *WorkflowService_StartWorkflowExecution_Result) IsSetLimitExceededError() bool { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) IsSetLimitExceededError() bool { return v != nil && v.LimitExceededError != nil } // GetEntityNotExistError returns the value of EntityNotExistError if it is set or its // zero value if it is unset. -func (v *WorkflowService_StartWorkflowExecution_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) { if v != nil && v.EntityNotExistError != nil { return v.EntityNotExistError } @@ -27549,13 +29171,13 @@ func (v *WorkflowService_StartWorkflowExecution_Result) GetEntityNotExistError() } // IsSetEntityNotExistError returns true if EntityNotExistError is not nil. -func (v *WorkflowService_StartWorkflowExecution_Result) IsSetEntityNotExistError() bool { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) IsSetEntityNotExistError() bool { return v != nil && v.EntityNotExistError != nil } // GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its // zero value if it is unset. -func (v *WorkflowService_StartWorkflowExecution_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { if v != nil && v.ClientVersionNotSupportedError != nil { return v.ClientVersionNotSupportedError } @@ -27564,22 +29186,22 @@ func (v *WorkflowService_StartWorkflowExecution_Result) GetClientVersionNotSuppo } // IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil. -func (v *WorkflowService_StartWorkflowExecution_Result) IsSetClientVersionNotSupportedError() bool { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) IsSetClientVersionNotSupportedError() bool { return v != nil && v.ClientVersionNotSupportedError != nil } // MethodName returns the name of the Thrift function as specified in // the IDL, for which this struct represent the result. // -// This will always be "StartWorkflowExecution" for this struct. -func (v *WorkflowService_StartWorkflowExecution_Result) MethodName() string { - return "StartWorkflowExecution" +// This will always be "StartWorkflowExecutionAsync" for this struct. +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) MethodName() string { + return "StartWorkflowExecutionAsync" } // EnvelopeType returns the kind of value inside this struct. // // This will always be Reply for this struct. -func (v *WorkflowService_StartWorkflowExecution_Result) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_StartWorkflowExecutionAsync_Result) EnvelopeType() wire.EnvelopeType { return wire.Reply } diff --git a/.gen/go/cadence/workflowserviceclient/client.go b/.gen/go/cadence/workflowserviceclient/client.go index 84eb010a3..9d86ed529 100644 --- a/.gen/go/cadence/workflowserviceclient/client.go +++ b/.gen/go/cadence/workflowserviceclient/client.go @@ -258,6 +258,12 @@ type Interface interface { opts ...yarpc.CallOption, ) (*shared.StartWorkflowExecutionResponse, error) + SignalWithStartWorkflowExecutionAsync( + ctx context.Context, + SignalWithStartRequest *shared.SignalWithStartWorkflowExecutionAsyncRequest, + opts ...yarpc.CallOption, + ) (*shared.SignalWithStartWorkflowExecutionAsyncResponse, error) + SignalWorkflowExecution( ctx context.Context, SignalRequest *shared.SignalWorkflowExecutionRequest, @@ -270,6 +276,12 @@ type Interface interface { opts ...yarpc.CallOption, ) (*shared.StartWorkflowExecutionResponse, error) + StartWorkflowExecutionAsync( + ctx context.Context, + StartRequest *shared.StartWorkflowExecutionAsyncRequest, + opts ...yarpc.CallOption, + ) (*shared.StartWorkflowExecutionAsyncResponse, error) + TerminateWorkflowExecution( ctx context.Context, TerminateRequest *shared.TerminateWorkflowExecutionRequest, @@ -1156,6 +1168,29 @@ func (c client) SignalWithStartWorkflowExecution( return } +func (c client) SignalWithStartWorkflowExecutionAsync( + ctx context.Context, + _SignalWithStartRequest *shared.SignalWithStartWorkflowExecutionAsyncRequest, + opts ...yarpc.CallOption, +) (success *shared.SignalWithStartWorkflowExecutionAsyncResponse, err error) { + + args := cadence.WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper.Args(_SignalWithStartRequest) + + var body wire.Value + body, err = c.c.Call(ctx, args, opts...) + if err != nil { + return + } + + var result cadence.WorkflowService_SignalWithStartWorkflowExecutionAsync_Result + if err = result.FromWire(body); err != nil { + return + } + + success, err = cadence.WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper.UnwrapResponse(&result) + return +} + func (c client) SignalWorkflowExecution( ctx context.Context, _SignalRequest *shared.SignalWorkflowExecutionRequest, @@ -1202,6 +1237,29 @@ func (c client) StartWorkflowExecution( return } +func (c client) StartWorkflowExecutionAsync( + ctx context.Context, + _StartRequest *shared.StartWorkflowExecutionAsyncRequest, + opts ...yarpc.CallOption, +) (success *shared.StartWorkflowExecutionAsyncResponse, err error) { + + args := cadence.WorkflowService_StartWorkflowExecutionAsync_Helper.Args(_StartRequest) + + var body wire.Value + body, err = c.c.Call(ctx, args, opts...) + if err != nil { + return + } + + var result cadence.WorkflowService_StartWorkflowExecutionAsync_Result + if err = result.FromWire(body); err != nil { + return + } + + success, err = cadence.WorkflowService_StartWorkflowExecutionAsync_Helper.UnwrapResponse(&result) + return +} + func (c client) TerminateWorkflowExecution( ctx context.Context, _TerminateRequest *shared.TerminateWorkflowExecutionRequest, diff --git a/.gen/go/cadence/workflowserviceserver/server.go b/.gen/go/cadence/workflowserviceserver/server.go index ce4bdcd68..8095482fe 100644 --- a/.gen/go/cadence/workflowserviceserver/server.go +++ b/.gen/go/cadence/workflowserviceserver/server.go @@ -220,6 +220,11 @@ type Interface interface { SignalWithStartRequest *shared.SignalWithStartWorkflowExecutionRequest, ) (*shared.StartWorkflowExecutionResponse, error) + SignalWithStartWorkflowExecutionAsync( + ctx context.Context, + SignalWithStartRequest *shared.SignalWithStartWorkflowExecutionAsyncRequest, + ) (*shared.SignalWithStartWorkflowExecutionAsyncResponse, error) + SignalWorkflowExecution( ctx context.Context, SignalRequest *shared.SignalWorkflowExecutionRequest, @@ -230,6 +235,11 @@ type Interface interface { StartRequest *shared.StartWorkflowExecutionRequest, ) (*shared.StartWorkflowExecutionResponse, error) + StartWorkflowExecutionAsync( + ctx context.Context, + StartRequest *shared.StartWorkflowExecutionAsyncRequest, + ) (*shared.StartWorkflowExecutionAsyncResponse, error) + TerminateWorkflowExecution( ctx context.Context, TerminateRequest *shared.TerminateWorkflowExecutionRequest, @@ -659,6 +669,17 @@ func New(impl Interface, opts ...thrift.RegisterOption) []transport.Procedure { ThriftModule: cadence.ThriftModule, }, + thrift.Method{ + Name: "SignalWithStartWorkflowExecutionAsync", + HandlerSpec: thrift.HandlerSpec{ + + Type: transport.Unary, + Unary: thrift.UnaryHandler(h.SignalWithStartWorkflowExecutionAsync), + }, + Signature: "SignalWithStartWorkflowExecutionAsync(SignalWithStartRequest *shared.SignalWithStartWorkflowExecutionAsyncRequest) (*shared.SignalWithStartWorkflowExecutionAsyncResponse)", + ThriftModule: cadence.ThriftModule, + }, + thrift.Method{ Name: "SignalWorkflowExecution", HandlerSpec: thrift.HandlerSpec{ @@ -681,6 +702,17 @@ func New(impl Interface, opts ...thrift.RegisterOption) []transport.Procedure { ThriftModule: cadence.ThriftModule, }, + thrift.Method{ + Name: "StartWorkflowExecutionAsync", + HandlerSpec: thrift.HandlerSpec{ + + Type: transport.Unary, + Unary: thrift.UnaryHandler(h.StartWorkflowExecutionAsync), + }, + Signature: "StartWorkflowExecutionAsync(StartRequest *shared.StartWorkflowExecutionAsyncRequest) (*shared.StartWorkflowExecutionAsyncResponse)", + ThriftModule: cadence.ThriftModule, + }, + thrift.Method{ Name: "TerminateWorkflowExecution", HandlerSpec: thrift.HandlerSpec{ @@ -705,7 +737,7 @@ func New(impl Interface, opts ...thrift.RegisterOption) []transport.Procedure { }, } - procedures := make([]transport.Procedure, 0, 41) + procedures := make([]transport.Procedure, 0, 43) procedures = append(procedures, thrift.BuildProcedures(service, opts...)...) return procedures } @@ -1826,6 +1858,36 @@ func (h handler) SignalWithStartWorkflowExecution(ctx context.Context, body wire return response, err } +func (h handler) SignalWithStartWorkflowExecutionAsync(ctx context.Context, body wire.Value) (thrift.Response, error) { + var args cadence.WorkflowService_SignalWithStartWorkflowExecutionAsync_Args + if err := args.FromWire(body); err != nil { + return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf( + "could not decode Thrift request for service 'WorkflowService' procedure 'SignalWithStartWorkflowExecutionAsync': %w", err) + } + + success, appErr := h.impl.SignalWithStartWorkflowExecutionAsync(ctx, args.SignalWithStartRequest) + + hadError := appErr != nil + result, err := cadence.WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper.WrapResponse(success, appErr) + + var response thrift.Response + if err == nil { + response.IsApplicationError = hadError + response.Body = result + if namer, ok := appErr.(yarpcErrorNamer); ok { + response.ApplicationErrorName = namer.YARPCErrorName() + } + if extractor, ok := appErr.(yarpcErrorCoder); ok { + response.ApplicationErrorCode = extractor.YARPCErrorCode() + } + if appErr != nil { + response.ApplicationErrorDetails = appErr.Error() + } + } + + return response, err +} + func (h handler) SignalWorkflowExecution(ctx context.Context, body wire.Value) (thrift.Response, error) { var args cadence.WorkflowService_SignalWorkflowExecution_Args if err := args.FromWire(body); err != nil { @@ -1886,6 +1948,36 @@ func (h handler) StartWorkflowExecution(ctx context.Context, body wire.Value) (t return response, err } +func (h handler) StartWorkflowExecutionAsync(ctx context.Context, body wire.Value) (thrift.Response, error) { + var args cadence.WorkflowService_StartWorkflowExecutionAsync_Args + if err := args.FromWire(body); err != nil { + return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf( + "could not decode Thrift request for service 'WorkflowService' procedure 'StartWorkflowExecutionAsync': %w", err) + } + + success, appErr := h.impl.StartWorkflowExecutionAsync(ctx, args.StartRequest) + + hadError := appErr != nil + result, err := cadence.WorkflowService_StartWorkflowExecutionAsync_Helper.WrapResponse(success, appErr) + + var response thrift.Response + if err == nil { + response.IsApplicationError = hadError + response.Body = result + if namer, ok := appErr.(yarpcErrorNamer); ok { + response.ApplicationErrorName = namer.YARPCErrorName() + } + if extractor, ok := appErr.(yarpcErrorCoder); ok { + response.ApplicationErrorCode = extractor.YARPCErrorCode() + } + if appErr != nil { + response.ApplicationErrorDetails = appErr.Error() + } + } + + return response, err +} + func (h handler) TerminateWorkflowExecution(ctx context.Context, body wire.Value) (thrift.Response, error) { var args cadence.WorkflowService_TerminateWorkflowExecution_Args if err := args.FromWire(body); err != nil { diff --git a/.gen/go/cadence/workflowservicetest/client.go b/.gen/go/cadence/workflowservicetest/client.go index 064e02c8f..299945ef5 100644 --- a/.gen/go/cadence/workflowservicetest/client.go +++ b/.gen/go/cadence/workflowservicetest/client.go @@ -1257,6 +1257,39 @@ func (mr *_MockClientRecorder) SignalWithStartWorkflowExecution( return mr.mock.ctrl.RecordCall(mr.mock, "SignalWithStartWorkflowExecution", args...) } +// SignalWithStartWorkflowExecutionAsync responds to a SignalWithStartWorkflowExecutionAsync call based on the mock expectations. This +// call will fail if the mock does not expect this call. Use EXPECT to expect +// a call to this function. +// +// client.EXPECT().SignalWithStartWorkflowExecutionAsync(gomock.Any(), ...).Return(...) +// ... := client.SignalWithStartWorkflowExecutionAsync(...) +func (m *MockClient) SignalWithStartWorkflowExecutionAsync( + ctx context.Context, + _SignalWithStartRequest *shared.SignalWithStartWorkflowExecutionAsyncRequest, + opts ...yarpc.CallOption, +) (success *shared.SignalWithStartWorkflowExecutionAsyncResponse, err error) { + + args := []interface{}{ctx, _SignalWithStartRequest} + for _, o := range opts { + args = append(args, o) + } + i := 0 + ret := m.ctrl.Call(m, "SignalWithStartWorkflowExecutionAsync", args...) + success, _ = ret[i].(*shared.SignalWithStartWorkflowExecutionAsyncResponse) + i++ + err, _ = ret[i].(error) + return +} + +func (mr *_MockClientRecorder) SignalWithStartWorkflowExecutionAsync( + ctx interface{}, + _SignalWithStartRequest interface{}, + opts ...interface{}, +) *gomock.Call { + args := append([]interface{}{ctx, _SignalWithStartRequest}, opts...) + return mr.mock.ctrl.RecordCall(mr.mock, "SignalWithStartWorkflowExecutionAsync", args...) +} + // SignalWorkflowExecution responds to a SignalWorkflowExecution call based on the mock expectations. This // call will fail if the mock does not expect this call. Use EXPECT to expect // a call to this function. @@ -1321,6 +1354,39 @@ func (mr *_MockClientRecorder) StartWorkflowExecution( return mr.mock.ctrl.RecordCall(mr.mock, "StartWorkflowExecution", args...) } +// StartWorkflowExecutionAsync responds to a StartWorkflowExecutionAsync call based on the mock expectations. This +// call will fail if the mock does not expect this call. Use EXPECT to expect +// a call to this function. +// +// client.EXPECT().StartWorkflowExecutionAsync(gomock.Any(), ...).Return(...) +// ... := client.StartWorkflowExecutionAsync(...) +func (m *MockClient) StartWorkflowExecutionAsync( + ctx context.Context, + _StartRequest *shared.StartWorkflowExecutionAsyncRequest, + opts ...yarpc.CallOption, +) (success *shared.StartWorkflowExecutionAsyncResponse, err error) { + + args := []interface{}{ctx, _StartRequest} + for _, o := range opts { + args = append(args, o) + } + i := 0 + ret := m.ctrl.Call(m, "StartWorkflowExecutionAsync", args...) + success, _ = ret[i].(*shared.StartWorkflowExecutionAsyncResponse) + i++ + err, _ = ret[i].(error) + return +} + +func (mr *_MockClientRecorder) StartWorkflowExecutionAsync( + ctx interface{}, + _StartRequest interface{}, + opts ...interface{}, +) *gomock.Call { + args := append([]interface{}{ctx, _StartRequest}, opts...) + return mr.mock.ctrl.RecordCall(mr.mock, "StartWorkflowExecutionAsync", args...) +} + // TerminateWorkflowExecution responds to a TerminateWorkflowExecution call based on the mock expectations. This // call will fail if the mock does not expect this call. Use EXPECT to expect // a call to this function. diff --git a/.gen/go/shared/shared.go b/.gen/go/shared/shared.go index 91190892f..e0cf86dac 100644 --- a/.gen/go/shared/shared.go +++ b/.gen/go/shared/shared.go @@ -4131,6 +4131,280 @@ func (v *ArchivalStatus) UnmarshalJSON(text []byte) error { } } +type AsyncWorkflowConfiguration struct { + Enabled *bool `json:"enabled,omitempty"` + PredefinedQueueName *string `json:"predefinedQueueName,omitempty"` + QueueType *string `json:"queueType,omitempty"` + QueueConfig *DataBlob `json:"queueConfig,omitempty"` +} + +// ToWire translates a AsyncWorkflowConfiguration struct into a Thrift-level intermediate +// representation. This intermediate representation may be serialized +// into bytes using a ThriftRW protocol implementation. +// +// An error is returned if the struct or any of its fields failed to +// validate. +// +// x, err := v.ToWire() +// if err != nil { +// return err +// } +// +// if err := binaryProtocol.Encode(x, writer); err != nil { +// return err +// } +func (v *AsyncWorkflowConfiguration) ToWire() (wire.Value, error) { + var ( + fields [4]wire.Field + i int = 0 + w wire.Value + err error + ) + + if v.Enabled != nil { + w, err = wire.NewValueBool(*(v.Enabled)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 10, Value: w} + i++ + } + if v.PredefinedQueueName != nil { + w, err = wire.NewValueString(*(v.PredefinedQueueName)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 20, Value: w} + i++ + } + if v.QueueType != nil { + w, err = wire.NewValueString(*(v.QueueType)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 30, Value: w} + i++ + } + if v.QueueConfig != nil { + w, err = v.QueueConfig.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 40, Value: w} + i++ + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +func _DataBlob_Read(w wire.Value) (*DataBlob, error) { + var v DataBlob + err := v.FromWire(w) + return &v, err +} + +// FromWire deserializes a AsyncWorkflowConfiguration struct from its Thrift-level +// representation. The Thrift-level representation may be obtained +// from a ThriftRW protocol implementation. +// +// An error is returned if we were unable to build a AsyncWorkflowConfiguration struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v AsyncWorkflowConfiguration +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *AsyncWorkflowConfiguration) FromWire(w wire.Value) error { + var err error + + for _, field := range w.GetStruct().Fields { + switch field.ID { + case 10: + if field.Value.Type() == wire.TBool { + var x bool + x, err = field.Value.GetBool(), error(nil) + v.Enabled = &x + if err != nil { + return err + } + + } + case 20: + if field.Value.Type() == wire.TBinary { + var x string + x, err = field.Value.GetString(), error(nil) + v.PredefinedQueueName = &x + if err != nil { + return err + } + + } + case 30: + if field.Value.Type() == wire.TBinary { + var x string + x, err = field.Value.GetString(), error(nil) + v.QueueType = &x + if err != nil { + return err + } + + } + case 40: + if field.Value.Type() == wire.TStruct { + v.QueueConfig, err = _DataBlob_Read(field.Value) + if err != nil { + return err + } + + } + } + } + + return nil +} + +// String returns a readable string representation of a AsyncWorkflowConfiguration +// struct. +func (v *AsyncWorkflowConfiguration) String() string { + if v == nil { + return "" + } + + var fields [4]string + i := 0 + if v.Enabled != nil { + fields[i] = fmt.Sprintf("Enabled: %v", *(v.Enabled)) + i++ + } + if v.PredefinedQueueName != nil { + fields[i] = fmt.Sprintf("PredefinedQueueName: %v", *(v.PredefinedQueueName)) + i++ + } + if v.QueueType != nil { + fields[i] = fmt.Sprintf("QueueType: %v", *(v.QueueType)) + i++ + } + if v.QueueConfig != nil { + fields[i] = fmt.Sprintf("QueueConfig: %v", v.QueueConfig) + i++ + } + + return fmt.Sprintf("AsyncWorkflowConfiguration{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this AsyncWorkflowConfiguration match the +// provided AsyncWorkflowConfiguration. +// +// This function performs a deep comparison. +func (v *AsyncWorkflowConfiguration) Equals(rhs *AsyncWorkflowConfiguration) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !_Bool_EqualsPtr(v.Enabled, rhs.Enabled) { + return false + } + if !_String_EqualsPtr(v.PredefinedQueueName, rhs.PredefinedQueueName) { + return false + } + if !_String_EqualsPtr(v.QueueType, rhs.QueueType) { + return false + } + if !((v.QueueConfig == nil && rhs.QueueConfig == nil) || (v.QueueConfig != nil && rhs.QueueConfig != nil && v.QueueConfig.Equals(rhs.QueueConfig))) { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of AsyncWorkflowConfiguration. +func (v *AsyncWorkflowConfiguration) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + if v.Enabled != nil { + enc.AddBool("enabled", *v.Enabled) + } + if v.PredefinedQueueName != nil { + enc.AddString("predefinedQueueName", *v.PredefinedQueueName) + } + if v.QueueType != nil { + enc.AddString("queueType", *v.QueueType) + } + if v.QueueConfig != nil { + err = multierr.Append(err, enc.AddObject("queueConfig", v.QueueConfig)) + } + return err +} + +// GetEnabled returns the value of Enabled if it is set or its +// zero value if it is unset. +func (v *AsyncWorkflowConfiguration) GetEnabled() (o bool) { + if v != nil && v.Enabled != nil { + return *v.Enabled + } + + return +} + +// IsSetEnabled returns true if Enabled is not nil. +func (v *AsyncWorkflowConfiguration) IsSetEnabled() bool { + return v != nil && v.Enabled != nil +} + +// GetPredefinedQueueName returns the value of PredefinedQueueName if it is set or its +// zero value if it is unset. +func (v *AsyncWorkflowConfiguration) GetPredefinedQueueName() (o string) { + if v != nil && v.PredefinedQueueName != nil { + return *v.PredefinedQueueName + } + + return +} + +// IsSetPredefinedQueueName returns true if PredefinedQueueName is not nil. +func (v *AsyncWorkflowConfiguration) IsSetPredefinedQueueName() bool { + return v != nil && v.PredefinedQueueName != nil +} + +// GetQueueType returns the value of QueueType if it is set or its +// zero value if it is unset. +func (v *AsyncWorkflowConfiguration) GetQueueType() (o string) { + if v != nil && v.QueueType != nil { + return *v.QueueType + } + + return +} + +// IsSetQueueType returns true if QueueType is not nil. +func (v *AsyncWorkflowConfiguration) IsSetQueueType() bool { + return v != nil && v.QueueType != nil +} + +// GetQueueConfig returns the value of QueueConfig if it is set or its +// zero value if it is unset. +func (v *AsyncWorkflowConfiguration) GetQueueConfig() (o *DataBlob) { + if v != nil && v.QueueConfig != nil { + return v.QueueConfig + } + + return +} + +// IsSetQueueConfig returns true if QueueConfig is not nil. +func (v *AsyncWorkflowConfiguration) IsSetQueueConfig() bool { + return v != nil && v.QueueConfig != nil +} + type BadBinaries struct { Binaries map[string]*BadBinaryInfo `json:"binaries,omitempty"` } @@ -21741,6 +22015,7 @@ type DomainConfiguration struct { HistoryArchivalURI *string `json:"historyArchivalURI,omitempty"` VisibilityArchivalStatus *ArchivalStatus `json:"visibilityArchivalStatus,omitempty"` VisibilityArchivalURI *string `json:"visibilityArchivalURI,omitempty"` + AsyncWorkflowConfiguration *AsyncWorkflowConfiguration `json:"AsyncWorkflowConfiguration,omitempty"` } // ToWire translates a DomainConfiguration struct into a Thrift-level intermediate @@ -21760,7 +22035,7 @@ type DomainConfiguration struct { // } func (v *DomainConfiguration) ToWire() (wire.Value, error) { var ( - fields [8]wire.Field + fields [9]wire.Field i int = 0 w wire.Value err error @@ -21830,6 +22105,14 @@ func (v *DomainConfiguration) ToWire() (wire.Value, error) { fields[i] = wire.Field{ID: 110, Value: w} i++ } + if v.AsyncWorkflowConfiguration != nil { + w, err = v.AsyncWorkflowConfiguration.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 120, Value: w} + i++ + } return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } @@ -21852,6 +22135,12 @@ func _ArchivalStatus_Read(w wire.Value) (ArchivalStatus, error) { return v, err } +func _AsyncWorkflowConfiguration_Read(w wire.Value) (*AsyncWorkflowConfiguration, error) { + var v AsyncWorkflowConfiguration + err := v.FromWire(w) + return &v, err +} + // FromWire deserializes a DomainConfiguration struct from its Thrift-level // representation. The Thrift-level representation may be obtained // from a ThriftRW protocol implementation. @@ -21949,6 +22238,14 @@ func (v *DomainConfiguration) FromWire(w wire.Value) error { return err } + } + case 120: + if field.Value.Type() == wire.TStruct { + v.AsyncWorkflowConfiguration, err = _AsyncWorkflowConfiguration_Read(field.Value) + if err != nil { + return err + } + } } } @@ -21963,7 +22260,7 @@ func (v *DomainConfiguration) String() string { return "" } - var fields [8]string + var fields [9]string i := 0 if v.WorkflowExecutionRetentionPeriodInDays != nil { fields[i] = fmt.Sprintf("WorkflowExecutionRetentionPeriodInDays: %v", *(v.WorkflowExecutionRetentionPeriodInDays)) @@ -21997,6 +22294,10 @@ func (v *DomainConfiguration) String() string { fields[i] = fmt.Sprintf("VisibilityArchivalURI: %v", *(v.VisibilityArchivalURI)) i++ } + if v.AsyncWorkflowConfiguration != nil { + fields[i] = fmt.Sprintf("AsyncWorkflowConfiguration: %v", v.AsyncWorkflowConfiguration) + i++ + } return fmt.Sprintf("DomainConfiguration{%v}", strings.Join(fields[:i], ", ")) } @@ -22045,6 +22346,9 @@ func (v *DomainConfiguration) Equals(rhs *DomainConfiguration) bool { if !_String_EqualsPtr(v.VisibilityArchivalURI, rhs.VisibilityArchivalURI) { return false } + if !((v.AsyncWorkflowConfiguration == nil && rhs.AsyncWorkflowConfiguration == nil) || (v.AsyncWorkflowConfiguration != nil && rhs.AsyncWorkflowConfiguration != nil && v.AsyncWorkflowConfiguration.Equals(rhs.AsyncWorkflowConfiguration))) { + return false + } return true } @@ -22079,6 +22383,9 @@ func (v *DomainConfiguration) MarshalLogObject(enc zapcore.ObjectEncoder) (err e if v.VisibilityArchivalURI != nil { enc.AddString("visibilityArchivalURI", *v.VisibilityArchivalURI) } + if v.AsyncWorkflowConfiguration != nil { + err = multierr.Append(err, enc.AddObject("AsyncWorkflowConfiguration", v.AsyncWorkflowConfiguration)) + } return err } @@ -22202,6 +22509,21 @@ func (v *DomainConfiguration) IsSetVisibilityArchivalURI() bool { return v != nil && v.VisibilityArchivalURI != nil } +// GetAsyncWorkflowConfiguration returns the value of AsyncWorkflowConfiguration if it is set or its +// zero value if it is unset. +func (v *DomainConfiguration) GetAsyncWorkflowConfiguration() (o *AsyncWorkflowConfiguration) { + if v != nil && v.AsyncWorkflowConfiguration != nil { + return v.AsyncWorkflowConfiguration + } + + return +} + +// IsSetAsyncWorkflowConfiguration returns true if AsyncWorkflowConfiguration is not nil. +func (v *DomainConfiguration) IsSetAsyncWorkflowConfiguration() bool { + return v != nil && v.AsyncWorkflowConfiguration != nil +} + type DomainInfo struct { Name *string `json:"name,omitempty"` Status *DomainStatus `json:"status,omitempty"` @@ -27630,12 +27952,6 @@ func _History_Read(w wire.Value) (*History, error) { return &v, err } -func _DataBlob_Read(w wire.Value) (*DataBlob, error) { - var v DataBlob - err := v.FromWire(w) - return &v, err -} - func _List_DataBlob_Read(l wire.ValueList) ([]*DataBlob, error) { if l.ValueType() != wire.TStruct { return nil, nil @@ -54908,6 +55224,238 @@ func (v *SignalExternalWorkflowExecutionInitiatedEventAttributes) IsSetChildWork return v != nil && v.ChildWorkflowOnly != nil } +type SignalWithStartWorkflowExecutionAsyncRequest struct { + Request *SignalWithStartWorkflowExecutionRequest `json:"request,omitempty"` +} + +// ToWire translates a SignalWithStartWorkflowExecutionAsyncRequest struct into a Thrift-level intermediate +// representation. This intermediate representation may be serialized +// into bytes using a ThriftRW protocol implementation. +// +// An error is returned if the struct or any of its fields failed to +// validate. +// +// x, err := v.ToWire() +// if err != nil { +// return err +// } +// +// if err := binaryProtocol.Encode(x, writer); err != nil { +// return err +// } +func (v *SignalWithStartWorkflowExecutionAsyncRequest) ToWire() (wire.Value, error) { + var ( + fields [1]wire.Field + i int = 0 + w wire.Value + err error + ) + + if v.Request != nil { + w, err = v.Request.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 10, Value: w} + i++ + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +func _SignalWithStartWorkflowExecutionRequest_Read(w wire.Value) (*SignalWithStartWorkflowExecutionRequest, error) { + var v SignalWithStartWorkflowExecutionRequest + err := v.FromWire(w) + return &v, err +} + +// FromWire deserializes a SignalWithStartWorkflowExecutionAsyncRequest struct from its Thrift-level +// representation. The Thrift-level representation may be obtained +// from a ThriftRW protocol implementation. +// +// An error is returned if we were unable to build a SignalWithStartWorkflowExecutionAsyncRequest struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v SignalWithStartWorkflowExecutionAsyncRequest +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *SignalWithStartWorkflowExecutionAsyncRequest) FromWire(w wire.Value) error { + var err error + + for _, field := range w.GetStruct().Fields { + switch field.ID { + case 10: + if field.Value.Type() == wire.TStruct { + v.Request, err = _SignalWithStartWorkflowExecutionRequest_Read(field.Value) + if err != nil { + return err + } + + } + } + } + + return nil +} + +// String returns a readable string representation of a SignalWithStartWorkflowExecutionAsyncRequest +// struct. +func (v *SignalWithStartWorkflowExecutionAsyncRequest) String() string { + if v == nil { + return "" + } + + var fields [1]string + i := 0 + if v.Request != nil { + fields[i] = fmt.Sprintf("Request: %v", v.Request) + i++ + } + + return fmt.Sprintf("SignalWithStartWorkflowExecutionAsyncRequest{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this SignalWithStartWorkflowExecutionAsyncRequest match the +// provided SignalWithStartWorkflowExecutionAsyncRequest. +// +// This function performs a deep comparison. +func (v *SignalWithStartWorkflowExecutionAsyncRequest) Equals(rhs *SignalWithStartWorkflowExecutionAsyncRequest) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of SignalWithStartWorkflowExecutionAsyncRequest. +func (v *SignalWithStartWorkflowExecutionAsyncRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + if v.Request != nil { + err = multierr.Append(err, enc.AddObject("request", v.Request)) + } + return err +} + +// GetRequest returns the value of Request if it is set or its +// zero value if it is unset. +func (v *SignalWithStartWorkflowExecutionAsyncRequest) GetRequest() (o *SignalWithStartWorkflowExecutionRequest) { + if v != nil && v.Request != nil { + return v.Request + } + + return +} + +// IsSetRequest returns true if Request is not nil. +func (v *SignalWithStartWorkflowExecutionAsyncRequest) IsSetRequest() bool { + return v != nil && v.Request != nil +} + +type SignalWithStartWorkflowExecutionAsyncResponse struct { +} + +// ToWire translates a SignalWithStartWorkflowExecutionAsyncResponse struct into a Thrift-level intermediate +// representation. This intermediate representation may be serialized +// into bytes using a ThriftRW protocol implementation. +// +// An error is returned if the struct or any of its fields failed to +// validate. +// +// x, err := v.ToWire() +// if err != nil { +// return err +// } +// +// if err := binaryProtocol.Encode(x, writer); err != nil { +// return err +// } +func (v *SignalWithStartWorkflowExecutionAsyncResponse) ToWire() (wire.Value, error) { + var ( + fields [0]wire.Field + i int = 0 + ) + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +// FromWire deserializes a SignalWithStartWorkflowExecutionAsyncResponse struct from its Thrift-level +// representation. The Thrift-level representation may be obtained +// from a ThriftRW protocol implementation. +// +// An error is returned if we were unable to build a SignalWithStartWorkflowExecutionAsyncResponse struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v SignalWithStartWorkflowExecutionAsyncResponse +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *SignalWithStartWorkflowExecutionAsyncResponse) FromWire(w wire.Value) error { + + for _, field := range w.GetStruct().Fields { + switch field.ID { + } + } + + return nil +} + +// String returns a readable string representation of a SignalWithStartWorkflowExecutionAsyncResponse +// struct. +func (v *SignalWithStartWorkflowExecutionAsyncResponse) String() string { + if v == nil { + return "" + } + + var fields [0]string + i := 0 + + return fmt.Sprintf("SignalWithStartWorkflowExecutionAsyncResponse{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this SignalWithStartWorkflowExecutionAsyncResponse match the +// provided SignalWithStartWorkflowExecutionAsyncResponse. +// +// This function performs a deep comparison. +func (v *SignalWithStartWorkflowExecutionAsyncResponse) Equals(rhs *SignalWithStartWorkflowExecutionAsyncResponse) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of SignalWithStartWorkflowExecutionAsyncResponse. +func (v *SignalWithStartWorkflowExecutionAsyncResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + return err +} + type SignalWithStartWorkflowExecutionRequest struct { Domain *string `json:"domain,omitempty"` WorkflowId *string `json:"workflowId,omitempty"` @@ -58662,6 +59210,238 @@ func (v *StartTimerDecisionAttributes) IsSetStartToFireTimeoutSeconds() bool { return v != nil && v.StartToFireTimeoutSeconds != nil } +type StartWorkflowExecutionAsyncRequest struct { + Request *StartWorkflowExecutionRequest `json:"request,omitempty"` +} + +// ToWire translates a StartWorkflowExecutionAsyncRequest struct into a Thrift-level intermediate +// representation. This intermediate representation may be serialized +// into bytes using a ThriftRW protocol implementation. +// +// An error is returned if the struct or any of its fields failed to +// validate. +// +// x, err := v.ToWire() +// if err != nil { +// return err +// } +// +// if err := binaryProtocol.Encode(x, writer); err != nil { +// return err +// } +func (v *StartWorkflowExecutionAsyncRequest) ToWire() (wire.Value, error) { + var ( + fields [1]wire.Field + i int = 0 + w wire.Value + err error + ) + + if v.Request != nil { + w, err = v.Request.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 10, Value: w} + i++ + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +func _StartWorkflowExecutionRequest_Read(w wire.Value) (*StartWorkflowExecutionRequest, error) { + var v StartWorkflowExecutionRequest + err := v.FromWire(w) + return &v, err +} + +// FromWire deserializes a StartWorkflowExecutionAsyncRequest struct from its Thrift-level +// representation. The Thrift-level representation may be obtained +// from a ThriftRW protocol implementation. +// +// An error is returned if we were unable to build a StartWorkflowExecutionAsyncRequest struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v StartWorkflowExecutionAsyncRequest +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *StartWorkflowExecutionAsyncRequest) FromWire(w wire.Value) error { + var err error + + for _, field := range w.GetStruct().Fields { + switch field.ID { + case 10: + if field.Value.Type() == wire.TStruct { + v.Request, err = _StartWorkflowExecutionRequest_Read(field.Value) + if err != nil { + return err + } + + } + } + } + + return nil +} + +// String returns a readable string representation of a StartWorkflowExecutionAsyncRequest +// struct. +func (v *StartWorkflowExecutionAsyncRequest) String() string { + if v == nil { + return "" + } + + var fields [1]string + i := 0 + if v.Request != nil { + fields[i] = fmt.Sprintf("Request: %v", v.Request) + i++ + } + + return fmt.Sprintf("StartWorkflowExecutionAsyncRequest{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this StartWorkflowExecutionAsyncRequest match the +// provided StartWorkflowExecutionAsyncRequest. +// +// This function performs a deep comparison. +func (v *StartWorkflowExecutionAsyncRequest) Equals(rhs *StartWorkflowExecutionAsyncRequest) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !((v.Request == nil && rhs.Request == nil) || (v.Request != nil && rhs.Request != nil && v.Request.Equals(rhs.Request))) { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of StartWorkflowExecutionAsyncRequest. +func (v *StartWorkflowExecutionAsyncRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + if v.Request != nil { + err = multierr.Append(err, enc.AddObject("request", v.Request)) + } + return err +} + +// GetRequest returns the value of Request if it is set or its +// zero value if it is unset. +func (v *StartWorkflowExecutionAsyncRequest) GetRequest() (o *StartWorkflowExecutionRequest) { + if v != nil && v.Request != nil { + return v.Request + } + + return +} + +// IsSetRequest returns true if Request is not nil. +func (v *StartWorkflowExecutionAsyncRequest) IsSetRequest() bool { + return v != nil && v.Request != nil +} + +type StartWorkflowExecutionAsyncResponse struct { +} + +// ToWire translates a StartWorkflowExecutionAsyncResponse struct into a Thrift-level intermediate +// representation. This intermediate representation may be serialized +// into bytes using a ThriftRW protocol implementation. +// +// An error is returned if the struct or any of its fields failed to +// validate. +// +// x, err := v.ToWire() +// if err != nil { +// return err +// } +// +// if err := binaryProtocol.Encode(x, writer); err != nil { +// return err +// } +func (v *StartWorkflowExecutionAsyncResponse) ToWire() (wire.Value, error) { + var ( + fields [0]wire.Field + i int = 0 + ) + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +// FromWire deserializes a StartWorkflowExecutionAsyncResponse struct from its Thrift-level +// representation. The Thrift-level representation may be obtained +// from a ThriftRW protocol implementation. +// +// An error is returned if we were unable to build a StartWorkflowExecutionAsyncResponse struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v StartWorkflowExecutionAsyncResponse +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *StartWorkflowExecutionAsyncResponse) FromWire(w wire.Value) error { + + for _, field := range w.GetStruct().Fields { + switch field.ID { + } + } + + return nil +} + +// String returns a readable string representation of a StartWorkflowExecutionAsyncResponse +// struct. +func (v *StartWorkflowExecutionAsyncResponse) String() string { + if v == nil { + return "" + } + + var fields [0]string + i := 0 + + return fmt.Sprintf("StartWorkflowExecutionAsyncResponse{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this StartWorkflowExecutionAsyncResponse match the +// provided StartWorkflowExecutionAsyncResponse. +// +// This function performs a deep comparison. +func (v *StartWorkflowExecutionAsyncResponse) Equals(rhs *StartWorkflowExecutionAsyncResponse) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of StartWorkflowExecutionAsyncResponse. +func (v *StartWorkflowExecutionAsyncResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + return err +} + type StartWorkflowExecutionRequest struct { Domain *string `json:"domain,omitempty"` WorkflowId *string `json:"workflowId,omitempty"` @@ -71424,8 +72204,8 @@ var ThriftModule = &thriftreflect.ThriftModule{ Name: "shared", Package: "go.uber.org/cadence/.gen/go/shared", FilePath: "shared.thrift", - SHA1: "8f9f90cfaf3f0952570f55581c746699e0bff1a8", + SHA1: "e920c0f4e776279d543590ae2f12cbf18fff1aa1", Raw: rawIDL, } -const rawIDL = "// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nnamespace java com.uber.cadence\n\nexception BadRequestError {\n 1: required string message\n}\n\nexception InternalServiceError {\n 1: required string message\n}\n\nexception InternalDataInconsistencyError {\n 1: required string message\n}\n\nexception DomainAlreadyExistsError {\n 1: required string message\n}\n\nexception WorkflowExecutionAlreadyStartedError {\n 10: optional string message\n 20: optional string startRequestId\n 30: optional string runId\n}\n\nexception WorkflowExecutionAlreadyCompletedError {\n 1: required string message\n}\n\nexception EntityNotExistsError {\n 1: required string message\n 2: optional string currentCluster\n 3: optional string activeCluster\n}\n\nexception ServiceBusyError {\n 1: required string message\n}\n\nexception CancellationAlreadyRequestedError {\n 1: required string message\n}\n\nexception QueryFailedError {\n 1: required string message\n}\n\nexception DomainNotActiveError {\n 1: required string message\n 2: required string domainName\n 3: required string currentCluster\n 4: required string activeCluster\n}\n\nexception LimitExceededError {\n 1: required string message\n}\n\nexception AccessDeniedError {\n 1: required string message\n}\n\nexception RetryTaskV2Error {\n 1: required string message\n 2: optional string domainId\n 3: optional string workflowId\n 4: optional string runId\n 5: optional i64 (js.type = \"Long\") startEventId\n 6: optional i64 (js.type = \"Long\") startEventVersion\n 7: optional i64 (js.type = \"Long\") endEventId\n 8: optional i64 (js.type = \"Long\") endEventVersion\n}\n\nexception ClientVersionNotSupportedError {\n 1: required string featureVersion\n 2: required string clientImpl\n 3: required string supportedVersions\n}\n\nexception FeatureNotEnabledError {\n 1: required string featureFlag\n}\n\nexception CurrentBranchChangedError {\n 10: required string message\n 20: required binary currentBranchToken\n}\n\nexception RemoteSyncMatchedError {\n 10: required string message\n}\n\nexception StickyWorkerUnavailableError {\n 1: required string message\n}\n\nenum WorkflowIdReusePolicy {\n /*\n * allow start a workflow execution using the same workflow ID,\n * when workflow not running, and the last execution close state is in\n * [terminated, cancelled, timeouted, failed].\n */\n AllowDuplicateFailedOnly,\n /*\n * allow start a workflow execution using the same workflow ID,\n * when workflow not running.\n */\n AllowDuplicate,\n /*\n * do not allow start a workflow execution using the same workflow ID at all\n */\n RejectDuplicate,\n /*\n * if a workflow is running using the same workflow ID, terminate it and start a new one\n */\n TerminateIfRunning,\n}\n\nenum DomainStatus {\n REGISTERED,\n DEPRECATED,\n DELETED,\n}\n\nenum TimeoutType {\n START_TO_CLOSE,\n SCHEDULE_TO_START,\n SCHEDULE_TO_CLOSE,\n HEARTBEAT,\n}\n\nenum ParentClosePolicy {\n\tABANDON,\n\tREQUEST_CANCEL,\n\tTERMINATE,\n}\n\n\n// whenever this list of decision is changed\n// do change the mutableStateBuilder.go\n// function shouldBufferEvent\n// to make sure wo do the correct event ordering\nenum DecisionType {\n ScheduleActivityTask,\n RequestCancelActivityTask,\n StartTimer,\n CompleteWorkflowExecution,\n FailWorkflowExecution,\n CancelTimer,\n CancelWorkflowExecution,\n RequestCancelExternalWorkflowExecution,\n RecordMarker,\n ContinueAsNewWorkflowExecution,\n StartChildWorkflowExecution,\n SignalExternalWorkflowExecution,\n UpsertWorkflowSearchAttributes,\n}\n\nenum EventType {\n WorkflowExecutionStarted,\n WorkflowExecutionCompleted,\n WorkflowExecutionFailed,\n WorkflowExecutionTimedOut,\n DecisionTaskScheduled,\n DecisionTaskStarted,\n DecisionTaskCompleted,\n DecisionTaskTimedOut\n DecisionTaskFailed,\n ActivityTaskScheduled,\n ActivityTaskStarted,\n ActivityTaskCompleted,\n ActivityTaskFailed,\n ActivityTaskTimedOut,\n ActivityTaskCancelRequested,\n RequestCancelActivityTaskFailed,\n ActivityTaskCanceled,\n TimerStarted,\n TimerFired,\n CancelTimerFailed,\n TimerCanceled,\n WorkflowExecutionCancelRequested,\n WorkflowExecutionCanceled,\n RequestCancelExternalWorkflowExecutionInitiated,\n RequestCancelExternalWorkflowExecutionFailed,\n ExternalWorkflowExecutionCancelRequested,\n MarkerRecorded,\n WorkflowExecutionSignaled,\n WorkflowExecutionTerminated,\n WorkflowExecutionContinuedAsNew,\n StartChildWorkflowExecutionInitiated,\n StartChildWorkflowExecutionFailed,\n ChildWorkflowExecutionStarted,\n ChildWorkflowExecutionCompleted,\n ChildWorkflowExecutionFailed,\n ChildWorkflowExecutionCanceled,\n ChildWorkflowExecutionTimedOut,\n ChildWorkflowExecutionTerminated,\n SignalExternalWorkflowExecutionInitiated,\n SignalExternalWorkflowExecutionFailed,\n ExternalWorkflowExecutionSignaled,\n UpsertWorkflowSearchAttributes,\n}\n\nenum DecisionTaskFailedCause {\n UNHANDLED_DECISION,\n BAD_SCHEDULE_ACTIVITY_ATTRIBUTES,\n BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES,\n BAD_START_TIMER_ATTRIBUTES,\n BAD_CANCEL_TIMER_ATTRIBUTES,\n BAD_RECORD_MARKER_ATTRIBUTES,\n BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES,\n BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES,\n BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES,\n BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES,\n BAD_CONTINUE_AS_NEW_ATTRIBUTES,\n START_TIMER_DUPLICATE_ID,\n RESET_STICKY_TASKLIST,\n WORKFLOW_WORKER_UNHANDLED_FAILURE,\n BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES,\n BAD_START_CHILD_EXECUTION_ATTRIBUTES,\n FORCE_CLOSE_DECISION,\n FAILOVER_CLOSE_DECISION,\n BAD_SIGNAL_INPUT_SIZE,\n RESET_WORKFLOW,\n BAD_BINARY,\n SCHEDULE_ACTIVITY_DUPLICATE_ID,\n BAD_SEARCH_ATTRIBUTES,\n}\n\nenum DecisionTaskTimedOutCause {\n TIMEOUT,\n RESET,\n}\n\nenum CancelExternalWorkflowExecutionFailedCause {\n UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION,\n}\n\nenum SignalExternalWorkflowExecutionFailedCause {\n UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION,\n}\n\nenum ChildWorkflowExecutionFailedCause {\n WORKFLOW_ALREADY_RUNNING,\n}\n\n// TODO: when migrating to gRPC, add a running / none status,\n// currently, customer is using null / nil as an indication\n// that workflow is still running\nenum WorkflowExecutionCloseStatus {\n COMPLETED,\n FAILED,\n CANCELED,\n TERMINATED,\n CONTINUED_AS_NEW,\n TIMED_OUT,\n}\n\nenum QueryTaskCompletedType {\n COMPLETED,\n FAILED,\n}\n\nenum QueryResultType {\n ANSWERED,\n FAILED,\n}\n\nenum PendingActivityState {\n SCHEDULED,\n STARTED,\n CANCEL_REQUESTED,\n}\n\nenum PendingDecisionState {\n SCHEDULED,\n STARTED,\n}\n\nenum HistoryEventFilterType {\n ALL_EVENT,\n CLOSE_EVENT,\n}\n\nenum TaskListKind {\n NORMAL,\n STICKY,\n}\n\nenum ArchivalStatus {\n DISABLED,\n ENABLED,\n}\n\nenum IndexedValueType {\n STRING,\n KEYWORD,\n INT,\n DOUBLE,\n BOOL,\n DATETIME,\n}\n\nstruct Header {\n 10: optional map fields\n}\n\nstruct WorkflowType {\n 10: optional string name\n}\n\nstruct ActivityType {\n 10: optional string name\n}\n\nstruct TaskList {\n 10: optional string name\n 20: optional TaskListKind kind\n}\n\nenum EncodingType {\n ThriftRW,\n JSON,\n}\n\nenum QueryRejectCondition {\n // NOT_OPEN indicates that query should be rejected if workflow is not open\n NOT_OPEN\n // NOT_COMPLETED_CLEANLY indicates that query should be rejected if workflow did not complete cleanly\n NOT_COMPLETED_CLEANLY\n}\n\nenum QueryConsistencyLevel {\n // EVENTUAL indicates that query should be eventually consistent\n EVENTUAL\n // STRONG indicates that any events that came before query should be reflected in workflow state before running query\n STRONG\n}\n\nstruct DataBlob {\n 10: optional EncodingType EncodingType\n 20: optional binary Data\n}\n\nstruct TaskListMetadata {\n 10: optional double maxTasksPerSecond\n}\n\nstruct WorkflowExecution {\n 10: optional string workflowId\n 20: optional string runId\n}\n\nstruct Memo {\n 10: optional map fields\n}\n\nstruct SearchAttributes {\n 10: optional map indexedFields\n}\n\nstruct WorkerVersionInfo {\n 10: optional string impl\n 20: optional string featureVersion\n}\n\nstruct WorkflowExecutionInfo {\n 10: optional WorkflowExecution execution\n 20: optional WorkflowType type\n 30: optional i64 (js.type = \"Long\") startTime\n 40: optional i64 (js.type = \"Long\") closeTime\n 50: optional WorkflowExecutionCloseStatus closeStatus\n 60: optional i64 (js.type = \"Long\") historyLength\n 70: optional string parentDomainId\n 71: optional string parentDomainName\n 72: optional i64 parentInitatedId\n 80: optional WorkflowExecution parentExecution\n 90: optional i64 (js.type = \"Long\") executionTime\n 100: optional Memo memo\n 101: optional SearchAttributes searchAttributes\n 110: optional ResetPoints autoResetPoints\n 120: optional string taskList\n 130: optional bool isCron\n 140: optional i64 (js.type = \"Long\") updateTime\n 150: optional map partitionConfig\n}\n\nstruct WorkflowExecutionConfiguration {\n 10: optional TaskList taskList\n 20: optional i32 executionStartToCloseTimeoutSeconds\n 30: optional i32 taskStartToCloseTimeoutSeconds\n// 40: optional ChildPolicy childPolicy -- Removed but reserve the IDL order number\n}\n\nstruct TransientDecisionInfo {\n 10: optional HistoryEvent scheduledEvent\n 20: optional HistoryEvent startedEvent\n}\n\nstruct ScheduleActivityTaskDecisionAttributes {\n 10: optional string activityId\n 20: optional ActivityType activityType\n 25: optional string domain\n 30: optional TaskList taskList\n 40: optional binary input\n 45: optional i32 scheduleToCloseTimeoutSeconds\n 50: optional i32 scheduleToStartTimeoutSeconds\n 55: optional i32 startToCloseTimeoutSeconds\n 60: optional i32 heartbeatTimeoutSeconds\n 70: optional RetryPolicy retryPolicy\n 80: optional Header header\n 90: optional bool requestLocalDispatch\n}\n\nstruct ActivityLocalDispatchInfo{\n 10: optional string activityId\n 20: optional i64 (js.type = \"Long\") scheduledTimestamp\n 30: optional i64 (js.type = \"Long\") startedTimestamp\n 40: optional i64 (js.type = \"Long\") scheduledTimestampOfThisAttempt\n 50: optional binary taskToken\n}\n\nstruct RequestCancelActivityTaskDecisionAttributes {\n 10: optional string activityId\n}\n\nstruct StartTimerDecisionAttributes {\n 10: optional string timerId\n 20: optional i64 (js.type = \"Long\") startToFireTimeoutSeconds\n}\n\nstruct CompleteWorkflowExecutionDecisionAttributes {\n 10: optional binary result\n}\n\nstruct FailWorkflowExecutionDecisionAttributes {\n 10: optional string reason\n 20: optional binary details\n}\n\nstruct CancelTimerDecisionAttributes {\n 10: optional string timerId\n}\n\nstruct CancelWorkflowExecutionDecisionAttributes {\n 10: optional binary details\n}\n\nstruct RequestCancelExternalWorkflowExecutionDecisionAttributes {\n 10: optional string domain\n 20: optional string workflowId\n 30: optional string runId\n 40: optional binary control\n 50: optional bool childWorkflowOnly\n}\n\nstruct SignalExternalWorkflowExecutionDecisionAttributes {\n 10: optional string domain\n 20: optional WorkflowExecution execution\n 30: optional string signalName\n 40: optional binary input\n 50: optional binary control\n 60: optional bool childWorkflowOnly\n}\n\nstruct UpsertWorkflowSearchAttributesDecisionAttributes {\n 10: optional SearchAttributes searchAttributes\n}\n\nstruct RecordMarkerDecisionAttributes {\n 10: optional string markerName\n 20: optional binary details\n 30: optional Header header\n}\n\nstruct ContinueAsNewWorkflowExecutionDecisionAttributes {\n 10: optional WorkflowType workflowType\n 20: optional TaskList taskList\n 30: optional binary input\n 40: optional i32 executionStartToCloseTimeoutSeconds\n 50: optional i32 taskStartToCloseTimeoutSeconds\n 60: optional i32 backoffStartIntervalInSeconds\n 70: optional RetryPolicy retryPolicy\n 80: optional ContinueAsNewInitiator initiator\n 90: optional string failureReason\n 100: optional binary failureDetails\n 110: optional binary lastCompletionResult\n 120: optional string cronSchedule\n 130: optional Header header\n 140: optional Memo memo\n 150: optional SearchAttributes searchAttributes\n 160: optional i32 jitterStartSeconds\n}\n\nstruct StartChildWorkflowExecutionDecisionAttributes {\n 10: optional string domain\n 20: optional string workflowId\n 30: optional WorkflowType workflowType\n 40: optional TaskList taskList\n 50: optional binary input\n 60: optional i32 executionStartToCloseTimeoutSeconds\n 70: optional i32 taskStartToCloseTimeoutSeconds\n// 80: optional ChildPolicy childPolicy -- Removed but reserve the IDL order number\n 81: optional ParentClosePolicy parentClosePolicy\n 90: optional binary control\n 100: optional WorkflowIdReusePolicy workflowIdReusePolicy\n 110: optional RetryPolicy retryPolicy\n 120: optional string cronSchedule\n 130: optional Header header\n 140: optional Memo memo\n 150: optional SearchAttributes searchAttributes\n}\n\nstruct Decision {\n 10: optional DecisionType decisionType\n 20: optional ScheduleActivityTaskDecisionAttributes scheduleActivityTaskDecisionAttributes\n 25: optional StartTimerDecisionAttributes startTimerDecisionAttributes\n 30: optional CompleteWorkflowExecutionDecisionAttributes completeWorkflowExecutionDecisionAttributes\n 35: optional FailWorkflowExecutionDecisionAttributes failWorkflowExecutionDecisionAttributes\n 40: optional RequestCancelActivityTaskDecisionAttributes requestCancelActivityTaskDecisionAttributes\n 50: optional CancelTimerDecisionAttributes cancelTimerDecisionAttributes\n 60: optional CancelWorkflowExecutionDecisionAttributes cancelWorkflowExecutionDecisionAttributes\n 70: optional RequestCancelExternalWorkflowExecutionDecisionAttributes requestCancelExternalWorkflowExecutionDecisionAttributes\n 80: optional RecordMarkerDecisionAttributes recordMarkerDecisionAttributes\n 90: optional ContinueAsNewWorkflowExecutionDecisionAttributes continueAsNewWorkflowExecutionDecisionAttributes\n 100: optional StartChildWorkflowExecutionDecisionAttributes startChildWorkflowExecutionDecisionAttributes\n 110: optional SignalExternalWorkflowExecutionDecisionAttributes signalExternalWorkflowExecutionDecisionAttributes\n 120: optional UpsertWorkflowSearchAttributesDecisionAttributes upsertWorkflowSearchAttributesDecisionAttributes\n}\n\nstruct WorkflowExecutionStartedEventAttributes {\n 10: optional WorkflowType workflowType\n 12: optional string parentWorkflowDomain\n 14: optional WorkflowExecution parentWorkflowExecution\n 16: optional i64 (js.type = \"Long\") parentInitiatedEventId\n 20: optional TaskList taskList\n 30: optional binary input\n 40: optional i32 executionStartToCloseTimeoutSeconds\n 50: optional i32 taskStartToCloseTimeoutSeconds\n// 52: optional ChildPolicy childPolicy -- Removed but reserve the IDL order number\n 54: optional string continuedExecutionRunId\n 55: optional ContinueAsNewInitiator initiator\n 56: optional string continuedFailureReason\n 57: optional binary continuedFailureDetails\n 58: optional binary lastCompletionResult\n 59: optional string originalExecutionRunId // This is the runID when the WorkflowExecutionStarted event is written\n 60: optional string identity\n 61: optional string firstExecutionRunId // This is the very first runID along the chain of ContinueAsNew and Reset.\n 62: optional i64 (js.type = \"Long\") firstScheduledTimeNano\n 70: optional RetryPolicy retryPolicy\n 80: optional i32 attempt\n 90: optional i64 (js.type = \"Long\") expirationTimestamp\n 100: optional string cronSchedule\n 110: optional i32 firstDecisionTaskBackoffSeconds\n 120: optional Memo memo\n 121: optional SearchAttributes searchAttributes\n 130: optional ResetPoints prevAutoResetPoints\n 140: optional Header header\n 150: optional map partitionConfig\n}\n\nstruct ResetPoints{\n 10: optional list points\n}\n\n struct ResetPointInfo{\n 10: optional string binaryChecksum\n 20: optional string runId\n 30: optional i64 firstDecisionCompletedId\n 40: optional i64 (js.type = \"Long\") createdTimeNano\n 50: optional i64 (js.type = \"Long\") expiringTimeNano //the time that the run is deleted due to retention\n 60: optional bool resettable // false if the resset point has pending childWFs/reqCancels/signalExternals.\n}\n\nstruct WorkflowExecutionCompletedEventAttributes {\n 10: optional binary result\n 20: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n}\n\nstruct WorkflowExecutionFailedEventAttributes {\n 10: optional string reason\n 20: optional binary details\n 30: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n}\n\nstruct WorkflowExecutionTimedOutEventAttributes {\n 10: optional TimeoutType timeoutType\n}\n\nenum ContinueAsNewInitiator {\n Decider,\n RetryPolicy,\n CronSchedule,\n}\n\nstruct WorkflowExecutionContinuedAsNewEventAttributes {\n 10: optional string newExecutionRunId\n 20: optional WorkflowType workflowType\n 30: optional TaskList taskList\n 40: optional binary input\n 50: optional i32 executionStartToCloseTimeoutSeconds\n 60: optional i32 taskStartToCloseTimeoutSeconds\n 70: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 80: optional i32 backoffStartIntervalInSeconds\n 90: optional ContinueAsNewInitiator initiator\n 100: optional string failureReason\n 110: optional binary failureDetails\n 120: optional binary lastCompletionResult\n 130: optional Header header\n 140: optional Memo memo\n 150: optional SearchAttributes searchAttributes\n}\n\nstruct DecisionTaskScheduledEventAttributes {\n 10: optional TaskList taskList\n 20: optional i32 startToCloseTimeoutSeconds\n 30: optional i64 (js.type = \"Long\") attempt\n}\n\nstruct DecisionTaskStartedEventAttributes {\n 10: optional i64 (js.type = \"Long\") scheduledEventId\n 20: optional string identity\n 30: optional string requestId\n}\n\nstruct DecisionTaskCompletedEventAttributes {\n 10: optional binary executionContext\n 20: optional i64 (js.type = \"Long\") scheduledEventId\n 30: optional i64 (js.type = \"Long\") startedEventId\n 40: optional string identity\n 50: optional string binaryChecksum\n}\n\nstruct DecisionTaskTimedOutEventAttributes {\n 10: optional i64 (js.type = \"Long\") scheduledEventId\n 20: optional i64 (js.type = \"Long\") startedEventId\n 30: optional TimeoutType timeoutType\n // for reset workflow\n 40: optional string baseRunId\n 50: optional string newRunId\n 60: optional i64 (js.type = \"Long\") forkEventVersion\n 70: optional string reason\n 80: optional DecisionTaskTimedOutCause cause\n}\n\nstruct DecisionTaskFailedEventAttributes {\n 10: optional i64 (js.type = \"Long\") scheduledEventId\n 20: optional i64 (js.type = \"Long\") startedEventId\n 30: optional DecisionTaskFailedCause cause\n 35: optional binary details\n 40: optional string identity\n 50: optional string reason\n // for reset workflow\n 60: optional string baseRunId\n 70: optional string newRunId\n 80: optional i64 (js.type = \"Long\") forkEventVersion\n 90: optional string binaryChecksum\n}\n\nstruct ActivityTaskScheduledEventAttributes {\n 10: optional string activityId\n 20: optional ActivityType activityType\n 25: optional string domain\n 30: optional TaskList taskList\n 40: optional binary input\n 45: optional i32 scheduleToCloseTimeoutSeconds\n 50: optional i32 scheduleToStartTimeoutSeconds\n 55: optional i32 startToCloseTimeoutSeconds\n 60: optional i32 heartbeatTimeoutSeconds\n 90: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 110: optional RetryPolicy retryPolicy\n 120: optional Header header\n}\n\nstruct ActivityTaskStartedEventAttributes {\n 10: optional i64 (js.type = \"Long\") scheduledEventId\n 20: optional string identity\n 30: optional string requestId\n 40: optional i32 attempt\n 50: optional string lastFailureReason\n 60: optional binary lastFailureDetails\n}\n\nstruct ActivityTaskCompletedEventAttributes {\n 10: optional binary result\n 20: optional i64 (js.type = \"Long\") scheduledEventId\n 30: optional i64 (js.type = \"Long\") startedEventId\n 40: optional string identity\n}\n\nstruct ActivityTaskFailedEventAttributes {\n 10: optional string reason\n 20: optional binary details\n 30: optional i64 (js.type = \"Long\") scheduledEventId\n 40: optional i64 (js.type = \"Long\") startedEventId\n 50: optional string identity\n}\n\nstruct ActivityTaskTimedOutEventAttributes {\n 05: optional binary details\n 10: optional i64 (js.type = \"Long\") scheduledEventId\n 20: optional i64 (js.type = \"Long\") startedEventId\n 30: optional TimeoutType timeoutType\n // For retry activity, it may have a failure before timeout. It's important to keep those information for debug.\n // Client can also provide the info for making next decision\n 40: optional string lastFailureReason\n 50: optional binary lastFailureDetails\n}\n\nstruct ActivityTaskCancelRequestedEventAttributes {\n 10: optional string activityId\n 20: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n}\n\nstruct RequestCancelActivityTaskFailedEventAttributes{\n 10: optional string activityId\n 20: optional string cause\n 30: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n}\n\nstruct ActivityTaskCanceledEventAttributes {\n 10: optional binary details\n 20: optional i64 (js.type = \"Long\") latestCancelRequestedEventId\n 30: optional i64 (js.type = \"Long\") scheduledEventId\n 40: optional i64 (js.type = \"Long\") startedEventId\n 50: optional string identity\n}\n\nstruct TimerStartedEventAttributes {\n 10: optional string timerId\n 20: optional i64 (js.type = \"Long\") startToFireTimeoutSeconds\n 30: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n}\n\nstruct TimerFiredEventAttributes {\n 10: optional string timerId\n 20: optional i64 (js.type = \"Long\") startedEventId\n}\n\nstruct TimerCanceledEventAttributes {\n 10: optional string timerId\n 20: optional i64 (js.type = \"Long\") startedEventId\n 30: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 40: optional string identity\n}\n\nstruct CancelTimerFailedEventAttributes {\n 10: optional string timerId\n 20: optional string cause\n 30: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 40: optional string identity\n}\n\nstruct WorkflowExecutionCancelRequestedEventAttributes {\n 10: optional string cause\n 20: optional i64 (js.type = \"Long\") externalInitiatedEventId\n 30: optional WorkflowExecution externalWorkflowExecution\n 40: optional string identity\n}\n\nstruct WorkflowExecutionCanceledEventAttributes {\n 10: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 20: optional binary details\n}\n\nstruct MarkerRecordedEventAttributes {\n 10: optional string markerName\n 20: optional binary details\n 30: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 40: optional Header header\n}\n\nstruct WorkflowExecutionSignaledEventAttributes {\n 10: optional string signalName\n 20: optional binary input\n 30: optional string identity\n}\n\nstruct WorkflowExecutionTerminatedEventAttributes {\n 10: optional string reason\n 20: optional binary details\n 30: optional string identity\n}\n\nstruct RequestCancelExternalWorkflowExecutionInitiatedEventAttributes {\n 10: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 20: optional string domain\n 30: optional WorkflowExecution workflowExecution\n 40: optional binary control\n 50: optional bool childWorkflowOnly\n}\n\nstruct RequestCancelExternalWorkflowExecutionFailedEventAttributes {\n 10: optional CancelExternalWorkflowExecutionFailedCause cause\n 20: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 30: optional string domain\n 40: optional WorkflowExecution workflowExecution\n 50: optional i64 (js.type = \"Long\") initiatedEventId\n 60: optional binary control\n}\n\nstruct ExternalWorkflowExecutionCancelRequestedEventAttributes {\n 10: optional i64 (js.type = \"Long\") initiatedEventId\n 20: optional string domain\n 30: optional WorkflowExecution workflowExecution\n}\n\nstruct SignalExternalWorkflowExecutionInitiatedEventAttributes {\n 10: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 20: optional string domain\n 30: optional WorkflowExecution workflowExecution\n 40: optional string signalName\n 50: optional binary input\n 60: optional binary control\n 70: optional bool childWorkflowOnly\n}\n\nstruct SignalExternalWorkflowExecutionFailedEventAttributes {\n 10: optional SignalExternalWorkflowExecutionFailedCause cause\n 20: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 30: optional string domain\n 40: optional WorkflowExecution workflowExecution\n 50: optional i64 (js.type = \"Long\") initiatedEventId\n 60: optional binary control\n}\n\nstruct ExternalWorkflowExecutionSignaledEventAttributes {\n 10: optional i64 (js.type = \"Long\") initiatedEventId\n 20: optional string domain\n 30: optional WorkflowExecution workflowExecution\n 40: optional binary control\n}\n\nstruct UpsertWorkflowSearchAttributesEventAttributes {\n 10: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 20: optional SearchAttributes searchAttributes\n}\n\nstruct StartChildWorkflowExecutionInitiatedEventAttributes {\n 10: optional string domain\n 20: optional string workflowId\n 30: optional WorkflowType workflowType\n 40: optional TaskList taskList\n 50: optional binary input\n 60: optional i32 executionStartToCloseTimeoutSeconds\n 70: optional i32 taskStartToCloseTimeoutSeconds\n// 80: optional ChildPolicy childPolicy -- Removed but reserve the IDL order number\n 81: optional ParentClosePolicy parentClosePolicy\n 90: optional binary control\n 100: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 110: optional WorkflowIdReusePolicy workflowIdReusePolicy\n 120: optional RetryPolicy retryPolicy\n 130: optional string cronSchedule\n 140: optional Header header\n 150: optional Memo memo\n 160: optional SearchAttributes searchAttributes\n 170: optional i32 delayStartSeconds\n 180: optional i32 jitterStartSeconds\n}\n\nstruct StartChildWorkflowExecutionFailedEventAttributes {\n 10: optional string domain\n 20: optional string workflowId\n 30: optional WorkflowType workflowType\n 40: optional ChildWorkflowExecutionFailedCause cause\n 50: optional binary control\n 60: optional i64 (js.type = \"Long\") initiatedEventId\n 70: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n}\n\nstruct ChildWorkflowExecutionStartedEventAttributes {\n 10: optional string domain\n 20: optional i64 (js.type = \"Long\") initiatedEventId\n 30: optional WorkflowExecution workflowExecution\n 40: optional WorkflowType workflowType\n 50: optional Header header\n}\n\nstruct ChildWorkflowExecutionCompletedEventAttributes {\n 10: optional binary result\n 20: optional string domain\n 30: optional WorkflowExecution workflowExecution\n 40: optional WorkflowType workflowType\n 50: optional i64 (js.type = \"Long\") initiatedEventId\n 60: optional i64 (js.type = \"Long\") startedEventId\n}\n\nstruct ChildWorkflowExecutionFailedEventAttributes {\n 10: optional string reason\n 20: optional binary details\n 30: optional string domain\n 40: optional WorkflowExecution workflowExecution\n 50: optional WorkflowType workflowType\n 60: optional i64 (js.type = \"Long\") initiatedEventId\n 70: optional i64 (js.type = \"Long\") startedEventId\n}\n\nstruct ChildWorkflowExecutionCanceledEventAttributes {\n 10: optional binary details\n 20: optional string domain\n 30: optional WorkflowExecution workflowExecution\n 40: optional WorkflowType workflowType\n 50: optional i64 (js.type = \"Long\") initiatedEventId\n 60: optional i64 (js.type = \"Long\") startedEventId\n}\n\nstruct ChildWorkflowExecutionTimedOutEventAttributes {\n 10: optional TimeoutType timeoutType\n 20: optional string domain\n 30: optional WorkflowExecution workflowExecution\n 40: optional WorkflowType workflowType\n 50: optional i64 (js.type = \"Long\") initiatedEventId\n 60: optional i64 (js.type = \"Long\") startedEventId\n}\n\nstruct ChildWorkflowExecutionTerminatedEventAttributes {\n 10: optional string domain\n 20: optional WorkflowExecution workflowExecution\n 30: optional WorkflowType workflowType\n 40: optional i64 (js.type = \"Long\") initiatedEventId\n 50: optional i64 (js.type = \"Long\") startedEventId\n}\n\nstruct HistoryEvent {\n 10: optional i64 (js.type = \"Long\") eventId\n 20: optional i64 (js.type = \"Long\") timestamp\n 30: optional EventType eventType\n 35: optional i64 (js.type = \"Long\") version\n 36: optional i64 (js.type = \"Long\") taskId\n 40: optional WorkflowExecutionStartedEventAttributes workflowExecutionStartedEventAttributes\n 50: optional WorkflowExecutionCompletedEventAttributes workflowExecutionCompletedEventAttributes\n 60: optional WorkflowExecutionFailedEventAttributes workflowExecutionFailedEventAttributes\n 70: optional WorkflowExecutionTimedOutEventAttributes workflowExecutionTimedOutEventAttributes\n 80: optional DecisionTaskScheduledEventAttributes decisionTaskScheduledEventAttributes\n 90: optional DecisionTaskStartedEventAttributes decisionTaskStartedEventAttributes\n 100: optional DecisionTaskCompletedEventAttributes decisionTaskCompletedEventAttributes\n 110: optional DecisionTaskTimedOutEventAttributes decisionTaskTimedOutEventAttributes\n 120: optional DecisionTaskFailedEventAttributes decisionTaskFailedEventAttributes\n 130: optional ActivityTaskScheduledEventAttributes activityTaskScheduledEventAttributes\n 140: optional ActivityTaskStartedEventAttributes activityTaskStartedEventAttributes\n 150: optional ActivityTaskCompletedEventAttributes activityTaskCompletedEventAttributes\n 160: optional ActivityTaskFailedEventAttributes activityTaskFailedEventAttributes\n 170: optional ActivityTaskTimedOutEventAttributes activityTaskTimedOutEventAttributes\n 180: optional TimerStartedEventAttributes timerStartedEventAttributes\n 190: optional TimerFiredEventAttributes timerFiredEventAttributes\n 200: optional ActivityTaskCancelRequestedEventAttributes activityTaskCancelRequestedEventAttributes\n 210: optional RequestCancelActivityTaskFailedEventAttributes requestCancelActivityTaskFailedEventAttributes\n 220: optional ActivityTaskCanceledEventAttributes activityTaskCanceledEventAttributes\n 230: optional TimerCanceledEventAttributes timerCanceledEventAttributes\n 240: optional CancelTimerFailedEventAttributes cancelTimerFailedEventAttributes\n 250: optional MarkerRecordedEventAttributes markerRecordedEventAttributes\n 260: optional WorkflowExecutionSignaledEventAttributes workflowExecutionSignaledEventAttributes\n 270: optional WorkflowExecutionTerminatedEventAttributes workflowExecutionTerminatedEventAttributes\n 280: optional WorkflowExecutionCancelRequestedEventAttributes workflowExecutionCancelRequestedEventAttributes\n 290: optional WorkflowExecutionCanceledEventAttributes workflowExecutionCanceledEventAttributes\n 300: optional RequestCancelExternalWorkflowExecutionInitiatedEventAttributes requestCancelExternalWorkflowExecutionInitiatedEventAttributes\n 310: optional RequestCancelExternalWorkflowExecutionFailedEventAttributes requestCancelExternalWorkflowExecutionFailedEventAttributes\n 320: optional ExternalWorkflowExecutionCancelRequestedEventAttributes externalWorkflowExecutionCancelRequestedEventAttributes\n 330: optional WorkflowExecutionContinuedAsNewEventAttributes workflowExecutionContinuedAsNewEventAttributes\n 340: optional StartChildWorkflowExecutionInitiatedEventAttributes startChildWorkflowExecutionInitiatedEventAttributes\n 350: optional StartChildWorkflowExecutionFailedEventAttributes startChildWorkflowExecutionFailedEventAttributes\n 360: optional ChildWorkflowExecutionStartedEventAttributes childWorkflowExecutionStartedEventAttributes\n 370: optional ChildWorkflowExecutionCompletedEventAttributes childWorkflowExecutionCompletedEventAttributes\n 380: optional ChildWorkflowExecutionFailedEventAttributes childWorkflowExecutionFailedEventAttributes\n 390: optional ChildWorkflowExecutionCanceledEventAttributes childWorkflowExecutionCanceledEventAttributes\n 400: optional ChildWorkflowExecutionTimedOutEventAttributes childWorkflowExecutionTimedOutEventAttributes\n 410: optional ChildWorkflowExecutionTerminatedEventAttributes childWorkflowExecutionTerminatedEventAttributes\n 420: optional SignalExternalWorkflowExecutionInitiatedEventAttributes signalExternalWorkflowExecutionInitiatedEventAttributes\n 430: optional SignalExternalWorkflowExecutionFailedEventAttributes signalExternalWorkflowExecutionFailedEventAttributes\n 440: optional ExternalWorkflowExecutionSignaledEventAttributes externalWorkflowExecutionSignaledEventAttributes\n 450: optional UpsertWorkflowSearchAttributesEventAttributes upsertWorkflowSearchAttributesEventAttributes\n}\n\nstruct History {\n 10: optional list events\n}\n\nstruct WorkflowExecutionFilter {\n 10: optional string workflowId\n 20: optional string runId\n}\n\nstruct WorkflowTypeFilter {\n 10: optional string name\n}\n\nstruct StartTimeFilter {\n 10: optional i64 (js.type = \"Long\") earliestTime\n 20: optional i64 (js.type = \"Long\") latestTime\n}\n\nstruct DomainInfo {\n 10: optional string name\n 20: optional DomainStatus status\n 30: optional string description\n 40: optional string ownerEmail\n // A key-value map for any customized purpose\n 50: optional map data\n 60: optional string uuid\n}\n\nstruct DomainConfiguration {\n 10: optional i32 workflowExecutionRetentionPeriodInDays\n 20: optional bool emitMetric\n 60: optional IsolationGroupConfiguration isolationgroups\n 70: optional BadBinaries badBinaries\n 80: optional ArchivalStatus historyArchivalStatus\n 90: optional string historyArchivalURI\n 100: optional ArchivalStatus visibilityArchivalStatus\n 110: optional string visibilityArchivalURI\n}\n\nstruct FailoverInfo {\n 10: optional i64 (js.type = \"Long\") failoverVersion\n 20: optional i64 (js.type = \"Long\") failoverStartTimestamp\n 30: optional i64 (js.type = \"Long\") failoverExpireTimestamp\n 40: optional i32 completedShardCount\n 50: optional list pendingShards\n}\n\nstruct BadBinaries{\n 10: optional map binaries\n}\n\nstruct BadBinaryInfo{\n 10: optional string reason\n 20: optional string operator\n 30: optional i64 (js.type = \"Long\") createdTimeNano\n}\n\nstruct UpdateDomainInfo {\n 10: optional string description\n 20: optional string ownerEmail\n // A key-value map for any customized purpose\n 30: optional map data\n}\n\nstruct ClusterReplicationConfiguration {\n 10: optional string clusterName\n}\n\nstruct DomainReplicationConfiguration {\n 10: optional string activeClusterName\n 20: optional list clusters\n}\n\nstruct RegisterDomainRequest {\n 10: optional string name\n 20: optional string description\n 30: optional string ownerEmail\n 40: optional i32 workflowExecutionRetentionPeriodInDays\n 50: optional bool emitMetric = true\n 60: optional list clusters\n 70: optional string activeClusterName\n // A key-value map for any customized purpose\n 80: optional map data\n 90: optional string securityToken\n 120: optional bool isGlobalDomain\n 130: optional ArchivalStatus historyArchivalStatus\n 140: optional string historyArchivalURI\n 150: optional ArchivalStatus visibilityArchivalStatus\n 160: optional string visibilityArchivalURI\n}\n\nstruct ListDomainsRequest {\n 10: optional i32 pageSize\n 20: optional binary nextPageToken\n}\n\nstruct ListDomainsResponse {\n 10: optional list domains\n 20: optional binary nextPageToken\n}\n\nstruct DescribeDomainRequest {\n 10: optional string name\n 20: optional string uuid\n}\n\nstruct DescribeDomainResponse {\n 10: optional DomainInfo domainInfo\n 20: optional DomainConfiguration configuration\n 30: optional DomainReplicationConfiguration replicationConfiguration\n 40: optional i64 (js.type = \"Long\") failoverVersion\n 50: optional bool isGlobalDomain\n 60: optional FailoverInfo failoverInfo\n}\n\nstruct UpdateDomainRequest {\n 10: optional string name\n 20: optional UpdateDomainInfo updatedInfo\n 30: optional DomainConfiguration configuration\n 40: optional DomainReplicationConfiguration replicationConfiguration\n 50: optional string securityToken\n 60: optional string deleteBadBinary\n 70: optional i32 failoverTimeoutInSeconds\n}\n\nstruct UpdateDomainResponse {\n 10: optional DomainInfo domainInfo\n 20: optional DomainConfiguration configuration\n 30: optional DomainReplicationConfiguration replicationConfiguration\n 40: optional i64 (js.type = \"Long\") failoverVersion\n 50: optional bool isGlobalDomain\n}\n\nstruct DeprecateDomainRequest {\n 10: optional string name\n 20: optional string securityToken\n}\n\nstruct StartWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional string workflowId\n 30: optional WorkflowType workflowType\n 40: optional TaskList taskList\n 50: optional binary input\n 60: optional i32 executionStartToCloseTimeoutSeconds\n 70: optional i32 taskStartToCloseTimeoutSeconds\n 80: optional string identity\n 90: optional string requestId\n 100: optional WorkflowIdReusePolicy workflowIdReusePolicy\n// 110: optional ChildPolicy childPolicy -- Removed but reserve the IDL order number\n 120: optional RetryPolicy retryPolicy\n 130: optional string cronSchedule\n 140: optional Memo memo\n 141: optional SearchAttributes searchAttributes\n 150: optional Header header\n 160: optional i32 delayStartSeconds\n 170: optional i32 jitterStartSeconds\n}\n\nstruct StartWorkflowExecutionResponse {\n 10: optional string runId\n}\n\nstruct RestartWorkflowExecutionResponse {\n 10: optional string runId\n}\n\nstruct PollForDecisionTaskRequest {\n 10: optional string domain\n 20: optional TaskList taskList\n 30: optional string identity\n 40: optional string binaryChecksum\n}\n\nstruct PollForDecisionTaskResponse {\n 10: optional binary taskToken\n 20: optional WorkflowExecution workflowExecution\n 30: optional WorkflowType workflowType\n 40: optional i64 (js.type = \"Long\") previousStartedEventId\n 50: optional i64 (js.type = \"Long\") startedEventId\n 51: optional i64 (js.type = 'Long') attempt\n 54: optional i64 (js.type = \"Long\") backlogCountHint\n 60: optional History history\n 70: optional binary nextPageToken\n 80: optional WorkflowQuery query\n 90: optional TaskList WorkflowExecutionTaskList\n 100: optional i64 (js.type = \"Long\") scheduledTimestamp\n 110: optional i64 (js.type = \"Long\") startedTimestamp\n 120: optional map queries\n 130: optional i64 (js.type = 'Long') nextEventId\n 140: optional i64 (js.type = 'Long') totalHistoryBytes\n}\n\nstruct StickyExecutionAttributes {\n 10: optional TaskList workerTaskList\n 20: optional i32 scheduleToStartTimeoutSeconds\n}\n\nstruct RespondDecisionTaskCompletedRequest {\n 10: optional binary taskToken\n 20: optional list decisions\n 30: optional binary executionContext\n 40: optional string identity\n 50: optional StickyExecutionAttributes stickyAttributes\n 60: optional bool returnNewDecisionTask\n 70: optional bool forceCreateNewDecisionTask\n 80: optional string binaryChecksum\n 90: optional map queryResults\n}\n\nstruct RespondDecisionTaskCompletedResponse {\n 10: optional PollForDecisionTaskResponse decisionTask\n 20: optional map activitiesToDispatchLocally\n}\n\nstruct RespondDecisionTaskFailedRequest {\n 10: optional binary taskToken\n 20: optional DecisionTaskFailedCause cause\n 30: optional binary details\n 40: optional string identity\n 50: optional string binaryChecksum\n}\n\nstruct PollForActivityTaskRequest {\n 10: optional string domain\n 20: optional TaskList taskList\n 30: optional string identity\n 40: optional TaskListMetadata taskListMetadata\n}\n\nstruct PollForActivityTaskResponse {\n 10: optional binary taskToken\n 20: optional WorkflowExecution workflowExecution\n 30: optional string activityId\n 40: optional ActivityType activityType\n 50: optional binary input\n 70: optional i64 (js.type = \"Long\") scheduledTimestamp\n 80: optional i32 scheduleToCloseTimeoutSeconds\n 90: optional i64 (js.type = \"Long\") startedTimestamp\n 100: optional i32 startToCloseTimeoutSeconds\n 110: optional i32 heartbeatTimeoutSeconds\n 120: optional i32 attempt\n 130: optional i64 (js.type = \"Long\") scheduledTimestampOfThisAttempt\n 140: optional binary heartbeatDetails\n 150: optional WorkflowType workflowType\n 160: optional string workflowDomain\n 170: optional Header header\n}\n\nstruct RecordActivityTaskHeartbeatRequest {\n 10: optional binary taskToken\n 20: optional binary details\n 30: optional string identity\n}\n\nstruct RecordActivityTaskHeartbeatByIDRequest {\n 10: optional string domain\n 20: optional string workflowID\n 30: optional string runID\n 40: optional string activityID\n 50: optional binary details\n 60: optional string identity\n}\n\nstruct RecordActivityTaskHeartbeatResponse {\n 10: optional bool cancelRequested\n}\n\nstruct RespondActivityTaskCompletedRequest {\n 10: optional binary taskToken\n 20: optional binary result\n 30: optional string identity\n}\n\nstruct RespondActivityTaskFailedRequest {\n 10: optional binary taskToken\n 20: optional string reason\n 30: optional binary details\n 40: optional string identity\n}\n\nstruct RespondActivityTaskCanceledRequest {\n 10: optional binary taskToken\n 20: optional binary details\n 30: optional string identity\n}\n\nstruct RespondActivityTaskCompletedByIDRequest {\n 10: optional string domain\n 20: optional string workflowID\n 30: optional string runID\n 40: optional string activityID\n 50: optional binary result\n 60: optional string identity\n}\n\nstruct RespondActivityTaskFailedByIDRequest {\n 10: optional string domain\n 20: optional string workflowID\n 30: optional string runID\n 40: optional string activityID\n 50: optional string reason\n 60: optional binary details\n 70: optional string identity\n}\n\nstruct RespondActivityTaskCanceledByIDRequest {\n 10: optional string domain\n 20: optional string workflowID\n 30: optional string runID\n 40: optional string activityID\n 50: optional binary details\n 60: optional string identity\n}\n\nstruct RequestCancelWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional WorkflowExecution workflowExecution\n 30: optional string identity\n 40: optional string requestId\n 50: optional string cause\n 60: optional string firstExecutionRunID\n}\n\nstruct GetWorkflowExecutionHistoryRequest {\n 10: optional string domain\n 20: optional WorkflowExecution execution\n 30: optional i32 maximumPageSize\n 40: optional binary nextPageToken\n 50: optional bool waitForNewEvent\n 60: optional HistoryEventFilterType HistoryEventFilterType\n 70: optional bool skipArchival\n}\n\nstruct GetWorkflowExecutionHistoryResponse {\n 10: optional History history\n 11: optional list rawHistory\n 20: optional binary nextPageToken\n 30: optional bool archived\n}\n\nstruct SignalWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional WorkflowExecution workflowExecution\n 30: optional string signalName\n 40: optional binary input\n 50: optional string identity\n 60: optional string requestId\n 70: optional binary control\n}\n\nstruct SignalWithStartWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional string workflowId\n 30: optional WorkflowType workflowType\n 40: optional TaskList taskList\n 50: optional binary input\n 60: optional i32 executionStartToCloseTimeoutSeconds\n 70: optional i32 taskStartToCloseTimeoutSeconds\n 80: optional string identity\n 90: optional string requestId\n 100: optional WorkflowIdReusePolicy workflowIdReusePolicy\n 110: optional string signalName\n 120: optional binary signalInput\n 130: optional binary control\n 140: optional RetryPolicy retryPolicy\n 150: optional string cronSchedule\n 160: optional Memo memo\n 161: optional SearchAttributes searchAttributes\n 170: optional Header header\n 180: optional i32 delayStartSeconds\n 190: optional i32 jitterStartSeconds\n}\nstruct RestartWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional WorkflowExecution workflowExecution\n 30: optional string reason\n 40: optional string identity\n}\nstruct TerminateWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional WorkflowExecution workflowExecution\n 30: optional string reason\n 40: optional binary details\n 50: optional string identity\n 60: optional string firstExecutionRunID\n}\n\nstruct ResetWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional WorkflowExecution workflowExecution\n 30: optional string reason\n 40: optional i64 (js.type = \"Long\") decisionFinishEventId\n 50: optional string requestId\n 60: optional bool skipSignalReapply\n}\n\nstruct ResetWorkflowExecutionResponse {\n 10: optional string runId\n}\n\nstruct ListOpenWorkflowExecutionsRequest {\n 10: optional string domain\n 20: optional i32 maximumPageSize\n 30: optional binary nextPageToken\n 40: optional StartTimeFilter StartTimeFilter\n 50: optional WorkflowExecutionFilter executionFilter\n 60: optional WorkflowTypeFilter typeFilter\n}\n\nstruct ListOpenWorkflowExecutionsResponse {\n 10: optional list executions\n 20: optional binary nextPageToken\n}\n\nstruct ListClosedWorkflowExecutionsRequest {\n 10: optional string domain\n 20: optional i32 maximumPageSize\n 30: optional binary nextPageToken\n 40: optional StartTimeFilter StartTimeFilter\n 50: optional WorkflowExecutionFilter executionFilter\n 60: optional WorkflowTypeFilter typeFilter\n 70: optional WorkflowExecutionCloseStatus statusFilter\n}\n\nstruct ListClosedWorkflowExecutionsResponse {\n 10: optional list executions\n 20: optional binary nextPageToken\n}\n\nstruct ListWorkflowExecutionsRequest {\n 10: optional string domain\n 20: optional i32 pageSize\n 30: optional binary nextPageToken\n 40: optional string query\n}\n\nstruct ListWorkflowExecutionsResponse {\n 10: optional list executions\n 20: optional binary nextPageToken\n}\n\nstruct ListArchivedWorkflowExecutionsRequest {\n 10: optional string domain\n 20: optional i32 pageSize\n 30: optional binary nextPageToken\n 40: optional string query\n}\n\nstruct ListArchivedWorkflowExecutionsResponse {\n 10: optional list executions\n 20: optional binary nextPageToken\n}\n\nstruct CountWorkflowExecutionsRequest {\n 10: optional string domain\n 20: optional string query\n}\n\nstruct CountWorkflowExecutionsResponse {\n 10: optional i64 count\n}\n\nstruct GetSearchAttributesResponse {\n 10: optional map keys\n}\n\nstruct QueryWorkflowRequest {\n 10: optional string domain\n 20: optional WorkflowExecution execution\n 30: optional WorkflowQuery query\n // QueryRejectCondition can used to reject the query if workflow state does not satisify condition\n 40: optional QueryRejectCondition queryRejectCondition\n 50: optional QueryConsistencyLevel queryConsistencyLevel\n}\n\nstruct QueryRejected {\n 10: optional WorkflowExecutionCloseStatus closeStatus\n}\n\nstruct QueryWorkflowResponse {\n 10: optional binary queryResult\n 20: optional QueryRejected queryRejected\n}\n\nstruct WorkflowQuery {\n 10: optional string queryType\n 20: optional binary queryArgs\n}\n\nstruct ResetStickyTaskListRequest {\n 10: optional string domain\n 20: optional WorkflowExecution execution\n}\n\nstruct ResetStickyTaskListResponse {\n // The reason to keep this response is to allow returning\n // information in the future.\n}\n\nstruct RespondQueryTaskCompletedRequest {\n 10: optional binary taskToken\n 20: optional QueryTaskCompletedType completedType\n 30: optional binary queryResult\n 40: optional string errorMessage\n 50: optional WorkerVersionInfo workerVersionInfo\n}\n\nstruct WorkflowQueryResult {\n 10: optional QueryResultType resultType\n 20: optional binary answer\n 30: optional string errorMessage\n}\n\nstruct DescribeWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional WorkflowExecution execution\n}\n\nstruct PendingActivityInfo {\n 10: optional string activityID\n 20: optional ActivityType activityType\n 30: optional PendingActivityState state\n 40: optional binary heartbeatDetails\n 50: optional i64 (js.type = \"Long\") lastHeartbeatTimestamp\n 60: optional i64 (js.type = \"Long\") lastStartedTimestamp\n 70: optional i32 attempt\n 80: optional i32 maximumAttempts\n 90: optional i64 (js.type = \"Long\") scheduledTimestamp\n 100: optional i64 (js.type = \"Long\") expirationTimestamp\n 110: optional string lastFailureReason\n 120: optional string lastWorkerIdentity\n 130: optional binary lastFailureDetails\n 140: optional string startedWorkerIdentity\n}\n\nstruct PendingDecisionInfo {\n 10: optional PendingDecisionState state\n 20: optional i64 (js.type = \"Long\") scheduledTimestamp\n 30: optional i64 (js.type = \"Long\") startedTimestamp\n 40: optional i64 attempt\n 50: optional i64 (js.type = \"Long\") originalScheduledTimestamp\n}\n\nstruct PendingChildExecutionInfo {\n 1: optional string domain\n 10: optional string workflowID\n 20: optional string runID\n 30: optional string workflowTypName\n 40: optional i64 (js.type = \"Long\") initiatedID\n 50: optional ParentClosePolicy parentClosePolicy\n}\n\nstruct DescribeWorkflowExecutionResponse {\n 10: optional WorkflowExecutionConfiguration executionConfiguration\n 20: optional WorkflowExecutionInfo workflowExecutionInfo\n 30: optional list pendingActivities\n 40: optional list pendingChildren\n 50: optional PendingDecisionInfo pendingDecision\n}\n\nstruct DescribeTaskListRequest {\n 10: optional string domain\n 20: optional TaskList taskList\n 30: optional TaskListType taskListType\n 40: optional bool includeTaskListStatus\n}\n\nstruct DescribeTaskListResponse {\n 10: optional list pollers\n 20: optional TaskListStatus taskListStatus\n}\n\nstruct GetTaskListsByDomainRequest {\n 10: optional string domainName\n}\n\nstruct GetTaskListsByDomainResponse {\n 10: optional map decisionTaskListMap\n 20: optional map activityTaskListMap\n}\n\nstruct ListTaskListPartitionsRequest {\n 10: optional string domain\n 20: optional TaskList taskList\n}\n\nstruct TaskListPartitionMetadata {\n 10: optional string key\n 20: optional string ownerHostName\n}\n\nstruct ListTaskListPartitionsResponse {\n 10: optional list activityTaskListPartitions\n 20: optional list decisionTaskListPartitions\n}\n\nstruct TaskListStatus {\n 10: optional i64 (js.type = \"Long\") backlogCountHint\n 20: optional i64 (js.type = \"Long\") readLevel\n 30: optional i64 (js.type = \"Long\") ackLevel\n 35: optional double ratePerSecond\n 40: optional TaskIDBlock taskIDBlock\n}\n\nstruct TaskIDBlock {\n 10: optional i64 (js.type = \"Long\") startID\n 20: optional i64 (js.type = \"Long\") endID\n}\n\n//At least one of the parameters needs to be provided\nstruct DescribeHistoryHostRequest {\n 10: optional string hostAddress //ip:port\n 20: optional i32 shardIdForHost\n 30: optional WorkflowExecution executionForHost\n}\n\nstruct RemoveTaskRequest {\n 10: optional i32 shardID\n 20: optional i32 type\n 30: optional i64 (js.type = \"Long\") taskID\n 40: optional i64 (js.type = \"Long\") visibilityTimestamp\n 50: optional string clusterName\n}\n\nstruct CloseShardRequest {\n 10: optional i32 shardID\n}\n\nstruct ResetQueueRequest {\n 10: optional i32 shardID\n 20: optional string clusterName\n 30: optional i32 type\n}\n\nstruct DescribeQueueRequest {\n 10: optional i32 shardID\n 20: optional string clusterName\n 30: optional i32 type\n}\n\nstruct DescribeQueueResponse {\n 10: optional list processingQueueStates\n}\n\nstruct DescribeShardDistributionRequest {\n 10: optional i32 pageSize\n 20: optional i32 pageID\n}\n\nstruct DescribeShardDistributionResponse {\n 10: optional i32 numberOfShards\n\n // ShardID to Address (ip:port) map\n 20: optional map shards\n}\n\nstruct DescribeHistoryHostResponse{\n 10: optional i32 numberOfShards\n 20: optional list shardIDs\n 30: optional DomainCacheInfo domainCache\n 40: optional string shardControllerStatus\n 50: optional string address\n}\n\nstruct DomainCacheInfo{\n 10: optional i64 numOfItemsInCacheByID\n 20: optional i64 numOfItemsInCacheByName\n}\n\nenum TaskListType {\n /*\n * Decision type of tasklist\n */\n Decision,\n /*\n * Activity type of tasklist\n */\n Activity,\n}\n\nstruct PollerInfo {\n // Unix Nano\n 10: optional i64 (js.type = \"Long\") lastAccessTime\n 20: optional string identity\n 30: optional double ratePerSecond\n}\n\nstruct RetryPolicy {\n // Interval of the first retry. If coefficient is 1.0 then it is used for all retries.\n 10: optional i32 initialIntervalInSeconds\n\n // Coefficient used to calculate the next retry interval.\n // The next retry interval is previous interval multiplied by the coefficient.\n // Must be 1 or larger.\n 20: optional double backoffCoefficient\n\n // Maximum interval between retries. Exponential backoff leads to interval increase.\n // This value is the cap of the increase. Default is 100x of initial interval.\n 30: optional i32 maximumIntervalInSeconds\n\n // Maximum number of attempts. When exceeded the retries stop even if not expired yet.\n // Must be 1 or bigger. Default is unlimited.\n 40: optional i32 maximumAttempts\n\n // Non-Retriable errors. Will stop retrying if error matches this list.\n 50: optional list nonRetriableErrorReasons\n\n // Expiration time for the whole retry process.\n 60: optional i32 expirationIntervalInSeconds\n}\n\n// HistoryBranchRange represents a piece of range for a branch.\nstruct HistoryBranchRange{\n // branchID of original branch forked from\n 10: optional string branchID\n // beinning node for the range, inclusive\n 20: optional i64 beginNodeID\n // ending node for the range, exclusive\n 30: optional i64 endNodeID\n}\n\n// For history persistence to serialize/deserialize branch details\nstruct HistoryBranch{\n 10: optional string treeID\n 20: optional string branchID\n 30: optional list ancestors\n}\n\n// VersionHistoryItem contains signal eventID and the corresponding version\nstruct VersionHistoryItem{\n 10: optional i64 (js.type = \"Long\") eventID\n 20: optional i64 (js.type = \"Long\") version\n}\n\n// VersionHistory contains the version history of a branch\nstruct VersionHistory{\n 10: optional binary branchToken\n 20: optional list items\n}\n\n// VersionHistories contains all version histories from all branches\nstruct VersionHistories{\n 10: optional i32 currentVersionHistoryIndex\n 20: optional list histories\n}\n\n// ReapplyEventsRequest is the request for reapply events API\nstruct ReapplyEventsRequest{\n 10: optional string domainName\n 20: optional WorkflowExecution workflowExecution\n 30: optional DataBlob events\n}\n\n// SupportedClientVersions contains the support versions for client library\nstruct SupportedClientVersions{\n 10: optional string goSdk\n 20: optional string javaSdk\n}\n\n// ClusterInfo contains information about cadence cluster\nstruct ClusterInfo{\n 10: optional SupportedClientVersions supportedClientVersions\n}\n\nstruct RefreshWorkflowTasksRequest {\n 10: optional string domain\n 20: optional WorkflowExecution execution\n}\n\nstruct FeatureFlags {\n\t10: optional bool WorkflowExecutionAlreadyCompletedErrorEnabled\n}\n\nenum CrossClusterTaskType {\n StartChildExecution\n CancelExecution\n SignalExecution\n RecordChildWorkflowExecutionComplete\n ApplyParentClosePolicy\n}\n\nenum CrossClusterTaskFailedCause {\n DOMAIN_NOT_ACTIVE\n DOMAIN_NOT_EXISTS\n WORKFLOW_ALREADY_RUNNING\n WORKFLOW_NOT_EXISTS\n WORKFLOW_ALREADY_COMPLETED\n UNCATEGORIZED\n}\n\nenum GetTaskFailedCause {\n SERVICE_BUSY\n TIMEOUT\n SHARD_OWNERSHIP_LOST\n UNCATEGORIZED\n}\n\nstruct CrossClusterTaskInfo {\n 10: optional string domainID\n 20: optional string workflowID\n 30: optional string runID\n 40: optional CrossClusterTaskType taskType\n 50: optional i16 taskState\n 60: optional i64 (js.type = \"Long\") taskID\n 70: optional i64 (js.type = \"Long\") visibilityTimestamp\n}\n\nstruct CrossClusterStartChildExecutionRequestAttributes {\n 10: optional string targetDomainID\n 20: optional string requestID\n 30: optional i64 (js.type = \"Long\") initiatedEventID\n 40: optional StartChildWorkflowExecutionInitiatedEventAttributes initiatedEventAttributes\n // targetRunID is for scheduling first decision task\n // targetWorkflowID is available in initiatedEventAttributes\n 50: optional string targetRunID\n 60: optional map partitionConfig\n}\n\nstruct CrossClusterStartChildExecutionResponseAttributes {\n 10: optional string runID\n}\n\nstruct CrossClusterCancelExecutionRequestAttributes {\n 10: optional string targetDomainID\n 20: optional string targetWorkflowID\n 30: optional string targetRunID\n 40: optional string requestID\n 50: optional i64 (js.type = \"Long\") initiatedEventID\n 60: optional bool childWorkflowOnly\n}\n\nstruct CrossClusterCancelExecutionResponseAttributes {\n}\n\nstruct CrossClusterSignalExecutionRequestAttributes {\n 10: optional string targetDomainID\n 20: optional string targetWorkflowID\n 30: optional string targetRunID\n 40: optional string requestID\n 50: optional i64 (js.type = \"Long\") initiatedEventID\n 60: optional bool childWorkflowOnly\n 70: optional string signalName\n 80: optional binary signalInput\n 90: optional binary control\n}\n\nstruct CrossClusterSignalExecutionResponseAttributes {\n}\n\nstruct CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes {\n 10: optional string targetDomainID\n 20: optional string targetWorkflowID\n 30: optional string targetRunID\n 40: optional i64 (js.type = \"Long\") initiatedEventID\n 50: optional HistoryEvent completionEvent\n}\n\nstruct CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes {\n}\n\nstruct ApplyParentClosePolicyAttributes {\n 10: optional string childDomainID\n 20: optional string childWorkflowID\n 30: optional string childRunID\n 40: optional ParentClosePolicy parentClosePolicy\n}\n\nstruct ApplyParentClosePolicyStatus {\n 10: optional bool completed\n 20: optional CrossClusterTaskFailedCause failedCause\n}\n\nstruct ApplyParentClosePolicyRequest {\n 10: optional ApplyParentClosePolicyAttributes child\n 20: optional ApplyParentClosePolicyStatus status\n}\n\nstruct CrossClusterApplyParentClosePolicyRequestAttributes {\n 10: optional list children\n}\n\nstruct ApplyParentClosePolicyResult {\n 10: optional ApplyParentClosePolicyAttributes child\n 20: optional CrossClusterTaskFailedCause failedCause\n}\n\nstruct CrossClusterApplyParentClosePolicyResponseAttributes {\n 10: optional list childrenStatus\n}\n\nstruct CrossClusterTaskRequest {\n 10: optional CrossClusterTaskInfo taskInfo\n 20: optional CrossClusterStartChildExecutionRequestAttributes startChildExecutionAttributes\n 30: optional CrossClusterCancelExecutionRequestAttributes cancelExecutionAttributes\n 40: optional CrossClusterSignalExecutionRequestAttributes signalExecutionAttributes\n 50: optional CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes recordChildWorkflowExecutionCompleteAttributes\n 60: optional CrossClusterApplyParentClosePolicyRequestAttributes applyParentClosePolicyAttributes\n}\n\nstruct CrossClusterTaskResponse {\n 10: optional i64 (js.type = \"Long\") taskID\n 20: optional CrossClusterTaskType taskType\n 30: optional i16 taskState\n 40: optional CrossClusterTaskFailedCause failedCause\n 50: optional CrossClusterStartChildExecutionResponseAttributes startChildExecutionAttributes\n 60: optional CrossClusterCancelExecutionResponseAttributes cancelExecutionAttributes\n 70: optional CrossClusterSignalExecutionResponseAttributes signalExecutionAttributes\n 80: optional CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes recordChildWorkflowExecutionCompleteAttributes\n 90: optional CrossClusterApplyParentClosePolicyResponseAttributes applyParentClosePolicyAttributes\n}\n\nstruct GetCrossClusterTasksRequest {\n 10: optional list shardIDs\n 20: optional string targetCluster\n}\n\nstruct GetCrossClusterTasksResponse {\n 10: optional map> tasksByShard\n 20: optional map failedCauseByShard\n}\n\nstruct RespondCrossClusterTasksCompletedRequest {\n 10: optional i32 shardID\n 20: optional string targetCluster\n 30: optional list taskResponses\n 40: optional bool fetchNewTasks\n}\n\nstruct RespondCrossClusterTasksCompletedResponse {\n 10: optional list tasks\n}\n\nenum IsolationGroupState {\n INVALID,\n HEALTHY,\n DRAINED,\n}\n\nstruct IsolationGroupPartition {\n 10: optional string name\n 20: optional IsolationGroupState state\n}\n\nstruct IsolationGroupConfiguration {\n 10: optional list isolationGroups\n}\n\n" +const rawIDL = "// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nnamespace java com.uber.cadence\n\nexception BadRequestError {\n 1: required string message\n}\n\nexception InternalServiceError {\n 1: required string message\n}\n\nexception InternalDataInconsistencyError {\n 1: required string message\n}\n\nexception DomainAlreadyExistsError {\n 1: required string message\n}\n\nexception WorkflowExecutionAlreadyStartedError {\n 10: optional string message\n 20: optional string startRequestId\n 30: optional string runId\n}\n\nexception WorkflowExecutionAlreadyCompletedError {\n 1: required string message\n}\n\nexception EntityNotExistsError {\n 1: required string message\n 2: optional string currentCluster\n 3: optional string activeCluster\n}\n\nexception ServiceBusyError {\n 1: required string message\n}\n\nexception CancellationAlreadyRequestedError {\n 1: required string message\n}\n\nexception QueryFailedError {\n 1: required string message\n}\n\nexception DomainNotActiveError {\n 1: required string message\n 2: required string domainName\n 3: required string currentCluster\n 4: required string activeCluster\n}\n\nexception LimitExceededError {\n 1: required string message\n}\n\nexception AccessDeniedError {\n 1: required string message\n}\n\nexception RetryTaskV2Error {\n 1: required string message\n 2: optional string domainId\n 3: optional string workflowId\n 4: optional string runId\n 5: optional i64 (js.type = \"Long\") startEventId\n 6: optional i64 (js.type = \"Long\") startEventVersion\n 7: optional i64 (js.type = \"Long\") endEventId\n 8: optional i64 (js.type = \"Long\") endEventVersion\n}\n\nexception ClientVersionNotSupportedError {\n 1: required string featureVersion\n 2: required string clientImpl\n 3: required string supportedVersions\n}\n\nexception FeatureNotEnabledError {\n 1: required string featureFlag\n}\n\nexception CurrentBranchChangedError {\n 10: required string message\n 20: required binary currentBranchToken\n}\n\nexception RemoteSyncMatchedError {\n 10: required string message\n}\n\nexception StickyWorkerUnavailableError {\n 1: required string message\n}\n\nenum WorkflowIdReusePolicy {\n /*\n * allow start a workflow execution using the same workflow ID,\n * when workflow not running, and the last execution close state is in\n * [terminated, cancelled, timeouted, failed].\n */\n AllowDuplicateFailedOnly,\n /*\n * allow start a workflow execution using the same workflow ID,\n * when workflow not running.\n */\n AllowDuplicate,\n /*\n * do not allow start a workflow execution using the same workflow ID at all\n */\n RejectDuplicate,\n /*\n * if a workflow is running using the same workflow ID, terminate it and start a new one\n */\n TerminateIfRunning,\n}\n\nenum DomainStatus {\n REGISTERED,\n DEPRECATED,\n DELETED,\n}\n\nenum TimeoutType {\n START_TO_CLOSE,\n SCHEDULE_TO_START,\n SCHEDULE_TO_CLOSE,\n HEARTBEAT,\n}\n\nenum ParentClosePolicy {\n\tABANDON,\n\tREQUEST_CANCEL,\n\tTERMINATE,\n}\n\n\n// whenever this list of decision is changed\n// do change the mutableStateBuilder.go\n// function shouldBufferEvent\n// to make sure wo do the correct event ordering\nenum DecisionType {\n ScheduleActivityTask,\n RequestCancelActivityTask,\n StartTimer,\n CompleteWorkflowExecution,\n FailWorkflowExecution,\n CancelTimer,\n CancelWorkflowExecution,\n RequestCancelExternalWorkflowExecution,\n RecordMarker,\n ContinueAsNewWorkflowExecution,\n StartChildWorkflowExecution,\n SignalExternalWorkflowExecution,\n UpsertWorkflowSearchAttributes,\n}\n\nenum EventType {\n WorkflowExecutionStarted,\n WorkflowExecutionCompleted,\n WorkflowExecutionFailed,\n WorkflowExecutionTimedOut,\n DecisionTaskScheduled,\n DecisionTaskStarted,\n DecisionTaskCompleted,\n DecisionTaskTimedOut\n DecisionTaskFailed,\n ActivityTaskScheduled,\n ActivityTaskStarted,\n ActivityTaskCompleted,\n ActivityTaskFailed,\n ActivityTaskTimedOut,\n ActivityTaskCancelRequested,\n RequestCancelActivityTaskFailed,\n ActivityTaskCanceled,\n TimerStarted,\n TimerFired,\n CancelTimerFailed,\n TimerCanceled,\n WorkflowExecutionCancelRequested,\n WorkflowExecutionCanceled,\n RequestCancelExternalWorkflowExecutionInitiated,\n RequestCancelExternalWorkflowExecutionFailed,\n ExternalWorkflowExecutionCancelRequested,\n MarkerRecorded,\n WorkflowExecutionSignaled,\n WorkflowExecutionTerminated,\n WorkflowExecutionContinuedAsNew,\n StartChildWorkflowExecutionInitiated,\n StartChildWorkflowExecutionFailed,\n ChildWorkflowExecutionStarted,\n ChildWorkflowExecutionCompleted,\n ChildWorkflowExecutionFailed,\n ChildWorkflowExecutionCanceled,\n ChildWorkflowExecutionTimedOut,\n ChildWorkflowExecutionTerminated,\n SignalExternalWorkflowExecutionInitiated,\n SignalExternalWorkflowExecutionFailed,\n ExternalWorkflowExecutionSignaled,\n UpsertWorkflowSearchAttributes,\n}\n\nenum DecisionTaskFailedCause {\n UNHANDLED_DECISION,\n BAD_SCHEDULE_ACTIVITY_ATTRIBUTES,\n BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES,\n BAD_START_TIMER_ATTRIBUTES,\n BAD_CANCEL_TIMER_ATTRIBUTES,\n BAD_RECORD_MARKER_ATTRIBUTES,\n BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES,\n BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES,\n BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES,\n BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES,\n BAD_CONTINUE_AS_NEW_ATTRIBUTES,\n START_TIMER_DUPLICATE_ID,\n RESET_STICKY_TASKLIST,\n WORKFLOW_WORKER_UNHANDLED_FAILURE,\n BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES,\n BAD_START_CHILD_EXECUTION_ATTRIBUTES,\n FORCE_CLOSE_DECISION,\n FAILOVER_CLOSE_DECISION,\n BAD_SIGNAL_INPUT_SIZE,\n RESET_WORKFLOW,\n BAD_BINARY,\n SCHEDULE_ACTIVITY_DUPLICATE_ID,\n BAD_SEARCH_ATTRIBUTES,\n}\n\nenum DecisionTaskTimedOutCause {\n TIMEOUT,\n RESET,\n}\n\nenum CancelExternalWorkflowExecutionFailedCause {\n UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION,\n}\n\nenum SignalExternalWorkflowExecutionFailedCause {\n UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION,\n}\n\nenum ChildWorkflowExecutionFailedCause {\n WORKFLOW_ALREADY_RUNNING,\n}\n\n// TODO: when migrating to gRPC, add a running / none status,\n// currently, customer is using null / nil as an indication\n// that workflow is still running\nenum WorkflowExecutionCloseStatus {\n COMPLETED,\n FAILED,\n CANCELED,\n TERMINATED,\n CONTINUED_AS_NEW,\n TIMED_OUT,\n}\n\nenum QueryTaskCompletedType {\n COMPLETED,\n FAILED,\n}\n\nenum QueryResultType {\n ANSWERED,\n FAILED,\n}\n\nenum PendingActivityState {\n SCHEDULED,\n STARTED,\n CANCEL_REQUESTED,\n}\n\nenum PendingDecisionState {\n SCHEDULED,\n STARTED,\n}\n\nenum HistoryEventFilterType {\n ALL_EVENT,\n CLOSE_EVENT,\n}\n\nenum TaskListKind {\n NORMAL,\n STICKY,\n}\n\nenum ArchivalStatus {\n DISABLED,\n ENABLED,\n}\n\nenum IndexedValueType {\n STRING,\n KEYWORD,\n INT,\n DOUBLE,\n BOOL,\n DATETIME,\n}\n\nstruct Header {\n 10: optional map fields\n}\n\nstruct WorkflowType {\n 10: optional string name\n}\n\nstruct ActivityType {\n 10: optional string name\n}\n\nstruct TaskList {\n 10: optional string name\n 20: optional TaskListKind kind\n}\n\nenum EncodingType {\n ThriftRW,\n JSON,\n}\n\nenum QueryRejectCondition {\n // NOT_OPEN indicates that query should be rejected if workflow is not open\n NOT_OPEN\n // NOT_COMPLETED_CLEANLY indicates that query should be rejected if workflow did not complete cleanly\n NOT_COMPLETED_CLEANLY\n}\n\nenum QueryConsistencyLevel {\n // EVENTUAL indicates that query should be eventually consistent\n EVENTUAL\n // STRONG indicates that any events that came before query should be reflected in workflow state before running query\n STRONG\n}\n\nstruct DataBlob {\n 10: optional EncodingType EncodingType\n 20: optional binary Data\n}\n\nstruct TaskListMetadata {\n 10: optional double maxTasksPerSecond\n}\n\nstruct WorkflowExecution {\n 10: optional string workflowId\n 20: optional string runId\n}\n\nstruct Memo {\n 10: optional map fields\n}\n\nstruct SearchAttributes {\n 10: optional map indexedFields\n}\n\nstruct WorkerVersionInfo {\n 10: optional string impl\n 20: optional string featureVersion\n}\n\nstruct WorkflowExecutionInfo {\n 10: optional WorkflowExecution execution\n 20: optional WorkflowType type\n 30: optional i64 (js.type = \"Long\") startTime\n 40: optional i64 (js.type = \"Long\") closeTime\n 50: optional WorkflowExecutionCloseStatus closeStatus\n 60: optional i64 (js.type = \"Long\") historyLength\n 70: optional string parentDomainId\n 71: optional string parentDomainName\n 72: optional i64 parentInitatedId\n 80: optional WorkflowExecution parentExecution\n 90: optional i64 (js.type = \"Long\") executionTime\n 100: optional Memo memo\n 101: optional SearchAttributes searchAttributes\n 110: optional ResetPoints autoResetPoints\n 120: optional string taskList\n 130: optional bool isCron\n 140: optional i64 (js.type = \"Long\") updateTime\n 150: optional map partitionConfig\n}\n\nstruct WorkflowExecutionConfiguration {\n 10: optional TaskList taskList\n 20: optional i32 executionStartToCloseTimeoutSeconds\n 30: optional i32 taskStartToCloseTimeoutSeconds\n// 40: optional ChildPolicy childPolicy -- Removed but reserve the IDL order number\n}\n\nstruct TransientDecisionInfo {\n 10: optional HistoryEvent scheduledEvent\n 20: optional HistoryEvent startedEvent\n}\n\nstruct ScheduleActivityTaskDecisionAttributes {\n 10: optional string activityId\n 20: optional ActivityType activityType\n 25: optional string domain\n 30: optional TaskList taskList\n 40: optional binary input\n 45: optional i32 scheduleToCloseTimeoutSeconds\n 50: optional i32 scheduleToStartTimeoutSeconds\n 55: optional i32 startToCloseTimeoutSeconds\n 60: optional i32 heartbeatTimeoutSeconds\n 70: optional RetryPolicy retryPolicy\n 80: optional Header header\n 90: optional bool requestLocalDispatch\n}\n\nstruct ActivityLocalDispatchInfo{\n 10: optional string activityId\n 20: optional i64 (js.type = \"Long\") scheduledTimestamp\n 30: optional i64 (js.type = \"Long\") startedTimestamp\n 40: optional i64 (js.type = \"Long\") scheduledTimestampOfThisAttempt\n 50: optional binary taskToken\n}\n\nstruct RequestCancelActivityTaskDecisionAttributes {\n 10: optional string activityId\n}\n\nstruct StartTimerDecisionAttributes {\n 10: optional string timerId\n 20: optional i64 (js.type = \"Long\") startToFireTimeoutSeconds\n}\n\nstruct CompleteWorkflowExecutionDecisionAttributes {\n 10: optional binary result\n}\n\nstruct FailWorkflowExecutionDecisionAttributes {\n 10: optional string reason\n 20: optional binary details\n}\n\nstruct CancelTimerDecisionAttributes {\n 10: optional string timerId\n}\n\nstruct CancelWorkflowExecutionDecisionAttributes {\n 10: optional binary details\n}\n\nstruct RequestCancelExternalWorkflowExecutionDecisionAttributes {\n 10: optional string domain\n 20: optional string workflowId\n 30: optional string runId\n 40: optional binary control\n 50: optional bool childWorkflowOnly\n}\n\nstruct SignalExternalWorkflowExecutionDecisionAttributes {\n 10: optional string domain\n 20: optional WorkflowExecution execution\n 30: optional string signalName\n 40: optional binary input\n 50: optional binary control\n 60: optional bool childWorkflowOnly\n}\n\nstruct UpsertWorkflowSearchAttributesDecisionAttributes {\n 10: optional SearchAttributes searchAttributes\n}\n\nstruct RecordMarkerDecisionAttributes {\n 10: optional string markerName\n 20: optional binary details\n 30: optional Header header\n}\n\nstruct ContinueAsNewWorkflowExecutionDecisionAttributes {\n 10: optional WorkflowType workflowType\n 20: optional TaskList taskList\n 30: optional binary input\n 40: optional i32 executionStartToCloseTimeoutSeconds\n 50: optional i32 taskStartToCloseTimeoutSeconds\n 60: optional i32 backoffStartIntervalInSeconds\n 70: optional RetryPolicy retryPolicy\n 80: optional ContinueAsNewInitiator initiator\n 90: optional string failureReason\n 100: optional binary failureDetails\n 110: optional binary lastCompletionResult\n 120: optional string cronSchedule\n 130: optional Header header\n 140: optional Memo memo\n 150: optional SearchAttributes searchAttributes\n 160: optional i32 jitterStartSeconds\n}\n\nstruct StartChildWorkflowExecutionDecisionAttributes {\n 10: optional string domain\n 20: optional string workflowId\n 30: optional WorkflowType workflowType\n 40: optional TaskList taskList\n 50: optional binary input\n 60: optional i32 executionStartToCloseTimeoutSeconds\n 70: optional i32 taskStartToCloseTimeoutSeconds\n// 80: optional ChildPolicy childPolicy -- Removed but reserve the IDL order number\n 81: optional ParentClosePolicy parentClosePolicy\n 90: optional binary control\n 100: optional WorkflowIdReusePolicy workflowIdReusePolicy\n 110: optional RetryPolicy retryPolicy\n 120: optional string cronSchedule\n 130: optional Header header\n 140: optional Memo memo\n 150: optional SearchAttributes searchAttributes\n}\n\nstruct Decision {\n 10: optional DecisionType decisionType\n 20: optional ScheduleActivityTaskDecisionAttributes scheduleActivityTaskDecisionAttributes\n 25: optional StartTimerDecisionAttributes startTimerDecisionAttributes\n 30: optional CompleteWorkflowExecutionDecisionAttributes completeWorkflowExecutionDecisionAttributes\n 35: optional FailWorkflowExecutionDecisionAttributes failWorkflowExecutionDecisionAttributes\n 40: optional RequestCancelActivityTaskDecisionAttributes requestCancelActivityTaskDecisionAttributes\n 50: optional CancelTimerDecisionAttributes cancelTimerDecisionAttributes\n 60: optional CancelWorkflowExecutionDecisionAttributes cancelWorkflowExecutionDecisionAttributes\n 70: optional RequestCancelExternalWorkflowExecutionDecisionAttributes requestCancelExternalWorkflowExecutionDecisionAttributes\n 80: optional RecordMarkerDecisionAttributes recordMarkerDecisionAttributes\n 90: optional ContinueAsNewWorkflowExecutionDecisionAttributes continueAsNewWorkflowExecutionDecisionAttributes\n 100: optional StartChildWorkflowExecutionDecisionAttributes startChildWorkflowExecutionDecisionAttributes\n 110: optional SignalExternalWorkflowExecutionDecisionAttributes signalExternalWorkflowExecutionDecisionAttributes\n 120: optional UpsertWorkflowSearchAttributesDecisionAttributes upsertWorkflowSearchAttributesDecisionAttributes\n}\n\nstruct WorkflowExecutionStartedEventAttributes {\n 10: optional WorkflowType workflowType\n 12: optional string parentWorkflowDomain\n 14: optional WorkflowExecution parentWorkflowExecution\n 16: optional i64 (js.type = \"Long\") parentInitiatedEventId\n 20: optional TaskList taskList\n 30: optional binary input\n 40: optional i32 executionStartToCloseTimeoutSeconds\n 50: optional i32 taskStartToCloseTimeoutSeconds\n// 52: optional ChildPolicy childPolicy -- Removed but reserve the IDL order number\n 54: optional string continuedExecutionRunId\n 55: optional ContinueAsNewInitiator initiator\n 56: optional string continuedFailureReason\n 57: optional binary continuedFailureDetails\n 58: optional binary lastCompletionResult\n 59: optional string originalExecutionRunId // This is the runID when the WorkflowExecutionStarted event is written\n 60: optional string identity\n 61: optional string firstExecutionRunId // This is the very first runID along the chain of ContinueAsNew and Reset.\n 62: optional i64 (js.type = \"Long\") firstScheduledTimeNano\n 70: optional RetryPolicy retryPolicy\n 80: optional i32 attempt\n 90: optional i64 (js.type = \"Long\") expirationTimestamp\n 100: optional string cronSchedule\n 110: optional i32 firstDecisionTaskBackoffSeconds\n 120: optional Memo memo\n 121: optional SearchAttributes searchAttributes\n 130: optional ResetPoints prevAutoResetPoints\n 140: optional Header header\n 150: optional map partitionConfig\n}\n\nstruct ResetPoints{\n 10: optional list points\n}\n\n struct ResetPointInfo{\n 10: optional string binaryChecksum\n 20: optional string runId\n 30: optional i64 firstDecisionCompletedId\n 40: optional i64 (js.type = \"Long\") createdTimeNano\n 50: optional i64 (js.type = \"Long\") expiringTimeNano //the time that the run is deleted due to retention\n 60: optional bool resettable // false if the resset point has pending childWFs/reqCancels/signalExternals.\n}\n\nstruct WorkflowExecutionCompletedEventAttributes {\n 10: optional binary result\n 20: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n}\n\nstruct WorkflowExecutionFailedEventAttributes {\n 10: optional string reason\n 20: optional binary details\n 30: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n}\n\nstruct WorkflowExecutionTimedOutEventAttributes {\n 10: optional TimeoutType timeoutType\n}\n\nenum ContinueAsNewInitiator {\n Decider,\n RetryPolicy,\n CronSchedule,\n}\n\nstruct WorkflowExecutionContinuedAsNewEventAttributes {\n 10: optional string newExecutionRunId\n 20: optional WorkflowType workflowType\n 30: optional TaskList taskList\n 40: optional binary input\n 50: optional i32 executionStartToCloseTimeoutSeconds\n 60: optional i32 taskStartToCloseTimeoutSeconds\n 70: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 80: optional i32 backoffStartIntervalInSeconds\n 90: optional ContinueAsNewInitiator initiator\n 100: optional string failureReason\n 110: optional binary failureDetails\n 120: optional binary lastCompletionResult\n 130: optional Header header\n 140: optional Memo memo\n 150: optional SearchAttributes searchAttributes\n}\n\nstruct DecisionTaskScheduledEventAttributes {\n 10: optional TaskList taskList\n 20: optional i32 startToCloseTimeoutSeconds\n 30: optional i64 (js.type = \"Long\") attempt\n}\n\nstruct DecisionTaskStartedEventAttributes {\n 10: optional i64 (js.type = \"Long\") scheduledEventId\n 20: optional string identity\n 30: optional string requestId\n}\n\nstruct DecisionTaskCompletedEventAttributes {\n 10: optional binary executionContext\n 20: optional i64 (js.type = \"Long\") scheduledEventId\n 30: optional i64 (js.type = \"Long\") startedEventId\n 40: optional string identity\n 50: optional string binaryChecksum\n}\n\nstruct DecisionTaskTimedOutEventAttributes {\n 10: optional i64 (js.type = \"Long\") scheduledEventId\n 20: optional i64 (js.type = \"Long\") startedEventId\n 30: optional TimeoutType timeoutType\n // for reset workflow\n 40: optional string baseRunId\n 50: optional string newRunId\n 60: optional i64 (js.type = \"Long\") forkEventVersion\n 70: optional string reason\n 80: optional DecisionTaskTimedOutCause cause\n}\n\nstruct DecisionTaskFailedEventAttributes {\n 10: optional i64 (js.type = \"Long\") scheduledEventId\n 20: optional i64 (js.type = \"Long\") startedEventId\n 30: optional DecisionTaskFailedCause cause\n 35: optional binary details\n 40: optional string identity\n 50: optional string reason\n // for reset workflow\n 60: optional string baseRunId\n 70: optional string newRunId\n 80: optional i64 (js.type = \"Long\") forkEventVersion\n 90: optional string binaryChecksum\n}\n\nstruct ActivityTaskScheduledEventAttributes {\n 10: optional string activityId\n 20: optional ActivityType activityType\n 25: optional string domain\n 30: optional TaskList taskList\n 40: optional binary input\n 45: optional i32 scheduleToCloseTimeoutSeconds\n 50: optional i32 scheduleToStartTimeoutSeconds\n 55: optional i32 startToCloseTimeoutSeconds\n 60: optional i32 heartbeatTimeoutSeconds\n 90: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 110: optional RetryPolicy retryPolicy\n 120: optional Header header\n}\n\nstruct ActivityTaskStartedEventAttributes {\n 10: optional i64 (js.type = \"Long\") scheduledEventId\n 20: optional string identity\n 30: optional string requestId\n 40: optional i32 attempt\n 50: optional string lastFailureReason\n 60: optional binary lastFailureDetails\n}\n\nstruct ActivityTaskCompletedEventAttributes {\n 10: optional binary result\n 20: optional i64 (js.type = \"Long\") scheduledEventId\n 30: optional i64 (js.type = \"Long\") startedEventId\n 40: optional string identity\n}\n\nstruct ActivityTaskFailedEventAttributes {\n 10: optional string reason\n 20: optional binary details\n 30: optional i64 (js.type = \"Long\") scheduledEventId\n 40: optional i64 (js.type = \"Long\") startedEventId\n 50: optional string identity\n}\n\nstruct ActivityTaskTimedOutEventAttributes {\n 05: optional binary details\n 10: optional i64 (js.type = \"Long\") scheduledEventId\n 20: optional i64 (js.type = \"Long\") startedEventId\n 30: optional TimeoutType timeoutType\n // For retry activity, it may have a failure before timeout. It's important to keep those information for debug.\n // Client can also provide the info for making next decision\n 40: optional string lastFailureReason\n 50: optional binary lastFailureDetails\n}\n\nstruct ActivityTaskCancelRequestedEventAttributes {\n 10: optional string activityId\n 20: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n}\n\nstruct RequestCancelActivityTaskFailedEventAttributes{\n 10: optional string activityId\n 20: optional string cause\n 30: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n}\n\nstruct ActivityTaskCanceledEventAttributes {\n 10: optional binary details\n 20: optional i64 (js.type = \"Long\") latestCancelRequestedEventId\n 30: optional i64 (js.type = \"Long\") scheduledEventId\n 40: optional i64 (js.type = \"Long\") startedEventId\n 50: optional string identity\n}\n\nstruct TimerStartedEventAttributes {\n 10: optional string timerId\n 20: optional i64 (js.type = \"Long\") startToFireTimeoutSeconds\n 30: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n}\n\nstruct TimerFiredEventAttributes {\n 10: optional string timerId\n 20: optional i64 (js.type = \"Long\") startedEventId\n}\n\nstruct TimerCanceledEventAttributes {\n 10: optional string timerId\n 20: optional i64 (js.type = \"Long\") startedEventId\n 30: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 40: optional string identity\n}\n\nstruct CancelTimerFailedEventAttributes {\n 10: optional string timerId\n 20: optional string cause\n 30: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 40: optional string identity\n}\n\nstruct WorkflowExecutionCancelRequestedEventAttributes {\n 10: optional string cause\n 20: optional i64 (js.type = \"Long\") externalInitiatedEventId\n 30: optional WorkflowExecution externalWorkflowExecution\n 40: optional string identity\n}\n\nstruct WorkflowExecutionCanceledEventAttributes {\n 10: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 20: optional binary details\n}\n\nstruct MarkerRecordedEventAttributes {\n 10: optional string markerName\n 20: optional binary details\n 30: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 40: optional Header header\n}\n\nstruct WorkflowExecutionSignaledEventAttributes {\n 10: optional string signalName\n 20: optional binary input\n 30: optional string identity\n}\n\nstruct WorkflowExecutionTerminatedEventAttributes {\n 10: optional string reason\n 20: optional binary details\n 30: optional string identity\n}\n\nstruct RequestCancelExternalWorkflowExecutionInitiatedEventAttributes {\n 10: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 20: optional string domain\n 30: optional WorkflowExecution workflowExecution\n 40: optional binary control\n 50: optional bool childWorkflowOnly\n}\n\nstruct RequestCancelExternalWorkflowExecutionFailedEventAttributes {\n 10: optional CancelExternalWorkflowExecutionFailedCause cause\n 20: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 30: optional string domain\n 40: optional WorkflowExecution workflowExecution\n 50: optional i64 (js.type = \"Long\") initiatedEventId\n 60: optional binary control\n}\n\nstruct ExternalWorkflowExecutionCancelRequestedEventAttributes {\n 10: optional i64 (js.type = \"Long\") initiatedEventId\n 20: optional string domain\n 30: optional WorkflowExecution workflowExecution\n}\n\nstruct SignalExternalWorkflowExecutionInitiatedEventAttributes {\n 10: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 20: optional string domain\n 30: optional WorkflowExecution workflowExecution\n 40: optional string signalName\n 50: optional binary input\n 60: optional binary control\n 70: optional bool childWorkflowOnly\n}\n\nstruct SignalExternalWorkflowExecutionFailedEventAttributes {\n 10: optional SignalExternalWorkflowExecutionFailedCause cause\n 20: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 30: optional string domain\n 40: optional WorkflowExecution workflowExecution\n 50: optional i64 (js.type = \"Long\") initiatedEventId\n 60: optional binary control\n}\n\nstruct ExternalWorkflowExecutionSignaledEventAttributes {\n 10: optional i64 (js.type = \"Long\") initiatedEventId\n 20: optional string domain\n 30: optional WorkflowExecution workflowExecution\n 40: optional binary control\n}\n\nstruct UpsertWorkflowSearchAttributesEventAttributes {\n 10: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 20: optional SearchAttributes searchAttributes\n}\n\nstruct StartChildWorkflowExecutionInitiatedEventAttributes {\n 10: optional string domain\n 20: optional string workflowId\n 30: optional WorkflowType workflowType\n 40: optional TaskList taskList\n 50: optional binary input\n 60: optional i32 executionStartToCloseTimeoutSeconds\n 70: optional i32 taskStartToCloseTimeoutSeconds\n// 80: optional ChildPolicy childPolicy -- Removed but reserve the IDL order number\n 81: optional ParentClosePolicy parentClosePolicy\n 90: optional binary control\n 100: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n 110: optional WorkflowIdReusePolicy workflowIdReusePolicy\n 120: optional RetryPolicy retryPolicy\n 130: optional string cronSchedule\n 140: optional Header header\n 150: optional Memo memo\n 160: optional SearchAttributes searchAttributes\n 170: optional i32 delayStartSeconds\n 180: optional i32 jitterStartSeconds\n}\n\nstruct StartChildWorkflowExecutionFailedEventAttributes {\n 10: optional string domain\n 20: optional string workflowId\n 30: optional WorkflowType workflowType\n 40: optional ChildWorkflowExecutionFailedCause cause\n 50: optional binary control\n 60: optional i64 (js.type = \"Long\") initiatedEventId\n 70: optional i64 (js.type = \"Long\") decisionTaskCompletedEventId\n}\n\nstruct ChildWorkflowExecutionStartedEventAttributes {\n 10: optional string domain\n 20: optional i64 (js.type = \"Long\") initiatedEventId\n 30: optional WorkflowExecution workflowExecution\n 40: optional WorkflowType workflowType\n 50: optional Header header\n}\n\nstruct ChildWorkflowExecutionCompletedEventAttributes {\n 10: optional binary result\n 20: optional string domain\n 30: optional WorkflowExecution workflowExecution\n 40: optional WorkflowType workflowType\n 50: optional i64 (js.type = \"Long\") initiatedEventId\n 60: optional i64 (js.type = \"Long\") startedEventId\n}\n\nstruct ChildWorkflowExecutionFailedEventAttributes {\n 10: optional string reason\n 20: optional binary details\n 30: optional string domain\n 40: optional WorkflowExecution workflowExecution\n 50: optional WorkflowType workflowType\n 60: optional i64 (js.type = \"Long\") initiatedEventId\n 70: optional i64 (js.type = \"Long\") startedEventId\n}\n\nstruct ChildWorkflowExecutionCanceledEventAttributes {\n 10: optional binary details\n 20: optional string domain\n 30: optional WorkflowExecution workflowExecution\n 40: optional WorkflowType workflowType\n 50: optional i64 (js.type = \"Long\") initiatedEventId\n 60: optional i64 (js.type = \"Long\") startedEventId\n}\n\nstruct ChildWorkflowExecutionTimedOutEventAttributes {\n 10: optional TimeoutType timeoutType\n 20: optional string domain\n 30: optional WorkflowExecution workflowExecution\n 40: optional WorkflowType workflowType\n 50: optional i64 (js.type = \"Long\") initiatedEventId\n 60: optional i64 (js.type = \"Long\") startedEventId\n}\n\nstruct ChildWorkflowExecutionTerminatedEventAttributes {\n 10: optional string domain\n 20: optional WorkflowExecution workflowExecution\n 30: optional WorkflowType workflowType\n 40: optional i64 (js.type = \"Long\") initiatedEventId\n 50: optional i64 (js.type = \"Long\") startedEventId\n}\n\nstruct HistoryEvent {\n 10: optional i64 (js.type = \"Long\") eventId\n 20: optional i64 (js.type = \"Long\") timestamp\n 30: optional EventType eventType\n 35: optional i64 (js.type = \"Long\") version\n 36: optional i64 (js.type = \"Long\") taskId\n 40: optional WorkflowExecutionStartedEventAttributes workflowExecutionStartedEventAttributes\n 50: optional WorkflowExecutionCompletedEventAttributes workflowExecutionCompletedEventAttributes\n 60: optional WorkflowExecutionFailedEventAttributes workflowExecutionFailedEventAttributes\n 70: optional WorkflowExecutionTimedOutEventAttributes workflowExecutionTimedOutEventAttributes\n 80: optional DecisionTaskScheduledEventAttributes decisionTaskScheduledEventAttributes\n 90: optional DecisionTaskStartedEventAttributes decisionTaskStartedEventAttributes\n 100: optional DecisionTaskCompletedEventAttributes decisionTaskCompletedEventAttributes\n 110: optional DecisionTaskTimedOutEventAttributes decisionTaskTimedOutEventAttributes\n 120: optional DecisionTaskFailedEventAttributes decisionTaskFailedEventAttributes\n 130: optional ActivityTaskScheduledEventAttributes activityTaskScheduledEventAttributes\n 140: optional ActivityTaskStartedEventAttributes activityTaskStartedEventAttributes\n 150: optional ActivityTaskCompletedEventAttributes activityTaskCompletedEventAttributes\n 160: optional ActivityTaskFailedEventAttributes activityTaskFailedEventAttributes\n 170: optional ActivityTaskTimedOutEventAttributes activityTaskTimedOutEventAttributes\n 180: optional TimerStartedEventAttributes timerStartedEventAttributes\n 190: optional TimerFiredEventAttributes timerFiredEventAttributes\n 200: optional ActivityTaskCancelRequestedEventAttributes activityTaskCancelRequestedEventAttributes\n 210: optional RequestCancelActivityTaskFailedEventAttributes requestCancelActivityTaskFailedEventAttributes\n 220: optional ActivityTaskCanceledEventAttributes activityTaskCanceledEventAttributes\n 230: optional TimerCanceledEventAttributes timerCanceledEventAttributes\n 240: optional CancelTimerFailedEventAttributes cancelTimerFailedEventAttributes\n 250: optional MarkerRecordedEventAttributes markerRecordedEventAttributes\n 260: optional WorkflowExecutionSignaledEventAttributes workflowExecutionSignaledEventAttributes\n 270: optional WorkflowExecutionTerminatedEventAttributes workflowExecutionTerminatedEventAttributes\n 280: optional WorkflowExecutionCancelRequestedEventAttributes workflowExecutionCancelRequestedEventAttributes\n 290: optional WorkflowExecutionCanceledEventAttributes workflowExecutionCanceledEventAttributes\n 300: optional RequestCancelExternalWorkflowExecutionInitiatedEventAttributes requestCancelExternalWorkflowExecutionInitiatedEventAttributes\n 310: optional RequestCancelExternalWorkflowExecutionFailedEventAttributes requestCancelExternalWorkflowExecutionFailedEventAttributes\n 320: optional ExternalWorkflowExecutionCancelRequestedEventAttributes externalWorkflowExecutionCancelRequestedEventAttributes\n 330: optional WorkflowExecutionContinuedAsNewEventAttributes workflowExecutionContinuedAsNewEventAttributes\n 340: optional StartChildWorkflowExecutionInitiatedEventAttributes startChildWorkflowExecutionInitiatedEventAttributes\n 350: optional StartChildWorkflowExecutionFailedEventAttributes startChildWorkflowExecutionFailedEventAttributes\n 360: optional ChildWorkflowExecutionStartedEventAttributes childWorkflowExecutionStartedEventAttributes\n 370: optional ChildWorkflowExecutionCompletedEventAttributes childWorkflowExecutionCompletedEventAttributes\n 380: optional ChildWorkflowExecutionFailedEventAttributes childWorkflowExecutionFailedEventAttributes\n 390: optional ChildWorkflowExecutionCanceledEventAttributes childWorkflowExecutionCanceledEventAttributes\n 400: optional ChildWorkflowExecutionTimedOutEventAttributes childWorkflowExecutionTimedOutEventAttributes\n 410: optional ChildWorkflowExecutionTerminatedEventAttributes childWorkflowExecutionTerminatedEventAttributes\n 420: optional SignalExternalWorkflowExecutionInitiatedEventAttributes signalExternalWorkflowExecutionInitiatedEventAttributes\n 430: optional SignalExternalWorkflowExecutionFailedEventAttributes signalExternalWorkflowExecutionFailedEventAttributes\n 440: optional ExternalWorkflowExecutionSignaledEventAttributes externalWorkflowExecutionSignaledEventAttributes\n 450: optional UpsertWorkflowSearchAttributesEventAttributes upsertWorkflowSearchAttributesEventAttributes\n}\n\nstruct History {\n 10: optional list events\n}\n\nstruct WorkflowExecutionFilter {\n 10: optional string workflowId\n 20: optional string runId\n}\n\nstruct WorkflowTypeFilter {\n 10: optional string name\n}\n\nstruct StartTimeFilter {\n 10: optional i64 (js.type = \"Long\") earliestTime\n 20: optional i64 (js.type = \"Long\") latestTime\n}\n\nstruct DomainInfo {\n 10: optional string name\n 20: optional DomainStatus status\n 30: optional string description\n 40: optional string ownerEmail\n // A key-value map for any customized purpose\n 50: optional map data\n 60: optional string uuid\n}\n\nstruct DomainConfiguration {\n 10: optional i32 workflowExecutionRetentionPeriodInDays\n 20: optional bool emitMetric\n 60: optional IsolationGroupConfiguration isolationgroups\n 70: optional BadBinaries badBinaries\n 80: optional ArchivalStatus historyArchivalStatus\n 90: optional string historyArchivalURI\n 100: optional ArchivalStatus visibilityArchivalStatus\n 110: optional string visibilityArchivalURI\n 120: optional AsyncWorkflowConfiguration AsyncWorkflowConfiguration\n}\n\nstruct FailoverInfo {\n 10: optional i64 (js.type = \"Long\") failoverVersion\n 20: optional i64 (js.type = \"Long\") failoverStartTimestamp\n 30: optional i64 (js.type = \"Long\") failoverExpireTimestamp\n 40: optional i32 completedShardCount\n 50: optional list pendingShards\n}\n\nstruct BadBinaries{\n 10: optional map binaries\n}\n\nstruct BadBinaryInfo{\n 10: optional string reason\n 20: optional string operator\n 30: optional i64 (js.type = \"Long\") createdTimeNano\n}\n\nstruct UpdateDomainInfo {\n 10: optional string description\n 20: optional string ownerEmail\n // A key-value map for any customized purpose\n 30: optional map data\n}\n\nstruct ClusterReplicationConfiguration {\n 10: optional string clusterName\n}\n\nstruct DomainReplicationConfiguration {\n 10: optional string activeClusterName\n 20: optional list clusters\n}\n\nstruct RegisterDomainRequest {\n 10: optional string name\n 20: optional string description\n 30: optional string ownerEmail\n 40: optional i32 workflowExecutionRetentionPeriodInDays\n 50: optional bool emitMetric = true\n 60: optional list clusters\n 70: optional string activeClusterName\n // A key-value map for any customized purpose\n 80: optional map data\n 90: optional string securityToken\n 120: optional bool isGlobalDomain\n 130: optional ArchivalStatus historyArchivalStatus\n 140: optional string historyArchivalURI\n 150: optional ArchivalStatus visibilityArchivalStatus\n 160: optional string visibilityArchivalURI\n}\n\nstruct ListDomainsRequest {\n 10: optional i32 pageSize\n 20: optional binary nextPageToken\n}\n\nstruct ListDomainsResponse {\n 10: optional list domains\n 20: optional binary nextPageToken\n}\n\nstruct DescribeDomainRequest {\n 10: optional string name\n 20: optional string uuid\n}\n\nstruct DescribeDomainResponse {\n 10: optional DomainInfo domainInfo\n 20: optional DomainConfiguration configuration\n 30: optional DomainReplicationConfiguration replicationConfiguration\n 40: optional i64 (js.type = \"Long\") failoverVersion\n 50: optional bool isGlobalDomain\n 60: optional FailoverInfo failoverInfo\n}\n\nstruct UpdateDomainRequest {\n 10: optional string name\n 20: optional UpdateDomainInfo updatedInfo\n 30: optional DomainConfiguration configuration\n 40: optional DomainReplicationConfiguration replicationConfiguration\n 50: optional string securityToken\n 60: optional string deleteBadBinary\n 70: optional i32 failoverTimeoutInSeconds\n}\n\nstruct UpdateDomainResponse {\n 10: optional DomainInfo domainInfo\n 20: optional DomainConfiguration configuration\n 30: optional DomainReplicationConfiguration replicationConfiguration\n 40: optional i64 (js.type = \"Long\") failoverVersion\n 50: optional bool isGlobalDomain\n}\n\nstruct DeprecateDomainRequest {\n 10: optional string name\n 20: optional string securityToken\n}\n\nstruct StartWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional string workflowId\n 30: optional WorkflowType workflowType\n 40: optional TaskList taskList\n 50: optional binary input\n 60: optional i32 executionStartToCloseTimeoutSeconds\n 70: optional i32 taskStartToCloseTimeoutSeconds\n 80: optional string identity\n 90: optional string requestId\n 100: optional WorkflowIdReusePolicy workflowIdReusePolicy\n// 110: optional ChildPolicy childPolicy -- Removed but reserve the IDL order number\n 120: optional RetryPolicy retryPolicy\n 130: optional string cronSchedule\n 140: optional Memo memo\n 141: optional SearchAttributes searchAttributes\n 150: optional Header header\n 160: optional i32 delayStartSeconds\n 170: optional i32 jitterStartSeconds\n}\n\nstruct StartWorkflowExecutionResponse {\n 10: optional string runId\n}\n\nstruct StartWorkflowExecutionAsyncRequest {\n 10: optional StartWorkflowExecutionRequest request\n}\n\nstruct StartWorkflowExecutionAsyncResponse {\n}\n\nstruct RestartWorkflowExecutionResponse {\n 10: optional string runId\n}\n\nstruct PollForDecisionTaskRequest {\n 10: optional string domain\n 20: optional TaskList taskList\n 30: optional string identity\n 40: optional string binaryChecksum\n}\n\nstruct PollForDecisionTaskResponse {\n 10: optional binary taskToken\n 20: optional WorkflowExecution workflowExecution\n 30: optional WorkflowType workflowType\n 40: optional i64 (js.type = \"Long\") previousStartedEventId\n 50: optional i64 (js.type = \"Long\") startedEventId\n 51: optional i64 (js.type = 'Long') attempt\n 54: optional i64 (js.type = \"Long\") backlogCountHint\n 60: optional History history\n 70: optional binary nextPageToken\n 80: optional WorkflowQuery query\n 90: optional TaskList WorkflowExecutionTaskList\n 100: optional i64 (js.type = \"Long\") scheduledTimestamp\n 110: optional i64 (js.type = \"Long\") startedTimestamp\n 120: optional map queries\n 130: optional i64 (js.type = 'Long') nextEventId\n 140: optional i64 (js.type = 'Long') totalHistoryBytes\n}\n\nstruct StickyExecutionAttributes {\n 10: optional TaskList workerTaskList\n 20: optional i32 scheduleToStartTimeoutSeconds\n}\n\nstruct RespondDecisionTaskCompletedRequest {\n 10: optional binary taskToken\n 20: optional list decisions\n 30: optional binary executionContext\n 40: optional string identity\n 50: optional StickyExecutionAttributes stickyAttributes\n 60: optional bool returnNewDecisionTask\n 70: optional bool forceCreateNewDecisionTask\n 80: optional string binaryChecksum\n 90: optional map queryResults\n}\n\nstruct RespondDecisionTaskCompletedResponse {\n 10: optional PollForDecisionTaskResponse decisionTask\n 20: optional map activitiesToDispatchLocally\n}\n\nstruct RespondDecisionTaskFailedRequest {\n 10: optional binary taskToken\n 20: optional DecisionTaskFailedCause cause\n 30: optional binary details\n 40: optional string identity\n 50: optional string binaryChecksum\n}\n\nstruct PollForActivityTaskRequest {\n 10: optional string domain\n 20: optional TaskList taskList\n 30: optional string identity\n 40: optional TaskListMetadata taskListMetadata\n}\n\nstruct PollForActivityTaskResponse {\n 10: optional binary taskToken\n 20: optional WorkflowExecution workflowExecution\n 30: optional string activityId\n 40: optional ActivityType activityType\n 50: optional binary input\n 70: optional i64 (js.type = \"Long\") scheduledTimestamp\n 80: optional i32 scheduleToCloseTimeoutSeconds\n 90: optional i64 (js.type = \"Long\") startedTimestamp\n 100: optional i32 startToCloseTimeoutSeconds\n 110: optional i32 heartbeatTimeoutSeconds\n 120: optional i32 attempt\n 130: optional i64 (js.type = \"Long\") scheduledTimestampOfThisAttempt\n 140: optional binary heartbeatDetails\n 150: optional WorkflowType workflowType\n 160: optional string workflowDomain\n 170: optional Header header\n}\n\nstruct RecordActivityTaskHeartbeatRequest {\n 10: optional binary taskToken\n 20: optional binary details\n 30: optional string identity\n}\n\nstruct RecordActivityTaskHeartbeatByIDRequest {\n 10: optional string domain\n 20: optional string workflowID\n 30: optional string runID\n 40: optional string activityID\n 50: optional binary details\n 60: optional string identity\n}\n\nstruct RecordActivityTaskHeartbeatResponse {\n 10: optional bool cancelRequested\n}\n\nstruct RespondActivityTaskCompletedRequest {\n 10: optional binary taskToken\n 20: optional binary result\n 30: optional string identity\n}\n\nstruct RespondActivityTaskFailedRequest {\n 10: optional binary taskToken\n 20: optional string reason\n 30: optional binary details\n 40: optional string identity\n}\n\nstruct RespondActivityTaskCanceledRequest {\n 10: optional binary taskToken\n 20: optional binary details\n 30: optional string identity\n}\n\nstruct RespondActivityTaskCompletedByIDRequest {\n 10: optional string domain\n 20: optional string workflowID\n 30: optional string runID\n 40: optional string activityID\n 50: optional binary result\n 60: optional string identity\n}\n\nstruct RespondActivityTaskFailedByIDRequest {\n 10: optional string domain\n 20: optional string workflowID\n 30: optional string runID\n 40: optional string activityID\n 50: optional string reason\n 60: optional binary details\n 70: optional string identity\n}\n\nstruct RespondActivityTaskCanceledByIDRequest {\n 10: optional string domain\n 20: optional string workflowID\n 30: optional string runID\n 40: optional string activityID\n 50: optional binary details\n 60: optional string identity\n}\n\nstruct RequestCancelWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional WorkflowExecution workflowExecution\n 30: optional string identity\n 40: optional string requestId\n 50: optional string cause\n 60: optional string firstExecutionRunID\n}\n\nstruct GetWorkflowExecutionHistoryRequest {\n 10: optional string domain\n 20: optional WorkflowExecution execution\n 30: optional i32 maximumPageSize\n 40: optional binary nextPageToken\n 50: optional bool waitForNewEvent\n 60: optional HistoryEventFilterType HistoryEventFilterType\n 70: optional bool skipArchival\n}\n\nstruct GetWorkflowExecutionHistoryResponse {\n 10: optional History history\n 11: optional list rawHistory\n 20: optional binary nextPageToken\n 30: optional bool archived\n}\n\nstruct SignalWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional WorkflowExecution workflowExecution\n 30: optional string signalName\n 40: optional binary input\n 50: optional string identity\n 60: optional string requestId\n 70: optional binary control\n}\n\nstruct SignalWithStartWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional string workflowId\n 30: optional WorkflowType workflowType\n 40: optional TaskList taskList\n 50: optional binary input\n 60: optional i32 executionStartToCloseTimeoutSeconds\n 70: optional i32 taskStartToCloseTimeoutSeconds\n 80: optional string identity\n 90: optional string requestId\n 100: optional WorkflowIdReusePolicy workflowIdReusePolicy\n 110: optional string signalName\n 120: optional binary signalInput\n 130: optional binary control\n 140: optional RetryPolicy retryPolicy\n 150: optional string cronSchedule\n 160: optional Memo memo\n 161: optional SearchAttributes searchAttributes\n 170: optional Header header\n 180: optional i32 delayStartSeconds\n 190: optional i32 jitterStartSeconds\n}\n\nstruct SignalWithStartWorkflowExecutionAsyncRequest {\n 10: optional SignalWithStartWorkflowExecutionRequest request\n}\n\nstruct SignalWithStartWorkflowExecutionAsyncResponse {\n}\n\nstruct RestartWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional WorkflowExecution workflowExecution\n 30: optional string reason\n 40: optional string identity\n}\nstruct TerminateWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional WorkflowExecution workflowExecution\n 30: optional string reason\n 40: optional binary details\n 50: optional string identity\n 60: optional string firstExecutionRunID\n}\n\nstruct ResetWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional WorkflowExecution workflowExecution\n 30: optional string reason\n 40: optional i64 (js.type = \"Long\") decisionFinishEventId\n 50: optional string requestId\n 60: optional bool skipSignalReapply\n}\n\nstruct ResetWorkflowExecutionResponse {\n 10: optional string runId\n}\n\nstruct ListOpenWorkflowExecutionsRequest {\n 10: optional string domain\n 20: optional i32 maximumPageSize\n 30: optional binary nextPageToken\n 40: optional StartTimeFilter StartTimeFilter\n 50: optional WorkflowExecutionFilter executionFilter\n 60: optional WorkflowTypeFilter typeFilter\n}\n\nstruct ListOpenWorkflowExecutionsResponse {\n 10: optional list executions\n 20: optional binary nextPageToken\n}\n\nstruct ListClosedWorkflowExecutionsRequest {\n 10: optional string domain\n 20: optional i32 maximumPageSize\n 30: optional binary nextPageToken\n 40: optional StartTimeFilter StartTimeFilter\n 50: optional WorkflowExecutionFilter executionFilter\n 60: optional WorkflowTypeFilter typeFilter\n 70: optional WorkflowExecutionCloseStatus statusFilter\n}\n\nstruct ListClosedWorkflowExecutionsResponse {\n 10: optional list executions\n 20: optional binary nextPageToken\n}\n\nstruct ListWorkflowExecutionsRequest {\n 10: optional string domain\n 20: optional i32 pageSize\n 30: optional binary nextPageToken\n 40: optional string query\n}\n\nstruct ListWorkflowExecutionsResponse {\n 10: optional list executions\n 20: optional binary nextPageToken\n}\n\nstruct ListArchivedWorkflowExecutionsRequest {\n 10: optional string domain\n 20: optional i32 pageSize\n 30: optional binary nextPageToken\n 40: optional string query\n}\n\nstruct ListArchivedWorkflowExecutionsResponse {\n 10: optional list executions\n 20: optional binary nextPageToken\n}\n\nstruct CountWorkflowExecutionsRequest {\n 10: optional string domain\n 20: optional string query\n}\n\nstruct CountWorkflowExecutionsResponse {\n 10: optional i64 count\n}\n\nstruct GetSearchAttributesResponse {\n 10: optional map keys\n}\n\nstruct QueryWorkflowRequest {\n 10: optional string domain\n 20: optional WorkflowExecution execution\n 30: optional WorkflowQuery query\n // QueryRejectCondition can used to reject the query if workflow state does not satisify condition\n 40: optional QueryRejectCondition queryRejectCondition\n 50: optional QueryConsistencyLevel queryConsistencyLevel\n}\n\nstruct QueryRejected {\n 10: optional WorkflowExecutionCloseStatus closeStatus\n}\n\nstruct QueryWorkflowResponse {\n 10: optional binary queryResult\n 20: optional QueryRejected queryRejected\n}\n\nstruct WorkflowQuery {\n 10: optional string queryType\n 20: optional binary queryArgs\n}\n\nstruct ResetStickyTaskListRequest {\n 10: optional string domain\n 20: optional WorkflowExecution execution\n}\n\nstruct ResetStickyTaskListResponse {\n // The reason to keep this response is to allow returning\n // information in the future.\n}\n\nstruct RespondQueryTaskCompletedRequest {\n 10: optional binary taskToken\n 20: optional QueryTaskCompletedType completedType\n 30: optional binary queryResult\n 40: optional string errorMessage\n 50: optional WorkerVersionInfo workerVersionInfo\n}\n\nstruct WorkflowQueryResult {\n 10: optional QueryResultType resultType\n 20: optional binary answer\n 30: optional string errorMessage\n}\n\nstruct DescribeWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional WorkflowExecution execution\n}\n\nstruct PendingActivityInfo {\n 10: optional string activityID\n 20: optional ActivityType activityType\n 30: optional PendingActivityState state\n 40: optional binary heartbeatDetails\n 50: optional i64 (js.type = \"Long\") lastHeartbeatTimestamp\n 60: optional i64 (js.type = \"Long\") lastStartedTimestamp\n 70: optional i32 attempt\n 80: optional i32 maximumAttempts\n 90: optional i64 (js.type = \"Long\") scheduledTimestamp\n 100: optional i64 (js.type = \"Long\") expirationTimestamp\n 110: optional string lastFailureReason\n 120: optional string lastWorkerIdentity\n 130: optional binary lastFailureDetails\n 140: optional string startedWorkerIdentity\n}\n\nstruct PendingDecisionInfo {\n 10: optional PendingDecisionState state\n 20: optional i64 (js.type = \"Long\") scheduledTimestamp\n 30: optional i64 (js.type = \"Long\") startedTimestamp\n 40: optional i64 attempt\n 50: optional i64 (js.type = \"Long\") originalScheduledTimestamp\n}\n\nstruct PendingChildExecutionInfo {\n 1: optional string domain\n 10: optional string workflowID\n 20: optional string runID\n 30: optional string workflowTypName\n 40: optional i64 (js.type = \"Long\") initiatedID\n 50: optional ParentClosePolicy parentClosePolicy\n}\n\nstruct DescribeWorkflowExecutionResponse {\n 10: optional WorkflowExecutionConfiguration executionConfiguration\n 20: optional WorkflowExecutionInfo workflowExecutionInfo\n 30: optional list pendingActivities\n 40: optional list pendingChildren\n 50: optional PendingDecisionInfo pendingDecision\n}\n\nstruct DescribeTaskListRequest {\n 10: optional string domain\n 20: optional TaskList taskList\n 30: optional TaskListType taskListType\n 40: optional bool includeTaskListStatus\n}\n\nstruct DescribeTaskListResponse {\n 10: optional list pollers\n 20: optional TaskListStatus taskListStatus\n}\n\nstruct GetTaskListsByDomainRequest {\n 10: optional string domainName\n}\n\nstruct GetTaskListsByDomainResponse {\n 10: optional map decisionTaskListMap\n 20: optional map activityTaskListMap\n}\n\nstruct ListTaskListPartitionsRequest {\n 10: optional string domain\n 20: optional TaskList taskList\n}\n\nstruct TaskListPartitionMetadata {\n 10: optional string key\n 20: optional string ownerHostName\n}\n\nstruct ListTaskListPartitionsResponse {\n 10: optional list activityTaskListPartitions\n 20: optional list decisionTaskListPartitions\n}\n\nstruct TaskListStatus {\n 10: optional i64 (js.type = \"Long\") backlogCountHint\n 20: optional i64 (js.type = \"Long\") readLevel\n 30: optional i64 (js.type = \"Long\") ackLevel\n 35: optional double ratePerSecond\n 40: optional TaskIDBlock taskIDBlock\n}\n\nstruct TaskIDBlock {\n 10: optional i64 (js.type = \"Long\") startID\n 20: optional i64 (js.type = \"Long\") endID\n}\n\n//At least one of the parameters needs to be provided\nstruct DescribeHistoryHostRequest {\n 10: optional string hostAddress //ip:port\n 20: optional i32 shardIdForHost\n 30: optional WorkflowExecution executionForHost\n}\n\nstruct RemoveTaskRequest {\n 10: optional i32 shardID\n 20: optional i32 type\n 30: optional i64 (js.type = \"Long\") taskID\n 40: optional i64 (js.type = \"Long\") visibilityTimestamp\n 50: optional string clusterName\n}\n\nstruct CloseShardRequest {\n 10: optional i32 shardID\n}\n\nstruct ResetQueueRequest {\n 10: optional i32 shardID\n 20: optional string clusterName\n 30: optional i32 type\n}\n\nstruct DescribeQueueRequest {\n 10: optional i32 shardID\n 20: optional string clusterName\n 30: optional i32 type\n}\n\nstruct DescribeQueueResponse {\n 10: optional list processingQueueStates\n}\n\nstruct DescribeShardDistributionRequest {\n 10: optional i32 pageSize\n 20: optional i32 pageID\n}\n\nstruct DescribeShardDistributionResponse {\n 10: optional i32 numberOfShards\n\n // ShardID to Address (ip:port) map\n 20: optional map shards\n}\n\nstruct DescribeHistoryHostResponse{\n 10: optional i32 numberOfShards\n 20: optional list shardIDs\n 30: optional DomainCacheInfo domainCache\n 40: optional string shardControllerStatus\n 50: optional string address\n}\n\nstruct DomainCacheInfo{\n 10: optional i64 numOfItemsInCacheByID\n 20: optional i64 numOfItemsInCacheByName\n}\n\nenum TaskListType {\n /*\n * Decision type of tasklist\n */\n Decision,\n /*\n * Activity type of tasklist\n */\n Activity,\n}\n\nstruct PollerInfo {\n // Unix Nano\n 10: optional i64 (js.type = \"Long\") lastAccessTime\n 20: optional string identity\n 30: optional double ratePerSecond\n}\n\nstruct RetryPolicy {\n // Interval of the first retry. If coefficient is 1.0 then it is used for all retries.\n 10: optional i32 initialIntervalInSeconds\n\n // Coefficient used to calculate the next retry interval.\n // The next retry interval is previous interval multiplied by the coefficient.\n // Must be 1 or larger.\n 20: optional double backoffCoefficient\n\n // Maximum interval between retries. Exponential backoff leads to interval increase.\n // This value is the cap of the increase. Default is 100x of initial interval.\n 30: optional i32 maximumIntervalInSeconds\n\n // Maximum number of attempts. When exceeded the retries stop even if not expired yet.\n // Must be 1 or bigger. Default is unlimited.\n 40: optional i32 maximumAttempts\n\n // Non-Retriable errors. Will stop retrying if error matches this list.\n 50: optional list nonRetriableErrorReasons\n\n // Expiration time for the whole retry process.\n 60: optional i32 expirationIntervalInSeconds\n}\n\n// HistoryBranchRange represents a piece of range for a branch.\nstruct HistoryBranchRange{\n // branchID of original branch forked from\n 10: optional string branchID\n // beinning node for the range, inclusive\n 20: optional i64 beginNodeID\n // ending node for the range, exclusive\n 30: optional i64 endNodeID\n}\n\n// For history persistence to serialize/deserialize branch details\nstruct HistoryBranch{\n 10: optional string treeID\n 20: optional string branchID\n 30: optional list ancestors\n}\n\n// VersionHistoryItem contains signal eventID and the corresponding version\nstruct VersionHistoryItem{\n 10: optional i64 (js.type = \"Long\") eventID\n 20: optional i64 (js.type = \"Long\") version\n}\n\n// VersionHistory contains the version history of a branch\nstruct VersionHistory{\n 10: optional binary branchToken\n 20: optional list items\n}\n\n// VersionHistories contains all version histories from all branches\nstruct VersionHistories{\n 10: optional i32 currentVersionHistoryIndex\n 20: optional list histories\n}\n\n// ReapplyEventsRequest is the request for reapply events API\nstruct ReapplyEventsRequest{\n 10: optional string domainName\n 20: optional WorkflowExecution workflowExecution\n 30: optional DataBlob events\n}\n\n// SupportedClientVersions contains the support versions for client library\nstruct SupportedClientVersions{\n 10: optional string goSdk\n 20: optional string javaSdk\n}\n\n// ClusterInfo contains information about cadence cluster\nstruct ClusterInfo{\n 10: optional SupportedClientVersions supportedClientVersions\n}\n\nstruct RefreshWorkflowTasksRequest {\n 10: optional string domain\n 20: optional WorkflowExecution execution\n}\n\nstruct FeatureFlags {\n\t10: optional bool WorkflowExecutionAlreadyCompletedErrorEnabled\n}\n\nenum CrossClusterTaskType {\n StartChildExecution\n CancelExecution\n SignalExecution\n RecordChildWorkflowExecutionComplete\n ApplyParentClosePolicy\n}\n\nenum CrossClusterTaskFailedCause {\n DOMAIN_NOT_ACTIVE\n DOMAIN_NOT_EXISTS\n WORKFLOW_ALREADY_RUNNING\n WORKFLOW_NOT_EXISTS\n WORKFLOW_ALREADY_COMPLETED\n UNCATEGORIZED\n}\n\nenum GetTaskFailedCause {\n SERVICE_BUSY\n TIMEOUT\n SHARD_OWNERSHIP_LOST\n UNCATEGORIZED\n}\n\nstruct CrossClusterTaskInfo {\n 10: optional string domainID\n 20: optional string workflowID\n 30: optional string runID\n 40: optional CrossClusterTaskType taskType\n 50: optional i16 taskState\n 60: optional i64 (js.type = \"Long\") taskID\n 70: optional i64 (js.type = \"Long\") visibilityTimestamp\n}\n\nstruct CrossClusterStartChildExecutionRequestAttributes {\n 10: optional string targetDomainID\n 20: optional string requestID\n 30: optional i64 (js.type = \"Long\") initiatedEventID\n 40: optional StartChildWorkflowExecutionInitiatedEventAttributes initiatedEventAttributes\n // targetRunID is for scheduling first decision task\n // targetWorkflowID is available in initiatedEventAttributes\n 50: optional string targetRunID\n 60: optional map partitionConfig\n}\n\nstruct CrossClusterStartChildExecutionResponseAttributes {\n 10: optional string runID\n}\n\nstruct CrossClusterCancelExecutionRequestAttributes {\n 10: optional string targetDomainID\n 20: optional string targetWorkflowID\n 30: optional string targetRunID\n 40: optional string requestID\n 50: optional i64 (js.type = \"Long\") initiatedEventID\n 60: optional bool childWorkflowOnly\n}\n\nstruct CrossClusterCancelExecutionResponseAttributes {\n}\n\nstruct CrossClusterSignalExecutionRequestAttributes {\n 10: optional string targetDomainID\n 20: optional string targetWorkflowID\n 30: optional string targetRunID\n 40: optional string requestID\n 50: optional i64 (js.type = \"Long\") initiatedEventID\n 60: optional bool childWorkflowOnly\n 70: optional string signalName\n 80: optional binary signalInput\n 90: optional binary control\n}\n\nstruct CrossClusterSignalExecutionResponseAttributes {\n}\n\nstruct CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes {\n 10: optional string targetDomainID\n 20: optional string targetWorkflowID\n 30: optional string targetRunID\n 40: optional i64 (js.type = \"Long\") initiatedEventID\n 50: optional HistoryEvent completionEvent\n}\n\nstruct CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes {\n}\n\nstruct ApplyParentClosePolicyAttributes {\n 10: optional string childDomainID\n 20: optional string childWorkflowID\n 30: optional string childRunID\n 40: optional ParentClosePolicy parentClosePolicy\n}\n\nstruct ApplyParentClosePolicyStatus {\n 10: optional bool completed\n 20: optional CrossClusterTaskFailedCause failedCause\n}\n\nstruct ApplyParentClosePolicyRequest {\n 10: optional ApplyParentClosePolicyAttributes child\n 20: optional ApplyParentClosePolicyStatus status\n}\n\nstruct CrossClusterApplyParentClosePolicyRequestAttributes {\n 10: optional list children\n}\n\nstruct ApplyParentClosePolicyResult {\n 10: optional ApplyParentClosePolicyAttributes child\n 20: optional CrossClusterTaskFailedCause failedCause\n}\n\nstruct CrossClusterApplyParentClosePolicyResponseAttributes {\n 10: optional list childrenStatus\n}\n\nstruct CrossClusterTaskRequest {\n 10: optional CrossClusterTaskInfo taskInfo\n 20: optional CrossClusterStartChildExecutionRequestAttributes startChildExecutionAttributes\n 30: optional CrossClusterCancelExecutionRequestAttributes cancelExecutionAttributes\n 40: optional CrossClusterSignalExecutionRequestAttributes signalExecutionAttributes\n 50: optional CrossClusterRecordChildWorkflowExecutionCompleteRequestAttributes recordChildWorkflowExecutionCompleteAttributes\n 60: optional CrossClusterApplyParentClosePolicyRequestAttributes applyParentClosePolicyAttributes\n}\n\nstruct CrossClusterTaskResponse {\n 10: optional i64 (js.type = \"Long\") taskID\n 20: optional CrossClusterTaskType taskType\n 30: optional i16 taskState\n 40: optional CrossClusterTaskFailedCause failedCause\n 50: optional CrossClusterStartChildExecutionResponseAttributes startChildExecutionAttributes\n 60: optional CrossClusterCancelExecutionResponseAttributes cancelExecutionAttributes\n 70: optional CrossClusterSignalExecutionResponseAttributes signalExecutionAttributes\n 80: optional CrossClusterRecordChildWorkflowExecutionCompleteResponseAttributes recordChildWorkflowExecutionCompleteAttributes\n 90: optional CrossClusterApplyParentClosePolicyResponseAttributes applyParentClosePolicyAttributes\n}\n\nstruct GetCrossClusterTasksRequest {\n 10: optional list shardIDs\n 20: optional string targetCluster\n}\n\nstruct GetCrossClusterTasksResponse {\n 10: optional map> tasksByShard\n 20: optional map failedCauseByShard\n}\n\nstruct RespondCrossClusterTasksCompletedRequest {\n 10: optional i32 shardID\n 20: optional string targetCluster\n 30: optional list taskResponses\n 40: optional bool fetchNewTasks\n}\n\nstruct RespondCrossClusterTasksCompletedResponse {\n 10: optional list tasks\n}\n\nenum IsolationGroupState {\n INVALID,\n HEALTHY,\n DRAINED,\n}\n\nstruct IsolationGroupPartition {\n 10: optional string name\n 20: optional IsolationGroupState state\n}\n\nstruct IsolationGroupConfiguration {\n 10: optional list isolationGroups\n}\n\nstruct AsyncWorkflowConfiguration {\n 10: optional bool enabled\n // PredefinedQueueName is the name of the predefined queue in cadence server config's asyncWorkflowQueues\n 20: optional string predefinedQueueName\n // queueType is the type of the queue if predefined_queue_name is not used\n 30: optional string queueType\n // queueConfig is the configuration for the queue if predefined_queue_name is not used\n 40: optional DataBlob queueConfig\n}\n" diff --git a/go.mod b/go.mod index 09266bb50..ad5586570 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible github.com/stretchr/testify v1.8.1 github.com/uber-go/tally v3.3.15+incompatible - github.com/uber/cadence-idl v0.0.0-20230905165949-03586319b849 + github.com/uber/cadence-idl v0.0.0-20240212223805-34b4519b2709 github.com/uber/jaeger-client-go v2.22.1+incompatible github.com/uber/tchannel-go v1.32.1 go.uber.org/atomic v1.9.0 diff --git a/go.sum b/go.sum index 25c49bf8e..7ee115cc6 100644 --- a/go.sum +++ b/go.sum @@ -208,6 +208,8 @@ github.com/uber-go/tally v3.3.15+incompatible h1:9hLSgNBP28CjIaDmAuRTq9qV+UZY+9P github.com/uber-go/tally v3.3.15+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU= github.com/uber/cadence-idl v0.0.0-20230905165949-03586319b849 h1:j3bfADG1t35Lt4rNRpc9AuQ3l2cGw2Ao25Qt6rDamgc= github.com/uber/cadence-idl v0.0.0-20230905165949-03586319b849/go.mod h1:oyUK7GCNCRHCCyWyzifSzXpVrRYVBbAMHAzF5dXiKws= +github.com/uber/cadence-idl v0.0.0-20240212223805-34b4519b2709 h1:1u+kMB6p8P9fjK6jk3QHAl8PxLyNjO9/TMXoPOVr1O8= +github.com/uber/cadence-idl v0.0.0-20240212223805-34b4519b2709/go.mod h1:oyUK7GCNCRHCCyWyzifSzXpVrRYVBbAMHAzF5dXiKws= github.com/uber/jaeger-client-go v2.22.1+incompatible h1:NHcubEkVbahf9t3p75TOCR83gdUHXjRJvjoBh1yACsM= github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= diff --git a/idls b/idls index 03586319b..34b4519b2 160000 --- a/idls +++ b/idls @@ -1 +1 @@ -Subproject commit 03586319b849f683308f8a772aadb6323147ee74 +Subproject commit 34b4519b270945fbb38f413137dfb50b5fc20af7 diff --git a/internal/common/auth/service_wrapper.go b/internal/common/auth/service_wrapper.go index af0e60706..c11421a9a 100644 --- a/internal/common/auth/service_wrapper.go +++ b/internal/common/auth/service_wrapper.go @@ -24,9 +24,10 @@ import ( "context" "github.com/golang-jwt/jwt/v5" + "go.uber.org/yarpc" + "go.uber.org/cadence/.gen/go/cadence/workflowserviceclient" "go.uber.org/cadence/.gen/go/shared" - "go.uber.org/yarpc" ) const ( @@ -342,6 +343,16 @@ func (w *workflowServiceAuthWrapper) SignalWithStartWorkflowExecution(ctx contex return result, err } +func (w *workflowServiceAuthWrapper) SignalWithStartWorkflowExecutionAsync(ctx context.Context, request *shared.SignalWithStartWorkflowExecutionAsyncRequest, opts ...yarpc.CallOption) (*shared.SignalWithStartWorkflowExecutionAsyncResponse, error) { + tokenHeader, err := w.getYarpcJWTHeader() + if err != nil { + return nil, err + } + opts = append(opts, *tokenHeader) + result, err := w.service.SignalWithStartWorkflowExecutionAsync(ctx, request, opts...) + return result, err +} + func (w *workflowServiceAuthWrapper) StartWorkflowExecution(ctx context.Context, request *shared.StartWorkflowExecutionRequest, opts ...yarpc.CallOption) (*shared.StartWorkflowExecutionResponse, error) { tokenHeader, err := w.getYarpcJWTHeader() if err != nil { @@ -352,6 +363,16 @@ func (w *workflowServiceAuthWrapper) StartWorkflowExecution(ctx context.Context, return result, err } +func (w *workflowServiceAuthWrapper) StartWorkflowExecutionAsync(ctx context.Context, request *shared.StartWorkflowExecutionAsyncRequest, opts ...yarpc.CallOption) (*shared.StartWorkflowExecutionAsyncResponse, error) { + tokenHeader, err := w.getYarpcJWTHeader() + if err != nil { + return nil, err + } + opts = append(opts, *tokenHeader) + result, err := w.service.StartWorkflowExecutionAsync(ctx, request, opts...) + return result, err +} + func (w *workflowServiceAuthWrapper) TerminateWorkflowExecution(ctx context.Context, request *shared.TerminateWorkflowExecutionRequest, opts ...yarpc.CallOption) error { tokenHeader, err := w.getYarpcJWTHeader() if err != nil { diff --git a/internal/common/auth/service_wrapper_test.go b/internal/common/auth/service_wrapper_test.go index 2db357ab0..840f0dddd 100644 --- a/internal/common/auth/service_wrapper_test.go +++ b/internal/common/auth/service_wrapper_test.go @@ -508,6 +508,22 @@ func (s *serviceWrapperSuite) TestSignalWithStartWorkflowExecutionInvalidToken() s.EqualError(err, "error") } +func (s *serviceWrapperSuite) TestSignalWithStartWorkflowExecutionAsyncToken() { + s.Service.EXPECT().SignalWithStartWorkflowExecutionAsync(gomock.Any(), gomock.Any(), gomock.Any()).Times(1) + sw := NewWorkflowServiceWrapper(s.Service, s.AuthProvider) + ctx, _ := thrift.NewContext(time.Minute) + _, err := sw.SignalWithStartWorkflowExecutionAsync(ctx, &shared.SignalWithStartWorkflowExecutionAsyncRequest{}) + s.NoError(err) +} + +func (s *serviceWrapperSuite) TestSignalWithStartWorkflowExecutionAsyncInvalidToken() { + s.AuthProvider = newJWTAuthIncorrect() + sw := NewWorkflowServiceWrapper(s.Service, s.AuthProvider) + ctx, _ := thrift.NewContext(time.Minute) + _, err := sw.SignalWithStartWorkflowExecutionAsync(ctx, &shared.SignalWithStartWorkflowExecutionAsyncRequest{}) + s.EqualError(err, "error") +} + func (s *serviceWrapperSuite) TestStartWorkflowExecutionToken() { s.Service.EXPECT().StartWorkflowExecution(gomock.Any(), gomock.Any(), gomock.Any()).Times(1) sw := NewWorkflowServiceWrapper(s.Service, s.AuthProvider) @@ -524,6 +540,22 @@ func (s *serviceWrapperSuite) TestStartWorkflowExecutionInvalidToken() { s.EqualError(err, "error") } +func (s *serviceWrapperSuite) TestStartWorkflowExecutionAsyncToken() { + s.Service.EXPECT().StartWorkflowExecutionAsync(gomock.Any(), gomock.Any(), gomock.Any()).Times(1) + sw := NewWorkflowServiceWrapper(s.Service, s.AuthProvider) + ctx, _ := thrift.NewContext(time.Minute) + _, err := sw.StartWorkflowExecutionAsync(ctx, &shared.StartWorkflowExecutionAsyncRequest{}) + s.NoError(err) +} + +func (s *serviceWrapperSuite) TestStartWorkflowExecutionAsyncInvalidToken() { + s.AuthProvider = newJWTAuthIncorrect() + sw := NewWorkflowServiceWrapper(s.Service, s.AuthProvider) + ctx, _ := thrift.NewContext(time.Minute) + _, err := sw.StartWorkflowExecutionAsync(ctx, &shared.StartWorkflowExecutionAsyncRequest{}) + s.EqualError(err, "error") +} + func (s *serviceWrapperSuite) TestTerminateWorkflowExecutionToken() { s.Service.EXPECT().TerminateWorkflowExecution(gomock.Any(), gomock.Any(), gomock.Any()).Times(1) sw := NewWorkflowServiceWrapper(s.Service, s.AuthProvider) diff --git a/internal/common/isolationgroup/service_wrapper.go b/internal/common/isolationgroup/service_wrapper.go index 953e379ad..0ad7072b0 100644 --- a/internal/common/isolationgroup/service_wrapper.go +++ b/internal/common/isolationgroup/service_wrapper.go @@ -211,12 +211,24 @@ func (w *workflowServiceIsolationGroupWrapper) SignalWithStartWorkflowExecution( return result, err } +func (w *workflowServiceIsolationGroupWrapper) SignalWithStartWorkflowExecutionAsync(ctx context.Context, request *shared.SignalWithStartWorkflowExecutionAsyncRequest, opts ...yarpc.CallOption) (*shared.SignalWithStartWorkflowExecutionAsyncResponse, error) { + opts = append(opts, w.getIsolationGroupIdentifier()) + result, err := w.service.SignalWithStartWorkflowExecutionAsync(ctx, request, opts...) + return result, err +} + func (w *workflowServiceIsolationGroupWrapper) StartWorkflowExecution(ctx context.Context, request *shared.StartWorkflowExecutionRequest, opts ...yarpc.CallOption) (*shared.StartWorkflowExecutionResponse, error) { opts = append(opts, w.getIsolationGroupIdentifier()) result, err := w.service.StartWorkflowExecution(ctx, request, opts...) return result, err } +func (w *workflowServiceIsolationGroupWrapper) StartWorkflowExecutionAsync(ctx context.Context, request *shared.StartWorkflowExecutionAsyncRequest, opts ...yarpc.CallOption) (*shared.StartWorkflowExecutionAsyncResponse, error) { + opts = append(opts, w.getIsolationGroupIdentifier()) + result, err := w.service.StartWorkflowExecutionAsync(ctx, request, opts...) + return result, err +} + func (w *workflowServiceIsolationGroupWrapper) TerminateWorkflowExecution(ctx context.Context, request *shared.TerminateWorkflowExecutionRequest, opts ...yarpc.CallOption) error { opts = append(opts, w.getIsolationGroupIdentifier()) err := w.service.TerminateWorkflowExecution(ctx, request, opts...) diff --git a/internal/common/isolationgroup/service_wrapper_test.go b/internal/common/isolationgroup/service_wrapper_test.go index 5504526c4..d299268eb 100644 --- a/internal/common/isolationgroup/service_wrapper_test.go +++ b/internal/common/isolationgroup/service_wrapper_test.go @@ -200,7 +200,6 @@ func TestAPICalls(t *testing.T) { m.EXPECT().RespondActivityTaskCanceled(gomock.Any(), &shared.RespondActivityTaskCanceledRequest{}, gomock.Any()).Times(1).Return(nil) }, }, - "RespondActivityTaskCompleted": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return nil, sw.RespondActivityTaskCompleted(ctx, &shared.RespondActivityTaskCompletedRequest{}) @@ -209,7 +208,6 @@ func TestAPICalls(t *testing.T) { m.EXPECT().RespondActivityTaskCompleted(gomock.Any(), &shared.RespondActivityTaskCompletedRequest{}, gomock.Any()).Times(1).Return(nil) }, }, - "RespondActivityTaskFailed": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return nil, sw.RespondActivityTaskFailed(ctx, &shared.RespondActivityTaskFailedRequest{}) @@ -218,7 +216,6 @@ func TestAPICalls(t *testing.T) { m.EXPECT().RespondActivityTaskFailed(gomock.Any(), &shared.RespondActivityTaskFailedRequest{}, gomock.Any()).Times(1).Return(nil) }, }, - "RespondActivityTaskCompletedByID": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return nil, sw.RespondActivityTaskCompletedByID(ctx, &shared.RespondActivityTaskCompletedByIDRequest{}) @@ -227,7 +224,6 @@ func TestAPICalls(t *testing.T) { m.EXPECT().RespondActivityTaskCompletedByID(gomock.Any(), &shared.RespondActivityTaskCompletedByIDRequest{}, gomock.Any()).Times(1).Return(nil) }, }, - "RespondActivityTaskCanceledByID": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return nil, sw.RespondActivityTaskCanceledByID(ctx, &shared.RespondActivityTaskCanceledByIDRequest{}) @@ -236,7 +232,6 @@ func TestAPICalls(t *testing.T) { m.EXPECT().RespondActivityTaskCanceledByID(gomock.Any(), &shared.RespondActivityTaskCanceledByIDRequest{}, gomock.Any()).Times(1).Return(nil) }, }, - "RespondActivityTaskFailedByID": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return nil, sw.RespondActivityTaskFailedByID(ctx, &shared.RespondActivityTaskFailedByIDRequest{}) @@ -245,7 +240,6 @@ func TestAPICalls(t *testing.T) { m.EXPECT().RespondActivityTaskFailedByID(gomock.Any(), &shared.RespondActivityTaskFailedByIDRequest{}, gomock.Any()).Times(1).Return(nil) }, }, - "RespondDecisionTaskCompleted": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return sw.RespondDecisionTaskCompleted(ctx, &shared.RespondDecisionTaskCompletedRequest{}) @@ -255,7 +249,6 @@ func TestAPICalls(t *testing.T) { }, expectedResponse: &shared.RespondDecisionTaskCompletedResponse{}, }, - "RespondDecisionTaskFailed": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return nil, sw.RespondDecisionTaskFailed(ctx, &shared.RespondDecisionTaskFailedRequest{}) @@ -272,7 +265,6 @@ func TestAPICalls(t *testing.T) { m.EXPECT().SignalWorkflowExecution(gomock.Any(), &shared.SignalWorkflowExecutionRequest{}, gomock.Any()).Times(1).Return(nil) }, }, - "SignalWithStartWorkflowExecution": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return sw.SignalWithStartWorkflowExecution(ctx, &shared.SignalWithStartWorkflowExecutionRequest{}) @@ -282,7 +274,15 @@ func TestAPICalls(t *testing.T) { }, expectedResponse: &shared.StartWorkflowExecutionResponse{}, }, - + "SignalWithStartWorkflowExecutionAsync": { + action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { + return sw.SignalWithStartWorkflowExecutionAsync(ctx, &shared.SignalWithStartWorkflowExecutionAsyncRequest{}) + }, + affordance: func(m *workflowservicetest.MockClient) { + m.EXPECT().SignalWithStartWorkflowExecutionAsync(gomock.Any(), &shared.SignalWithStartWorkflowExecutionAsyncRequest{}, gomock.Any()).Times(1).Return(&shared.SignalWithStartWorkflowExecutionAsyncResponse{}, nil) + }, + expectedResponse: &shared.SignalWithStartWorkflowExecutionAsyncResponse{}, + }, "StartWorkflowExecution": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return sw.StartWorkflowExecution(ctx, &shared.StartWorkflowExecutionRequest{}) @@ -292,7 +292,15 @@ func TestAPICalls(t *testing.T) { }, expectedResponse: &shared.StartWorkflowExecutionResponse{}, }, - + "StartWorkflowExecutionAsync": { + action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { + return sw.StartWorkflowExecutionAsync(ctx, &shared.StartWorkflowExecutionAsyncRequest{}) + }, + affordance: func(m *workflowservicetest.MockClient) { + m.EXPECT().StartWorkflowExecutionAsync(gomock.Any(), &shared.StartWorkflowExecutionAsyncRequest{}, gomock.Any()).Times(1).Return(&shared.StartWorkflowExecutionAsyncResponse{}, nil) + }, + expectedResponse: &shared.StartWorkflowExecutionAsyncResponse{}, + }, "TerminateWorkflowExecution": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return nil, sw.TerminateWorkflowExecution(ctx, &shared.TerminateWorkflowExecutionRequest{}) @@ -301,7 +309,6 @@ func TestAPICalls(t *testing.T) { m.EXPECT().TerminateWorkflowExecution(gomock.Any(), &shared.TerminateWorkflowExecutionRequest{}, gomock.Any()).Times(1).Return(nil) }, }, - "ResetWorkflowExecution": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return sw.ResetWorkflowExecution(ctx, &shared.ResetWorkflowExecutionRequest{}) @@ -320,7 +327,6 @@ func TestAPICalls(t *testing.T) { }, expectedResponse: &shared.UpdateDomainResponse{}, }, - "QueryWorkflow": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return sw.QueryWorkflow(ctx, &shared.QueryWorkflowRequest{}) @@ -339,7 +345,6 @@ func TestAPICalls(t *testing.T) { }, expectedResponse: &shared.ResetStickyTaskListResponse{}, }, - "DescribeTaskList": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return sw.DescribeTaskList(ctx, &shared.DescribeTaskListRequest{}) @@ -349,7 +354,6 @@ func TestAPICalls(t *testing.T) { }, expectedResponse: &shared.DescribeTaskListResponse{}, }, - "RespondQueryTaskCompleted": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return nil, sw.RespondQueryTaskCompleted(ctx, &shared.RespondQueryTaskCompletedRequest{}) @@ -358,7 +362,6 @@ func TestAPICalls(t *testing.T) { m.EXPECT().RespondQueryTaskCompleted(gomock.Any(), &shared.RespondQueryTaskCompletedRequest{}, gomock.Any()).Times(1).Return(nil) }, }, - "GetSearchAttributes": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return sw.GetSearchAttributes(ctx) @@ -368,7 +371,6 @@ func TestAPICalls(t *testing.T) { }, expectedResponse: &shared.GetSearchAttributesResponse{}, }, - "ListTaskListPartitions": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return sw.ListTaskListPartitions(ctx, &shared.ListTaskListPartitionsRequest{}) @@ -378,7 +380,6 @@ func TestAPICalls(t *testing.T) { }, expectedResponse: &shared.ListTaskListPartitionsResponse{}, }, - "GetClusterInfo": { action: func(ctx context.Context, sw workflowserviceclient.Interface) (interface{}, error) { return sw.GetClusterInfo(ctx) diff --git a/internal/common/metrics/constants.go b/internal/common/metrics/constants.go index 31b78f189..136e674a5 100644 --- a/internal/common/metrics/constants.go +++ b/internal/common/metrics/constants.go @@ -115,8 +115,8 @@ const ( MemoryUsedStack = CadenceMetricsPrefix + "memory-used-stack" NumGoRoutines = CadenceMetricsPrefix + "num-go-routines" - EstimatedHistorySize = CadenceMetricsPrefix + "estimated-history-size" - ServerSideHistorySize = CadenceMetricsPrefix + "server-side-history-size" + EstimatedHistorySize = CadenceMetricsPrefix + "estimated-history-size" + ServerSideHistorySize = CadenceMetricsPrefix + "server-side-history-size" ConcurrentTaskQuota = CadenceMetricsPrefix + "concurrent-task-quota" PollerRequestBufferUsage = CadenceMetricsPrefix + "poller-request-buffer-usage" ) diff --git a/internal/common/metrics/service_wrapper.go b/internal/common/metrics/service_wrapper.go index 81e7e3b2f..a5d38933b 100644 --- a/internal/common/metrics/service_wrapper.go +++ b/internal/common/metrics/service_wrapper.go @@ -47,47 +47,49 @@ type ( ) const ( - scopeNameDeprecateDomain = CadenceMetricsPrefix + "DeprecateDomain" - scopeNameDescribeDomain = CadenceMetricsPrefix + "DescribeDomain" - scopeNameListDomains = CadenceMetricsPrefix + "ListDomains" - scopeNameGetWorkflowExecutionHistory = CadenceMetricsPrefix + "GetWorkflowExecutionHistory" - scopeNameGetWorkflowExecutionRawHistory = CadenceMetricsPrefix + "GetWorkflowExecutionRawHistory" - scopeNamePollForWorkflowExecutionRawHistory = CadenceMetricsPrefix + "PollForWorkflowExecutionRawHistory" - scopeNameListClosedWorkflowExecutions = CadenceMetricsPrefix + "ListClosedWorkflowExecutions" - scopeNameListOpenWorkflowExecutions = CadenceMetricsPrefix + "ListOpenWorkflowExecutions" - scopeNameListWorkflowExecutions = CadenceMetricsPrefix + "ListWorkflowExecutions" - scopeNameListArchivedWorkflowExecutions = CadenceMetricsPrefix + "ListArchviedExecutions" - scopeNameScanWorkflowExecutions = CadenceMetricsPrefix + "ScanWorkflowExecutions" - scopeNameCountWorkflowExecutions = CadenceMetricsPrefix + "CountWorkflowExecutions" - scopeNamePollForActivityTask = CadenceMetricsPrefix + "PollForActivityTask" - scopeNamePollForDecisionTask = CadenceMetricsPrefix + "PollForDecisionTask" - scopeNameRecordActivityTaskHeartbeat = CadenceMetricsPrefix + "RecordActivityTaskHeartbeat" - scopeNameRecordActivityTaskHeartbeatByID = CadenceMetricsPrefix + "RecordActivityTaskHeartbeatByID" - scopeNameRegisterDomain = CadenceMetricsPrefix + "RegisterDomain" - scopeNameRequestCancelWorkflowExecution = CadenceMetricsPrefix + "RequestCancelWorkflowExecution" - scopeNameRespondActivityTaskCanceled = CadenceMetricsPrefix + "RespondActivityTaskCanceled" - scopeNameRespondActivityTaskCompleted = CadenceMetricsPrefix + "RespondActivityTaskCompleted" - scopeNameRespondActivityTaskFailed = CadenceMetricsPrefix + "RespondActivityTaskFailed" - scopeNameRespondActivityTaskCanceledByID = CadenceMetricsPrefix + "RespondActivityTaskCanceledByID" - scopeNameRespondActivityTaskCompletedByID = CadenceMetricsPrefix + "RespondActivityTaskCompletedByID" - scopeNameRespondActivityTaskFailedByID = CadenceMetricsPrefix + "RespondActivityTaskFailedByID" - scopeNameRespondDecisionTaskCompleted = CadenceMetricsPrefix + "RespondDecisionTaskCompleted" - scopeNameRespondDecisionTaskFailed = CadenceMetricsPrefix + "RespondDecisionTaskFailed" - scopeNameSignalWorkflowExecution = CadenceMetricsPrefix + "SignalWorkflowExecution" - scopeNameSignalWithStartWorkflowExecution = CadenceMetricsPrefix + "SignalWithStartWorkflowExecution" - scopeNameStartWorkflowExecution = CadenceMetricsPrefix + "StartWorkflowExecution" - scopeNameTerminateWorkflowExecution = CadenceMetricsPrefix + "TerminateWorkflowExecution" - scopeNameResetWorkflowExecution = CadenceMetricsPrefix + "ResetWorkflowExecution" - scopeNameUpdateDomain = CadenceMetricsPrefix + "UpdateDomain" - scopeNameQueryWorkflow = CadenceMetricsPrefix + "QueryWorkflow" - scopeNameDescribeTaskList = CadenceMetricsPrefix + "DescribeTaskList" - scopeNameRespondQueryTaskCompleted = CadenceMetricsPrefix + "RespondQueryTaskCompleted" - scopeNameDescribeWorkflowExecution = CadenceMetricsPrefix + "DescribeWorkflowExecution" - scopeNameResetStickyTaskList = CadenceMetricsPrefix + "ResetStickyTaskList" - scopeNameGetSearchAttributes = CadenceMetricsPrefix + "GetSearchAttributes" - scopeNameListTaskListPartitions = CadenceMetricsPrefix + "ListTaskListPartitions" - scopeNameGetClusterInfo = CadenceMetricsPrefix + "GetClusterInfo" - scopeRefreshWorkflowTasks = CadenceMetricsPrefix + "RefreshWorkflowTasks" + scopeNameDeprecateDomain = CadenceMetricsPrefix + "DeprecateDomain" + scopeNameDescribeDomain = CadenceMetricsPrefix + "DescribeDomain" + scopeNameListDomains = CadenceMetricsPrefix + "ListDomains" + scopeNameGetWorkflowExecutionHistory = CadenceMetricsPrefix + "GetWorkflowExecutionHistory" + scopeNameGetWorkflowExecutionRawHistory = CadenceMetricsPrefix + "GetWorkflowExecutionRawHistory" + scopeNamePollForWorkflowExecutionRawHistory = CadenceMetricsPrefix + "PollForWorkflowExecutionRawHistory" + scopeNameListClosedWorkflowExecutions = CadenceMetricsPrefix + "ListClosedWorkflowExecutions" + scopeNameListOpenWorkflowExecutions = CadenceMetricsPrefix + "ListOpenWorkflowExecutions" + scopeNameListWorkflowExecutions = CadenceMetricsPrefix + "ListWorkflowExecutions" + scopeNameListArchivedWorkflowExecutions = CadenceMetricsPrefix + "ListArchviedExecutions" + scopeNameScanWorkflowExecutions = CadenceMetricsPrefix + "ScanWorkflowExecutions" + scopeNameCountWorkflowExecutions = CadenceMetricsPrefix + "CountWorkflowExecutions" + scopeNamePollForActivityTask = CadenceMetricsPrefix + "PollForActivityTask" + scopeNamePollForDecisionTask = CadenceMetricsPrefix + "PollForDecisionTask" + scopeNameRecordActivityTaskHeartbeat = CadenceMetricsPrefix + "RecordActivityTaskHeartbeat" + scopeNameRecordActivityTaskHeartbeatByID = CadenceMetricsPrefix + "RecordActivityTaskHeartbeatByID" + scopeNameRegisterDomain = CadenceMetricsPrefix + "RegisterDomain" + scopeNameRequestCancelWorkflowExecution = CadenceMetricsPrefix + "RequestCancelWorkflowExecution" + scopeNameRespondActivityTaskCanceled = CadenceMetricsPrefix + "RespondActivityTaskCanceled" + scopeNameRespondActivityTaskCompleted = CadenceMetricsPrefix + "RespondActivityTaskCompleted" + scopeNameRespondActivityTaskFailed = CadenceMetricsPrefix + "RespondActivityTaskFailed" + scopeNameRespondActivityTaskCanceledByID = CadenceMetricsPrefix + "RespondActivityTaskCanceledByID" + scopeNameRespondActivityTaskCompletedByID = CadenceMetricsPrefix + "RespondActivityTaskCompletedByID" + scopeNameRespondActivityTaskFailedByID = CadenceMetricsPrefix + "RespondActivityTaskFailedByID" + scopeNameRespondDecisionTaskCompleted = CadenceMetricsPrefix + "RespondDecisionTaskCompleted" + scopeNameRespondDecisionTaskFailed = CadenceMetricsPrefix + "RespondDecisionTaskFailed" + scopeNameSignalWorkflowExecution = CadenceMetricsPrefix + "SignalWorkflowExecution" + scopeNameSignalWithStartWorkflowExecution = CadenceMetricsPrefix + "SignalWithStartWorkflowExecution" + scopeNameSignalWithStartWorkflowExecutionAsync = CadenceMetricsPrefix + "SignalWithStartWorkflowExecutionAsync" + scopeNameStartWorkflowExecution = CadenceMetricsPrefix + "StartWorkflowExecution" + scopeNameStartWorkflowExecutionAsync = CadenceMetricsPrefix + "StartWorkflowExecutionAsync" + scopeNameTerminateWorkflowExecution = CadenceMetricsPrefix + "TerminateWorkflowExecution" + scopeNameResetWorkflowExecution = CadenceMetricsPrefix + "ResetWorkflowExecution" + scopeNameUpdateDomain = CadenceMetricsPrefix + "UpdateDomain" + scopeNameQueryWorkflow = CadenceMetricsPrefix + "QueryWorkflow" + scopeNameDescribeTaskList = CadenceMetricsPrefix + "DescribeTaskList" + scopeNameRespondQueryTaskCompleted = CadenceMetricsPrefix + "RespondQueryTaskCompleted" + scopeNameDescribeWorkflowExecution = CadenceMetricsPrefix + "DescribeWorkflowExecution" + scopeNameResetStickyTaskList = CadenceMetricsPrefix + "ResetStickyTaskList" + scopeNameGetSearchAttributes = CadenceMetricsPrefix + "GetSearchAttributes" + scopeNameListTaskListPartitions = CadenceMetricsPrefix + "ListTaskListPartitions" + scopeNameGetClusterInfo = CadenceMetricsPrefix + "GetClusterInfo" + scopeRefreshWorkflowTasks = CadenceMetricsPrefix + "RefreshWorkflowTasks" ) // NewWorkflowServiceWrapper creates a new wrapper to WorkflowService that will emit metrics for each service call. @@ -321,6 +323,13 @@ func (w *workflowServiceMetricsWrapper) SignalWithStartWorkflowExecution(ctx con return result, err } +func (w *workflowServiceMetricsWrapper) SignalWithStartWorkflowExecutionAsync(ctx context.Context, request *shared.SignalWithStartWorkflowExecutionAsyncRequest, opts ...yarpc.CallOption) (*shared.SignalWithStartWorkflowExecutionAsyncResponse, error) { + scope := w.getOperationScope(scopeNameSignalWithStartWorkflowExecutionAsync) + result, err := w.service.SignalWithStartWorkflowExecutionAsync(ctx, request, opts...) + scope.handleError(err) + return result, err +} + func (w *workflowServiceMetricsWrapper) StartWorkflowExecution(ctx context.Context, request *shared.StartWorkflowExecutionRequest, opts ...yarpc.CallOption) (*shared.StartWorkflowExecutionResponse, error) { scope := w.getOperationScope(scopeNameStartWorkflowExecution) result, err := w.service.StartWorkflowExecution(ctx, request, opts...) @@ -328,6 +337,13 @@ func (w *workflowServiceMetricsWrapper) StartWorkflowExecution(ctx context.Conte return result, err } +func (w *workflowServiceMetricsWrapper) StartWorkflowExecutionAsync(ctx context.Context, request *shared.StartWorkflowExecutionAsyncRequest, opts ...yarpc.CallOption) (*shared.StartWorkflowExecutionAsyncResponse, error) { + scope := w.getOperationScope(scopeNameStartWorkflowExecutionAsync) + result, err := w.service.StartWorkflowExecutionAsync(ctx, request, opts...) + scope.handleError(err) + return result, err +} + func (w *workflowServiceMetricsWrapper) TerminateWorkflowExecution(ctx context.Context, request *shared.TerminateWorkflowExecutionRequest, opts ...yarpc.CallOption) error { scope := w.getOperationScope(scopeNameTerminateWorkflowExecution) err := w.service.TerminateWorkflowExecution(ctx, request, opts...) diff --git a/internal/common/metrics/service_wrapper_test.go b/internal/common/metrics/service_wrapper_test.go index e5ea638e6..6cbc2d4b1 100644 --- a/internal/common/metrics/service_wrapper_test.go +++ b/internal/common/metrics/service_wrapper_test.go @@ -88,7 +88,10 @@ func Test_Wrapper(t *testing.T) { {"RespondActivityTaskFailedByID", []interface{}{ctx, &s.RespondActivityTaskFailedByIDRequest{}}, []interface{}{nil}, []string{CadenceRequest}}, {"RespondDecisionTaskCompleted", []interface{}{ctx, &s.RespondDecisionTaskCompletedRequest{}}, []interface{}{nil, nil}, []string{CadenceRequest}}, {"SignalWorkflowExecution", []interface{}{ctx, &s.SignalWorkflowExecutionRequest{}}, []interface{}{nil}, []string{CadenceRequest}}, + {"SignalWithStartWorkflowExecution", []interface{}{ctx, &s.SignalWithStartWorkflowExecutionRequest{}}, []interface{}{&s.StartWorkflowExecutionResponse{}, nil}, []string{CadenceRequest}}, + {"SignalWithStartWorkflowExecutionAsync", []interface{}{ctx, &s.SignalWithStartWorkflowExecutionAsyncRequest{}}, []interface{}{&s.SignalWithStartWorkflowExecutionAsyncResponse{}, nil}, []string{CadenceRequest}}, {"StartWorkflowExecution", []interface{}{ctx, &s.StartWorkflowExecutionRequest{}}, []interface{}{&s.StartWorkflowExecutionResponse{}, nil}, []string{CadenceRequest}}, + {"StartWorkflowExecutionAsync", []interface{}{ctx, &s.StartWorkflowExecutionAsyncRequest{}}, []interface{}{&s.StartWorkflowExecutionAsyncResponse{}, nil}, []string{CadenceRequest}}, {"TerminateWorkflowExecution", []interface{}{ctx, &s.TerminateWorkflowExecutionRequest{}}, []interface{}{nil}, []string{CadenceRequest}}, {"ResetWorkflowExecution", []interface{}{ctx, &s.ResetWorkflowExecutionRequest{}}, []interface{}{&s.ResetWorkflowExecutionResponse{}, nil}, []string{CadenceRequest}}, {"UpdateDomain", []interface{}{ctx, &s.UpdateDomainRequest{}}, []interface{}{&s.UpdateDomainResponse{}, nil}, []string{CadenceRequest}}, @@ -160,10 +163,14 @@ func runTest( mockService.EXPECT().RespondDecisionTaskCompleted(gomock.Any(), gomock.Any(), gomock.Any()).Return(returns...) case "SignalWorkflowExecution": mockService.EXPECT().SignalWorkflowExecution(gomock.Any(), gomock.Any(), gomock.Any()).Return(returns...) - case "SignaWithStartlWorkflowExecution": + case "SignalWithStartWorkflowExecution": mockService.EXPECT().SignalWithStartWorkflowExecution(gomock.Any(), gomock.Any(), gomock.Any()).Return(returns...) + case "SignalWithStartWorkflowExecutionAsync": + mockService.EXPECT().SignalWithStartWorkflowExecutionAsync(gomock.Any(), gomock.Any(), gomock.Any()).Return(returns...) case "StartWorkflowExecution": mockService.EXPECT().StartWorkflowExecution(gomock.Any(), gomock.Any(), gomock.Any()).Return(returns...) + case "StartWorkflowExecutionAsync": + mockService.EXPECT().StartWorkflowExecutionAsync(gomock.Any(), gomock.Any(), gomock.Any()).Return(returns...) case "TerminateWorkflowExecution": mockService.EXPECT().TerminateWorkflowExecution(gomock.Any(), gomock.Any(), gomock.Any()).Return(returns...) case "ResetWorkflowExecution": diff --git a/internal/internal_event_handlers_test.go b/internal/internal_event_handlers_test.go index a624a567c..e7118858e 100644 --- a/internal/internal_event_handlers_test.go +++ b/internal/internal_event_handlers_test.go @@ -22,9 +22,10 @@ package internal import ( "encoding/json" - "go.uber.org/cadence/internal/common" "testing" + "go.uber.org/cadence/internal/common" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/zap" diff --git a/internal/internal_utils.go b/internal/internal_utils.go index 453078a49..f3a3695aa 100644 --- a/internal/internal_utils.go +++ b/internal/internal_utils.go @@ -26,13 +26,14 @@ import ( "context" "encoding/json" "fmt" - "go.uber.org/zap" "os" "os/signal" "strings" "syscall" "time" + "go.uber.org/zap" + "github.com/pborman/uuid" "github.com/uber-go/tally" "go.uber.org/yarpc" diff --git a/internal/jwt_authorization_test.go b/internal/jwt_authorization_test.go index c24e227af..d23e523b6 100644 --- a/internal/jwt_authorization_test.go +++ b/internal/jwt_authorization_test.go @@ -26,6 +26,7 @@ import ( "github.com/golang-jwt/jwt/v5" "github.com/stretchr/testify/assert" + "go.uber.org/cadence/internal/common/auth" "go.uber.org/cadence/internal/common/util" ) diff --git a/internal/oauth_authorization.go b/internal/oauth_authorization.go index 2d6ede574..2e2828438 100644 --- a/internal/oauth_authorization.go +++ b/internal/oauth_authorization.go @@ -25,9 +25,10 @@ import ( "fmt" "net/url" - "go.uber.org/cadence/internal/common/auth" "golang.org/x/oauth2" "golang.org/x/oauth2/clientcredentials" + + "go.uber.org/cadence/internal/common/auth" ) // OAuthAuthorizerConfig allows to configure external OAuth provider diff --git a/internal/oauth_authorization_test.go b/internal/oauth_authorization_test.go index 1b6fc81f2..006289b05 100644 --- a/internal/oauth_authorization_test.go +++ b/internal/oauth_authorization_test.go @@ -1,3 +1,23 @@ +// Copyright (c) 2021 Uber Technologies Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + package internal import ( diff --git a/internal/workflow_replayer_utils_test.go b/internal/workflow_replayer_utils_test.go index 3e2386dc3..d72f0605f 100644 --- a/internal/workflow_replayer_utils_test.go +++ b/internal/workflow_replayer_utils_test.go @@ -21,10 +21,12 @@ package internal import ( + "testing" + "github.com/stretchr/testify/assert" + "go.uber.org/cadence/.gen/go/shared" "go.uber.org/cadence/internal/common" - "testing" ) type matchReplayWithHistoryTestCase struct { diff --git a/test/replaytests/continue_as_new_wf.go b/test/replaytests/continue_as_new_wf.go index a09c83b89..a8f07d464 100644 --- a/test/replaytests/continue_as_new_wf.go +++ b/test/replaytests/continue_as_new_wf.go @@ -1,8 +1,29 @@ +// Copyright (c) 2021 Uber Technologies Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + package replaytests import ( - "go.uber.org/cadence/workflow" "go.uber.org/zap" + + "go.uber.org/cadence/workflow" ) // ContinueAsNewWorkflow is a sample Cadence workflows that can receive a signal diff --git a/test/replaytests/sequential_workflow.go b/test/replaytests/sequential_workflow.go index be1de74f7..d735f250b 100644 --- a/test/replaytests/sequential_workflow.go +++ b/test/replaytests/sequential_workflow.go @@ -25,9 +25,10 @@ import ( "fmt" "time" + "go.uber.org/zap" + "go.uber.org/cadence/activity" "go.uber.org/cadence/workflow" - "go.uber.org/zap" ) type replayerSampleMessage struct { From 08cde0b8fd572057841ac6a84cf789284f70c38d Mon Sep 17 00:00:00 2001 From: taylan isikdemir Date: Mon, 18 Mar 2024 11:42:27 -0700 Subject: [PATCH 2/2] compat layer --- internal/compatibility/adapter.go | 10 ++++++++++ internal/compatibility/proto/request.go | 19 +++++++++++++++++++ internal/compatibility/thrift/response.go | 14 ++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/internal/compatibility/adapter.go b/internal/compatibility/adapter.go index 5a7709b11..93846088c 100644 --- a/internal/compatibility/adapter.go +++ b/internal/compatibility/adapter.go @@ -219,6 +219,11 @@ func (a thrift2protoAdapter) SignalWithStartWorkflowExecution(ctx context.Contex return thrift.SignalWithStartWorkflowExecutionResponse(response), thrift.Error(err) } +func (a thrift2protoAdapter) SignalWithStartWorkflowExecutionAsync(ctx context.Context, request *shared.SignalWithStartWorkflowExecutionAsyncRequest, opts ...yarpc.CallOption) (*shared.SignalWithStartWorkflowExecutionAsyncResponse, error) { + response, err := a.workflow.SignalWithStartWorkflowExecutionAsync(ctx, proto.SignalWithStartWorkflowExecutionAsyncRequest(request), opts...) + return thrift.SignalWithStartWorkflowExecutionAsyncResponse(response), thrift.Error(err) +} + func (a thrift2protoAdapter) SignalWorkflowExecution(ctx context.Context, request *shared.SignalWorkflowExecutionRequest, opts ...yarpc.CallOption) error { _, err := a.workflow.SignalWorkflowExecution(ctx, proto.SignalWorkflowExecutionRequest(request), opts...) return thrift.Error(err) @@ -229,6 +234,11 @@ func (a thrift2protoAdapter) StartWorkflowExecution(ctx context.Context, request return thrift.StartWorkflowExecutionResponse(response), thrift.Error(err) } +func (a thrift2protoAdapter) StartWorkflowExecutionAsync(ctx context.Context, request *shared.StartWorkflowExecutionAsyncRequest, opts ...yarpc.CallOption) (*shared.StartWorkflowExecutionAsyncResponse, error) { + response, err := a.workflow.StartWorkflowExecutionAsync(ctx, proto.StartWorkflowExecutionAsyncRequest(request), opts...) + return thrift.StartWorkflowExecutionAsyncResponse(response), thrift.Error(err) +} + func (a thrift2protoAdapter) TerminateWorkflowExecution(ctx context.Context, request *shared.TerminateWorkflowExecutionRequest, opts ...yarpc.CallOption) error { _, err := a.workflow.TerminateWorkflowExecution(ctx, proto.TerminateWorkflowExecutionRequest(request), opts...) return thrift.Error(err) diff --git a/internal/compatibility/proto/request.go b/internal/compatibility/proto/request.go index 368040994..29d7dc654 100644 --- a/internal/compatibility/proto/request.go +++ b/internal/compatibility/proto/request.go @@ -417,6 +417,16 @@ func SignalWithStartWorkflowExecutionRequest(t *shared.SignalWithStartWorkflowEx } } +func SignalWithStartWorkflowExecutionAsyncRequest(t *shared.SignalWithStartWorkflowExecutionAsyncRequest) *apiv1.SignalWithStartWorkflowExecutionAsyncRequest { + if t == nil { + return nil + } + + return &apiv1.SignalWithStartWorkflowExecutionAsyncRequest{ + Request: SignalWithStartWorkflowExecutionRequest(t.GetRequest()), + } +} + func SignalWorkflowExecutionRequest(t *shared.SignalWorkflowExecutionRequest) *apiv1.SignalWorkflowExecutionRequest { if t == nil { return nil @@ -457,6 +467,15 @@ func StartWorkflowExecutionRequest(t *shared.StartWorkflowExecutionRequest) *api } } +func StartWorkflowExecutionAsyncRequest(t *shared.StartWorkflowExecutionAsyncRequest) *apiv1.StartWorkflowExecutionAsyncRequest { + if t == nil { + return nil + } + return &apiv1.StartWorkflowExecutionAsyncRequest{ + Request: StartWorkflowExecutionRequest(t.GetRequest()), + } +} + func TerminateWorkflowExecutionRequest(t *shared.TerminateWorkflowExecutionRequest) *apiv1.TerminateWorkflowExecutionRequest { if t == nil { return nil diff --git a/internal/compatibility/thrift/response.go b/internal/compatibility/thrift/response.go index 1247618b6..7f24d7364 100644 --- a/internal/compatibility/thrift/response.go +++ b/internal/compatibility/thrift/response.go @@ -293,6 +293,13 @@ func SignalWithStartWorkflowExecutionResponse(t *apiv1.SignalWithStartWorkflowEx } } +func SignalWithStartWorkflowExecutionAsyncResponse(t *apiv1.SignalWithStartWorkflowExecutionAsyncResponse) *shared.SignalWithStartWorkflowExecutionAsyncResponse { + if t == nil { + return nil + } + return &shared.SignalWithStartWorkflowExecutionAsyncResponse{} +} + func StartWorkflowExecutionResponse(t *apiv1.StartWorkflowExecutionResponse) *shared.StartWorkflowExecutionResponse { if t == nil { return nil @@ -302,6 +309,13 @@ func StartWorkflowExecutionResponse(t *apiv1.StartWorkflowExecutionResponse) *sh } } +func StartWorkflowExecutionAsyncResponse(t *apiv1.StartWorkflowExecutionAsyncResponse) *shared.StartWorkflowExecutionAsyncResponse { + if t == nil { + return nil + } + return &shared.StartWorkflowExecutionAsyncResponse{} +} + func UpdateDomainResponse(t *apiv1.UpdateDomainResponse) *shared.UpdateDomainResponse { if t == nil || t.Domain == nil { return nil