diff --git a/.gen/go/cadence/cadence.go b/.gen/go/cadence/cadence.go index b986e9d3383..b4e91d7e941 100644 --- a/.gen/go/cadence/cadence.go +++ b/.gen/go/cadence/cadence.go @@ -22,14 +22,14 @@ var ThriftModule = &thriftreflect.ThriftModule{ Name: "cadence", Package: "github.com/uber/cadence/.gen/go/cadence", FilePath: "cadence.thrift", - SHA1: "4ad1f024ec41ab1b9d2c2f79c53b5857bc14b868", + SHA1: "f60ed994cde3a2436b8aa4a67d5cfa8eb78836ef", 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 6: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 7: shared.AccessDeniedError accessDeniedError,\n )\n\n /**\n * FailoverDomain is used to failover a registered domain to different cluster.\n **/\n shared.FailoverDomainResponse FailoverDomain(1: shared.FailoverDomainRequest failoverRequest)\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 7: shared.AccessDeniedError accessDeniedError,\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 7: shared.AccessDeniedError accessDeniedError,\n )\n\n /**\n * DeleteDomain permanently removes a domain record. This operation:\n * - Requires domain to be in DEPRECATED status\n * - Cannot be performed on domains with running workflows\n * - Is irreversible and removes all domain data\n * - Requires proper permissions and security token\n **/\n void DeleteDomain(1: shared.DeleteDomainRequest deleteRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 2: shared.ServiceBusyError serviceBusyError,\n 3: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 4: shared.AccessDeniedError accessDeniedError,\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 7: shared.AccessDeniedError accessDeniedError,\n )\n\n /**\n * DiagnoseWorkflowExecution diagnoses a previous workflow execution\n **/\n shared.DiagnoseWorkflowExecutionResponse DiagnoseWorkflowExecution(1: shared.DiagnoseWorkflowExecutionRequest diagnoseRequest)\n throws (\n 1: shared.DomainNotActiveError domainNotActiveError,\n 2: shared.ServiceBusyError serviceBusyError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 5: shared.AccessDeniedError accessDeniedError,\n )\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 8: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 8: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 10: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 8: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 7: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 4: shared.AccessDeniedError accessDeniedError,\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 8: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 8: shared.AccessDeniedError accessDeniedError,\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 7: shared.AccessDeniedError accessDeniedError,\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 7: shared.AccessDeniedError accessDeniedError,\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 3: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 5: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 7: shared.AccessDeniedError accessDeniedError,\n )\n\n /**\n * FailoverDomain is used to failover a registered domain to different cluster.\n **/\n shared.FailoverDomainResponse FailoverDomain(1: shared.FailoverDomainRequest failoverRequest)\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 7: shared.AccessDeniedError accessDeniedError,\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 7: shared.AccessDeniedError accessDeniedError,\n )\n\n /**\n * DeleteDomain permanently removes a domain record. This operation:\n * - Requires domain to be in DEPRECATED status\n * - Cannot be performed on domains with running workflows\n * - Is irreversible and removes all domain data\n * - Requires proper permissions and security token\n **/\n void DeleteDomain(1: shared.DeleteDomainRequest deleteRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 2: shared.ServiceBusyError serviceBusyError,\n 3: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 4: shared.AccessDeniedError accessDeniedError,\n )\n\n /**\n * ListFailoverHistory returns the history of failover events for a domain.\n **/\n shared.ListFailoverHistoryResponse ListFailoverHistory(1: shared.ListFailoverHistoryRequest listRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 2: shared.ServiceBusyError serviceBusyError,\n 3: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 4: shared.AccessDeniedError accessDeniedError,\n )\n\n /**\n * GetFailoverEvent returns the cluster failovers that occurred as part of a specific failover event.\n * To construct the request, use:\n * - domain_id: the id of the domain to fetch the failover event for.\n * - failover_event_id: the id of the failover event to fetch.\n * - created_time: the time the failover event was created.\n **/\n shared.GetFailoverEventResponse GetFailoverEvent(1: shared.GetFailoverEventRequest getRequest)\n throws (\n 1: shared.BadRequestError badRequestError,\n 2: shared.ServiceBusyError serviceBusyError,\n 3: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 4: shared.AccessDeniedError accessDeniedError,\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 7: shared.AccessDeniedError accessDeniedError,\n )\n\n /**\n * DiagnoseWorkflowExecution diagnoses a previous workflow execution\n **/\n shared.DiagnoseWorkflowExecutionResponse DiagnoseWorkflowExecution(1: shared.DiagnoseWorkflowExecutionRequest diagnoseRequest)\n throws (\n 1: shared.DomainNotActiveError domainNotActiveError,\n 2: shared.ServiceBusyError serviceBusyError,\n 3: shared.EntityNotExistsError entityNotExistError,\n 4: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,\n 5: shared.AccessDeniedError accessDeniedError,\n )\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 8: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 8: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 10: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 8: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 7: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 4: shared.AccessDeniedError accessDeniedError,\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 8: shared.AccessDeniedError accessDeniedError,\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 9: shared.AccessDeniedError accessDeniedError,\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 8: shared.AccessDeniedError accessDeniedError,\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 7: shared.AccessDeniedError accessDeniedError,\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 7: shared.AccessDeniedError accessDeniedError,\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 3: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 6: shared.AccessDeniedError accessDeniedError,\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 5: shared.AccessDeniedError accessDeniedError,\n )\n}\n" // WorkflowService_CountWorkflowExecutions_Args represents the arguments for the WorkflowService.CountWorkflowExecutions function. // @@ -8837,13 +8837,14 @@ func (v *WorkflowService_GetClusterInfo_Result) EnvelopeType() wire.EnvelopeType return wire.Reply } -// WorkflowService_GetSearchAttributes_Args represents the arguments for the WorkflowService.GetSearchAttributes function. +// WorkflowService_GetFailoverEvent_Args represents the arguments for the WorkflowService.GetFailoverEvent function. // -// The arguments for GetSearchAttributes are sent and received over the wire as this struct. -type WorkflowService_GetSearchAttributes_Args struct { +// The arguments for GetFailoverEvent are sent and received over the wire as this struct. +type WorkflowService_GetFailoverEvent_Args struct { + GetRequest *shared.GetFailoverEventRequest `json:"getRequest,omitempty"` } -// ToWire translates a WorkflowService_GetSearchAttributes_Args struct into a Thrift-level intermediate +// ToWire translates a WorkflowService_GetFailoverEvent_Args struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -8858,20 +8859,37 @@ type WorkflowService_GetSearchAttributes_Args struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_GetSearchAttributes_Args) ToWire() (wire.Value, error) { +func (v *WorkflowService_GetFailoverEvent_Args) ToWire() (wire.Value, error) { var ( - fields [0]wire.Field + fields [1]wire.Field i int = 0 + w wire.Value + err error ) + if v.GetRequest != nil { + w, err = v.GetRequest.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 } -// FromWire deserializes a WorkflowService_GetSearchAttributes_Args struct from its Thrift-level +func _GetFailoverEventRequest_Read(w wire.Value) (*shared.GetFailoverEventRequest, error) { + var v shared.GetFailoverEventRequest + err := v.FromWire(w) + return &v, err +} + +// FromWire deserializes a WorkflowService_GetFailoverEvent_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_GetSearchAttributes_Args struct +// An error is returned if we were unable to build a WorkflowService_GetFailoverEvent_Args struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -8879,39 +8897,66 @@ func (v *WorkflowService_GetSearchAttributes_Args) ToWire() (wire.Value, error) // return nil, err // } // -// var v WorkflowService_GetSearchAttributes_Args +// var v WorkflowService_GetFailoverEvent_Args // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_GetSearchAttributes_Args) FromWire(w wire.Value) error { +func (v *WorkflowService_GetFailoverEvent_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.GetRequest, err = _GetFailoverEventRequest_Read(field.Value) + if err != nil { + return err + } + + } } } return nil } -// Encode serializes a WorkflowService_GetSearchAttributes_Args struct directly into bytes, without going +// Encode serializes a WorkflowService_GetFailoverEvent_Args struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a WorkflowService_GetSearchAttributes_Args struct could not be encoded. -func (v *WorkflowService_GetSearchAttributes_Args) Encode(sw stream.Writer) error { +// An error is returned if a WorkflowService_GetFailoverEvent_Args struct could not be encoded. +func (v *WorkflowService_GetFailoverEvent_Args) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } + if v.GetRequest != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil { + return err + } + if err := v.GetRequest.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + return sw.WriteStructEnd() } -// Decode deserializes a WorkflowService_GetSearchAttributes_Args struct directly from its Thrift-level +func _GetFailoverEventRequest_Decode(sr stream.Reader) (*shared.GetFailoverEventRequest, error) { + var v shared.GetFailoverEventRequest + err := v.Decode(sr) + return &v, err +} + +// Decode deserializes a WorkflowService_GetFailoverEvent_Args struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a WorkflowService_GetSearchAttributes_Args struct could not be generated from the wire +// An error is returned if a WorkflowService_GetFailoverEvent_Args struct could not be generated from the wire // representation. -func (v *WorkflowService_GetSearchAttributes_Args) Decode(sr stream.Reader) error { +func (v *WorkflowService_GetFailoverEvent_Args) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -8924,6 +8969,12 @@ func (v *WorkflowService_GetSearchAttributes_Args) Decode(sr stream.Reader) erro for ok { switch { + case fh.ID == 1 && fh.Type == wire.TStruct: + v.GetRequest, err = _GetFailoverEventRequest_Decode(sr) + if err != nil { + return err + } + default: if err := sr.Skip(fh.Type); err != nil { return err @@ -8946,107 +8997,140 @@ func (v *WorkflowService_GetSearchAttributes_Args) Decode(sr stream.Reader) erro return nil } -// String returns a readable string representation of a WorkflowService_GetSearchAttributes_Args +// String returns a readable string representation of a WorkflowService_GetFailoverEvent_Args // struct. -func (v *WorkflowService_GetSearchAttributes_Args) String() string { +func (v *WorkflowService_GetFailoverEvent_Args) String() string { if v == nil { return "" } - var fields [0]string + var fields [1]string i := 0 + if v.GetRequest != nil { + fields[i] = fmt.Sprintf("GetRequest: %v", v.GetRequest) + i++ + } - return fmt.Sprintf("WorkflowService_GetSearchAttributes_Args{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_GetFailoverEvent_Args{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_GetSearchAttributes_Args match the -// provided WorkflowService_GetSearchAttributes_Args. +// Equals returns true if all the fields of this WorkflowService_GetFailoverEvent_Args match the +// provided WorkflowService_GetFailoverEvent_Args. // // This function performs a deep comparison. -func (v *WorkflowService_GetSearchAttributes_Args) Equals(rhs *WorkflowService_GetSearchAttributes_Args) bool { +func (v *WorkflowService_GetFailoverEvent_Args) Equals(rhs *WorkflowService_GetFailoverEvent_Args) bool { if v == nil { return rhs == nil } else if rhs == nil { return false } + if !((v.GetRequest == nil && rhs.GetRequest == nil) || (v.GetRequest != nil && rhs.GetRequest != nil && v.GetRequest.Equals(rhs.GetRequest))) { + return false + } return true } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_GetSearchAttributes_Args. -func (v *WorkflowService_GetSearchAttributes_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_GetFailoverEvent_Args. +func (v *WorkflowService_GetFailoverEvent_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } + if v.GetRequest != nil { + err = multierr.Append(err, enc.AddObject("getRequest", v.GetRequest)) + } return err } +// GetGetRequest returns the value of GetRequest if it is set or its +// zero value if it is unset. +func (v *WorkflowService_GetFailoverEvent_Args) GetGetRequest() (o *shared.GetFailoverEventRequest) { + if v != nil && v.GetRequest != nil { + return v.GetRequest + } + + return +} + +// IsSetGetRequest returns true if GetRequest is not nil. +func (v *WorkflowService_GetFailoverEvent_Args) IsSetGetRequest() bool { + return v != nil && v.GetRequest != 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 "GetSearchAttributes" for this struct. -func (v *WorkflowService_GetSearchAttributes_Args) MethodName() string { - return "GetSearchAttributes" +// This will always be "GetFailoverEvent" for this struct. +func (v *WorkflowService_GetFailoverEvent_Args) MethodName() string { + return "GetFailoverEvent" } // EnvelopeType returns the kind of value inside this struct. // // This will always be Call for this struct. -func (v *WorkflowService_GetSearchAttributes_Args) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_GetFailoverEvent_Args) EnvelopeType() wire.EnvelopeType { return wire.Call } -// WorkflowService_GetSearchAttributes_Helper provides functions that aid in handling the -// parameters and return values of the WorkflowService.GetSearchAttributes +// WorkflowService_GetFailoverEvent_Helper provides functions that aid in handling the +// parameters and return values of the WorkflowService.GetFailoverEvent // function. -var WorkflowService_GetSearchAttributes_Helper = struct { - // Args accepts the parameters of GetSearchAttributes in-order and returns +var WorkflowService_GetFailoverEvent_Helper = struct { + // Args accepts the parameters of GetFailoverEvent in-order and returns // the arguments struct for the function. - Args func() *WorkflowService_GetSearchAttributes_Args + Args func( + getRequest *shared.GetFailoverEventRequest, + ) *WorkflowService_GetFailoverEvent_Args // IsException returns true if the given error can be thrown - // by GetSearchAttributes. + // by GetFailoverEvent. // - // An error can be thrown by GetSearchAttributes only if the + // An error can be thrown by GetFailoverEvent 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 GetSearchAttributes + // WrapResponse returns the result struct for GetFailoverEvent // given its return value and error. // // This allows mapping values and errors returned by - // GetSearchAttributes into a serializable result struct. + // GetFailoverEvent into a serializable result struct. // WrapResponse returns a non-nil error if the provided - // error cannot be thrown by GetSearchAttributes + // error cannot be thrown by GetFailoverEvent // - // value, err := GetSearchAttributes(args) - // result, err := WorkflowService_GetSearchAttributes_Helper.WrapResponse(value, err) + // value, err := GetFailoverEvent(args) + // result, err := WorkflowService_GetFailoverEvent_Helper.WrapResponse(value, err) // if err != nil { - // return fmt.Errorf("unexpected error from GetSearchAttributes: %v", err) + // return fmt.Errorf("unexpected error from GetFailoverEvent: %v", err) // } // serialize(result) - WrapResponse func(*shared.GetSearchAttributesResponse, error) (*WorkflowService_GetSearchAttributes_Result, error) + WrapResponse func(*shared.GetFailoverEventResponse, error) (*WorkflowService_GetFailoverEvent_Result, error) - // UnwrapResponse takes the result struct for GetSearchAttributes + // UnwrapResponse takes the result struct for GetFailoverEvent // and returns the value or error returned by it. // - // The error is non-nil only if GetSearchAttributes threw an + // The error is non-nil only if GetFailoverEvent threw an // exception. // // result := deserialize(bytes) - // value, err := WorkflowService_GetSearchAttributes_Helper.UnwrapResponse(result) - UnwrapResponse func(*WorkflowService_GetSearchAttributes_Result) (*shared.GetSearchAttributesResponse, error) + // value, err := WorkflowService_GetFailoverEvent_Helper.UnwrapResponse(result) + UnwrapResponse func(*WorkflowService_GetFailoverEvent_Result) (*shared.GetFailoverEventResponse, error) }{} func init() { - WorkflowService_GetSearchAttributes_Helper.Args = func() *WorkflowService_GetSearchAttributes_Args { - return &WorkflowService_GetSearchAttributes_Args{} + WorkflowService_GetFailoverEvent_Helper.Args = func( + getRequest *shared.GetFailoverEventRequest, + ) *WorkflowService_GetFailoverEvent_Args { + return &WorkflowService_GetFailoverEvent_Args{ + GetRequest: getRequest, + } } - WorkflowService_GetSearchAttributes_Helper.IsException = func(err error) bool { + WorkflowService_GetFailoverEvent_Helper.IsException = func(err error) bool { switch err.(type) { + case *shared.BadRequestError: + return true case *shared.ServiceBusyError: return true case *shared.ClientVersionNotSupportedError: @@ -9058,32 +9142,41 @@ func init() { } } - WorkflowService_GetSearchAttributes_Helper.WrapResponse = func(success *shared.GetSearchAttributesResponse, err error) (*WorkflowService_GetSearchAttributes_Result, error) { + WorkflowService_GetFailoverEvent_Helper.WrapResponse = func(success *shared.GetFailoverEventResponse, err error) (*WorkflowService_GetFailoverEvent_Result, error) { if err == nil { - return &WorkflowService_GetSearchAttributes_Result{Success: success}, nil + return &WorkflowService_GetFailoverEvent_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_GetFailoverEvent_Result.BadRequestError") + } + return &WorkflowService_GetFailoverEvent_Result{BadRequestError: e}, nil case *shared.ServiceBusyError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetSearchAttributes_Result.ServiceBusyError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetFailoverEvent_Result.ServiceBusyError") } - return &WorkflowService_GetSearchAttributes_Result{ServiceBusyError: e}, nil + return &WorkflowService_GetFailoverEvent_Result{ServiceBusyError: e}, nil case *shared.ClientVersionNotSupportedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetSearchAttributes_Result.ClientVersionNotSupportedError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetFailoverEvent_Result.ClientVersionNotSupportedError") } - return &WorkflowService_GetSearchAttributes_Result{ClientVersionNotSupportedError: e}, nil + return &WorkflowService_GetFailoverEvent_Result{ClientVersionNotSupportedError: e}, nil case *shared.AccessDeniedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetSearchAttributes_Result.AccessDeniedError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetFailoverEvent_Result.AccessDeniedError") } - return &WorkflowService_GetSearchAttributes_Result{AccessDeniedError: e}, nil + return &WorkflowService_GetFailoverEvent_Result{AccessDeniedError: e}, nil } return nil, err } - WorkflowService_GetSearchAttributes_Helper.UnwrapResponse = func(result *WorkflowService_GetSearchAttributes_Result) (success *shared.GetSearchAttributesResponse, err error) { + WorkflowService_GetFailoverEvent_Helper.UnwrapResponse = func(result *WorkflowService_GetFailoverEvent_Result) (success *shared.GetFailoverEventResponse, err error) { + if result.BadRequestError != nil { + err = result.BadRequestError + return + } if result.ServiceBusyError != nil { err = result.ServiceBusyError return @@ -9108,20 +9201,21 @@ func init() { } -// WorkflowService_GetSearchAttributes_Result represents the result of a WorkflowService.GetSearchAttributes function call. +// WorkflowService_GetFailoverEvent_Result represents the result of a WorkflowService.GetFailoverEvent function call. // -// The result of a GetSearchAttributes execution is sent and received over the wire as this struct. +// The result of a GetFailoverEvent 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_GetSearchAttributes_Result struct { - // Value returned by GetSearchAttributes after a successful execution. - Success *shared.GetSearchAttributesResponse `json:"success,omitempty"` +type WorkflowService_GetFailoverEvent_Result struct { + // Value returned by GetFailoverEvent after a successful execution. + Success *shared.GetFailoverEventResponse `json:"success,omitempty"` + BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` AccessDeniedError *shared.AccessDeniedError `json:"accessDeniedError,omitempty"` } -// ToWire translates a WorkflowService_GetSearchAttributes_Result struct into a Thrift-level intermediate +// ToWire translates a WorkflowService_GetFailoverEvent_Result struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -9136,9 +9230,9 @@ type WorkflowService_GetSearchAttributes_Result struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_GetSearchAttributes_Result) ToWire() (wire.Value, error) { +func (v *WorkflowService_GetFailoverEvent_Result) ToWire() (wire.Value, error) { var ( - fields [4]wire.Field + fields [5]wire.Field i int = 0 w wire.Value err error @@ -9152,6 +9246,14 @@ func (v *WorkflowService_GetSearchAttributes_Result) ToWire() (wire.Value, error 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.ServiceBusyError != nil { w, err = v.ServiceBusyError.ToWire() if err != nil { @@ -9178,23 +9280,23 @@ func (v *WorkflowService_GetSearchAttributes_Result) ToWire() (wire.Value, error } if i != 1 { - return wire.Value{}, fmt.Errorf("WorkflowService_GetSearchAttributes_Result should have exactly one field: got %v fields", i) + return wire.Value{}, fmt.Errorf("WorkflowService_GetFailoverEvent_Result should have exactly one field: got %v fields", i) } return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _GetSearchAttributesResponse_Read(w wire.Value) (*shared.GetSearchAttributesResponse, error) { - var v shared.GetSearchAttributesResponse +func _GetFailoverEventResponse_Read(w wire.Value) (*shared.GetFailoverEventResponse, error) { + var v shared.GetFailoverEventResponse err := v.FromWire(w) return &v, err } -// FromWire deserializes a WorkflowService_GetSearchAttributes_Result struct from its Thrift-level +// FromWire deserializes a WorkflowService_GetFailoverEvent_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_GetSearchAttributes_Result struct +// An error is returned if we were unable to build a WorkflowService_GetFailoverEvent_Result struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -9202,19 +9304,27 @@ func _GetSearchAttributesResponse_Read(w wire.Value) (*shared.GetSearchAttribute // return nil, err // } // -// var v WorkflowService_GetSearchAttributes_Result +// var v WorkflowService_GetFailoverEvent_Result // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_GetSearchAttributes_Result) FromWire(w wire.Value) error { +func (v *WorkflowService_GetFailoverEvent_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 = _GetSearchAttributesResponse_Read(field.Value) + v.Success, err = _GetFailoverEventResponse_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 } @@ -9251,6 +9361,9 @@ func (v *WorkflowService_GetSearchAttributes_Result) FromWire(w wire.Value) erro if v.Success != nil { count++ } + if v.BadRequestError != nil { + count++ + } if v.ServiceBusyError != nil { count++ } @@ -9261,17 +9374,17 @@ func (v *WorkflowService_GetSearchAttributes_Result) FromWire(w wire.Value) erro count++ } if count != 1 { - return fmt.Errorf("WorkflowService_GetSearchAttributes_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_GetFailoverEvent_Result should have exactly one field: got %v fields", count) } return nil } -// Encode serializes a WorkflowService_GetSearchAttributes_Result struct directly into bytes, without going +// Encode serializes a WorkflowService_GetFailoverEvent_Result struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a WorkflowService_GetSearchAttributes_Result struct could not be encoded. -func (v *WorkflowService_GetSearchAttributes_Result) Encode(sw stream.Writer) error { +// An error is returned if a WorkflowService_GetFailoverEvent_Result struct could not be encoded. +func (v *WorkflowService_GetFailoverEvent_Result) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } @@ -9288,6 +9401,18 @@ func (v *WorkflowService_GetSearchAttributes_Result) Encode(sw stream.Writer) er } } + if v.BadRequestError != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil { + return err + } + if err := v.BadRequestError.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + if v.ServiceBusyError != nil { if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil { return err @@ -9328,6 +9453,9 @@ func (v *WorkflowService_GetSearchAttributes_Result) Encode(sw stream.Writer) er if v.Success != nil { count++ } + if v.BadRequestError != nil { + count++ + } if v.ServiceBusyError != nil { count++ } @@ -9339,24 +9467,24 @@ func (v *WorkflowService_GetSearchAttributes_Result) Encode(sw stream.Writer) er } if count != 1 { - return fmt.Errorf("WorkflowService_GetSearchAttributes_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_GetFailoverEvent_Result should have exactly one field: got %v fields", count) } return sw.WriteStructEnd() } -func _GetSearchAttributesResponse_Decode(sr stream.Reader) (*shared.GetSearchAttributesResponse, error) { - var v shared.GetSearchAttributesResponse +func _GetFailoverEventResponse_Decode(sr stream.Reader) (*shared.GetFailoverEventResponse, error) { + var v shared.GetFailoverEventResponse err := v.Decode(sr) return &v, err } -// Decode deserializes a WorkflowService_GetSearchAttributes_Result struct directly from its Thrift-level +// Decode deserializes a WorkflowService_GetFailoverEvent_Result struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a WorkflowService_GetSearchAttributes_Result struct could not be generated from the wire +// An error is returned if a WorkflowService_GetFailoverEvent_Result struct could not be generated from the wire // representation. -func (v *WorkflowService_GetSearchAttributes_Result) Decode(sr stream.Reader) error { +func (v *WorkflowService_GetFailoverEvent_Result) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -9370,7 +9498,13 @@ func (v *WorkflowService_GetSearchAttributes_Result) Decode(sr stream.Reader) er for ok { switch { case fh.ID == 0 && fh.Type == wire.TStruct: - v.Success, err = _GetSearchAttributesResponse_Decode(sr) + v.Success, err = _GetFailoverEventResponse_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 1 && fh.Type == wire.TStruct: + v.BadRequestError, err = _BadRequestError_Decode(sr) if err != nil { return err } @@ -9416,6 +9550,9 @@ func (v *WorkflowService_GetSearchAttributes_Result) Decode(sr stream.Reader) er if v.Success != nil { count++ } + if v.BadRequestError != nil { + count++ + } if v.ServiceBusyError != nil { count++ } @@ -9426,25 +9563,29 @@ func (v *WorkflowService_GetSearchAttributes_Result) Decode(sr stream.Reader) er count++ } if count != 1 { - return fmt.Errorf("WorkflowService_GetSearchAttributes_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_GetFailoverEvent_Result should have exactly one field: got %v fields", count) } return nil } -// String returns a readable string representation of a WorkflowService_GetSearchAttributes_Result +// String returns a readable string representation of a WorkflowService_GetFailoverEvent_Result // struct. -func (v *WorkflowService_GetSearchAttributes_Result) String() string { +func (v *WorkflowService_GetFailoverEvent_Result) String() string { if v == nil { return "" } - var fields [4]string + var fields [5]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.ServiceBusyError != nil { fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError) i++ @@ -9458,14 +9599,14 @@ func (v *WorkflowService_GetSearchAttributes_Result) String() string { i++ } - return fmt.Sprintf("WorkflowService_GetSearchAttributes_Result{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_GetFailoverEvent_Result{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_GetSearchAttributes_Result match the -// provided WorkflowService_GetSearchAttributes_Result. +// Equals returns true if all the fields of this WorkflowService_GetFailoverEvent_Result match the +// provided WorkflowService_GetFailoverEvent_Result. // // This function performs a deep comparison. -func (v *WorkflowService_GetSearchAttributes_Result) Equals(rhs *WorkflowService_GetSearchAttributes_Result) bool { +func (v *WorkflowService_GetFailoverEvent_Result) Equals(rhs *WorkflowService_GetFailoverEvent_Result) bool { if v == nil { return rhs == nil } else if rhs == nil { @@ -9474,6 +9615,9 @@ func (v *WorkflowService_GetSearchAttributes_Result) Equals(rhs *WorkflowService 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.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) { return false } @@ -9488,14 +9632,17 @@ func (v *WorkflowService_GetSearchAttributes_Result) Equals(rhs *WorkflowService } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_GetSearchAttributes_Result. -func (v *WorkflowService_GetSearchAttributes_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_GetFailoverEvent_Result. +func (v *WorkflowService_GetFailoverEvent_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.ServiceBusyError != nil { err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError)) } @@ -9510,7 +9657,7 @@ func (v *WorkflowService_GetSearchAttributes_Result) MarshalLogObject(enc zapcor // GetSuccess returns the value of Success if it is set or its // zero value if it is unset. -func (v *WorkflowService_GetSearchAttributes_Result) GetSuccess() (o *shared.GetSearchAttributesResponse) { +func (v *WorkflowService_GetFailoverEvent_Result) GetSuccess() (o *shared.GetFailoverEventResponse) { if v != nil && v.Success != nil { return v.Success } @@ -9519,13 +9666,28 @@ func (v *WorkflowService_GetSearchAttributes_Result) GetSuccess() (o *shared.Get } // IsSetSuccess returns true if Success is not nil. -func (v *WorkflowService_GetSearchAttributes_Result) IsSetSuccess() bool { +func (v *WorkflowService_GetFailoverEvent_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_GetFailoverEvent_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_GetFailoverEvent_Result) IsSetBadRequestError() bool { + return v != nil && v.BadRequestError != nil +} + // GetServiceBusyError returns the value of ServiceBusyError if it is set or its // zero value if it is unset. -func (v *WorkflowService_GetSearchAttributes_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { +func (v *WorkflowService_GetFailoverEvent_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { if v != nil && v.ServiceBusyError != nil { return v.ServiceBusyError } @@ -9534,13 +9696,13 @@ func (v *WorkflowService_GetSearchAttributes_Result) GetServiceBusyError() (o *s } // IsSetServiceBusyError returns true if ServiceBusyError is not nil. -func (v *WorkflowService_GetSearchAttributes_Result) IsSetServiceBusyError() bool { +func (v *WorkflowService_GetFailoverEvent_Result) IsSetServiceBusyError() bool { return v != nil && v.ServiceBusyError != nil } // GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its // zero value if it is unset. -func (v *WorkflowService_GetSearchAttributes_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { +func (v *WorkflowService_GetFailoverEvent_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { if v != nil && v.ClientVersionNotSupportedError != nil { return v.ClientVersionNotSupportedError } @@ -9549,13 +9711,13 @@ func (v *WorkflowService_GetSearchAttributes_Result) GetClientVersionNotSupporte } // IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil. -func (v *WorkflowService_GetSearchAttributes_Result) IsSetClientVersionNotSupportedError() bool { +func (v *WorkflowService_GetFailoverEvent_Result) IsSetClientVersionNotSupportedError() bool { return v != nil && v.ClientVersionNotSupportedError != nil } // GetAccessDeniedError returns the value of AccessDeniedError if it is set or its // zero value if it is unset. -func (v *WorkflowService_GetSearchAttributes_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) { +func (v *WorkflowService_GetFailoverEvent_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) { if v != nil && v.AccessDeniedError != nil { return v.AccessDeniedError } @@ -9564,33 +9726,1847 @@ func (v *WorkflowService_GetSearchAttributes_Result) GetAccessDeniedError() (o * } // IsSetAccessDeniedError returns true if AccessDeniedError is not nil. -func (v *WorkflowService_GetSearchAttributes_Result) IsSetAccessDeniedError() bool { +func (v *WorkflowService_GetFailoverEvent_Result) IsSetAccessDeniedError() bool { return v != nil && v.AccessDeniedError != 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 "GetSearchAttributes" for this struct. -func (v *WorkflowService_GetSearchAttributes_Result) MethodName() string { +// This will always be "GetFailoverEvent" for this struct. +func (v *WorkflowService_GetFailoverEvent_Result) MethodName() string { + return "GetFailoverEvent" +} + +// EnvelopeType returns the kind of value inside this struct. +// +// This will always be Reply for this struct. +func (v *WorkflowService_GetFailoverEvent_Result) EnvelopeType() wire.EnvelopeType { + return wire.Reply +} + +// WorkflowService_GetSearchAttributes_Args represents the arguments for the WorkflowService.GetSearchAttributes function. +// +// The arguments for GetSearchAttributes are sent and received over the wire as this struct. +type WorkflowService_GetSearchAttributes_Args struct { +} + +// ToWire translates a WorkflowService_GetSearchAttributes_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_GetSearchAttributes_Args) ToWire() (wire.Value, error) { + var ( + fields [0]wire.Field + i int = 0 + ) + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +// FromWire deserializes a WorkflowService_GetSearchAttributes_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_GetSearchAttributes_Args struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v WorkflowService_GetSearchAttributes_Args +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *WorkflowService_GetSearchAttributes_Args) FromWire(w wire.Value) error { + + for _, field := range w.GetStruct().Fields { + switch field.ID { + } + } + + return nil +} + +// Encode serializes a WorkflowService_GetSearchAttributes_Args struct directly into bytes, without going +// through an intermediary type. +// +// An error is returned if a WorkflowService_GetSearchAttributes_Args struct could not be encoded. +func (v *WorkflowService_GetSearchAttributes_Args) Encode(sw stream.Writer) error { + if err := sw.WriteStructBegin(); err != nil { + return err + } + + return sw.WriteStructEnd() +} + +// Decode deserializes a WorkflowService_GetSearchAttributes_Args struct directly from its Thrift-level +// representation, without going through an intemediary type. +// +// An error is returned if a WorkflowService_GetSearchAttributes_Args struct could not be generated from the wire +// representation. +func (v *WorkflowService_GetSearchAttributes_Args) Decode(sr stream.Reader) error { + + if err := sr.ReadStructBegin(); err != nil { + return err + } + + fh, ok, err := sr.ReadFieldBegin() + if err != nil { + return err + } + + for ok { + switch { + default: + if err := sr.Skip(fh.Type); err != nil { + return err + } + } + + if err := sr.ReadFieldEnd(); err != nil { + return err + } + + if fh, ok, err = sr.ReadFieldBegin(); err != nil { + return err + } + } + + if err := sr.ReadStructEnd(); err != nil { + return err + } + + return nil +} + +// String returns a readable string representation of a WorkflowService_GetSearchAttributes_Args +// struct. +func (v *WorkflowService_GetSearchAttributes_Args) String() string { + if v == nil { + return "" + } + + var fields [0]string + i := 0 + + return fmt.Sprintf("WorkflowService_GetSearchAttributes_Args{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this WorkflowService_GetSearchAttributes_Args match the +// provided WorkflowService_GetSearchAttributes_Args. +// +// This function performs a deep comparison. +func (v *WorkflowService_GetSearchAttributes_Args) Equals(rhs *WorkflowService_GetSearchAttributes_Args) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of WorkflowService_GetSearchAttributes_Args. +func (v *WorkflowService_GetSearchAttributes_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + return err +} + +// MethodName returns the name of the Thrift function as specified in +// the IDL, for which this struct represent the arguments. +// +// This will always be "GetSearchAttributes" for this struct. +func (v *WorkflowService_GetSearchAttributes_Args) MethodName() string { return "GetSearchAttributes" } +// EnvelopeType returns the kind of value inside this struct. +// +// This will always be Call for this struct. +func (v *WorkflowService_GetSearchAttributes_Args) EnvelopeType() wire.EnvelopeType { + return wire.Call +} + +// WorkflowService_GetSearchAttributes_Helper provides functions that aid in handling the +// parameters and return values of the WorkflowService.GetSearchAttributes +// function. +var WorkflowService_GetSearchAttributes_Helper = struct { + // Args accepts the parameters of GetSearchAttributes in-order and returns + // the arguments struct for the function. + Args func() *WorkflowService_GetSearchAttributes_Args + + // IsException returns true if the given error can be thrown + // by GetSearchAttributes. + // + // An error can be thrown by GetSearchAttributes 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 GetSearchAttributes + // given its return value and error. + // + // This allows mapping values and errors returned by + // GetSearchAttributes into a serializable result struct. + // WrapResponse returns a non-nil error if the provided + // error cannot be thrown by GetSearchAttributes + // + // value, err := GetSearchAttributes(args) + // result, err := WorkflowService_GetSearchAttributes_Helper.WrapResponse(value, err) + // if err != nil { + // return fmt.Errorf("unexpected error from GetSearchAttributes: %v", err) + // } + // serialize(result) + WrapResponse func(*shared.GetSearchAttributesResponse, error) (*WorkflowService_GetSearchAttributes_Result, error) + + // UnwrapResponse takes the result struct for GetSearchAttributes + // and returns the value or error returned by it. + // + // The error is non-nil only if GetSearchAttributes threw an + // exception. + // + // result := deserialize(bytes) + // value, err := WorkflowService_GetSearchAttributes_Helper.UnwrapResponse(result) + UnwrapResponse func(*WorkflowService_GetSearchAttributes_Result) (*shared.GetSearchAttributesResponse, error) +}{} + +func init() { + WorkflowService_GetSearchAttributes_Helper.Args = func() *WorkflowService_GetSearchAttributes_Args { + return &WorkflowService_GetSearchAttributes_Args{} + } + + WorkflowService_GetSearchAttributes_Helper.IsException = func(err error) bool { + switch err.(type) { + case *shared.ServiceBusyError: + return true + case *shared.ClientVersionNotSupportedError: + return true + case *shared.AccessDeniedError: + return true + default: + return false + } + } + + WorkflowService_GetSearchAttributes_Helper.WrapResponse = func(success *shared.GetSearchAttributesResponse, err error) (*WorkflowService_GetSearchAttributes_Result, error) { + if err == nil { + return &WorkflowService_GetSearchAttributes_Result{Success: success}, nil + } + + switch e := err.(type) { + case *shared.ServiceBusyError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetSearchAttributes_Result.ServiceBusyError") + } + return &WorkflowService_GetSearchAttributes_Result{ServiceBusyError: e}, nil + case *shared.ClientVersionNotSupportedError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetSearchAttributes_Result.ClientVersionNotSupportedError") + } + return &WorkflowService_GetSearchAttributes_Result{ClientVersionNotSupportedError: e}, nil + case *shared.AccessDeniedError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetSearchAttributes_Result.AccessDeniedError") + } + return &WorkflowService_GetSearchAttributes_Result{AccessDeniedError: e}, nil + } + + return nil, err + } + WorkflowService_GetSearchAttributes_Helper.UnwrapResponse = func(result *WorkflowService_GetSearchAttributes_Result) (success *shared.GetSearchAttributesResponse, err error) { + if result.ServiceBusyError != nil { + err = result.ServiceBusyError + return + } + if result.ClientVersionNotSupportedError != nil { + err = result.ClientVersionNotSupportedError + return + } + if result.AccessDeniedError != nil { + err = result.AccessDeniedError + return + } + + if result.Success != nil { + success = result.Success + return + } + + err = errors.New("expected a non-void result") + return + } + +} + +// WorkflowService_GetSearchAttributes_Result represents the result of a WorkflowService.GetSearchAttributes function call. +// +// The result of a GetSearchAttributes 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_GetSearchAttributes_Result struct { + // Value returned by GetSearchAttributes after a successful execution. + Success *shared.GetSearchAttributesResponse `json:"success,omitempty"` + ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` + ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` + AccessDeniedError *shared.AccessDeniedError `json:"accessDeniedError,omitempty"` +} + +// ToWire translates a WorkflowService_GetSearchAttributes_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_GetSearchAttributes_Result) ToWire() (wire.Value, error) { + var ( + fields [4]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.ServiceBusyError != nil { + w, err = v.ServiceBusyError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 2, Value: w} + i++ + } + if v.ClientVersionNotSupportedError != nil { + w, err = v.ClientVersionNotSupportedError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 3, Value: w} + i++ + } + if v.AccessDeniedError != nil { + w, err = v.AccessDeniedError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 4, Value: w} + i++ + } + + if i != 1 { + return wire.Value{}, fmt.Errorf("WorkflowService_GetSearchAttributes_Result should have exactly one field: got %v fields", i) + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +func _GetSearchAttributesResponse_Read(w wire.Value) (*shared.GetSearchAttributesResponse, error) { + var v shared.GetSearchAttributesResponse + err := v.FromWire(w) + return &v, err +} + +// FromWire deserializes a WorkflowService_GetSearchAttributes_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_GetSearchAttributes_Result struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v WorkflowService_GetSearchAttributes_Result +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *WorkflowService_GetSearchAttributes_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 = _GetSearchAttributesResponse_Read(field.Value) + if err != nil { + return err + } + + } + case 2: + if field.Value.Type() == wire.TStruct { + v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value) + if err != nil { + return err + } + + } + case 3: + if field.Value.Type() == wire.TStruct { + v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value) + if err != nil { + return err + } + + } + case 4: + if field.Value.Type() == wire.TStruct { + v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value) + if err != nil { + return err + } + + } + } + } + + count := 0 + if v.Success != nil { + count++ + } + if v.ServiceBusyError != nil { + count++ + } + if v.ClientVersionNotSupportedError != nil { + count++ + } + if v.AccessDeniedError != nil { + count++ + } + if count != 1 { + return fmt.Errorf("WorkflowService_GetSearchAttributes_Result should have exactly one field: got %v fields", count) + } + + return nil +} + +// Encode serializes a WorkflowService_GetSearchAttributes_Result struct directly into bytes, without going +// through an intermediary type. +// +// An error is returned if a WorkflowService_GetSearchAttributes_Result struct could not be encoded. +func (v *WorkflowService_GetSearchAttributes_Result) Encode(sw stream.Writer) error { + if err := sw.WriteStructBegin(); err != nil { + return err + } + + if v.Success != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil { + return err + } + if err := v.Success.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.ServiceBusyError != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil { + return err + } + if err := v.ServiceBusyError.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.ClientVersionNotSupportedError != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil { + return err + } + if err := v.ClientVersionNotSupportedError.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.AccessDeniedError != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 4, Type: wire.TStruct}); err != nil { + return err + } + if err := v.AccessDeniedError.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + count := 0 + if v.Success != nil { + count++ + } + if v.ServiceBusyError != nil { + count++ + } + if v.ClientVersionNotSupportedError != nil { + count++ + } + if v.AccessDeniedError != nil { + count++ + } + + if count != 1 { + return fmt.Errorf("WorkflowService_GetSearchAttributes_Result should have exactly one field: got %v fields", count) + } + + return sw.WriteStructEnd() +} + +func _GetSearchAttributesResponse_Decode(sr stream.Reader) (*shared.GetSearchAttributesResponse, error) { + var v shared.GetSearchAttributesResponse + err := v.Decode(sr) + return &v, err +} + +// Decode deserializes a WorkflowService_GetSearchAttributes_Result struct directly from its Thrift-level +// representation, without going through an intemediary type. +// +// An error is returned if a WorkflowService_GetSearchAttributes_Result struct could not be generated from the wire +// representation. +func (v *WorkflowService_GetSearchAttributes_Result) Decode(sr stream.Reader) error { + + if err := sr.ReadStructBegin(); err != nil { + return err + } + + fh, ok, err := sr.ReadFieldBegin() + if err != nil { + return err + } + + for ok { + switch { + case fh.ID == 0 && fh.Type == wire.TStruct: + v.Success, err = _GetSearchAttributesResponse_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 2 && fh.Type == wire.TStruct: + v.ServiceBusyError, err = _ServiceBusyError_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 3 && fh.Type == wire.TStruct: + v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 4 && fh.Type == wire.TStruct: + v.AccessDeniedError, err = _AccessDeniedError_Decode(sr) + if err != nil { + return err + } + + default: + if err := sr.Skip(fh.Type); err != nil { + return err + } + } + + if err := sr.ReadFieldEnd(); err != nil { + return err + } + + if fh, ok, err = sr.ReadFieldBegin(); err != nil { + return err + } + } + + if err := sr.ReadStructEnd(); err != nil { + return err + } + + count := 0 + if v.Success != nil { + count++ + } + if v.ServiceBusyError != nil { + count++ + } + if v.ClientVersionNotSupportedError != nil { + count++ + } + if v.AccessDeniedError != nil { + count++ + } + if count != 1 { + return fmt.Errorf("WorkflowService_GetSearchAttributes_Result should have exactly one field: got %v fields", count) + } + + return nil +} + +// String returns a readable string representation of a WorkflowService_GetSearchAttributes_Result +// struct. +func (v *WorkflowService_GetSearchAttributes_Result) String() string { + if v == nil { + return "" + } + + var fields [4]string + i := 0 + if v.Success != nil { + fields[i] = fmt.Sprintf("Success: %v", v.Success) + i++ + } + if v.ServiceBusyError != nil { + fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError) + i++ + } + if v.ClientVersionNotSupportedError != nil { + fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError) + i++ + } + if v.AccessDeniedError != nil { + fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError) + i++ + } + + return fmt.Sprintf("WorkflowService_GetSearchAttributes_Result{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this WorkflowService_GetSearchAttributes_Result match the +// provided WorkflowService_GetSearchAttributes_Result. +// +// This function performs a deep comparison. +func (v *WorkflowService_GetSearchAttributes_Result) Equals(rhs *WorkflowService_GetSearchAttributes_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.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) { + return false + } + if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) { + return false + } + if !((v.AccessDeniedError == nil && rhs.AccessDeniedError == nil) || (v.AccessDeniedError != nil && rhs.AccessDeniedError != nil && v.AccessDeniedError.Equals(rhs.AccessDeniedError))) { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of WorkflowService_GetSearchAttributes_Result. +func (v *WorkflowService_GetSearchAttributes_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.ServiceBusyError != nil { + err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError)) + } + if v.ClientVersionNotSupportedError != nil { + err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError)) + } + if v.AccessDeniedError != nil { + err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError)) + } + return err +} + +// GetSuccess returns the value of Success if it is set or its +// zero value if it is unset. +func (v *WorkflowService_GetSearchAttributes_Result) GetSuccess() (o *shared.GetSearchAttributesResponse) { + if v != nil && v.Success != nil { + return v.Success + } + + return +} + +// IsSetSuccess returns true if Success is not nil. +func (v *WorkflowService_GetSearchAttributes_Result) IsSetSuccess() bool { + return v != nil && v.Success != nil +} + +// GetServiceBusyError returns the value of ServiceBusyError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_GetSearchAttributes_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_GetSearchAttributes_Result) IsSetServiceBusyError() bool { + return v != nil && v.ServiceBusyError != nil +} + +// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_GetSearchAttributes_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_GetSearchAttributes_Result) IsSetClientVersionNotSupportedError() bool { + return v != nil && v.ClientVersionNotSupportedError != nil +} + +// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_GetSearchAttributes_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) { + if v != nil && v.AccessDeniedError != nil { + return v.AccessDeniedError + } + + return +} + +// IsSetAccessDeniedError returns true if AccessDeniedError is not nil. +func (v *WorkflowService_GetSearchAttributes_Result) IsSetAccessDeniedError() bool { + return v != nil && v.AccessDeniedError != 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 "GetSearchAttributes" for this struct. +func (v *WorkflowService_GetSearchAttributes_Result) MethodName() string { + return "GetSearchAttributes" +} + +// EnvelopeType returns the kind of value inside this struct. +// +// This will always be Reply for this struct. +func (v *WorkflowService_GetSearchAttributes_Result) EnvelopeType() wire.EnvelopeType { + return wire.Reply +} + +// WorkflowService_GetTaskListsByDomain_Args represents the arguments for the WorkflowService.GetTaskListsByDomain function. +// +// The arguments for GetTaskListsByDomain are sent and received over the wire as this struct. +type WorkflowService_GetTaskListsByDomain_Args struct { + Request *shared.GetTaskListsByDomainRequest `json:"request,omitempty"` +} + +// ToWire translates a WorkflowService_GetTaskListsByDomain_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_GetTaskListsByDomain_Args) 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: 1, Value: w} + i++ + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +func _GetTaskListsByDomainRequest_Read(w wire.Value) (*shared.GetTaskListsByDomainRequest, error) { + var v shared.GetTaskListsByDomainRequest + err := v.FromWire(w) + return &v, err +} + +// FromWire deserializes a WorkflowService_GetTaskListsByDomain_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_GetTaskListsByDomain_Args struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v WorkflowService_GetTaskListsByDomain_Args +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *WorkflowService_GetTaskListsByDomain_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.Request, err = _GetTaskListsByDomainRequest_Read(field.Value) + if err != nil { + return err + } + + } + } + } + + return nil +} + +// Encode serializes a WorkflowService_GetTaskListsByDomain_Args struct directly into bytes, without going +// through an intermediary type. +// +// An error is returned if a WorkflowService_GetTaskListsByDomain_Args struct could not be encoded. +func (v *WorkflowService_GetTaskListsByDomain_Args) Encode(sw stream.Writer) error { + if err := sw.WriteStructBegin(); err != nil { + return err + } + + if v.Request != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil { + return err + } + if err := v.Request.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + return sw.WriteStructEnd() +} + +func _GetTaskListsByDomainRequest_Decode(sr stream.Reader) (*shared.GetTaskListsByDomainRequest, error) { + var v shared.GetTaskListsByDomainRequest + err := v.Decode(sr) + return &v, err +} + +// Decode deserializes a WorkflowService_GetTaskListsByDomain_Args struct directly from its Thrift-level +// representation, without going through an intemediary type. +// +// An error is returned if a WorkflowService_GetTaskListsByDomain_Args struct could not be generated from the wire +// representation. +func (v *WorkflowService_GetTaskListsByDomain_Args) Decode(sr stream.Reader) error { + + if err := sr.ReadStructBegin(); err != nil { + return err + } + + fh, ok, err := sr.ReadFieldBegin() + if err != nil { + return err + } + + for ok { + switch { + case fh.ID == 1 && fh.Type == wire.TStruct: + v.Request, err = _GetTaskListsByDomainRequest_Decode(sr) + if err != nil { + return err + } + + default: + if err := sr.Skip(fh.Type); err != nil { + return err + } + } + + if err := sr.ReadFieldEnd(); err != nil { + return err + } + + if fh, ok, err = sr.ReadFieldBegin(); err != nil { + return err + } + } + + if err := sr.ReadStructEnd(); err != nil { + return err + } + + return nil +} + +// String returns a readable string representation of a WorkflowService_GetTaskListsByDomain_Args +// struct. +func (v *WorkflowService_GetTaskListsByDomain_Args) 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("WorkflowService_GetTaskListsByDomain_Args{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this WorkflowService_GetTaskListsByDomain_Args match the +// provided WorkflowService_GetTaskListsByDomain_Args. +// +// This function performs a deep comparison. +func (v *WorkflowService_GetTaskListsByDomain_Args) Equals(rhs *WorkflowService_GetTaskListsByDomain_Args) 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 WorkflowService_GetTaskListsByDomain_Args. +func (v *WorkflowService_GetTaskListsByDomain_Args) 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 *WorkflowService_GetTaskListsByDomain_Args) GetRequest() (o *shared.GetTaskListsByDomainRequest) { + if v != nil && v.Request != nil { + return v.Request + } + + return +} + +// IsSetRequest returns true if Request is not nil. +func (v *WorkflowService_GetTaskListsByDomain_Args) IsSetRequest() bool { + return v != nil && v.Request != 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 "GetTaskListsByDomain" for this struct. +func (v *WorkflowService_GetTaskListsByDomain_Args) MethodName() string { + return "GetTaskListsByDomain" +} + +// EnvelopeType returns the kind of value inside this struct. +// +// This will always be Call for this struct. +func (v *WorkflowService_GetTaskListsByDomain_Args) EnvelopeType() wire.EnvelopeType { + return wire.Call +} + +// WorkflowService_GetTaskListsByDomain_Helper provides functions that aid in handling the +// parameters and return values of the WorkflowService.GetTaskListsByDomain +// function. +var WorkflowService_GetTaskListsByDomain_Helper = struct { + // Args accepts the parameters of GetTaskListsByDomain in-order and returns + // the arguments struct for the function. + Args func( + request *shared.GetTaskListsByDomainRequest, + ) *WorkflowService_GetTaskListsByDomain_Args + + // IsException returns true if the given error can be thrown + // by GetTaskListsByDomain. + // + // An error can be thrown by GetTaskListsByDomain 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 GetTaskListsByDomain + // given its return value and error. + // + // This allows mapping values and errors returned by + // GetTaskListsByDomain into a serializable result struct. + // WrapResponse returns a non-nil error if the provided + // error cannot be thrown by GetTaskListsByDomain + // + // value, err := GetTaskListsByDomain(args) + // result, err := WorkflowService_GetTaskListsByDomain_Helper.WrapResponse(value, err) + // if err != nil { + // return fmt.Errorf("unexpected error from GetTaskListsByDomain: %v", err) + // } + // serialize(result) + WrapResponse func(*shared.GetTaskListsByDomainResponse, error) (*WorkflowService_GetTaskListsByDomain_Result, error) + + // UnwrapResponse takes the result struct for GetTaskListsByDomain + // and returns the value or error returned by it. + // + // The error is non-nil only if GetTaskListsByDomain threw an + // exception. + // + // result := deserialize(bytes) + // value, err := WorkflowService_GetTaskListsByDomain_Helper.UnwrapResponse(result) + UnwrapResponse func(*WorkflowService_GetTaskListsByDomain_Result) (*shared.GetTaskListsByDomainResponse, error) +}{} + +func init() { + WorkflowService_GetTaskListsByDomain_Helper.Args = func( + request *shared.GetTaskListsByDomainRequest, + ) *WorkflowService_GetTaskListsByDomain_Args { + return &WorkflowService_GetTaskListsByDomain_Args{ + Request: request, + } + } + + WorkflowService_GetTaskListsByDomain_Helper.IsException = func(err error) bool { + switch err.(type) { + case *shared.BadRequestError: + return true + case *shared.EntityNotExistsError: + return true + case *shared.LimitExceededError: + return true + case *shared.ServiceBusyError: + return true + case *shared.ClientVersionNotSupportedError: + return true + case *shared.AccessDeniedError: + return true + default: + return false + } + } + + WorkflowService_GetTaskListsByDomain_Helper.WrapResponse = func(success *shared.GetTaskListsByDomainResponse, err error) (*WorkflowService_GetTaskListsByDomain_Result, error) { + if err == nil { + return &WorkflowService_GetTaskListsByDomain_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_GetTaskListsByDomain_Result.BadRequestError") + } + return &WorkflowService_GetTaskListsByDomain_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_GetTaskListsByDomain_Result.EntityNotExistError") + } + return &WorkflowService_GetTaskListsByDomain_Result{EntityNotExistError: e}, nil + case *shared.LimitExceededError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetTaskListsByDomain_Result.LimitExceededError") + } + return &WorkflowService_GetTaskListsByDomain_Result{LimitExceededError: e}, nil + case *shared.ServiceBusyError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetTaskListsByDomain_Result.ServiceBusyError") + } + return &WorkflowService_GetTaskListsByDomain_Result{ServiceBusyError: e}, nil + case *shared.ClientVersionNotSupportedError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetTaskListsByDomain_Result.ClientVersionNotSupportedError") + } + return &WorkflowService_GetTaskListsByDomain_Result{ClientVersionNotSupportedError: e}, nil + case *shared.AccessDeniedError: + if e == nil { + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetTaskListsByDomain_Result.AccessDeniedError") + } + return &WorkflowService_GetTaskListsByDomain_Result{AccessDeniedError: e}, nil + } + + return nil, err + } + WorkflowService_GetTaskListsByDomain_Helper.UnwrapResponse = func(result *WorkflowService_GetTaskListsByDomain_Result) (success *shared.GetTaskListsByDomainResponse, err error) { + if result.BadRequestError != nil { + err = result.BadRequestError + return + } + if result.EntityNotExistError != nil { + err = result.EntityNotExistError + return + } + if result.LimitExceededError != nil { + err = result.LimitExceededError + return + } + if result.ServiceBusyError != nil { + err = result.ServiceBusyError + return + } + if result.ClientVersionNotSupportedError != nil { + err = result.ClientVersionNotSupportedError + return + } + if result.AccessDeniedError != nil { + err = result.AccessDeniedError + return + } + + if result.Success != nil { + success = result.Success + return + } + + err = errors.New("expected a non-void result") + return + } + +} + +// WorkflowService_GetTaskListsByDomain_Result represents the result of a WorkflowService.GetTaskListsByDomain function call. +// +// The result of a GetTaskListsByDomain 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_GetTaskListsByDomain_Result struct { + // Value returned by GetTaskListsByDomain after a successful execution. + Success *shared.GetTaskListsByDomainResponse `json:"success,omitempty"` + BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` + EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"` + LimitExceededError *shared.LimitExceededError `json:"limitExceededError,omitempty"` + ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` + ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` + AccessDeniedError *shared.AccessDeniedError `json:"accessDeniedError,omitempty"` +} + +// ToWire translates a WorkflowService_GetTaskListsByDomain_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_GetTaskListsByDomain_Result) ToWire() (wire.Value, error) { + var ( + fields [7]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.EntityNotExistError != nil { + w, err = v.EntityNotExistError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 2, Value: w} + i++ + } + if v.LimitExceededError != nil { + w, err = v.LimitExceededError.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.ClientVersionNotSupportedError != nil { + w, err = v.ClientVersionNotSupportedError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 5, Value: w} + i++ + } + if v.AccessDeniedError != nil { + w, err = v.AccessDeniedError.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 6, Value: w} + i++ + } + + if i != 1 { + return wire.Value{}, fmt.Errorf("WorkflowService_GetTaskListsByDomain_Result should have exactly one field: got %v fields", i) + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +func _GetTaskListsByDomainResponse_Read(w wire.Value) (*shared.GetTaskListsByDomainResponse, error) { + var v shared.GetTaskListsByDomainResponse + err := v.FromWire(w) + return &v, err +} + +// FromWire deserializes a WorkflowService_GetTaskListsByDomain_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_GetTaskListsByDomain_Result struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v WorkflowService_GetTaskListsByDomain_Result +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *WorkflowService_GetTaskListsByDomain_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 = _GetTaskListsByDomainResponse_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 2: + if field.Value.Type() == wire.TStruct { + v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value) + if err != nil { + return err + } + + } + case 3: + if field.Value.Type() == wire.TStruct { + v.LimitExceededError, err = _LimitExceededError_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.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value) + if err != nil { + return err + } + + } + case 6: + if field.Value.Type() == wire.TStruct { + v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value) + if err != nil { + return err + } + + } + } + } + + count := 0 + if v.Success != nil { + count++ + } + if v.BadRequestError != nil { + count++ + } + if v.EntityNotExistError != nil { + count++ + } + if v.LimitExceededError != nil { + count++ + } + if v.ServiceBusyError != nil { + count++ + } + if v.ClientVersionNotSupportedError != nil { + count++ + } + if v.AccessDeniedError != nil { + count++ + } + if count != 1 { + return fmt.Errorf("WorkflowService_GetTaskListsByDomain_Result should have exactly one field: got %v fields", count) + } + + return nil +} + +// Encode serializes a WorkflowService_GetTaskListsByDomain_Result struct directly into bytes, without going +// through an intermediary type. +// +// An error is returned if a WorkflowService_GetTaskListsByDomain_Result struct could not be encoded. +func (v *WorkflowService_GetTaskListsByDomain_Result) Encode(sw stream.Writer) error { + if err := sw.WriteStructBegin(); err != nil { + return err + } + + if v.Success != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 0, Type: wire.TStruct}); err != nil { + return err + } + if err := v.Success.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.BadRequestError != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil { + return err + } + if err := v.BadRequestError.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.EntityNotExistError != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil { + return err + } + if err := v.EntityNotExistError.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.LimitExceededError != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil { + return err + } + if err := v.LimitExceededError.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.ServiceBusyError != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 4, Type: wire.TStruct}); err != nil { + return err + } + if err := v.ServiceBusyError.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.ClientVersionNotSupportedError != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 5, Type: wire.TStruct}); err != nil { + return err + } + if err := v.ClientVersionNotSupportedError.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.AccessDeniedError != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 6, Type: wire.TStruct}); err != nil { + return err + } + if err := v.AccessDeniedError.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + count := 0 + if v.Success != nil { + count++ + } + if v.BadRequestError != nil { + count++ + } + if v.EntityNotExistError != nil { + count++ + } + if v.LimitExceededError != nil { + count++ + } + if v.ServiceBusyError != nil { + count++ + } + if v.ClientVersionNotSupportedError != nil { + count++ + } + if v.AccessDeniedError != nil { + count++ + } + + if count != 1 { + return fmt.Errorf("WorkflowService_GetTaskListsByDomain_Result should have exactly one field: got %v fields", count) + } + + return sw.WriteStructEnd() +} + +func _GetTaskListsByDomainResponse_Decode(sr stream.Reader) (*shared.GetTaskListsByDomainResponse, error) { + var v shared.GetTaskListsByDomainResponse + err := v.Decode(sr) + return &v, err +} + +// Decode deserializes a WorkflowService_GetTaskListsByDomain_Result struct directly from its Thrift-level +// representation, without going through an intemediary type. +// +// An error is returned if a WorkflowService_GetTaskListsByDomain_Result struct could not be generated from the wire +// representation. +func (v *WorkflowService_GetTaskListsByDomain_Result) Decode(sr stream.Reader) error { + + if err := sr.ReadStructBegin(); err != nil { + return err + } + + fh, ok, err := sr.ReadFieldBegin() + if err != nil { + return err + } + + for ok { + switch { + case fh.ID == 0 && fh.Type == wire.TStruct: + v.Success, err = _GetTaskListsByDomainResponse_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 1 && fh.Type == wire.TStruct: + v.BadRequestError, err = _BadRequestError_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 2 && fh.Type == wire.TStruct: + v.EntityNotExistError, err = _EntityNotExistsError_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 3 && fh.Type == wire.TStruct: + v.LimitExceededError, err = _LimitExceededError_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 4 && fh.Type == wire.TStruct: + v.ServiceBusyError, err = _ServiceBusyError_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 5 && fh.Type == wire.TStruct: + v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 6 && fh.Type == wire.TStruct: + v.AccessDeniedError, err = _AccessDeniedError_Decode(sr) + if err != nil { + return err + } + + default: + if err := sr.Skip(fh.Type); err != nil { + return err + } + } + + if err := sr.ReadFieldEnd(); err != nil { + return err + } + + if fh, ok, err = sr.ReadFieldBegin(); err != nil { + return err + } + } + + if err := sr.ReadStructEnd(); err != nil { + return err + } + + count := 0 + if v.Success != nil { + count++ + } + if v.BadRequestError != nil { + count++ + } + if v.EntityNotExistError != nil { + count++ + } + if v.LimitExceededError != nil { + count++ + } + if v.ServiceBusyError != nil { + count++ + } + if v.ClientVersionNotSupportedError != nil { + count++ + } + if v.AccessDeniedError != nil { + count++ + } + if count != 1 { + return fmt.Errorf("WorkflowService_GetTaskListsByDomain_Result should have exactly one field: got %v fields", count) + } + + return nil +} + +// String returns a readable string representation of a WorkflowService_GetTaskListsByDomain_Result +// struct. +func (v *WorkflowService_GetTaskListsByDomain_Result) String() string { + if v == nil { + return "" + } + + var fields [7]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) + i++ + } + if v.LimitExceededError != nil { + fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError) + i++ + } + if v.ServiceBusyError != nil { + fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError) + i++ + } + if v.ClientVersionNotSupportedError != nil { + fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError) + i++ + } + if v.AccessDeniedError != nil { + fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError) + i++ + } + + return fmt.Sprintf("WorkflowService_GetTaskListsByDomain_Result{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this WorkflowService_GetTaskListsByDomain_Result match the +// provided WorkflowService_GetTaskListsByDomain_Result. +// +// This function performs a deep comparison. +func (v *WorkflowService_GetTaskListsByDomain_Result) Equals(rhs *WorkflowService_GetTaskListsByDomain_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))) { + return false + } + if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) { + return false + } + if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) { + return false + } + if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) { + return false + } + if !((v.AccessDeniedError == nil && rhs.AccessDeniedError == nil) || (v.AccessDeniedError != nil && rhs.AccessDeniedError != nil && v.AccessDeniedError.Equals(rhs.AccessDeniedError))) { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of WorkflowService_GetTaskListsByDomain_Result. +func (v *WorkflowService_GetTaskListsByDomain_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.LimitExceededError != nil { + err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError)) + } + if v.ServiceBusyError != nil { + err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError)) + } + if v.ClientVersionNotSupportedError != nil { + err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError)) + } + if v.AccessDeniedError != nil { + err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError)) + } + return err +} + +// GetSuccess returns the value of Success if it is set or its +// zero value if it is unset. +func (v *WorkflowService_GetTaskListsByDomain_Result) GetSuccess() (o *shared.GetTaskListsByDomainResponse) { + if v != nil && v.Success != nil { + return v.Success + } + + return +} + +// IsSetSuccess returns true if Success is not nil. +func (v *WorkflowService_GetTaskListsByDomain_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_GetTaskListsByDomain_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_GetTaskListsByDomain_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_GetTaskListsByDomain_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_GetTaskListsByDomain_Result) IsSetEntityNotExistError() bool { + return v != nil && v.EntityNotExistError != nil +} + +// GetLimitExceededError returns the value of LimitExceededError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_GetTaskListsByDomain_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_GetTaskListsByDomain_Result) IsSetLimitExceededError() bool { + return v != nil && v.LimitExceededError != nil +} + +// GetServiceBusyError returns the value of ServiceBusyError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_GetTaskListsByDomain_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_GetTaskListsByDomain_Result) IsSetServiceBusyError() bool { + return v != nil && v.ServiceBusyError != nil +} + +// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_GetTaskListsByDomain_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_GetTaskListsByDomain_Result) IsSetClientVersionNotSupportedError() bool { + return v != nil && v.ClientVersionNotSupportedError != nil +} + +// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its +// zero value if it is unset. +func (v *WorkflowService_GetTaskListsByDomain_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) { + if v != nil && v.AccessDeniedError != nil { + return v.AccessDeniedError + } + + return +} + +// IsSetAccessDeniedError returns true if AccessDeniedError is not nil. +func (v *WorkflowService_GetTaskListsByDomain_Result) IsSetAccessDeniedError() bool { + return v != nil && v.AccessDeniedError != 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 "GetTaskListsByDomain" for this struct. +func (v *WorkflowService_GetTaskListsByDomain_Result) MethodName() string { + return "GetTaskListsByDomain" +} + // EnvelopeType returns the kind of value inside this struct. // // This will always be Reply for this struct. -func (v *WorkflowService_GetSearchAttributes_Result) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_GetTaskListsByDomain_Result) EnvelopeType() wire.EnvelopeType { return wire.Reply } -// WorkflowService_GetTaskListsByDomain_Args represents the arguments for the WorkflowService.GetTaskListsByDomain function. +// WorkflowService_GetWorkflowExecutionHistory_Args represents the arguments for the WorkflowService.GetWorkflowExecutionHistory function. // -// The arguments for GetTaskListsByDomain are sent and received over the wire as this struct. -type WorkflowService_GetTaskListsByDomain_Args struct { - Request *shared.GetTaskListsByDomainRequest `json:"request,omitempty"` +// The arguments for GetWorkflowExecutionHistory are sent and received over the wire as this struct. +type WorkflowService_GetWorkflowExecutionHistory_Args struct { + GetRequest *shared.GetWorkflowExecutionHistoryRequest `json:"getRequest,omitempty"` } -// ToWire translates a WorkflowService_GetTaskListsByDomain_Args struct into a Thrift-level intermediate +// ToWire translates a WorkflowService_GetWorkflowExecutionHistory_Args struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -9605,7 +11581,7 @@ type WorkflowService_GetTaskListsByDomain_Args struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_GetTaskListsByDomain_Args) ToWire() (wire.Value, error) { +func (v *WorkflowService_GetWorkflowExecutionHistory_Args) ToWire() (wire.Value, error) { var ( fields [1]wire.Field i int = 0 @@ -9613,8 +11589,8 @@ func (v *WorkflowService_GetTaskListsByDomain_Args) ToWire() (wire.Value, error) err error ) - if v.Request != nil { - w, err = v.Request.ToWire() + if v.GetRequest != nil { + w, err = v.GetRequest.ToWire() if err != nil { return w, err } @@ -9625,17 +11601,17 @@ func (v *WorkflowService_GetTaskListsByDomain_Args) ToWire() (wire.Value, error) return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _GetTaskListsByDomainRequest_Read(w wire.Value) (*shared.GetTaskListsByDomainRequest, error) { - var v shared.GetTaskListsByDomainRequest +func _GetWorkflowExecutionHistoryRequest_Read(w wire.Value) (*shared.GetWorkflowExecutionHistoryRequest, error) { + var v shared.GetWorkflowExecutionHistoryRequest err := v.FromWire(w) return &v, err } -// FromWire deserializes a WorkflowService_GetTaskListsByDomain_Args struct from its Thrift-level +// FromWire deserializes a WorkflowService_GetWorkflowExecutionHistory_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_GetTaskListsByDomain_Args struct +// An error is returned if we were unable to build a WorkflowService_GetWorkflowExecutionHistory_Args struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -9643,19 +11619,19 @@ func _GetTaskListsByDomainRequest_Read(w wire.Value) (*shared.GetTaskListsByDoma // return nil, err // } // -// var v WorkflowService_GetTaskListsByDomain_Args +// var v WorkflowService_GetWorkflowExecutionHistory_Args // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_GetTaskListsByDomain_Args) FromWire(w wire.Value) error { +func (v *WorkflowService_GetWorkflowExecutionHistory_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.Request, err = _GetTaskListsByDomainRequest_Read(field.Value) + v.GetRequest, err = _GetWorkflowExecutionHistoryRequest_Read(field.Value) if err != nil { return err } @@ -9667,20 +11643,20 @@ func (v *WorkflowService_GetTaskListsByDomain_Args) FromWire(w wire.Value) error return nil } -// Encode serializes a WorkflowService_GetTaskListsByDomain_Args struct directly into bytes, without going +// Encode serializes a WorkflowService_GetWorkflowExecutionHistory_Args struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a WorkflowService_GetTaskListsByDomain_Args struct could not be encoded. -func (v *WorkflowService_GetTaskListsByDomain_Args) Encode(sw stream.Writer) error { +// An error is returned if a WorkflowService_GetWorkflowExecutionHistory_Args struct could not be encoded. +func (v *WorkflowService_GetWorkflowExecutionHistory_Args) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } - if v.Request != nil { + if v.GetRequest != nil { if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil { return err } - if err := v.Request.Encode(sw); err != nil { + if err := v.GetRequest.Encode(sw); err != nil { return err } if err := sw.WriteFieldEnd(); err != nil { @@ -9691,18 +11667,18 @@ func (v *WorkflowService_GetTaskListsByDomain_Args) Encode(sw stream.Writer) err return sw.WriteStructEnd() } -func _GetTaskListsByDomainRequest_Decode(sr stream.Reader) (*shared.GetTaskListsByDomainRequest, error) { - var v shared.GetTaskListsByDomainRequest +func _GetWorkflowExecutionHistoryRequest_Decode(sr stream.Reader) (*shared.GetWorkflowExecutionHistoryRequest, error) { + var v shared.GetWorkflowExecutionHistoryRequest err := v.Decode(sr) return &v, err } -// Decode deserializes a WorkflowService_GetTaskListsByDomain_Args struct directly from its Thrift-level +// Decode deserializes a WorkflowService_GetWorkflowExecutionHistory_Args struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a WorkflowService_GetTaskListsByDomain_Args struct could not be generated from the wire +// An error is returned if a WorkflowService_GetWorkflowExecutionHistory_Args struct could not be generated from the wire // representation. -func (v *WorkflowService_GetTaskListsByDomain_Args) Decode(sr stream.Reader) error { +func (v *WorkflowService_GetWorkflowExecutionHistory_Args) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -9716,7 +11692,7 @@ func (v *WorkflowService_GetTaskListsByDomain_Args) Decode(sr stream.Reader) err for ok { switch { case fh.ID == 1 && fh.Type == wire.TStruct: - v.Request, err = _GetTaskListsByDomainRequest_Decode(sr) + v.GetRequest, err = _GetWorkflowExecutionHistoryRequest_Decode(sr) if err != nil { return err } @@ -9743,34 +11719,34 @@ func (v *WorkflowService_GetTaskListsByDomain_Args) Decode(sr stream.Reader) err return nil } -// String returns a readable string representation of a WorkflowService_GetTaskListsByDomain_Args +// String returns a readable string representation of a WorkflowService_GetWorkflowExecutionHistory_Args // struct. -func (v *WorkflowService_GetTaskListsByDomain_Args) String() string { +func (v *WorkflowService_GetWorkflowExecutionHistory_Args) String() string { if v == nil { return "" } var fields [1]string i := 0 - if v.Request != nil { - fields[i] = fmt.Sprintf("Request: %v", v.Request) + if v.GetRequest != nil { + fields[i] = fmt.Sprintf("GetRequest: %v", v.GetRequest) i++ } - return fmt.Sprintf("WorkflowService_GetTaskListsByDomain_Args{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_GetWorkflowExecutionHistory_Args{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_GetTaskListsByDomain_Args match the -// provided WorkflowService_GetTaskListsByDomain_Args. +// Equals returns true if all the fields of this WorkflowService_GetWorkflowExecutionHistory_Args match the +// provided WorkflowService_GetWorkflowExecutionHistory_Args. // // This function performs a deep comparison. -func (v *WorkflowService_GetTaskListsByDomain_Args) Equals(rhs *WorkflowService_GetTaskListsByDomain_Args) bool { +func (v *WorkflowService_GetWorkflowExecutionHistory_Args) Equals(rhs *WorkflowService_GetWorkflowExecutionHistory_Args) 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))) { + if !((v.GetRequest == nil && rhs.GetRequest == nil) || (v.GetRequest != nil && rhs.GetRequest != nil && v.GetRequest.Equals(rhs.GetRequest))) { return false } @@ -9778,109 +11754,107 @@ func (v *WorkflowService_GetTaskListsByDomain_Args) Equals(rhs *WorkflowService_ } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_GetTaskListsByDomain_Args. -func (v *WorkflowService_GetTaskListsByDomain_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_GetWorkflowExecutionHistory_Args. +func (v *WorkflowService_GetWorkflowExecutionHistory_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } - if v.Request != nil { - err = multierr.Append(err, enc.AddObject("request", v.Request)) + if v.GetRequest != nil { + err = multierr.Append(err, enc.AddObject("getRequest", v.GetRequest)) } return err } -// GetRequest returns the value of Request if it is set or its +// GetGetRequest returns the value of GetRequest if it is set or its // zero value if it is unset. -func (v *WorkflowService_GetTaskListsByDomain_Args) GetRequest() (o *shared.GetTaskListsByDomainRequest) { - if v != nil && v.Request != nil { - return v.Request +func (v *WorkflowService_GetWorkflowExecutionHistory_Args) GetGetRequest() (o *shared.GetWorkflowExecutionHistoryRequest) { + if v != nil && v.GetRequest != nil { + return v.GetRequest } return } -// IsSetRequest returns true if Request is not nil. -func (v *WorkflowService_GetTaskListsByDomain_Args) IsSetRequest() bool { - return v != nil && v.Request != nil +// IsSetGetRequest returns true if GetRequest is not nil. +func (v *WorkflowService_GetWorkflowExecutionHistory_Args) IsSetGetRequest() bool { + return v != nil && v.GetRequest != 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 "GetTaskListsByDomain" for this struct. -func (v *WorkflowService_GetTaskListsByDomain_Args) MethodName() string { - return "GetTaskListsByDomain" +// This will always be "GetWorkflowExecutionHistory" for this struct. +func (v *WorkflowService_GetWorkflowExecutionHistory_Args) MethodName() string { + return "GetWorkflowExecutionHistory" } // EnvelopeType returns the kind of value inside this struct. // // This will always be Call for this struct. -func (v *WorkflowService_GetTaskListsByDomain_Args) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_GetWorkflowExecutionHistory_Args) EnvelopeType() wire.EnvelopeType { return wire.Call } -// WorkflowService_GetTaskListsByDomain_Helper provides functions that aid in handling the -// parameters and return values of the WorkflowService.GetTaskListsByDomain +// WorkflowService_GetWorkflowExecutionHistory_Helper provides functions that aid in handling the +// parameters and return values of the WorkflowService.GetWorkflowExecutionHistory // function. -var WorkflowService_GetTaskListsByDomain_Helper = struct { - // Args accepts the parameters of GetTaskListsByDomain in-order and returns +var WorkflowService_GetWorkflowExecutionHistory_Helper = struct { + // Args accepts the parameters of GetWorkflowExecutionHistory in-order and returns // the arguments struct for the function. Args func( - request *shared.GetTaskListsByDomainRequest, - ) *WorkflowService_GetTaskListsByDomain_Args + getRequest *shared.GetWorkflowExecutionHistoryRequest, + ) *WorkflowService_GetWorkflowExecutionHistory_Args // IsException returns true if the given error can be thrown - // by GetTaskListsByDomain. + // by GetWorkflowExecutionHistory. // - // An error can be thrown by GetTaskListsByDomain only if the + // An error can be thrown by GetWorkflowExecutionHistory 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 GetTaskListsByDomain + // WrapResponse returns the result struct for GetWorkflowExecutionHistory // given its return value and error. // // This allows mapping values and errors returned by - // GetTaskListsByDomain into a serializable result struct. + // GetWorkflowExecutionHistory into a serializable result struct. // WrapResponse returns a non-nil error if the provided - // error cannot be thrown by GetTaskListsByDomain + // error cannot be thrown by GetWorkflowExecutionHistory // - // value, err := GetTaskListsByDomain(args) - // result, err := WorkflowService_GetTaskListsByDomain_Helper.WrapResponse(value, err) + // value, err := GetWorkflowExecutionHistory(args) + // result, err := WorkflowService_GetWorkflowExecutionHistory_Helper.WrapResponse(value, err) // if err != nil { - // return fmt.Errorf("unexpected error from GetTaskListsByDomain: %v", err) + // return fmt.Errorf("unexpected error from GetWorkflowExecutionHistory: %v", err) // } // serialize(result) - WrapResponse func(*shared.GetTaskListsByDomainResponse, error) (*WorkflowService_GetTaskListsByDomain_Result, error) + WrapResponse func(*shared.GetWorkflowExecutionHistoryResponse, error) (*WorkflowService_GetWorkflowExecutionHistory_Result, error) - // UnwrapResponse takes the result struct for GetTaskListsByDomain + // UnwrapResponse takes the result struct for GetWorkflowExecutionHistory // and returns the value or error returned by it. // - // The error is non-nil only if GetTaskListsByDomain threw an + // The error is non-nil only if GetWorkflowExecutionHistory threw an // exception. // // result := deserialize(bytes) - // value, err := WorkflowService_GetTaskListsByDomain_Helper.UnwrapResponse(result) - UnwrapResponse func(*WorkflowService_GetTaskListsByDomain_Result) (*shared.GetTaskListsByDomainResponse, error) + // value, err := WorkflowService_GetWorkflowExecutionHistory_Helper.UnwrapResponse(result) + UnwrapResponse func(*WorkflowService_GetWorkflowExecutionHistory_Result) (*shared.GetWorkflowExecutionHistoryResponse, error) }{} func init() { - WorkflowService_GetTaskListsByDomain_Helper.Args = func( - request *shared.GetTaskListsByDomainRequest, - ) *WorkflowService_GetTaskListsByDomain_Args { - return &WorkflowService_GetTaskListsByDomain_Args{ - Request: request, + WorkflowService_GetWorkflowExecutionHistory_Helper.Args = func( + getRequest *shared.GetWorkflowExecutionHistoryRequest, + ) *WorkflowService_GetWorkflowExecutionHistory_Args { + return &WorkflowService_GetWorkflowExecutionHistory_Args{ + GetRequest: getRequest, } } - WorkflowService_GetTaskListsByDomain_Helper.IsException = func(err error) bool { + WorkflowService_GetWorkflowExecutionHistory_Helper.IsException = func(err error) bool { switch err.(type) { case *shared.BadRequestError: return true case *shared.EntityNotExistsError: return true - case *shared.LimitExceededError: - return true case *shared.ServiceBusyError: return true case *shared.ClientVersionNotSupportedError: @@ -9892,47 +11866,42 @@ func init() { } } - WorkflowService_GetTaskListsByDomain_Helper.WrapResponse = func(success *shared.GetTaskListsByDomainResponse, err error) (*WorkflowService_GetTaskListsByDomain_Result, error) { + WorkflowService_GetWorkflowExecutionHistory_Helper.WrapResponse = func(success *shared.GetWorkflowExecutionHistoryResponse, err error) (*WorkflowService_GetWorkflowExecutionHistory_Result, error) { if err == nil { - return &WorkflowService_GetTaskListsByDomain_Result{Success: success}, nil + return &WorkflowService_GetWorkflowExecutionHistory_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_GetTaskListsByDomain_Result.BadRequestError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetWorkflowExecutionHistory_Result.BadRequestError") } - return &WorkflowService_GetTaskListsByDomain_Result{BadRequestError: e}, nil + return &WorkflowService_GetWorkflowExecutionHistory_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_GetTaskListsByDomain_Result.EntityNotExistError") - } - return &WorkflowService_GetTaskListsByDomain_Result{EntityNotExistError: e}, nil - case *shared.LimitExceededError: - if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetTaskListsByDomain_Result.LimitExceededError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetWorkflowExecutionHistory_Result.EntityNotExistError") } - return &WorkflowService_GetTaskListsByDomain_Result{LimitExceededError: e}, nil + return &WorkflowService_GetWorkflowExecutionHistory_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_GetTaskListsByDomain_Result.ServiceBusyError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetWorkflowExecutionHistory_Result.ServiceBusyError") } - return &WorkflowService_GetTaskListsByDomain_Result{ServiceBusyError: e}, nil + return &WorkflowService_GetWorkflowExecutionHistory_Result{ServiceBusyError: e}, nil case *shared.ClientVersionNotSupportedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetTaskListsByDomain_Result.ClientVersionNotSupportedError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetWorkflowExecutionHistory_Result.ClientVersionNotSupportedError") } - return &WorkflowService_GetTaskListsByDomain_Result{ClientVersionNotSupportedError: e}, nil + return &WorkflowService_GetWorkflowExecutionHistory_Result{ClientVersionNotSupportedError: e}, nil case *shared.AccessDeniedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetTaskListsByDomain_Result.AccessDeniedError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetWorkflowExecutionHistory_Result.AccessDeniedError") } - return &WorkflowService_GetTaskListsByDomain_Result{AccessDeniedError: e}, nil + return &WorkflowService_GetWorkflowExecutionHistory_Result{AccessDeniedError: e}, nil } return nil, err } - WorkflowService_GetTaskListsByDomain_Helper.UnwrapResponse = func(result *WorkflowService_GetTaskListsByDomain_Result) (success *shared.GetTaskListsByDomainResponse, err error) { + WorkflowService_GetWorkflowExecutionHistory_Helper.UnwrapResponse = func(result *WorkflowService_GetWorkflowExecutionHistory_Result) (success *shared.GetWorkflowExecutionHistoryResponse, err error) { if result.BadRequestError != nil { err = result.BadRequestError return @@ -9941,10 +11910,6 @@ func init() { err = result.EntityNotExistError return } - if result.LimitExceededError != nil { - err = result.LimitExceededError - return - } if result.ServiceBusyError != nil { err = result.ServiceBusyError return @@ -9969,23 +11934,22 @@ func init() { } -// WorkflowService_GetTaskListsByDomain_Result represents the result of a WorkflowService.GetTaskListsByDomain function call. +// WorkflowService_GetWorkflowExecutionHistory_Result represents the result of a WorkflowService.GetWorkflowExecutionHistory function call. // -// The result of a GetTaskListsByDomain execution is sent and received over the wire as this struct. +// The result of a GetWorkflowExecutionHistory 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_GetTaskListsByDomain_Result struct { - // Value returned by GetTaskListsByDomain after a successful execution. - Success *shared.GetTaskListsByDomainResponse `json:"success,omitempty"` - BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` - EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"` - LimitExceededError *shared.LimitExceededError `json:"limitExceededError,omitempty"` - ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` - ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` - AccessDeniedError *shared.AccessDeniedError `json:"accessDeniedError,omitempty"` +type WorkflowService_GetWorkflowExecutionHistory_Result struct { + // Value returned by GetWorkflowExecutionHistory after a successful execution. + Success *shared.GetWorkflowExecutionHistoryResponse `json:"success,omitempty"` + BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` + EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"` + ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` + ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` + AccessDeniedError *shared.AccessDeniedError `json:"accessDeniedError,omitempty"` } -// ToWire translates a WorkflowService_GetTaskListsByDomain_Result struct into a Thrift-level intermediate +// ToWire translates a WorkflowService_GetWorkflowExecutionHistory_Result struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -10000,9 +11964,9 @@ type WorkflowService_GetTaskListsByDomain_Result struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_GetTaskListsByDomain_Result) ToWire() (wire.Value, error) { +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) ToWire() (wire.Value, error) { var ( - fields [7]wire.Field + fields [6]wire.Field i int = 0 w wire.Value err error @@ -10029,14 +11993,6 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) ToWire() (wire.Value, erro if err != nil { return w, err } - fields[i] = wire.Field{ID: 2, Value: w} - i++ - } - if v.LimitExceededError != nil { - w, err = v.LimitExceededError.ToWire() - if err != nil { - return w, err - } fields[i] = wire.Field{ID: 3, Value: w} i++ } @@ -10066,23 +12022,23 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) ToWire() (wire.Value, erro } if i != 1 { - return wire.Value{}, fmt.Errorf("WorkflowService_GetTaskListsByDomain_Result should have exactly one field: got %v fields", i) + return wire.Value{}, fmt.Errorf("WorkflowService_GetWorkflowExecutionHistory_Result should have exactly one field: got %v fields", i) } return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _GetTaskListsByDomainResponse_Read(w wire.Value) (*shared.GetTaskListsByDomainResponse, error) { - var v shared.GetTaskListsByDomainResponse +func _GetWorkflowExecutionHistoryResponse_Read(w wire.Value) (*shared.GetWorkflowExecutionHistoryResponse, error) { + var v shared.GetWorkflowExecutionHistoryResponse err := v.FromWire(w) return &v, err } -// FromWire deserializes a WorkflowService_GetTaskListsByDomain_Result struct from its Thrift-level +// FromWire deserializes a WorkflowService_GetWorkflowExecutionHistory_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_GetTaskListsByDomain_Result struct +// An error is returned if we were unable to build a WorkflowService_GetWorkflowExecutionHistory_Result struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -10090,19 +12046,19 @@ func _GetTaskListsByDomainResponse_Read(w wire.Value) (*shared.GetTaskListsByDom // return nil, err // } // -// var v WorkflowService_GetTaskListsByDomain_Result +// var v WorkflowService_GetWorkflowExecutionHistory_Result // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_GetTaskListsByDomain_Result) FromWire(w wire.Value) error { +func (v *WorkflowService_GetWorkflowExecutionHistory_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 = _GetTaskListsByDomainResponse_Read(field.Value) + v.Success, err = _GetWorkflowExecutionHistoryResponse_Read(field.Value) if err != nil { return err } @@ -10115,18 +12071,10 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) FromWire(w wire.Value) err return err } - } - case 2: - if field.Value.Type() == wire.TStruct { - v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value) - if err != nil { - return err - } - } case 3: if field.Value.Type() == wire.TStruct { - v.LimitExceededError, err = _LimitExceededError_Read(field.Value) + v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value) if err != nil { return err } @@ -10169,9 +12117,6 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) FromWire(w wire.Value) err if v.EntityNotExistError != nil { count++ } - if v.LimitExceededError != nil { - count++ - } if v.ServiceBusyError != nil { count++ } @@ -10182,17 +12127,17 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) FromWire(w wire.Value) err count++ } if count != 1 { - return fmt.Errorf("WorkflowService_GetTaskListsByDomain_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_GetWorkflowExecutionHistory_Result should have exactly one field: got %v fields", count) } return nil } -// Encode serializes a WorkflowService_GetTaskListsByDomain_Result struct directly into bytes, without going +// Encode serializes a WorkflowService_GetWorkflowExecutionHistory_Result struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a WorkflowService_GetTaskListsByDomain_Result struct could not be encoded. -func (v *WorkflowService_GetTaskListsByDomain_Result) Encode(sw stream.Writer) error { +// An error is returned if a WorkflowService_GetWorkflowExecutionHistory_Result struct could not be encoded. +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } @@ -10222,22 +12167,10 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) Encode(sw stream.Writer) e } if v.EntityNotExistError != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil { - return err - } - if err := v.EntityNotExistError.Encode(sw); err != nil { - return err - } - if err := sw.WriteFieldEnd(); err != nil { - return err - } - } - - if v.LimitExceededError != nil { if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil { return err } - if err := v.LimitExceededError.Encode(sw); err != nil { + if err := v.EntityNotExistError.Encode(sw); err != nil { return err } if err := sw.WriteFieldEnd(); err != nil { @@ -10291,9 +12224,6 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) Encode(sw stream.Writer) e if v.EntityNotExistError != nil { count++ } - if v.LimitExceededError != nil { - count++ - } if v.ServiceBusyError != nil { count++ } @@ -10305,24 +12235,24 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) Encode(sw stream.Writer) e } if count != 1 { - return fmt.Errorf("WorkflowService_GetTaskListsByDomain_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_GetWorkflowExecutionHistory_Result should have exactly one field: got %v fields", count) } return sw.WriteStructEnd() } -func _GetTaskListsByDomainResponse_Decode(sr stream.Reader) (*shared.GetTaskListsByDomainResponse, error) { - var v shared.GetTaskListsByDomainResponse +func _GetWorkflowExecutionHistoryResponse_Decode(sr stream.Reader) (*shared.GetWorkflowExecutionHistoryResponse, error) { + var v shared.GetWorkflowExecutionHistoryResponse err := v.Decode(sr) return &v, err } -// Decode deserializes a WorkflowService_GetTaskListsByDomain_Result struct directly from its Thrift-level +// Decode deserializes a WorkflowService_GetWorkflowExecutionHistory_Result struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a WorkflowService_GetTaskListsByDomain_Result struct could not be generated from the wire +// An error is returned if a WorkflowService_GetWorkflowExecutionHistory_Result struct could not be generated from the wire // representation. -func (v *WorkflowService_GetTaskListsByDomain_Result) Decode(sr stream.Reader) error { +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -10336,7 +12266,7 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) Decode(sr stream.Reader) e for ok { switch { case fh.ID == 0 && fh.Type == wire.TStruct: - v.Success, err = _GetTaskListsByDomainResponse_Decode(sr) + v.Success, err = _GetWorkflowExecutionHistoryResponse_Decode(sr) if err != nil { return err } @@ -10347,14 +12277,8 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) Decode(sr stream.Reader) e return err } - case fh.ID == 2 && fh.Type == wire.TStruct: - v.EntityNotExistError, err = _EntityNotExistsError_Decode(sr) - if err != nil { - return err - } - case fh.ID == 3 && fh.Type == wire.TStruct: - v.LimitExceededError, err = _LimitExceededError_Decode(sr) + v.EntityNotExistError, err = _EntityNotExistsError_Decode(sr) if err != nil { return err } @@ -10406,9 +12330,6 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) Decode(sr stream.Reader) e if v.EntityNotExistError != nil { count++ } - if v.LimitExceededError != nil { - count++ - } if v.ServiceBusyError != nil { count++ } @@ -10419,20 +12340,20 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) Decode(sr stream.Reader) e count++ } if count != 1 { - return fmt.Errorf("WorkflowService_GetTaskListsByDomain_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_GetWorkflowExecutionHistory_Result should have exactly one field: got %v fields", count) } return nil } -// String returns a readable string representation of a WorkflowService_GetTaskListsByDomain_Result +// String returns a readable string representation of a WorkflowService_GetWorkflowExecutionHistory_Result // struct. -func (v *WorkflowService_GetTaskListsByDomain_Result) String() string { +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) String() string { if v == nil { return "" } - var fields [7]string + var fields [6]string i := 0 if v.Success != nil { fields[i] = fmt.Sprintf("Success: %v", v.Success) @@ -10446,10 +12367,6 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) String() string { fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError) i++ } - if v.LimitExceededError != nil { - fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError) - i++ - } if v.ServiceBusyError != nil { fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError) i++ @@ -10463,14 +12380,14 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) String() string { i++ } - return fmt.Sprintf("WorkflowService_GetTaskListsByDomain_Result{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_GetWorkflowExecutionHistory_Result{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_GetTaskListsByDomain_Result match the -// provided WorkflowService_GetTaskListsByDomain_Result. +// Equals returns true if all the fields of this WorkflowService_GetWorkflowExecutionHistory_Result match the +// provided WorkflowService_GetWorkflowExecutionHistory_Result. // // This function performs a deep comparison. -func (v *WorkflowService_GetTaskListsByDomain_Result) Equals(rhs *WorkflowService_GetTaskListsByDomain_Result) bool { +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) Equals(rhs *WorkflowService_GetWorkflowExecutionHistory_Result) bool { if v == nil { return rhs == nil } else if rhs == nil { @@ -10485,9 +12402,6 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) Equals(rhs *WorkflowServic if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) { return false } - if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) { - return false - } if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) { return false } @@ -10502,8 +12416,8 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) Equals(rhs *WorkflowServic } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_GetTaskListsByDomain_Result. -func (v *WorkflowService_GetTaskListsByDomain_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_GetWorkflowExecutionHistory_Result. +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } @@ -10516,9 +12430,6 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) MarshalLogObject(enc zapco if v.EntityNotExistError != nil { err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError)) } - if v.LimitExceededError != nil { - err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError)) - } if v.ServiceBusyError != nil { err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError)) } @@ -10533,7 +12444,7 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) MarshalLogObject(enc zapco // GetSuccess returns the value of Success if it is set or its // zero value if it is unset. -func (v *WorkflowService_GetTaskListsByDomain_Result) GetSuccess() (o *shared.GetTaskListsByDomainResponse) { +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) GetSuccess() (o *shared.GetWorkflowExecutionHistoryResponse) { if v != nil && v.Success != nil { return v.Success } @@ -10542,13 +12453,13 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) GetSuccess() (o *shared.Ge } // IsSetSuccess returns true if Success is not nil. -func (v *WorkflowService_GetTaskListsByDomain_Result) IsSetSuccess() bool { +func (v *WorkflowService_GetWorkflowExecutionHistory_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_GetTaskListsByDomain_Result) GetBadRequestError() (o *shared.BadRequestError) { +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) GetBadRequestError() (o *shared.BadRequestError) { if v != nil && v.BadRequestError != nil { return v.BadRequestError } @@ -10557,13 +12468,13 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) GetBadRequestError() (o *s } // IsSetBadRequestError returns true if BadRequestError is not nil. -func (v *WorkflowService_GetTaskListsByDomain_Result) IsSetBadRequestError() bool { +func (v *WorkflowService_GetWorkflowExecutionHistory_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_GetTaskListsByDomain_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) { +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) { if v != nil && v.EntityNotExistError != nil { return v.EntityNotExistError } @@ -10572,28 +12483,13 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) GetEntityNotExistError() ( } // IsSetEntityNotExistError returns true if EntityNotExistError is not nil. -func (v *WorkflowService_GetTaskListsByDomain_Result) IsSetEntityNotExistError() bool { +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) IsSetEntityNotExistError() bool { return v != nil && v.EntityNotExistError != nil } -// GetLimitExceededError returns the value of LimitExceededError if it is set or its -// zero value if it is unset. -func (v *WorkflowService_GetTaskListsByDomain_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_GetTaskListsByDomain_Result) IsSetLimitExceededError() bool { - return v != nil && v.LimitExceededError != nil -} - // GetServiceBusyError returns the value of ServiceBusyError if it is set or its // zero value if it is unset. -func (v *WorkflowService_GetTaskListsByDomain_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { if v != nil && v.ServiceBusyError != nil { return v.ServiceBusyError } @@ -10602,13 +12498,13 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) GetServiceBusyError() (o * } // IsSetServiceBusyError returns true if ServiceBusyError is not nil. -func (v *WorkflowService_GetTaskListsByDomain_Result) IsSetServiceBusyError() bool { +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) IsSetServiceBusyError() bool { return v != nil && v.ServiceBusyError != nil } // GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its // zero value if it is unset. -func (v *WorkflowService_GetTaskListsByDomain_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { if v != nil && v.ClientVersionNotSupportedError != nil { return v.ClientVersionNotSupportedError } @@ -10617,13 +12513,13 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) GetClientVersionNotSupport } // IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil. -func (v *WorkflowService_GetTaskListsByDomain_Result) IsSetClientVersionNotSupportedError() bool { +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) IsSetClientVersionNotSupportedError() bool { return v != nil && v.ClientVersionNotSupportedError != nil } // GetAccessDeniedError returns the value of AccessDeniedError if it is set or its // zero value if it is unset. -func (v *WorkflowService_GetTaskListsByDomain_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) { +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) { if v != nil && v.AccessDeniedError != nil { return v.AccessDeniedError } @@ -10632,33 +12528,33 @@ func (v *WorkflowService_GetTaskListsByDomain_Result) GetAccessDeniedError() (o } // IsSetAccessDeniedError returns true if AccessDeniedError is not nil. -func (v *WorkflowService_GetTaskListsByDomain_Result) IsSetAccessDeniedError() bool { +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) IsSetAccessDeniedError() bool { return v != nil && v.AccessDeniedError != 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 "GetTaskListsByDomain" for this struct. -func (v *WorkflowService_GetTaskListsByDomain_Result) MethodName() string { - return "GetTaskListsByDomain" +// This will always be "GetWorkflowExecutionHistory" for this struct. +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) MethodName() string { + return "GetWorkflowExecutionHistory" } // EnvelopeType returns the kind of value inside this struct. // // This will always be Reply for this struct. -func (v *WorkflowService_GetTaskListsByDomain_Result) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_GetWorkflowExecutionHistory_Result) EnvelopeType() wire.EnvelopeType { return wire.Reply } -// WorkflowService_GetWorkflowExecutionHistory_Args represents the arguments for the WorkflowService.GetWorkflowExecutionHistory function. +// WorkflowService_ListArchivedWorkflowExecutions_Args represents the arguments for the WorkflowService.ListArchivedWorkflowExecutions function. // -// The arguments for GetWorkflowExecutionHistory are sent and received over the wire as this struct. -type WorkflowService_GetWorkflowExecutionHistory_Args struct { - GetRequest *shared.GetWorkflowExecutionHistoryRequest `json:"getRequest,omitempty"` +// The arguments for ListArchivedWorkflowExecutions are sent and received over the wire as this struct. +type WorkflowService_ListArchivedWorkflowExecutions_Args struct { + ListRequest *shared.ListArchivedWorkflowExecutionsRequest `json:"listRequest,omitempty"` } -// ToWire translates a WorkflowService_GetWorkflowExecutionHistory_Args struct into a Thrift-level intermediate +// ToWire translates a WorkflowService_ListArchivedWorkflowExecutions_Args struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -10673,7 +12569,7 @@ type WorkflowService_GetWorkflowExecutionHistory_Args struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_GetWorkflowExecutionHistory_Args) ToWire() (wire.Value, error) { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) ToWire() (wire.Value, error) { var ( fields [1]wire.Field i int = 0 @@ -10681,8 +12577,8 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Args) ToWire() (wire.Value, err error ) - if v.GetRequest != nil { - w, err = v.GetRequest.ToWire() + if v.ListRequest != nil { + w, err = v.ListRequest.ToWire() if err != nil { return w, err } @@ -10693,17 +12589,17 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Args) ToWire() (wire.Value, return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _GetWorkflowExecutionHistoryRequest_Read(w wire.Value) (*shared.GetWorkflowExecutionHistoryRequest, error) { - var v shared.GetWorkflowExecutionHistoryRequest +func _ListArchivedWorkflowExecutionsRequest_Read(w wire.Value) (*shared.ListArchivedWorkflowExecutionsRequest, error) { + var v shared.ListArchivedWorkflowExecutionsRequest err := v.FromWire(w) return &v, err } -// FromWire deserializes a WorkflowService_GetWorkflowExecutionHistory_Args struct from its Thrift-level +// FromWire deserializes a WorkflowService_ListArchivedWorkflowExecutions_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_GetWorkflowExecutionHistory_Args struct +// An error is returned if we were unable to build a WorkflowService_ListArchivedWorkflowExecutions_Args struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -10711,19 +12607,19 @@ func _GetWorkflowExecutionHistoryRequest_Read(w wire.Value) (*shared.GetWorkflow // return nil, err // } // -// var v WorkflowService_GetWorkflowExecutionHistory_Args +// var v WorkflowService_ListArchivedWorkflowExecutions_Args // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_GetWorkflowExecutionHistory_Args) FromWire(w wire.Value) error { +func (v *WorkflowService_ListArchivedWorkflowExecutions_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.GetRequest, err = _GetWorkflowExecutionHistoryRequest_Read(field.Value) + v.ListRequest, err = _ListArchivedWorkflowExecutionsRequest_Read(field.Value) if err != nil { return err } @@ -10735,20 +12631,20 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Args) FromWire(w wire.Value return nil } -// Encode serializes a WorkflowService_GetWorkflowExecutionHistory_Args struct directly into bytes, without going +// Encode serializes a WorkflowService_ListArchivedWorkflowExecutions_Args struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a WorkflowService_GetWorkflowExecutionHistory_Args struct could not be encoded. -func (v *WorkflowService_GetWorkflowExecutionHistory_Args) Encode(sw stream.Writer) error { +// An error is returned if a WorkflowService_ListArchivedWorkflowExecutions_Args struct could not be encoded. +func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } - if v.GetRequest != nil { + if v.ListRequest != nil { if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 1, Type: wire.TStruct}); err != nil { return err } - if err := v.GetRequest.Encode(sw); err != nil { + if err := v.ListRequest.Encode(sw); err != nil { return err } if err := sw.WriteFieldEnd(); err != nil { @@ -10759,18 +12655,18 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Args) Encode(sw stream.Writ return sw.WriteStructEnd() } -func _GetWorkflowExecutionHistoryRequest_Decode(sr stream.Reader) (*shared.GetWorkflowExecutionHistoryRequest, error) { - var v shared.GetWorkflowExecutionHistoryRequest +func _ListArchivedWorkflowExecutionsRequest_Decode(sr stream.Reader) (*shared.ListArchivedWorkflowExecutionsRequest, error) { + var v shared.ListArchivedWorkflowExecutionsRequest err := v.Decode(sr) return &v, err } -// Decode deserializes a WorkflowService_GetWorkflowExecutionHistory_Args struct directly from its Thrift-level +// Decode deserializes a WorkflowService_ListArchivedWorkflowExecutions_Args struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a WorkflowService_GetWorkflowExecutionHistory_Args struct could not be generated from the wire +// An error is returned if a WorkflowService_ListArchivedWorkflowExecutions_Args struct could not be generated from the wire // representation. -func (v *WorkflowService_GetWorkflowExecutionHistory_Args) Decode(sr stream.Reader) error { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -10784,7 +12680,7 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Args) Decode(sr stream.Read for ok { switch { case fh.ID == 1 && fh.Type == wire.TStruct: - v.GetRequest, err = _GetWorkflowExecutionHistoryRequest_Decode(sr) + v.ListRequest, err = _ListArchivedWorkflowExecutionsRequest_Decode(sr) if err != nil { return err } @@ -10811,34 +12707,34 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Args) Decode(sr stream.Read return nil } -// String returns a readable string representation of a WorkflowService_GetWorkflowExecutionHistory_Args +// String returns a readable string representation of a WorkflowService_ListArchivedWorkflowExecutions_Args // struct. -func (v *WorkflowService_GetWorkflowExecutionHistory_Args) String() string { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) String() string { if v == nil { return "" } var fields [1]string i := 0 - if v.GetRequest != nil { - fields[i] = fmt.Sprintf("GetRequest: %v", v.GetRequest) + if v.ListRequest != nil { + fields[i] = fmt.Sprintf("ListRequest: %v", v.ListRequest) i++ } - return fmt.Sprintf("WorkflowService_GetWorkflowExecutionHistory_Args{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_ListArchivedWorkflowExecutions_Args{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_GetWorkflowExecutionHistory_Args match the -// provided WorkflowService_GetWorkflowExecutionHistory_Args. +// Equals returns true if all the fields of this WorkflowService_ListArchivedWorkflowExecutions_Args match the +// provided WorkflowService_ListArchivedWorkflowExecutions_Args. // // This function performs a deep comparison. -func (v *WorkflowService_GetWorkflowExecutionHistory_Args) Equals(rhs *WorkflowService_GetWorkflowExecutionHistory_Args) bool { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) Equals(rhs *WorkflowService_ListArchivedWorkflowExecutions_Args) bool { if v == nil { return rhs == nil } else if rhs == nil { return false } - if !((v.GetRequest == nil && rhs.GetRequest == nil) || (v.GetRequest != nil && rhs.GetRequest != nil && v.GetRequest.Equals(rhs.GetRequest))) { + if !((v.ListRequest == nil && rhs.ListRequest == nil) || (v.ListRequest != nil && rhs.ListRequest != nil && v.ListRequest.Equals(rhs.ListRequest))) { return false } @@ -10846,102 +12742,102 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Args) Equals(rhs *WorkflowS } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_GetWorkflowExecutionHistory_Args. -func (v *WorkflowService_GetWorkflowExecutionHistory_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_ListArchivedWorkflowExecutions_Args. +func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } - if v.GetRequest != nil { - err = multierr.Append(err, enc.AddObject("getRequest", v.GetRequest)) + if v.ListRequest != nil { + err = multierr.Append(err, enc.AddObject("listRequest", v.ListRequest)) } return err } -// GetGetRequest returns the value of GetRequest if it is set or its +// GetListRequest returns the value of ListRequest if it is set or its // zero value if it is unset. -func (v *WorkflowService_GetWorkflowExecutionHistory_Args) GetGetRequest() (o *shared.GetWorkflowExecutionHistoryRequest) { - if v != nil && v.GetRequest != nil { - return v.GetRequest +func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) GetListRequest() (o *shared.ListArchivedWorkflowExecutionsRequest) { + if v != nil && v.ListRequest != nil { + return v.ListRequest } return } -// IsSetGetRequest returns true if GetRequest is not nil. -func (v *WorkflowService_GetWorkflowExecutionHistory_Args) IsSetGetRequest() bool { - return v != nil && v.GetRequest != nil +// IsSetListRequest returns true if ListRequest is not nil. +func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) IsSetListRequest() bool { + return v != nil && v.ListRequest != 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 "GetWorkflowExecutionHistory" for this struct. -func (v *WorkflowService_GetWorkflowExecutionHistory_Args) MethodName() string { - return "GetWorkflowExecutionHistory" +// This will always be "ListArchivedWorkflowExecutions" for this struct. +func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) MethodName() string { + return "ListArchivedWorkflowExecutions" } // EnvelopeType returns the kind of value inside this struct. // // This will always be Call for this struct. -func (v *WorkflowService_GetWorkflowExecutionHistory_Args) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) EnvelopeType() wire.EnvelopeType { return wire.Call } -// WorkflowService_GetWorkflowExecutionHistory_Helper provides functions that aid in handling the -// parameters and return values of the WorkflowService.GetWorkflowExecutionHistory +// WorkflowService_ListArchivedWorkflowExecutions_Helper provides functions that aid in handling the +// parameters and return values of the WorkflowService.ListArchivedWorkflowExecutions // function. -var WorkflowService_GetWorkflowExecutionHistory_Helper = struct { - // Args accepts the parameters of GetWorkflowExecutionHistory in-order and returns +var WorkflowService_ListArchivedWorkflowExecutions_Helper = struct { + // Args accepts the parameters of ListArchivedWorkflowExecutions in-order and returns // the arguments struct for the function. Args func( - getRequest *shared.GetWorkflowExecutionHistoryRequest, - ) *WorkflowService_GetWorkflowExecutionHistory_Args + listRequest *shared.ListArchivedWorkflowExecutionsRequest, + ) *WorkflowService_ListArchivedWorkflowExecutions_Args // IsException returns true if the given error can be thrown - // by GetWorkflowExecutionHistory. + // by ListArchivedWorkflowExecutions. // - // An error can be thrown by GetWorkflowExecutionHistory only if the + // An error can be thrown by ListArchivedWorkflowExecutions 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 GetWorkflowExecutionHistory + // WrapResponse returns the result struct for ListArchivedWorkflowExecutions // given its return value and error. // // This allows mapping values and errors returned by - // GetWorkflowExecutionHistory into a serializable result struct. + // ListArchivedWorkflowExecutions into a serializable result struct. // WrapResponse returns a non-nil error if the provided - // error cannot be thrown by GetWorkflowExecutionHistory + // error cannot be thrown by ListArchivedWorkflowExecutions // - // value, err := GetWorkflowExecutionHistory(args) - // result, err := WorkflowService_GetWorkflowExecutionHistory_Helper.WrapResponse(value, err) + // value, err := ListArchivedWorkflowExecutions(args) + // result, err := WorkflowService_ListArchivedWorkflowExecutions_Helper.WrapResponse(value, err) // if err != nil { - // return fmt.Errorf("unexpected error from GetWorkflowExecutionHistory: %v", err) + // return fmt.Errorf("unexpected error from ListArchivedWorkflowExecutions: %v", err) // } // serialize(result) - WrapResponse func(*shared.GetWorkflowExecutionHistoryResponse, error) (*WorkflowService_GetWorkflowExecutionHistory_Result, error) + WrapResponse func(*shared.ListArchivedWorkflowExecutionsResponse, error) (*WorkflowService_ListArchivedWorkflowExecutions_Result, error) - // UnwrapResponse takes the result struct for GetWorkflowExecutionHistory + // UnwrapResponse takes the result struct for ListArchivedWorkflowExecutions // and returns the value or error returned by it. // - // The error is non-nil only if GetWorkflowExecutionHistory threw an + // The error is non-nil only if ListArchivedWorkflowExecutions threw an // exception. // // result := deserialize(bytes) - // value, err := WorkflowService_GetWorkflowExecutionHistory_Helper.UnwrapResponse(result) - UnwrapResponse func(*WorkflowService_GetWorkflowExecutionHistory_Result) (*shared.GetWorkflowExecutionHistoryResponse, error) + // value, err := WorkflowService_ListArchivedWorkflowExecutions_Helper.UnwrapResponse(result) + UnwrapResponse func(*WorkflowService_ListArchivedWorkflowExecutions_Result) (*shared.ListArchivedWorkflowExecutionsResponse, error) }{} func init() { - WorkflowService_GetWorkflowExecutionHistory_Helper.Args = func( - getRequest *shared.GetWorkflowExecutionHistoryRequest, - ) *WorkflowService_GetWorkflowExecutionHistory_Args { - return &WorkflowService_GetWorkflowExecutionHistory_Args{ - GetRequest: getRequest, + WorkflowService_ListArchivedWorkflowExecutions_Helper.Args = func( + listRequest *shared.ListArchivedWorkflowExecutionsRequest, + ) *WorkflowService_ListArchivedWorkflowExecutions_Args { + return &WorkflowService_ListArchivedWorkflowExecutions_Args{ + ListRequest: listRequest, } } - WorkflowService_GetWorkflowExecutionHistory_Helper.IsException = func(err error) bool { + WorkflowService_ListArchivedWorkflowExecutions_Helper.IsException = func(err error) bool { switch err.(type) { case *shared.BadRequestError: return true @@ -10958,42 +12854,42 @@ func init() { } } - WorkflowService_GetWorkflowExecutionHistory_Helper.WrapResponse = func(success *shared.GetWorkflowExecutionHistoryResponse, err error) (*WorkflowService_GetWorkflowExecutionHistory_Result, error) { + WorkflowService_ListArchivedWorkflowExecutions_Helper.WrapResponse = func(success *shared.ListArchivedWorkflowExecutionsResponse, err error) (*WorkflowService_ListArchivedWorkflowExecutions_Result, error) { if err == nil { - return &WorkflowService_GetWorkflowExecutionHistory_Result{Success: success}, nil + return &WorkflowService_ListArchivedWorkflowExecutions_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_GetWorkflowExecutionHistory_Result.BadRequestError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListArchivedWorkflowExecutions_Result.BadRequestError") } - return &WorkflowService_GetWorkflowExecutionHistory_Result{BadRequestError: e}, nil + return &WorkflowService_ListArchivedWorkflowExecutions_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_GetWorkflowExecutionHistory_Result.EntityNotExistError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListArchivedWorkflowExecutions_Result.EntityNotExistError") } - return &WorkflowService_GetWorkflowExecutionHistory_Result{EntityNotExistError: e}, nil + return &WorkflowService_ListArchivedWorkflowExecutions_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_GetWorkflowExecutionHistory_Result.ServiceBusyError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListArchivedWorkflowExecutions_Result.ServiceBusyError") } - return &WorkflowService_GetWorkflowExecutionHistory_Result{ServiceBusyError: e}, nil + return &WorkflowService_ListArchivedWorkflowExecutions_Result{ServiceBusyError: e}, nil case *shared.ClientVersionNotSupportedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetWorkflowExecutionHistory_Result.ClientVersionNotSupportedError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListArchivedWorkflowExecutions_Result.ClientVersionNotSupportedError") } - return &WorkflowService_GetWorkflowExecutionHistory_Result{ClientVersionNotSupportedError: e}, nil + return &WorkflowService_ListArchivedWorkflowExecutions_Result{ClientVersionNotSupportedError: e}, nil case *shared.AccessDeniedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetWorkflowExecutionHistory_Result.AccessDeniedError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListArchivedWorkflowExecutions_Result.AccessDeniedError") } - return &WorkflowService_GetWorkflowExecutionHistory_Result{AccessDeniedError: e}, nil + return &WorkflowService_ListArchivedWorkflowExecutions_Result{AccessDeniedError: e}, nil } return nil, err } - WorkflowService_GetWorkflowExecutionHistory_Helper.UnwrapResponse = func(result *WorkflowService_GetWorkflowExecutionHistory_Result) (success *shared.GetWorkflowExecutionHistoryResponse, err error) { + WorkflowService_ListArchivedWorkflowExecutions_Helper.UnwrapResponse = func(result *WorkflowService_ListArchivedWorkflowExecutions_Result) (success *shared.ListArchivedWorkflowExecutionsResponse, err error) { if result.BadRequestError != nil { err = result.BadRequestError return @@ -11026,22 +12922,22 @@ func init() { } -// WorkflowService_GetWorkflowExecutionHistory_Result represents the result of a WorkflowService.GetWorkflowExecutionHistory function call. +// WorkflowService_ListArchivedWorkflowExecutions_Result represents the result of a WorkflowService.ListArchivedWorkflowExecutions function call. // -// The result of a GetWorkflowExecutionHistory execution is sent and received over the wire as this struct. +// The result of a ListArchivedWorkflowExecutions 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_GetWorkflowExecutionHistory_Result struct { - // Value returned by GetWorkflowExecutionHistory after a successful execution. - Success *shared.GetWorkflowExecutionHistoryResponse `json:"success,omitempty"` - BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` - EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"` - ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` - ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` - AccessDeniedError *shared.AccessDeniedError `json:"accessDeniedError,omitempty"` +type WorkflowService_ListArchivedWorkflowExecutions_Result struct { + // Value returned by ListArchivedWorkflowExecutions after a successful execution. + Success *shared.ListArchivedWorkflowExecutionsResponse `json:"success,omitempty"` + BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` + EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"` + ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` + ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` + AccessDeniedError *shared.AccessDeniedError `json:"accessDeniedError,omitempty"` } -// ToWire translates a WorkflowService_GetWorkflowExecutionHistory_Result struct into a Thrift-level intermediate +// ToWire translates a WorkflowService_ListArchivedWorkflowExecutions_Result struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -11056,7 +12952,7 @@ type WorkflowService_GetWorkflowExecutionHistory_Result struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) ToWire() (wire.Value, error) { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) ToWire() (wire.Value, error) { var ( fields [6]wire.Field i int = 0 @@ -11114,23 +13010,23 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Result) ToWire() (wire.Valu } if i != 1 { - return wire.Value{}, fmt.Errorf("WorkflowService_GetWorkflowExecutionHistory_Result should have exactly one field: got %v fields", i) + return wire.Value{}, fmt.Errorf("WorkflowService_ListArchivedWorkflowExecutions_Result should have exactly one field: got %v fields", i) } return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _GetWorkflowExecutionHistoryResponse_Read(w wire.Value) (*shared.GetWorkflowExecutionHistoryResponse, error) { - var v shared.GetWorkflowExecutionHistoryResponse +func _ListArchivedWorkflowExecutionsResponse_Read(w wire.Value) (*shared.ListArchivedWorkflowExecutionsResponse, error) { + var v shared.ListArchivedWorkflowExecutionsResponse err := v.FromWire(w) return &v, err } -// FromWire deserializes a WorkflowService_GetWorkflowExecutionHistory_Result struct from its Thrift-level +// FromWire deserializes a WorkflowService_ListArchivedWorkflowExecutions_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_GetWorkflowExecutionHistory_Result struct +// An error is returned if we were unable to build a WorkflowService_ListArchivedWorkflowExecutions_Result struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -11138,19 +13034,19 @@ func _GetWorkflowExecutionHistoryResponse_Read(w wire.Value) (*shared.GetWorkflo // return nil, err // } // -// var v WorkflowService_GetWorkflowExecutionHistory_Result +// var v WorkflowService_ListArchivedWorkflowExecutions_Result // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) FromWire(w wire.Value) error { +func (v *WorkflowService_ListArchivedWorkflowExecutions_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 = _GetWorkflowExecutionHistoryResponse_Read(field.Value) + v.Success, err = _ListArchivedWorkflowExecutionsResponse_Read(field.Value) if err != nil { return err } @@ -11219,17 +13115,17 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Result) FromWire(w wire.Val count++ } if count != 1 { - return fmt.Errorf("WorkflowService_GetWorkflowExecutionHistory_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_ListArchivedWorkflowExecutions_Result should have exactly one field: got %v fields", count) } return nil } -// Encode serializes a WorkflowService_GetWorkflowExecutionHistory_Result struct directly into bytes, without going +// Encode serializes a WorkflowService_ListArchivedWorkflowExecutions_Result struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a WorkflowService_GetWorkflowExecutionHistory_Result struct could not be encoded. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) Encode(sw stream.Writer) error { +// An error is returned if a WorkflowService_ListArchivedWorkflowExecutions_Result struct could not be encoded. +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } @@ -11327,24 +13223,24 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Result) Encode(sw stream.Wr } if count != 1 { - return fmt.Errorf("WorkflowService_GetWorkflowExecutionHistory_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_ListArchivedWorkflowExecutions_Result should have exactly one field: got %v fields", count) } return sw.WriteStructEnd() } -func _GetWorkflowExecutionHistoryResponse_Decode(sr stream.Reader) (*shared.GetWorkflowExecutionHistoryResponse, error) { - var v shared.GetWorkflowExecutionHistoryResponse +func _ListArchivedWorkflowExecutionsResponse_Decode(sr stream.Reader) (*shared.ListArchivedWorkflowExecutionsResponse, error) { + var v shared.ListArchivedWorkflowExecutionsResponse err := v.Decode(sr) return &v, err } -// Decode deserializes a WorkflowService_GetWorkflowExecutionHistory_Result struct directly from its Thrift-level +// Decode deserializes a WorkflowService_ListArchivedWorkflowExecutions_Result struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a WorkflowService_GetWorkflowExecutionHistory_Result struct could not be generated from the wire +// An error is returned if a WorkflowService_ListArchivedWorkflowExecutions_Result struct could not be generated from the wire // representation. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) Decode(sr stream.Reader) error { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -11358,7 +13254,7 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Result) Decode(sr stream.Re for ok { switch { case fh.ID == 0 && fh.Type == wire.TStruct: - v.Success, err = _GetWorkflowExecutionHistoryResponse_Decode(sr) + v.Success, err = _ListArchivedWorkflowExecutionsResponse_Decode(sr) if err != nil { return err } @@ -11432,15 +13328,15 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Result) Decode(sr stream.Re count++ } if count != 1 { - return fmt.Errorf("WorkflowService_GetWorkflowExecutionHistory_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_ListArchivedWorkflowExecutions_Result should have exactly one field: got %v fields", count) } return nil } -// String returns a readable string representation of a WorkflowService_GetWorkflowExecutionHistory_Result +// String returns a readable string representation of a WorkflowService_ListArchivedWorkflowExecutions_Result // struct. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) String() string { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) String() string { if v == nil { return "" } @@ -11472,14 +13368,14 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Result) String() string { i++ } - return fmt.Sprintf("WorkflowService_GetWorkflowExecutionHistory_Result{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_ListArchivedWorkflowExecutions_Result{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_GetWorkflowExecutionHistory_Result match the -// provided WorkflowService_GetWorkflowExecutionHistory_Result. +// Equals returns true if all the fields of this WorkflowService_ListArchivedWorkflowExecutions_Result match the +// provided WorkflowService_ListArchivedWorkflowExecutions_Result. // // This function performs a deep comparison. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) Equals(rhs *WorkflowService_GetWorkflowExecutionHistory_Result) bool { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) Equals(rhs *WorkflowService_ListArchivedWorkflowExecutions_Result) bool { if v == nil { return rhs == nil } else if rhs == nil { @@ -11508,8 +13404,8 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Result) Equals(rhs *Workflo } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_GetWorkflowExecutionHistory_Result. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_ListArchivedWorkflowExecutions_Result. +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } @@ -11536,7 +13432,7 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Result) MarshalLogObject(en // GetSuccess returns the value of Success if it is set or its // zero value if it is unset. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) GetSuccess() (o *shared.GetWorkflowExecutionHistoryResponse) { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) GetSuccess() (o *shared.ListArchivedWorkflowExecutionsResponse) { if v != nil && v.Success != nil { return v.Success } @@ -11545,13 +13441,13 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Result) GetSuccess() (o *sh } // IsSetSuccess returns true if Success is not nil. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) IsSetSuccess() bool { +func (v *WorkflowService_ListArchivedWorkflowExecutions_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_GetWorkflowExecutionHistory_Result) GetBadRequestError() (o *shared.BadRequestError) { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) GetBadRequestError() (o *shared.BadRequestError) { if v != nil && v.BadRequestError != nil { return v.BadRequestError } @@ -11560,13 +13456,13 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Result) GetBadRequestError( } // IsSetBadRequestError returns true if BadRequestError is not nil. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) IsSetBadRequestError() bool { +func (v *WorkflowService_ListArchivedWorkflowExecutions_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_GetWorkflowExecutionHistory_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) { if v != nil && v.EntityNotExistError != nil { return v.EntityNotExistError } @@ -11575,13 +13471,13 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Result) GetEntityNotExistEr } // IsSetEntityNotExistError returns true if EntityNotExistError is not nil. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) IsSetEntityNotExistError() bool { +func (v *WorkflowService_ListArchivedWorkflowExecutions_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_GetWorkflowExecutionHistory_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { if v != nil && v.ServiceBusyError != nil { return v.ServiceBusyError } @@ -11590,13 +13486,13 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Result) GetServiceBusyError } // IsSetServiceBusyError returns true if ServiceBusyError is not nil. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) IsSetServiceBusyError() bool { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) IsSetServiceBusyError() bool { return v != nil && v.ServiceBusyError != nil } // GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its // zero value if it is unset. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { if v != nil && v.ClientVersionNotSupportedError != nil { return v.ClientVersionNotSupportedError } @@ -11605,13 +13501,13 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Result) GetClientVersionNot } // IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) IsSetClientVersionNotSupportedError() bool { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) IsSetClientVersionNotSupportedError() bool { return v != nil && v.ClientVersionNotSupportedError != nil } // GetAccessDeniedError returns the value of AccessDeniedError if it is set or its // zero value if it is unset. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) { if v != nil && v.AccessDeniedError != nil { return v.AccessDeniedError } @@ -11620,33 +13516,33 @@ func (v *WorkflowService_GetWorkflowExecutionHistory_Result) GetAccessDeniedErro } // IsSetAccessDeniedError returns true if AccessDeniedError is not nil. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) IsSetAccessDeniedError() bool { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) IsSetAccessDeniedError() bool { return v != nil && v.AccessDeniedError != 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 "GetWorkflowExecutionHistory" for this struct. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) MethodName() string { - return "GetWorkflowExecutionHistory" +// This will always be "ListArchivedWorkflowExecutions" for this struct. +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) MethodName() string { + return "ListArchivedWorkflowExecutions" } // EnvelopeType returns the kind of value inside this struct. // // This will always be Reply for this struct. -func (v *WorkflowService_GetWorkflowExecutionHistory_Result) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) EnvelopeType() wire.EnvelopeType { return wire.Reply } -// WorkflowService_ListArchivedWorkflowExecutions_Args represents the arguments for the WorkflowService.ListArchivedWorkflowExecutions function. +// WorkflowService_ListClosedWorkflowExecutions_Args represents the arguments for the WorkflowService.ListClosedWorkflowExecutions function. // -// The arguments for ListArchivedWorkflowExecutions are sent and received over the wire as this struct. -type WorkflowService_ListArchivedWorkflowExecutions_Args struct { - ListRequest *shared.ListArchivedWorkflowExecutionsRequest `json:"listRequest,omitempty"` +// The arguments for ListClosedWorkflowExecutions are sent and received over the wire as this struct. +type WorkflowService_ListClosedWorkflowExecutions_Args struct { + ListRequest *shared.ListClosedWorkflowExecutionsRequest `json:"listRequest,omitempty"` } -// ToWire translates a WorkflowService_ListArchivedWorkflowExecutions_Args struct into a Thrift-level intermediate +// ToWire translates a WorkflowService_ListClosedWorkflowExecutions_Args struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -11661,7 +13557,7 @@ type WorkflowService_ListArchivedWorkflowExecutions_Args struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) ToWire() (wire.Value, error) { +func (v *WorkflowService_ListClosedWorkflowExecutions_Args) ToWire() (wire.Value, error) { var ( fields [1]wire.Field i int = 0 @@ -11681,17 +13577,17 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) ToWire() (wire.Val return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _ListArchivedWorkflowExecutionsRequest_Read(w wire.Value) (*shared.ListArchivedWorkflowExecutionsRequest, error) { - var v shared.ListArchivedWorkflowExecutionsRequest +func _ListClosedWorkflowExecutionsRequest_Read(w wire.Value) (*shared.ListClosedWorkflowExecutionsRequest, error) { + var v shared.ListClosedWorkflowExecutionsRequest err := v.FromWire(w) return &v, err } -// FromWire deserializes a WorkflowService_ListArchivedWorkflowExecutions_Args struct from its Thrift-level +// FromWire deserializes a WorkflowService_ListClosedWorkflowExecutions_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_ListArchivedWorkflowExecutions_Args struct +// An error is returned if we were unable to build a WorkflowService_ListClosedWorkflowExecutions_Args struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -11699,19 +13595,19 @@ func _ListArchivedWorkflowExecutionsRequest_Read(w wire.Value) (*shared.ListArch // return nil, err // } // -// var v WorkflowService_ListArchivedWorkflowExecutions_Args +// var v WorkflowService_ListClosedWorkflowExecutions_Args // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) FromWire(w wire.Value) error { +func (v *WorkflowService_ListClosedWorkflowExecutions_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.ListRequest, err = _ListArchivedWorkflowExecutionsRequest_Read(field.Value) + v.ListRequest, err = _ListClosedWorkflowExecutionsRequest_Read(field.Value) if err != nil { return err } @@ -11723,11 +13619,11 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) FromWire(w wire.Va return nil } -// Encode serializes a WorkflowService_ListArchivedWorkflowExecutions_Args struct directly into bytes, without going +// Encode serializes a WorkflowService_ListClosedWorkflowExecutions_Args struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a WorkflowService_ListArchivedWorkflowExecutions_Args struct could not be encoded. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) Encode(sw stream.Writer) error { +// An error is returned if a WorkflowService_ListClosedWorkflowExecutions_Args struct could not be encoded. +func (v *WorkflowService_ListClosedWorkflowExecutions_Args) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } @@ -11747,18 +13643,18 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) Encode(sw stream.W return sw.WriteStructEnd() } -func _ListArchivedWorkflowExecutionsRequest_Decode(sr stream.Reader) (*shared.ListArchivedWorkflowExecutionsRequest, error) { - var v shared.ListArchivedWorkflowExecutionsRequest +func _ListClosedWorkflowExecutionsRequest_Decode(sr stream.Reader) (*shared.ListClosedWorkflowExecutionsRequest, error) { + var v shared.ListClosedWorkflowExecutionsRequest err := v.Decode(sr) return &v, err } -// Decode deserializes a WorkflowService_ListArchivedWorkflowExecutions_Args struct directly from its Thrift-level +// Decode deserializes a WorkflowService_ListClosedWorkflowExecutions_Args struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a WorkflowService_ListArchivedWorkflowExecutions_Args struct could not be generated from the wire +// An error is returned if a WorkflowService_ListClosedWorkflowExecutions_Args struct could not be generated from the wire // representation. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) Decode(sr stream.Reader) error { +func (v *WorkflowService_ListClosedWorkflowExecutions_Args) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -11772,7 +13668,7 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) Decode(sr stream.R for ok { switch { case fh.ID == 1 && fh.Type == wire.TStruct: - v.ListRequest, err = _ListArchivedWorkflowExecutionsRequest_Decode(sr) + v.ListRequest, err = _ListClosedWorkflowExecutionsRequest_Decode(sr) if err != nil { return err } @@ -11799,9 +13695,9 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) Decode(sr stream.R return nil } -// String returns a readable string representation of a WorkflowService_ListArchivedWorkflowExecutions_Args +// String returns a readable string representation of a WorkflowService_ListClosedWorkflowExecutions_Args // struct. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) String() string { +func (v *WorkflowService_ListClosedWorkflowExecutions_Args) String() string { if v == nil { return "" } @@ -11813,14 +13709,14 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) String() string { i++ } - return fmt.Sprintf("WorkflowService_ListArchivedWorkflowExecutions_Args{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_ListClosedWorkflowExecutions_Args{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_ListArchivedWorkflowExecutions_Args match the -// provided WorkflowService_ListArchivedWorkflowExecutions_Args. +// Equals returns true if all the fields of this WorkflowService_ListClosedWorkflowExecutions_Args match the +// provided WorkflowService_ListClosedWorkflowExecutions_Args. // // This function performs a deep comparison. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) Equals(rhs *WorkflowService_ListArchivedWorkflowExecutions_Args) bool { +func (v *WorkflowService_ListClosedWorkflowExecutions_Args) Equals(rhs *WorkflowService_ListClosedWorkflowExecutions_Args) bool { if v == nil { return rhs == nil } else if rhs == nil { @@ -11834,8 +13730,8 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) Equals(rhs *Workfl } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_ListArchivedWorkflowExecutions_Args. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_ListClosedWorkflowExecutions_Args. +func (v *WorkflowService_ListClosedWorkflowExecutions_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } @@ -11847,7 +13743,7 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) MarshalLogObject(e // GetListRequest returns the value of ListRequest if it is set or its // zero value if it is unset. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) GetListRequest() (o *shared.ListArchivedWorkflowExecutionsRequest) { +func (v *WorkflowService_ListClosedWorkflowExecutions_Args) GetListRequest() (o *shared.ListClosedWorkflowExecutionsRequest) { if v != nil && v.ListRequest != nil { return v.ListRequest } @@ -11856,80 +13752,80 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) GetListRequest() ( } // IsSetListRequest returns true if ListRequest is not nil. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) IsSetListRequest() bool { +func (v *WorkflowService_ListClosedWorkflowExecutions_Args) IsSetListRequest() bool { return v != nil && v.ListRequest != 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 "ListArchivedWorkflowExecutions" for this struct. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) MethodName() string { - return "ListArchivedWorkflowExecutions" +// This will always be "ListClosedWorkflowExecutions" for this struct. +func (v *WorkflowService_ListClosedWorkflowExecutions_Args) MethodName() string { + return "ListClosedWorkflowExecutions" } // EnvelopeType returns the kind of value inside this struct. // // This will always be Call for this struct. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_ListClosedWorkflowExecutions_Args) EnvelopeType() wire.EnvelopeType { return wire.Call } -// WorkflowService_ListArchivedWorkflowExecutions_Helper provides functions that aid in handling the -// parameters and return values of the WorkflowService.ListArchivedWorkflowExecutions +// WorkflowService_ListClosedWorkflowExecutions_Helper provides functions that aid in handling the +// parameters and return values of the WorkflowService.ListClosedWorkflowExecutions // function. -var WorkflowService_ListArchivedWorkflowExecutions_Helper = struct { - // Args accepts the parameters of ListArchivedWorkflowExecutions in-order and returns +var WorkflowService_ListClosedWorkflowExecutions_Helper = struct { + // Args accepts the parameters of ListClosedWorkflowExecutions in-order and returns // the arguments struct for the function. Args func( - listRequest *shared.ListArchivedWorkflowExecutionsRequest, - ) *WorkflowService_ListArchivedWorkflowExecutions_Args + listRequest *shared.ListClosedWorkflowExecutionsRequest, + ) *WorkflowService_ListClosedWorkflowExecutions_Args // IsException returns true if the given error can be thrown - // by ListArchivedWorkflowExecutions. + // by ListClosedWorkflowExecutions. // - // An error can be thrown by ListArchivedWorkflowExecutions only if the + // An error can be thrown by ListClosedWorkflowExecutions 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 ListArchivedWorkflowExecutions + // WrapResponse returns the result struct for ListClosedWorkflowExecutions // given its return value and error. // // This allows mapping values and errors returned by - // ListArchivedWorkflowExecutions into a serializable result struct. + // ListClosedWorkflowExecutions into a serializable result struct. // WrapResponse returns a non-nil error if the provided - // error cannot be thrown by ListArchivedWorkflowExecutions + // error cannot be thrown by ListClosedWorkflowExecutions // - // value, err := ListArchivedWorkflowExecutions(args) - // result, err := WorkflowService_ListArchivedWorkflowExecutions_Helper.WrapResponse(value, err) + // value, err := ListClosedWorkflowExecutions(args) + // result, err := WorkflowService_ListClosedWorkflowExecutions_Helper.WrapResponse(value, err) // if err != nil { - // return fmt.Errorf("unexpected error from ListArchivedWorkflowExecutions: %v", err) + // return fmt.Errorf("unexpected error from ListClosedWorkflowExecutions: %v", err) // } // serialize(result) - WrapResponse func(*shared.ListArchivedWorkflowExecutionsResponse, error) (*WorkflowService_ListArchivedWorkflowExecutions_Result, error) + WrapResponse func(*shared.ListClosedWorkflowExecutionsResponse, error) (*WorkflowService_ListClosedWorkflowExecutions_Result, error) - // UnwrapResponse takes the result struct for ListArchivedWorkflowExecutions + // UnwrapResponse takes the result struct for ListClosedWorkflowExecutions // and returns the value or error returned by it. // - // The error is non-nil only if ListArchivedWorkflowExecutions threw an + // The error is non-nil only if ListClosedWorkflowExecutions threw an // exception. // // result := deserialize(bytes) - // value, err := WorkflowService_ListArchivedWorkflowExecutions_Helper.UnwrapResponse(result) - UnwrapResponse func(*WorkflowService_ListArchivedWorkflowExecutions_Result) (*shared.ListArchivedWorkflowExecutionsResponse, error) + // value, err := WorkflowService_ListClosedWorkflowExecutions_Helper.UnwrapResponse(result) + UnwrapResponse func(*WorkflowService_ListClosedWorkflowExecutions_Result) (*shared.ListClosedWorkflowExecutionsResponse, error) }{} func init() { - WorkflowService_ListArchivedWorkflowExecutions_Helper.Args = func( - listRequest *shared.ListArchivedWorkflowExecutionsRequest, - ) *WorkflowService_ListArchivedWorkflowExecutions_Args { - return &WorkflowService_ListArchivedWorkflowExecutions_Args{ + WorkflowService_ListClosedWorkflowExecutions_Helper.Args = func( + listRequest *shared.ListClosedWorkflowExecutionsRequest, + ) *WorkflowService_ListClosedWorkflowExecutions_Args { + return &WorkflowService_ListClosedWorkflowExecutions_Args{ ListRequest: listRequest, } } - WorkflowService_ListArchivedWorkflowExecutions_Helper.IsException = func(err error) bool { + WorkflowService_ListClosedWorkflowExecutions_Helper.IsException = func(err error) bool { switch err.(type) { case *shared.BadRequestError: return true @@ -11946,42 +13842,42 @@ func init() { } } - WorkflowService_ListArchivedWorkflowExecutions_Helper.WrapResponse = func(success *shared.ListArchivedWorkflowExecutionsResponse, err error) (*WorkflowService_ListArchivedWorkflowExecutions_Result, error) { + WorkflowService_ListClosedWorkflowExecutions_Helper.WrapResponse = func(success *shared.ListClosedWorkflowExecutionsResponse, err error) (*WorkflowService_ListClosedWorkflowExecutions_Result, error) { if err == nil { - return &WorkflowService_ListArchivedWorkflowExecutions_Result{Success: success}, nil + return &WorkflowService_ListClosedWorkflowExecutions_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_ListArchivedWorkflowExecutions_Result.BadRequestError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListClosedWorkflowExecutions_Result.BadRequestError") } - return &WorkflowService_ListArchivedWorkflowExecutions_Result{BadRequestError: e}, nil + return &WorkflowService_ListClosedWorkflowExecutions_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_ListArchivedWorkflowExecutions_Result.EntityNotExistError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListClosedWorkflowExecutions_Result.EntityNotExistError") } - return &WorkflowService_ListArchivedWorkflowExecutions_Result{EntityNotExistError: e}, nil + return &WorkflowService_ListClosedWorkflowExecutions_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_ListArchivedWorkflowExecutions_Result.ServiceBusyError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListClosedWorkflowExecutions_Result.ServiceBusyError") } - return &WorkflowService_ListArchivedWorkflowExecutions_Result{ServiceBusyError: e}, nil + return &WorkflowService_ListClosedWorkflowExecutions_Result{ServiceBusyError: e}, nil case *shared.ClientVersionNotSupportedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListArchivedWorkflowExecutions_Result.ClientVersionNotSupportedError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListClosedWorkflowExecutions_Result.ClientVersionNotSupportedError") } - return &WorkflowService_ListArchivedWorkflowExecutions_Result{ClientVersionNotSupportedError: e}, nil + return &WorkflowService_ListClosedWorkflowExecutions_Result{ClientVersionNotSupportedError: e}, nil case *shared.AccessDeniedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListArchivedWorkflowExecutions_Result.AccessDeniedError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListClosedWorkflowExecutions_Result.AccessDeniedError") } - return &WorkflowService_ListArchivedWorkflowExecutions_Result{AccessDeniedError: e}, nil + return &WorkflowService_ListClosedWorkflowExecutions_Result{AccessDeniedError: e}, nil } return nil, err } - WorkflowService_ListArchivedWorkflowExecutions_Helper.UnwrapResponse = func(result *WorkflowService_ListArchivedWorkflowExecutions_Result) (success *shared.ListArchivedWorkflowExecutionsResponse, err error) { + WorkflowService_ListClosedWorkflowExecutions_Helper.UnwrapResponse = func(result *WorkflowService_ListClosedWorkflowExecutions_Result) (success *shared.ListClosedWorkflowExecutionsResponse, err error) { if result.BadRequestError != nil { err = result.BadRequestError return @@ -12014,22 +13910,22 @@ func init() { } -// WorkflowService_ListArchivedWorkflowExecutions_Result represents the result of a WorkflowService.ListArchivedWorkflowExecutions function call. +// WorkflowService_ListClosedWorkflowExecutions_Result represents the result of a WorkflowService.ListClosedWorkflowExecutions function call. // -// The result of a ListArchivedWorkflowExecutions execution is sent and received over the wire as this struct. +// The result of a ListClosedWorkflowExecutions 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_ListArchivedWorkflowExecutions_Result struct { - // Value returned by ListArchivedWorkflowExecutions after a successful execution. - Success *shared.ListArchivedWorkflowExecutionsResponse `json:"success,omitempty"` - BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` - EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"` - ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` - ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` - AccessDeniedError *shared.AccessDeniedError `json:"accessDeniedError,omitempty"` +type WorkflowService_ListClosedWorkflowExecutions_Result struct { + // Value returned by ListClosedWorkflowExecutions after a successful execution. + Success *shared.ListClosedWorkflowExecutionsResponse `json:"success,omitempty"` + BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` + EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"` + ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` + ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` + AccessDeniedError *shared.AccessDeniedError `json:"accessDeniedError,omitempty"` } -// ToWire translates a WorkflowService_ListArchivedWorkflowExecutions_Result struct into a Thrift-level intermediate +// ToWire translates a WorkflowService_ListClosedWorkflowExecutions_Result struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -12044,7 +13940,7 @@ type WorkflowService_ListArchivedWorkflowExecutions_Result struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) ToWire() (wire.Value, error) { +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) ToWire() (wire.Value, error) { var ( fields [6]wire.Field i int = 0 @@ -12102,23 +13998,23 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) ToWire() (wire.V } if i != 1 { - return wire.Value{}, fmt.Errorf("WorkflowService_ListArchivedWorkflowExecutions_Result should have exactly one field: got %v fields", i) + return wire.Value{}, fmt.Errorf("WorkflowService_ListClosedWorkflowExecutions_Result should have exactly one field: got %v fields", i) } return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _ListArchivedWorkflowExecutionsResponse_Read(w wire.Value) (*shared.ListArchivedWorkflowExecutionsResponse, error) { - var v shared.ListArchivedWorkflowExecutionsResponse +func _ListClosedWorkflowExecutionsResponse_Read(w wire.Value) (*shared.ListClosedWorkflowExecutionsResponse, error) { + var v shared.ListClosedWorkflowExecutionsResponse err := v.FromWire(w) return &v, err } -// FromWire deserializes a WorkflowService_ListArchivedWorkflowExecutions_Result struct from its Thrift-level +// FromWire deserializes a WorkflowService_ListClosedWorkflowExecutions_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_ListArchivedWorkflowExecutions_Result struct +// An error is returned if we were unable to build a WorkflowService_ListClosedWorkflowExecutions_Result struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -12126,19 +14022,19 @@ func _ListArchivedWorkflowExecutionsResponse_Read(w wire.Value) (*shared.ListArc // return nil, err // } // -// var v WorkflowService_ListArchivedWorkflowExecutions_Result +// var v WorkflowService_ListClosedWorkflowExecutions_Result // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) FromWire(w wire.Value) error { +func (v *WorkflowService_ListClosedWorkflowExecutions_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 = _ListArchivedWorkflowExecutionsResponse_Read(field.Value) + v.Success, err = _ListClosedWorkflowExecutionsResponse_Read(field.Value) if err != nil { return err } @@ -12207,17 +14103,17 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) FromWire(w wire. count++ } if count != 1 { - return fmt.Errorf("WorkflowService_ListArchivedWorkflowExecutions_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_ListClosedWorkflowExecutions_Result should have exactly one field: got %v fields", count) } return nil } -// Encode serializes a WorkflowService_ListArchivedWorkflowExecutions_Result struct directly into bytes, without going +// Encode serializes a WorkflowService_ListClosedWorkflowExecutions_Result struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a WorkflowService_ListArchivedWorkflowExecutions_Result struct could not be encoded. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) Encode(sw stream.Writer) error { +// An error is returned if a WorkflowService_ListClosedWorkflowExecutions_Result struct could not be encoded. +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } @@ -12315,24 +14211,24 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) Encode(sw stream } if count != 1 { - return fmt.Errorf("WorkflowService_ListArchivedWorkflowExecutions_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_ListClosedWorkflowExecutions_Result should have exactly one field: got %v fields", count) } return sw.WriteStructEnd() } -func _ListArchivedWorkflowExecutionsResponse_Decode(sr stream.Reader) (*shared.ListArchivedWorkflowExecutionsResponse, error) { - var v shared.ListArchivedWorkflowExecutionsResponse +func _ListClosedWorkflowExecutionsResponse_Decode(sr stream.Reader) (*shared.ListClosedWorkflowExecutionsResponse, error) { + var v shared.ListClosedWorkflowExecutionsResponse err := v.Decode(sr) return &v, err } -// Decode deserializes a WorkflowService_ListArchivedWorkflowExecutions_Result struct directly from its Thrift-level +// Decode deserializes a WorkflowService_ListClosedWorkflowExecutions_Result struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a WorkflowService_ListArchivedWorkflowExecutions_Result struct could not be generated from the wire +// An error is returned if a WorkflowService_ListClosedWorkflowExecutions_Result struct could not be generated from the wire // representation. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) Decode(sr stream.Reader) error { +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -12346,7 +14242,7 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) Decode(sr stream for ok { switch { case fh.ID == 0 && fh.Type == wire.TStruct: - v.Success, err = _ListArchivedWorkflowExecutionsResponse_Decode(sr) + v.Success, err = _ListClosedWorkflowExecutionsResponse_Decode(sr) if err != nil { return err } @@ -12420,15 +14316,15 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) Decode(sr stream count++ } if count != 1 { - return fmt.Errorf("WorkflowService_ListArchivedWorkflowExecutions_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_ListClosedWorkflowExecutions_Result should have exactly one field: got %v fields", count) } return nil } -// String returns a readable string representation of a WorkflowService_ListArchivedWorkflowExecutions_Result +// String returns a readable string representation of a WorkflowService_ListClosedWorkflowExecutions_Result // struct. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) String() string { +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) String() string { if v == nil { return "" } @@ -12460,14 +14356,14 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) String() string i++ } - return fmt.Sprintf("WorkflowService_ListArchivedWorkflowExecutions_Result{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_ListClosedWorkflowExecutions_Result{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_ListArchivedWorkflowExecutions_Result match the -// provided WorkflowService_ListArchivedWorkflowExecutions_Result. +// Equals returns true if all the fields of this WorkflowService_ListClosedWorkflowExecutions_Result match the +// provided WorkflowService_ListClosedWorkflowExecutions_Result. // // This function performs a deep comparison. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) Equals(rhs *WorkflowService_ListArchivedWorkflowExecutions_Result) bool { +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) Equals(rhs *WorkflowService_ListClosedWorkflowExecutions_Result) bool { if v == nil { return rhs == nil } else if rhs == nil { @@ -12496,8 +14392,8 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) Equals(rhs *Work } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_ListArchivedWorkflowExecutions_Result. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_ListClosedWorkflowExecutions_Result. +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } @@ -12524,7 +14420,7 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) MarshalLogObject // GetSuccess returns the value of Success if it is set or its // zero value if it is unset. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) GetSuccess() (o *shared.ListArchivedWorkflowExecutionsResponse) { +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) GetSuccess() (o *shared.ListClosedWorkflowExecutionsResponse) { if v != nil && v.Success != nil { return v.Success } @@ -12533,13 +14429,13 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) GetSuccess() (o } // IsSetSuccess returns true if Success is not nil. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) IsSetSuccess() bool { +func (v *WorkflowService_ListClosedWorkflowExecutions_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_ListArchivedWorkflowExecutions_Result) GetBadRequestError() (o *shared.BadRequestError) { +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) GetBadRequestError() (o *shared.BadRequestError) { if v != nil && v.BadRequestError != nil { return v.BadRequestError } @@ -12548,13 +14444,13 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) GetBadRequestErr } // IsSetBadRequestError returns true if BadRequestError is not nil. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) IsSetBadRequestError() bool { +func (v *WorkflowService_ListClosedWorkflowExecutions_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_ListArchivedWorkflowExecutions_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) { +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) { if v != nil && v.EntityNotExistError != nil { return v.EntityNotExistError } @@ -12563,13 +14459,13 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) GetEntityNotExis } // IsSetEntityNotExistError returns true if EntityNotExistError is not nil. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) IsSetEntityNotExistError() bool { +func (v *WorkflowService_ListClosedWorkflowExecutions_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_ListArchivedWorkflowExecutions_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { if v != nil && v.ServiceBusyError != nil { return v.ServiceBusyError } @@ -12578,13 +14474,13 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) GetServiceBusyEr } // IsSetServiceBusyError returns true if ServiceBusyError is not nil. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) IsSetServiceBusyError() bool { +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) IsSetServiceBusyError() bool { return v != nil && v.ServiceBusyError != nil } // GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its // zero value if it is unset. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { if v != nil && v.ClientVersionNotSupportedError != nil { return v.ClientVersionNotSupportedError } @@ -12593,13 +14489,13 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) GetClientVersion } // IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) IsSetClientVersionNotSupportedError() bool { +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) IsSetClientVersionNotSupportedError() bool { return v != nil && v.ClientVersionNotSupportedError != nil } // GetAccessDeniedError returns the value of AccessDeniedError if it is set or its // zero value if it is unset. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) { +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) { if v != nil && v.AccessDeniedError != nil { return v.AccessDeniedError } @@ -12608,33 +14504,33 @@ func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) GetAccessDeniedE } // IsSetAccessDeniedError returns true if AccessDeniedError is not nil. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) IsSetAccessDeniedError() bool { +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) IsSetAccessDeniedError() bool { return v != nil && v.AccessDeniedError != 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 "ListArchivedWorkflowExecutions" for this struct. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) MethodName() string { - return "ListArchivedWorkflowExecutions" +// This will always be "ListClosedWorkflowExecutions" for this struct. +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) MethodName() string { + return "ListClosedWorkflowExecutions" } // EnvelopeType returns the kind of value inside this struct. // // This will always be Reply for this struct. -func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_ListClosedWorkflowExecutions_Result) EnvelopeType() wire.EnvelopeType { return wire.Reply } -// WorkflowService_ListClosedWorkflowExecutions_Args represents the arguments for the WorkflowService.ListClosedWorkflowExecutions function. +// WorkflowService_ListDomains_Args represents the arguments for the WorkflowService.ListDomains function. // -// The arguments for ListClosedWorkflowExecutions are sent and received over the wire as this struct. -type WorkflowService_ListClosedWorkflowExecutions_Args struct { - ListRequest *shared.ListClosedWorkflowExecutionsRequest `json:"listRequest,omitempty"` +// The arguments for ListDomains are sent and received over the wire as this struct. +type WorkflowService_ListDomains_Args struct { + ListRequest *shared.ListDomainsRequest `json:"listRequest,omitempty"` } -// ToWire translates a WorkflowService_ListClosedWorkflowExecutions_Args struct into a Thrift-level intermediate +// ToWire translates a WorkflowService_ListDomains_Args struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -12649,7 +14545,7 @@ type WorkflowService_ListClosedWorkflowExecutions_Args struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_ListClosedWorkflowExecutions_Args) ToWire() (wire.Value, error) { +func (v *WorkflowService_ListDomains_Args) ToWire() (wire.Value, error) { var ( fields [1]wire.Field i int = 0 @@ -12669,17 +14565,17 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Args) ToWire() (wire.Value return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _ListClosedWorkflowExecutionsRequest_Read(w wire.Value) (*shared.ListClosedWorkflowExecutionsRequest, error) { - var v shared.ListClosedWorkflowExecutionsRequest +func _ListDomainsRequest_Read(w wire.Value) (*shared.ListDomainsRequest, error) { + var v shared.ListDomainsRequest err := v.FromWire(w) return &v, err } -// FromWire deserializes a WorkflowService_ListClosedWorkflowExecutions_Args struct from its Thrift-level +// FromWire deserializes a WorkflowService_ListDomains_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_ListClosedWorkflowExecutions_Args struct +// An error is returned if we were unable to build a WorkflowService_ListDomains_Args struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -12687,19 +14583,19 @@ func _ListClosedWorkflowExecutionsRequest_Read(w wire.Value) (*shared.ListClosed // return nil, err // } // -// var v WorkflowService_ListClosedWorkflowExecutions_Args +// var v WorkflowService_ListDomains_Args // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_ListClosedWorkflowExecutions_Args) FromWire(w wire.Value) error { +func (v *WorkflowService_ListDomains_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.ListRequest, err = _ListClosedWorkflowExecutionsRequest_Read(field.Value) + v.ListRequest, err = _ListDomainsRequest_Read(field.Value) if err != nil { return err } @@ -12711,11 +14607,11 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Args) FromWire(w wire.Valu return nil } -// Encode serializes a WorkflowService_ListClosedWorkflowExecutions_Args struct directly into bytes, without going +// Encode serializes a WorkflowService_ListDomains_Args struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a WorkflowService_ListClosedWorkflowExecutions_Args struct could not be encoded. -func (v *WorkflowService_ListClosedWorkflowExecutions_Args) Encode(sw stream.Writer) error { +// An error is returned if a WorkflowService_ListDomains_Args struct could not be encoded. +func (v *WorkflowService_ListDomains_Args) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } @@ -12735,18 +14631,18 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Args) Encode(sw stream.Wri return sw.WriteStructEnd() } -func _ListClosedWorkflowExecutionsRequest_Decode(sr stream.Reader) (*shared.ListClosedWorkflowExecutionsRequest, error) { - var v shared.ListClosedWorkflowExecutionsRequest +func _ListDomainsRequest_Decode(sr stream.Reader) (*shared.ListDomainsRequest, error) { + var v shared.ListDomainsRequest err := v.Decode(sr) return &v, err } -// Decode deserializes a WorkflowService_ListClosedWorkflowExecutions_Args struct directly from its Thrift-level +// Decode deserializes a WorkflowService_ListDomains_Args struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a WorkflowService_ListClosedWorkflowExecutions_Args struct could not be generated from the wire +// An error is returned if a WorkflowService_ListDomains_Args struct could not be generated from the wire // representation. -func (v *WorkflowService_ListClosedWorkflowExecutions_Args) Decode(sr stream.Reader) error { +func (v *WorkflowService_ListDomains_Args) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -12760,7 +14656,7 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Args) Decode(sr stream.Rea for ok { switch { case fh.ID == 1 && fh.Type == wire.TStruct: - v.ListRequest, err = _ListClosedWorkflowExecutionsRequest_Decode(sr) + v.ListRequest, err = _ListDomainsRequest_Decode(sr) if err != nil { return err } @@ -12787,9 +14683,9 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Args) Decode(sr stream.Rea return nil } -// String returns a readable string representation of a WorkflowService_ListClosedWorkflowExecutions_Args +// String returns a readable string representation of a WorkflowService_ListDomains_Args // struct. -func (v *WorkflowService_ListClosedWorkflowExecutions_Args) String() string { +func (v *WorkflowService_ListDomains_Args) String() string { if v == nil { return "" } @@ -12801,14 +14697,14 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Args) String() string { i++ } - return fmt.Sprintf("WorkflowService_ListClosedWorkflowExecutions_Args{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_ListDomains_Args{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_ListClosedWorkflowExecutions_Args match the -// provided WorkflowService_ListClosedWorkflowExecutions_Args. +// Equals returns true if all the fields of this WorkflowService_ListDomains_Args match the +// provided WorkflowService_ListDomains_Args. // // This function performs a deep comparison. -func (v *WorkflowService_ListClosedWorkflowExecutions_Args) Equals(rhs *WorkflowService_ListClosedWorkflowExecutions_Args) bool { +func (v *WorkflowService_ListDomains_Args) Equals(rhs *WorkflowService_ListDomains_Args) bool { if v == nil { return rhs == nil } else if rhs == nil { @@ -12822,8 +14718,8 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Args) Equals(rhs *Workflow } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_ListClosedWorkflowExecutions_Args. -func (v *WorkflowService_ListClosedWorkflowExecutions_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_ListDomains_Args. +func (v *WorkflowService_ListDomains_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } @@ -12835,7 +14731,7 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Args) MarshalLogObject(enc // GetListRequest returns the value of ListRequest if it is set or its // zero value if it is unset. -func (v *WorkflowService_ListClosedWorkflowExecutions_Args) GetListRequest() (o *shared.ListClosedWorkflowExecutionsRequest) { +func (v *WorkflowService_ListDomains_Args) GetListRequest() (o *shared.ListDomainsRequest) { if v != nil && v.ListRequest != nil { return v.ListRequest } @@ -12844,80 +14740,80 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Args) GetListRequest() (o } // IsSetListRequest returns true if ListRequest is not nil. -func (v *WorkflowService_ListClosedWorkflowExecutions_Args) IsSetListRequest() bool { +func (v *WorkflowService_ListDomains_Args) IsSetListRequest() bool { return v != nil && v.ListRequest != 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 "ListClosedWorkflowExecutions" for this struct. -func (v *WorkflowService_ListClosedWorkflowExecutions_Args) MethodName() string { - return "ListClosedWorkflowExecutions" +// This will always be "ListDomains" for this struct. +func (v *WorkflowService_ListDomains_Args) MethodName() string { + return "ListDomains" } // EnvelopeType returns the kind of value inside this struct. // // This will always be Call for this struct. -func (v *WorkflowService_ListClosedWorkflowExecutions_Args) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_ListDomains_Args) EnvelopeType() wire.EnvelopeType { return wire.Call } -// WorkflowService_ListClosedWorkflowExecutions_Helper provides functions that aid in handling the -// parameters and return values of the WorkflowService.ListClosedWorkflowExecutions +// WorkflowService_ListDomains_Helper provides functions that aid in handling the +// parameters and return values of the WorkflowService.ListDomains // function. -var WorkflowService_ListClosedWorkflowExecutions_Helper = struct { - // Args accepts the parameters of ListClosedWorkflowExecutions in-order and returns +var WorkflowService_ListDomains_Helper = struct { + // Args accepts the parameters of ListDomains in-order and returns // the arguments struct for the function. Args func( - listRequest *shared.ListClosedWorkflowExecutionsRequest, - ) *WorkflowService_ListClosedWorkflowExecutions_Args + listRequest *shared.ListDomainsRequest, + ) *WorkflowService_ListDomains_Args // IsException returns true if the given error can be thrown - // by ListClosedWorkflowExecutions. + // by ListDomains. // - // An error can be thrown by ListClosedWorkflowExecutions only if the + // An error can be thrown by ListDomains 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 ListClosedWorkflowExecutions + // WrapResponse returns the result struct for ListDomains // given its return value and error. // // This allows mapping values and errors returned by - // ListClosedWorkflowExecutions into a serializable result struct. + // ListDomains into a serializable result struct. // WrapResponse returns a non-nil error if the provided - // error cannot be thrown by ListClosedWorkflowExecutions + // error cannot be thrown by ListDomains // - // value, err := ListClosedWorkflowExecutions(args) - // result, err := WorkflowService_ListClosedWorkflowExecutions_Helper.WrapResponse(value, err) + // value, err := ListDomains(args) + // result, err := WorkflowService_ListDomains_Helper.WrapResponse(value, err) // if err != nil { - // return fmt.Errorf("unexpected error from ListClosedWorkflowExecutions: %v", err) + // return fmt.Errorf("unexpected error from ListDomains: %v", err) // } // serialize(result) - WrapResponse func(*shared.ListClosedWorkflowExecutionsResponse, error) (*WorkflowService_ListClosedWorkflowExecutions_Result, error) + WrapResponse func(*shared.ListDomainsResponse, error) (*WorkflowService_ListDomains_Result, error) - // UnwrapResponse takes the result struct for ListClosedWorkflowExecutions + // UnwrapResponse takes the result struct for ListDomains // and returns the value or error returned by it. // - // The error is non-nil only if ListClosedWorkflowExecutions threw an + // The error is non-nil only if ListDomains threw an // exception. // // result := deserialize(bytes) - // value, err := WorkflowService_ListClosedWorkflowExecutions_Helper.UnwrapResponse(result) - UnwrapResponse func(*WorkflowService_ListClosedWorkflowExecutions_Result) (*shared.ListClosedWorkflowExecutionsResponse, error) + // value, err := WorkflowService_ListDomains_Helper.UnwrapResponse(result) + UnwrapResponse func(*WorkflowService_ListDomains_Result) (*shared.ListDomainsResponse, error) }{} func init() { - WorkflowService_ListClosedWorkflowExecutions_Helper.Args = func( - listRequest *shared.ListClosedWorkflowExecutionsRequest, - ) *WorkflowService_ListClosedWorkflowExecutions_Args { - return &WorkflowService_ListClosedWorkflowExecutions_Args{ + WorkflowService_ListDomains_Helper.Args = func( + listRequest *shared.ListDomainsRequest, + ) *WorkflowService_ListDomains_Args { + return &WorkflowService_ListDomains_Args{ ListRequest: listRequest, } } - WorkflowService_ListClosedWorkflowExecutions_Helper.IsException = func(err error) bool { + WorkflowService_ListDomains_Helper.IsException = func(err error) bool { switch err.(type) { case *shared.BadRequestError: return true @@ -12934,42 +14830,42 @@ func init() { } } - WorkflowService_ListClosedWorkflowExecutions_Helper.WrapResponse = func(success *shared.ListClosedWorkflowExecutionsResponse, err error) (*WorkflowService_ListClosedWorkflowExecutions_Result, error) { + WorkflowService_ListDomains_Helper.WrapResponse = func(success *shared.ListDomainsResponse, err error) (*WorkflowService_ListDomains_Result, error) { if err == nil { - return &WorkflowService_ListClosedWorkflowExecutions_Result{Success: success}, nil + return &WorkflowService_ListDomains_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_ListClosedWorkflowExecutions_Result.BadRequestError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListDomains_Result.BadRequestError") } - return &WorkflowService_ListClosedWorkflowExecutions_Result{BadRequestError: e}, nil + return &WorkflowService_ListDomains_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_ListClosedWorkflowExecutions_Result.EntityNotExistError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListDomains_Result.EntityNotExistError") } - return &WorkflowService_ListClosedWorkflowExecutions_Result{EntityNotExistError: e}, nil + return &WorkflowService_ListDomains_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_ListClosedWorkflowExecutions_Result.ServiceBusyError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListDomains_Result.ServiceBusyError") } - return &WorkflowService_ListClosedWorkflowExecutions_Result{ServiceBusyError: e}, nil + return &WorkflowService_ListDomains_Result{ServiceBusyError: e}, nil case *shared.ClientVersionNotSupportedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListClosedWorkflowExecutions_Result.ClientVersionNotSupportedError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListDomains_Result.ClientVersionNotSupportedError") } - return &WorkflowService_ListClosedWorkflowExecutions_Result{ClientVersionNotSupportedError: e}, nil + return &WorkflowService_ListDomains_Result{ClientVersionNotSupportedError: e}, nil case *shared.AccessDeniedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListClosedWorkflowExecutions_Result.AccessDeniedError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListDomains_Result.AccessDeniedError") } - return &WorkflowService_ListClosedWorkflowExecutions_Result{AccessDeniedError: e}, nil + return &WorkflowService_ListDomains_Result{AccessDeniedError: e}, nil } return nil, err } - WorkflowService_ListClosedWorkflowExecutions_Helper.UnwrapResponse = func(result *WorkflowService_ListClosedWorkflowExecutions_Result) (success *shared.ListClosedWorkflowExecutionsResponse, err error) { + WorkflowService_ListDomains_Helper.UnwrapResponse = func(result *WorkflowService_ListDomains_Result) (success *shared.ListDomainsResponse, err error) { if result.BadRequestError != nil { err = result.BadRequestError return @@ -13002,22 +14898,22 @@ func init() { } -// WorkflowService_ListClosedWorkflowExecutions_Result represents the result of a WorkflowService.ListClosedWorkflowExecutions function call. +// WorkflowService_ListDomains_Result represents the result of a WorkflowService.ListDomains function call. // -// The result of a ListClosedWorkflowExecutions execution is sent and received over the wire as this struct. +// The result of a ListDomains 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_ListClosedWorkflowExecutions_Result struct { - // Value returned by ListClosedWorkflowExecutions after a successful execution. - Success *shared.ListClosedWorkflowExecutionsResponse `json:"success,omitempty"` - BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` - EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"` - ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` - ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` - AccessDeniedError *shared.AccessDeniedError `json:"accessDeniedError,omitempty"` +type WorkflowService_ListDomains_Result struct { + // Value returned by ListDomains after a successful execution. + Success *shared.ListDomainsResponse `json:"success,omitempty"` + BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` + EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"` + ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` + ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` + AccessDeniedError *shared.AccessDeniedError `json:"accessDeniedError,omitempty"` } -// ToWire translates a WorkflowService_ListClosedWorkflowExecutions_Result struct into a Thrift-level intermediate +// ToWire translates a WorkflowService_ListDomains_Result struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -13032,7 +14928,7 @@ type WorkflowService_ListClosedWorkflowExecutions_Result struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) ToWire() (wire.Value, error) { +func (v *WorkflowService_ListDomains_Result) ToWire() (wire.Value, error) { var ( fields [6]wire.Field i int = 0 @@ -13090,23 +14986,23 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Result) ToWire() (wire.Val } if i != 1 { - return wire.Value{}, fmt.Errorf("WorkflowService_ListClosedWorkflowExecutions_Result should have exactly one field: got %v fields", i) + return wire.Value{}, fmt.Errorf("WorkflowService_ListDomains_Result should have exactly one field: got %v fields", i) } return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _ListClosedWorkflowExecutionsResponse_Read(w wire.Value) (*shared.ListClosedWorkflowExecutionsResponse, error) { - var v shared.ListClosedWorkflowExecutionsResponse +func _ListDomainsResponse_Read(w wire.Value) (*shared.ListDomainsResponse, error) { + var v shared.ListDomainsResponse err := v.FromWire(w) return &v, err } -// FromWire deserializes a WorkflowService_ListClosedWorkflowExecutions_Result struct from its Thrift-level +// FromWire deserializes a WorkflowService_ListDomains_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_ListClosedWorkflowExecutions_Result struct +// An error is returned if we were unable to build a WorkflowService_ListDomains_Result struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -13114,19 +15010,19 @@ func _ListClosedWorkflowExecutionsResponse_Read(w wire.Value) (*shared.ListClose // return nil, err // } // -// var v WorkflowService_ListClosedWorkflowExecutions_Result +// var v WorkflowService_ListDomains_Result // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) FromWire(w wire.Value) error { +func (v *WorkflowService_ListDomains_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 = _ListClosedWorkflowExecutionsResponse_Read(field.Value) + v.Success, err = _ListDomainsResponse_Read(field.Value) if err != nil { return err } @@ -13195,17 +15091,17 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Result) FromWire(w wire.Va count++ } if count != 1 { - return fmt.Errorf("WorkflowService_ListClosedWorkflowExecutions_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_ListDomains_Result should have exactly one field: got %v fields", count) } return nil } -// Encode serializes a WorkflowService_ListClosedWorkflowExecutions_Result struct directly into bytes, without going +// Encode serializes a WorkflowService_ListDomains_Result struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a WorkflowService_ListClosedWorkflowExecutions_Result struct could not be encoded. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) Encode(sw stream.Writer) error { +// An error is returned if a WorkflowService_ListDomains_Result struct could not be encoded. +func (v *WorkflowService_ListDomains_Result) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } @@ -13303,24 +15199,24 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Result) Encode(sw stream.W } if count != 1 { - return fmt.Errorf("WorkflowService_ListClosedWorkflowExecutions_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_ListDomains_Result should have exactly one field: got %v fields", count) } return sw.WriteStructEnd() } -func _ListClosedWorkflowExecutionsResponse_Decode(sr stream.Reader) (*shared.ListClosedWorkflowExecutionsResponse, error) { - var v shared.ListClosedWorkflowExecutionsResponse +func _ListDomainsResponse_Decode(sr stream.Reader) (*shared.ListDomainsResponse, error) { + var v shared.ListDomainsResponse err := v.Decode(sr) return &v, err } -// Decode deserializes a WorkflowService_ListClosedWorkflowExecutions_Result struct directly from its Thrift-level +// Decode deserializes a WorkflowService_ListDomains_Result struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a WorkflowService_ListClosedWorkflowExecutions_Result struct could not be generated from the wire +// An error is returned if a WorkflowService_ListDomains_Result struct could not be generated from the wire // representation. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) Decode(sr stream.Reader) error { +func (v *WorkflowService_ListDomains_Result) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -13334,7 +15230,7 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Result) Decode(sr stream.R for ok { switch { case fh.ID == 0 && fh.Type == wire.TStruct: - v.Success, err = _ListClosedWorkflowExecutionsResponse_Decode(sr) + v.Success, err = _ListDomainsResponse_Decode(sr) if err != nil { return err } @@ -13408,15 +15304,15 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Result) Decode(sr stream.R count++ } if count != 1 { - return fmt.Errorf("WorkflowService_ListClosedWorkflowExecutions_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_ListDomains_Result should have exactly one field: got %v fields", count) } return nil } -// String returns a readable string representation of a WorkflowService_ListClosedWorkflowExecutions_Result +// String returns a readable string representation of a WorkflowService_ListDomains_Result // struct. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) String() string { +func (v *WorkflowService_ListDomains_Result) String() string { if v == nil { return "" } @@ -13448,14 +15344,14 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Result) String() string { i++ } - return fmt.Sprintf("WorkflowService_ListClosedWorkflowExecutions_Result{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_ListDomains_Result{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_ListClosedWorkflowExecutions_Result match the -// provided WorkflowService_ListClosedWorkflowExecutions_Result. +// Equals returns true if all the fields of this WorkflowService_ListDomains_Result match the +// provided WorkflowService_ListDomains_Result. // // This function performs a deep comparison. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) Equals(rhs *WorkflowService_ListClosedWorkflowExecutions_Result) bool { +func (v *WorkflowService_ListDomains_Result) Equals(rhs *WorkflowService_ListDomains_Result) bool { if v == nil { return rhs == nil } else if rhs == nil { @@ -13484,8 +15380,8 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Result) Equals(rhs *Workfl } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_ListClosedWorkflowExecutions_Result. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_ListDomains_Result. +func (v *WorkflowService_ListDomains_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } @@ -13512,7 +15408,7 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Result) MarshalLogObject(e // GetSuccess returns the value of Success if it is set or its // zero value if it is unset. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) GetSuccess() (o *shared.ListClosedWorkflowExecutionsResponse) { +func (v *WorkflowService_ListDomains_Result) GetSuccess() (o *shared.ListDomainsResponse) { if v != nil && v.Success != nil { return v.Success } @@ -13521,13 +15417,13 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Result) GetSuccess() (o *s } // IsSetSuccess returns true if Success is not nil. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) IsSetSuccess() bool { +func (v *WorkflowService_ListDomains_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_ListClosedWorkflowExecutions_Result) GetBadRequestError() (o *shared.BadRequestError) { +func (v *WorkflowService_ListDomains_Result) GetBadRequestError() (o *shared.BadRequestError) { if v != nil && v.BadRequestError != nil { return v.BadRequestError } @@ -13536,13 +15432,13 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Result) GetBadRequestError } // IsSetBadRequestError returns true if BadRequestError is not nil. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) IsSetBadRequestError() bool { +func (v *WorkflowService_ListDomains_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_ListClosedWorkflowExecutions_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) { +func (v *WorkflowService_ListDomains_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) { if v != nil && v.EntityNotExistError != nil { return v.EntityNotExistError } @@ -13551,13 +15447,13 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Result) GetEntityNotExistE } // IsSetEntityNotExistError returns true if EntityNotExistError is not nil. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) IsSetEntityNotExistError() bool { +func (v *WorkflowService_ListDomains_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_ListClosedWorkflowExecutions_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { +func (v *WorkflowService_ListDomains_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { if v != nil && v.ServiceBusyError != nil { return v.ServiceBusyError } @@ -13566,13 +15462,13 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Result) GetServiceBusyErro } // IsSetServiceBusyError returns true if ServiceBusyError is not nil. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) IsSetServiceBusyError() bool { +func (v *WorkflowService_ListDomains_Result) IsSetServiceBusyError() bool { return v != nil && v.ServiceBusyError != nil } // GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its // zero value if it is unset. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { +func (v *WorkflowService_ListDomains_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { if v != nil && v.ClientVersionNotSupportedError != nil { return v.ClientVersionNotSupportedError } @@ -13581,13 +15477,13 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Result) GetClientVersionNo } // IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) IsSetClientVersionNotSupportedError() bool { +func (v *WorkflowService_ListDomains_Result) IsSetClientVersionNotSupportedError() bool { return v != nil && v.ClientVersionNotSupportedError != nil } // GetAccessDeniedError returns the value of AccessDeniedError if it is set or its // zero value if it is unset. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) { +func (v *WorkflowService_ListDomains_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) { if v != nil && v.AccessDeniedError != nil { return v.AccessDeniedError } @@ -13596,33 +15492,33 @@ func (v *WorkflowService_ListClosedWorkflowExecutions_Result) GetAccessDeniedErr } // IsSetAccessDeniedError returns true if AccessDeniedError is not nil. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) IsSetAccessDeniedError() bool { +func (v *WorkflowService_ListDomains_Result) IsSetAccessDeniedError() bool { return v != nil && v.AccessDeniedError != 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 "ListClosedWorkflowExecutions" for this struct. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) MethodName() string { - return "ListClosedWorkflowExecutions" +// This will always be "ListDomains" for this struct. +func (v *WorkflowService_ListDomains_Result) MethodName() string { + return "ListDomains" } // EnvelopeType returns the kind of value inside this struct. // // This will always be Reply for this struct. -func (v *WorkflowService_ListClosedWorkflowExecutions_Result) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_ListDomains_Result) EnvelopeType() wire.EnvelopeType { return wire.Reply } -// WorkflowService_ListDomains_Args represents the arguments for the WorkflowService.ListDomains function. +// WorkflowService_ListFailoverHistory_Args represents the arguments for the WorkflowService.ListFailoverHistory function. // -// The arguments for ListDomains are sent and received over the wire as this struct. -type WorkflowService_ListDomains_Args struct { - ListRequest *shared.ListDomainsRequest `json:"listRequest,omitempty"` +// The arguments for ListFailoverHistory are sent and received over the wire as this struct. +type WorkflowService_ListFailoverHistory_Args struct { + ListRequest *shared.ListFailoverHistoryRequest `json:"listRequest,omitempty"` } -// ToWire translates a WorkflowService_ListDomains_Args struct into a Thrift-level intermediate +// ToWire translates a WorkflowService_ListFailoverHistory_Args struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -13637,7 +15533,7 @@ type WorkflowService_ListDomains_Args struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_ListDomains_Args) ToWire() (wire.Value, error) { +func (v *WorkflowService_ListFailoverHistory_Args) ToWire() (wire.Value, error) { var ( fields [1]wire.Field i int = 0 @@ -13657,17 +15553,17 @@ func (v *WorkflowService_ListDomains_Args) ToWire() (wire.Value, error) { return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _ListDomainsRequest_Read(w wire.Value) (*shared.ListDomainsRequest, error) { - var v shared.ListDomainsRequest +func _ListFailoverHistoryRequest_Read(w wire.Value) (*shared.ListFailoverHistoryRequest, error) { + var v shared.ListFailoverHistoryRequest err := v.FromWire(w) return &v, err } -// FromWire deserializes a WorkflowService_ListDomains_Args struct from its Thrift-level +// FromWire deserializes a WorkflowService_ListFailoverHistory_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_ListDomains_Args struct +// An error is returned if we were unable to build a WorkflowService_ListFailoverHistory_Args struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -13675,19 +15571,19 @@ func _ListDomainsRequest_Read(w wire.Value) (*shared.ListDomainsRequest, error) // return nil, err // } // -// var v WorkflowService_ListDomains_Args +// var v WorkflowService_ListFailoverHistory_Args // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_ListDomains_Args) FromWire(w wire.Value) error { +func (v *WorkflowService_ListFailoverHistory_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.ListRequest, err = _ListDomainsRequest_Read(field.Value) + v.ListRequest, err = _ListFailoverHistoryRequest_Read(field.Value) if err != nil { return err } @@ -13699,11 +15595,11 @@ func (v *WorkflowService_ListDomains_Args) FromWire(w wire.Value) error { return nil } -// Encode serializes a WorkflowService_ListDomains_Args struct directly into bytes, without going +// Encode serializes a WorkflowService_ListFailoverHistory_Args struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a WorkflowService_ListDomains_Args struct could not be encoded. -func (v *WorkflowService_ListDomains_Args) Encode(sw stream.Writer) error { +// An error is returned if a WorkflowService_ListFailoverHistory_Args struct could not be encoded. +func (v *WorkflowService_ListFailoverHistory_Args) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } @@ -13723,18 +15619,18 @@ func (v *WorkflowService_ListDomains_Args) Encode(sw stream.Writer) error { return sw.WriteStructEnd() } -func _ListDomainsRequest_Decode(sr stream.Reader) (*shared.ListDomainsRequest, error) { - var v shared.ListDomainsRequest +func _ListFailoverHistoryRequest_Decode(sr stream.Reader) (*shared.ListFailoverHistoryRequest, error) { + var v shared.ListFailoverHistoryRequest err := v.Decode(sr) return &v, err } -// Decode deserializes a WorkflowService_ListDomains_Args struct directly from its Thrift-level +// Decode deserializes a WorkflowService_ListFailoverHistory_Args struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a WorkflowService_ListDomains_Args struct could not be generated from the wire +// An error is returned if a WorkflowService_ListFailoverHistory_Args struct could not be generated from the wire // representation. -func (v *WorkflowService_ListDomains_Args) Decode(sr stream.Reader) error { +func (v *WorkflowService_ListFailoverHistory_Args) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -13748,7 +15644,7 @@ func (v *WorkflowService_ListDomains_Args) Decode(sr stream.Reader) error { for ok { switch { case fh.ID == 1 && fh.Type == wire.TStruct: - v.ListRequest, err = _ListDomainsRequest_Decode(sr) + v.ListRequest, err = _ListFailoverHistoryRequest_Decode(sr) if err != nil { return err } @@ -13775,9 +15671,9 @@ func (v *WorkflowService_ListDomains_Args) Decode(sr stream.Reader) error { return nil } -// String returns a readable string representation of a WorkflowService_ListDomains_Args +// String returns a readable string representation of a WorkflowService_ListFailoverHistory_Args // struct. -func (v *WorkflowService_ListDomains_Args) String() string { +func (v *WorkflowService_ListFailoverHistory_Args) String() string { if v == nil { return "" } @@ -13789,14 +15685,14 @@ func (v *WorkflowService_ListDomains_Args) String() string { i++ } - return fmt.Sprintf("WorkflowService_ListDomains_Args{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_ListFailoverHistory_Args{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_ListDomains_Args match the -// provided WorkflowService_ListDomains_Args. +// Equals returns true if all the fields of this WorkflowService_ListFailoverHistory_Args match the +// provided WorkflowService_ListFailoverHistory_Args. // // This function performs a deep comparison. -func (v *WorkflowService_ListDomains_Args) Equals(rhs *WorkflowService_ListDomains_Args) bool { +func (v *WorkflowService_ListFailoverHistory_Args) Equals(rhs *WorkflowService_ListFailoverHistory_Args) bool { if v == nil { return rhs == nil } else if rhs == nil { @@ -13810,8 +15706,8 @@ func (v *WorkflowService_ListDomains_Args) Equals(rhs *WorkflowService_ListDomai } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_ListDomains_Args. -func (v *WorkflowService_ListDomains_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_ListFailoverHistory_Args. +func (v *WorkflowService_ListFailoverHistory_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } @@ -13823,7 +15719,7 @@ func (v *WorkflowService_ListDomains_Args) MarshalLogObject(enc zapcore.ObjectEn // GetListRequest returns the value of ListRequest if it is set or its // zero value if it is unset. -func (v *WorkflowService_ListDomains_Args) GetListRequest() (o *shared.ListDomainsRequest) { +func (v *WorkflowService_ListFailoverHistory_Args) GetListRequest() (o *shared.ListFailoverHistoryRequest) { if v != nil && v.ListRequest != nil { return v.ListRequest } @@ -13832,85 +15728,83 @@ func (v *WorkflowService_ListDomains_Args) GetListRequest() (o *shared.ListDomai } // IsSetListRequest returns true if ListRequest is not nil. -func (v *WorkflowService_ListDomains_Args) IsSetListRequest() bool { +func (v *WorkflowService_ListFailoverHistory_Args) IsSetListRequest() bool { return v != nil && v.ListRequest != 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 "ListDomains" for this struct. -func (v *WorkflowService_ListDomains_Args) MethodName() string { - return "ListDomains" +// This will always be "ListFailoverHistory" for this struct. +func (v *WorkflowService_ListFailoverHistory_Args) MethodName() string { + return "ListFailoverHistory" } // EnvelopeType returns the kind of value inside this struct. // // This will always be Call for this struct. -func (v *WorkflowService_ListDomains_Args) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_ListFailoverHistory_Args) EnvelopeType() wire.EnvelopeType { return wire.Call } -// WorkflowService_ListDomains_Helper provides functions that aid in handling the -// parameters and return values of the WorkflowService.ListDomains +// WorkflowService_ListFailoverHistory_Helper provides functions that aid in handling the +// parameters and return values of the WorkflowService.ListFailoverHistory // function. -var WorkflowService_ListDomains_Helper = struct { - // Args accepts the parameters of ListDomains in-order and returns +var WorkflowService_ListFailoverHistory_Helper = struct { + // Args accepts the parameters of ListFailoverHistory in-order and returns // the arguments struct for the function. Args func( - listRequest *shared.ListDomainsRequest, - ) *WorkflowService_ListDomains_Args + listRequest *shared.ListFailoverHistoryRequest, + ) *WorkflowService_ListFailoverHistory_Args // IsException returns true if the given error can be thrown - // by ListDomains. + // by ListFailoverHistory. // - // An error can be thrown by ListDomains only if the + // An error can be thrown by ListFailoverHistory 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 ListDomains + // WrapResponse returns the result struct for ListFailoverHistory // given its return value and error. // // This allows mapping values and errors returned by - // ListDomains into a serializable result struct. + // ListFailoverHistory into a serializable result struct. // WrapResponse returns a non-nil error if the provided - // error cannot be thrown by ListDomains + // error cannot be thrown by ListFailoverHistory // - // value, err := ListDomains(args) - // result, err := WorkflowService_ListDomains_Helper.WrapResponse(value, err) + // value, err := ListFailoverHistory(args) + // result, err := WorkflowService_ListFailoverHistory_Helper.WrapResponse(value, err) // if err != nil { - // return fmt.Errorf("unexpected error from ListDomains: %v", err) + // return fmt.Errorf("unexpected error from ListFailoverHistory: %v", err) // } // serialize(result) - WrapResponse func(*shared.ListDomainsResponse, error) (*WorkflowService_ListDomains_Result, error) + WrapResponse func(*shared.ListFailoverHistoryResponse, error) (*WorkflowService_ListFailoverHistory_Result, error) - // UnwrapResponse takes the result struct for ListDomains + // UnwrapResponse takes the result struct for ListFailoverHistory // and returns the value or error returned by it. // - // The error is non-nil only if ListDomains threw an + // The error is non-nil only if ListFailoverHistory threw an // exception. // // result := deserialize(bytes) - // value, err := WorkflowService_ListDomains_Helper.UnwrapResponse(result) - UnwrapResponse func(*WorkflowService_ListDomains_Result) (*shared.ListDomainsResponse, error) + // value, err := WorkflowService_ListFailoverHistory_Helper.UnwrapResponse(result) + UnwrapResponse func(*WorkflowService_ListFailoverHistory_Result) (*shared.ListFailoverHistoryResponse, error) }{} func init() { - WorkflowService_ListDomains_Helper.Args = func( - listRequest *shared.ListDomainsRequest, - ) *WorkflowService_ListDomains_Args { - return &WorkflowService_ListDomains_Args{ + WorkflowService_ListFailoverHistory_Helper.Args = func( + listRequest *shared.ListFailoverHistoryRequest, + ) *WorkflowService_ListFailoverHistory_Args { + return &WorkflowService_ListFailoverHistory_Args{ ListRequest: listRequest, } } - WorkflowService_ListDomains_Helper.IsException = func(err error) bool { + WorkflowService_ListFailoverHistory_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.ClientVersionNotSupportedError: @@ -13922,50 +15816,41 @@ func init() { } } - WorkflowService_ListDomains_Helper.WrapResponse = func(success *shared.ListDomainsResponse, err error) (*WorkflowService_ListDomains_Result, error) { + WorkflowService_ListFailoverHistory_Helper.WrapResponse = func(success *shared.ListFailoverHistoryResponse, err error) (*WorkflowService_ListFailoverHistory_Result, error) { if err == nil { - return &WorkflowService_ListDomains_Result{Success: success}, nil + return &WorkflowService_ListFailoverHistory_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_ListDomains_Result.BadRequestError") - } - return &WorkflowService_ListDomains_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_ListDomains_Result.EntityNotExistError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListFailoverHistory_Result.BadRequestError") } - return &WorkflowService_ListDomains_Result{EntityNotExistError: e}, nil + return &WorkflowService_ListFailoverHistory_Result{BadRequestError: e}, nil case *shared.ServiceBusyError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListDomains_Result.ServiceBusyError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListFailoverHistory_Result.ServiceBusyError") } - return &WorkflowService_ListDomains_Result{ServiceBusyError: e}, nil + return &WorkflowService_ListFailoverHistory_Result{ServiceBusyError: e}, nil case *shared.ClientVersionNotSupportedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListDomains_Result.ClientVersionNotSupportedError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListFailoverHistory_Result.ClientVersionNotSupportedError") } - return &WorkflowService_ListDomains_Result{ClientVersionNotSupportedError: e}, nil + return &WorkflowService_ListFailoverHistory_Result{ClientVersionNotSupportedError: e}, nil case *shared.AccessDeniedError: if e == nil { - return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListDomains_Result.AccessDeniedError") + return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListFailoverHistory_Result.AccessDeniedError") } - return &WorkflowService_ListDomains_Result{AccessDeniedError: e}, nil + return &WorkflowService_ListFailoverHistory_Result{AccessDeniedError: e}, nil } return nil, err } - WorkflowService_ListDomains_Helper.UnwrapResponse = func(result *WorkflowService_ListDomains_Result) (success *shared.ListDomainsResponse, err error) { + WorkflowService_ListFailoverHistory_Helper.UnwrapResponse = func(result *WorkflowService_ListFailoverHistory_Result) (success *shared.ListFailoverHistoryResponse, 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 @@ -13990,22 +15875,21 @@ func init() { } -// WorkflowService_ListDomains_Result represents the result of a WorkflowService.ListDomains function call. +// WorkflowService_ListFailoverHistory_Result represents the result of a WorkflowService.ListFailoverHistory function call. // -// The result of a ListDomains execution is sent and received over the wire as this struct. +// The result of a ListFailoverHistory 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_ListDomains_Result struct { - // Value returned by ListDomains after a successful execution. - Success *shared.ListDomainsResponse `json:"success,omitempty"` +type WorkflowService_ListFailoverHistory_Result struct { + // Value returned by ListFailoverHistory after a successful execution. + Success *shared.ListFailoverHistoryResponse `json:"success,omitempty"` BadRequestError *shared.BadRequestError `json:"badRequestError,omitempty"` - EntityNotExistError *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"` ServiceBusyError *shared.ServiceBusyError `json:"serviceBusyError,omitempty"` ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"` AccessDeniedError *shared.AccessDeniedError `json:"accessDeniedError,omitempty"` } -// ToWire translates a WorkflowService_ListDomains_Result struct into a Thrift-level intermediate +// ToWire translates a WorkflowService_ListFailoverHistory_Result struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -14020,9 +15904,9 @@ type WorkflowService_ListDomains_Result struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *WorkflowService_ListDomains_Result) ToWire() (wire.Value, error) { +func (v *WorkflowService_ListFailoverHistory_Result) ToWire() (wire.Value, error) { var ( - fields [6]wire.Field + fields [5]wire.Field i int = 0 w wire.Value err error @@ -14044,20 +15928,12 @@ func (v *WorkflowService_ListDomains_Result) ToWire() (wire.Value, error) { 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} + fields[i] = wire.Field{ID: 2, Value: w} i++ } if v.ClientVersionNotSupportedError != nil { @@ -14065,7 +15941,7 @@ func (v *WorkflowService_ListDomains_Result) ToWire() (wire.Value, error) { if err != nil { return w, err } - fields[i] = wire.Field{ID: 5, Value: w} + fields[i] = wire.Field{ID: 3, Value: w} i++ } if v.AccessDeniedError != nil { @@ -14073,28 +15949,28 @@ func (v *WorkflowService_ListDomains_Result) ToWire() (wire.Value, error) { if err != nil { return w, err } - fields[i] = wire.Field{ID: 6, Value: w} + fields[i] = wire.Field{ID: 4, Value: w} i++ } if i != 1 { - return wire.Value{}, fmt.Errorf("WorkflowService_ListDomains_Result should have exactly one field: got %v fields", i) + return wire.Value{}, fmt.Errorf("WorkflowService_ListFailoverHistory_Result should have exactly one field: got %v fields", i) } return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _ListDomainsResponse_Read(w wire.Value) (*shared.ListDomainsResponse, error) { - var v shared.ListDomainsResponse +func _ListFailoverHistoryResponse_Read(w wire.Value) (*shared.ListFailoverHistoryResponse, error) { + var v shared.ListFailoverHistoryResponse err := v.FromWire(w) return &v, err } -// FromWire deserializes a WorkflowService_ListDomains_Result struct from its Thrift-level +// FromWire deserializes a WorkflowService_ListFailoverHistory_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_ListDomains_Result struct +// An error is returned if we were unable to build a WorkflowService_ListFailoverHistory_Result struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -14102,19 +15978,19 @@ func _ListDomainsResponse_Read(w wire.Value) (*shared.ListDomainsResponse, error // return nil, err // } // -// var v WorkflowService_ListDomains_Result +// var v WorkflowService_ListFailoverHistory_Result // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *WorkflowService_ListDomains_Result) FromWire(w wire.Value) error { +func (v *WorkflowService_ListFailoverHistory_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 = _ListDomainsResponse_Read(field.Value) + v.Success, err = _ListFailoverHistoryResponse_Read(field.Value) if err != nil { return err } @@ -14128,15 +16004,7 @@ func (v *WorkflowService_ListDomains_Result) FromWire(w wire.Value) error { } } - case 3: - if field.Value.Type() == wire.TStruct { - v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value) - if err != nil { - return err - } - - } - case 4: + case 2: if field.Value.Type() == wire.TStruct { v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value) if err != nil { @@ -14144,7 +16012,7 @@ func (v *WorkflowService_ListDomains_Result) FromWire(w wire.Value) error { } } - case 5: + case 3: if field.Value.Type() == wire.TStruct { v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value) if err != nil { @@ -14152,7 +16020,7 @@ func (v *WorkflowService_ListDomains_Result) FromWire(w wire.Value) error { } } - case 6: + case 4: if field.Value.Type() == wire.TStruct { v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value) if err != nil { @@ -14170,9 +16038,6 @@ func (v *WorkflowService_ListDomains_Result) FromWire(w wire.Value) error { if v.BadRequestError != nil { count++ } - if v.EntityNotExistError != nil { - count++ - } if v.ServiceBusyError != nil { count++ } @@ -14183,17 +16048,17 @@ func (v *WorkflowService_ListDomains_Result) FromWire(w wire.Value) error { count++ } if count != 1 { - return fmt.Errorf("WorkflowService_ListDomains_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_ListFailoverHistory_Result should have exactly one field: got %v fields", count) } return nil } -// Encode serializes a WorkflowService_ListDomains_Result struct directly into bytes, without going +// Encode serializes a WorkflowService_ListFailoverHistory_Result struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a WorkflowService_ListDomains_Result struct could not be encoded. -func (v *WorkflowService_ListDomains_Result) Encode(sw stream.Writer) error { +// An error is returned if a WorkflowService_ListFailoverHistory_Result struct could not be encoded. +func (v *WorkflowService_ListFailoverHistory_Result) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } @@ -14222,20 +16087,8 @@ func (v *WorkflowService_ListDomains_Result) Encode(sw stream.Writer) error { } } - if v.EntityNotExistError != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil { - return err - } - if err := v.EntityNotExistError.Encode(sw); err != nil { - return err - } - if err := sw.WriteFieldEnd(); err != nil { - return err - } - } - if v.ServiceBusyError != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 4, Type: wire.TStruct}); err != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 2, Type: wire.TStruct}); err != nil { return err } if err := v.ServiceBusyError.Encode(sw); err != nil { @@ -14247,7 +16100,7 @@ func (v *WorkflowService_ListDomains_Result) Encode(sw stream.Writer) error { } if v.ClientVersionNotSupportedError != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 5, Type: wire.TStruct}); err != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 3, Type: wire.TStruct}); err != nil { return err } if err := v.ClientVersionNotSupportedError.Encode(sw); err != nil { @@ -14259,7 +16112,7 @@ func (v *WorkflowService_ListDomains_Result) Encode(sw stream.Writer) error { } if v.AccessDeniedError != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 6, Type: wire.TStruct}); err != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 4, Type: wire.TStruct}); err != nil { return err } if err := v.AccessDeniedError.Encode(sw); err != nil { @@ -14277,9 +16130,6 @@ func (v *WorkflowService_ListDomains_Result) Encode(sw stream.Writer) error { if v.BadRequestError != nil { count++ } - if v.EntityNotExistError != nil { - count++ - } if v.ServiceBusyError != nil { count++ } @@ -14291,24 +16141,24 @@ func (v *WorkflowService_ListDomains_Result) Encode(sw stream.Writer) error { } if count != 1 { - return fmt.Errorf("WorkflowService_ListDomains_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_ListFailoverHistory_Result should have exactly one field: got %v fields", count) } return sw.WriteStructEnd() } -func _ListDomainsResponse_Decode(sr stream.Reader) (*shared.ListDomainsResponse, error) { - var v shared.ListDomainsResponse +func _ListFailoverHistoryResponse_Decode(sr stream.Reader) (*shared.ListFailoverHistoryResponse, error) { + var v shared.ListFailoverHistoryResponse err := v.Decode(sr) return &v, err } -// Decode deserializes a WorkflowService_ListDomains_Result struct directly from its Thrift-level +// Decode deserializes a WorkflowService_ListFailoverHistory_Result struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a WorkflowService_ListDomains_Result struct could not be generated from the wire +// An error is returned if a WorkflowService_ListFailoverHistory_Result struct could not be generated from the wire // representation. -func (v *WorkflowService_ListDomains_Result) Decode(sr stream.Reader) error { +func (v *WorkflowService_ListFailoverHistory_Result) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -14322,7 +16172,7 @@ func (v *WorkflowService_ListDomains_Result) Decode(sr stream.Reader) error { for ok { switch { case fh.ID == 0 && fh.Type == wire.TStruct: - v.Success, err = _ListDomainsResponse_Decode(sr) + v.Success, err = _ListFailoverHistoryResponse_Decode(sr) if err != nil { return err } @@ -14333,25 +16183,19 @@ func (v *WorkflowService_ListDomains_Result) Decode(sr stream.Reader) error { return err } - case fh.ID == 3 && fh.Type == wire.TStruct: - v.EntityNotExistError, err = _EntityNotExistsError_Decode(sr) - if err != nil { - return err - } - - case fh.ID == 4 && fh.Type == wire.TStruct: + case fh.ID == 2 && fh.Type == wire.TStruct: v.ServiceBusyError, err = _ServiceBusyError_Decode(sr) if err != nil { return err } - case fh.ID == 5 && fh.Type == wire.TStruct: + case fh.ID == 3 && fh.Type == wire.TStruct: v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Decode(sr) if err != nil { return err } - case fh.ID == 6 && fh.Type == wire.TStruct: + case fh.ID == 4 && fh.Type == wire.TStruct: v.AccessDeniedError, err = _AccessDeniedError_Decode(sr) if err != nil { return err @@ -14383,9 +16227,6 @@ func (v *WorkflowService_ListDomains_Result) Decode(sr stream.Reader) error { if v.BadRequestError != nil { count++ } - if v.EntityNotExistError != nil { - count++ - } if v.ServiceBusyError != nil { count++ } @@ -14396,20 +16237,20 @@ func (v *WorkflowService_ListDomains_Result) Decode(sr stream.Reader) error { count++ } if count != 1 { - return fmt.Errorf("WorkflowService_ListDomains_Result should have exactly one field: got %v fields", count) + return fmt.Errorf("WorkflowService_ListFailoverHistory_Result should have exactly one field: got %v fields", count) } return nil } -// String returns a readable string representation of a WorkflowService_ListDomains_Result +// String returns a readable string representation of a WorkflowService_ListFailoverHistory_Result // struct. -func (v *WorkflowService_ListDomains_Result) String() string { +func (v *WorkflowService_ListFailoverHistory_Result) String() string { if v == nil { return "" } - var fields [6]string + var fields [5]string i := 0 if v.Success != nil { fields[i] = fmt.Sprintf("Success: %v", v.Success) @@ -14419,10 +16260,6 @@ func (v *WorkflowService_ListDomains_Result) String() string { 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++ @@ -14436,14 +16273,14 @@ func (v *WorkflowService_ListDomains_Result) String() string { i++ } - return fmt.Sprintf("WorkflowService_ListDomains_Result{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("WorkflowService_ListFailoverHistory_Result{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this WorkflowService_ListDomains_Result match the -// provided WorkflowService_ListDomains_Result. +// Equals returns true if all the fields of this WorkflowService_ListFailoverHistory_Result match the +// provided WorkflowService_ListFailoverHistory_Result. // // This function performs a deep comparison. -func (v *WorkflowService_ListDomains_Result) Equals(rhs *WorkflowService_ListDomains_Result) bool { +func (v *WorkflowService_ListFailoverHistory_Result) Equals(rhs *WorkflowService_ListFailoverHistory_Result) bool { if v == nil { return rhs == nil } else if rhs == nil { @@ -14455,9 +16292,6 @@ func (v *WorkflowService_ListDomains_Result) Equals(rhs *WorkflowService_ListDom 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 } @@ -14472,8 +16306,8 @@ func (v *WorkflowService_ListDomains_Result) Equals(rhs *WorkflowService_ListDom } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of WorkflowService_ListDomains_Result. -func (v *WorkflowService_ListDomains_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of WorkflowService_ListFailoverHistory_Result. +func (v *WorkflowService_ListFailoverHistory_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } @@ -14483,9 +16317,6 @@ func (v *WorkflowService_ListDomains_Result) MarshalLogObject(enc zapcore.Object 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)) } @@ -14500,7 +16331,7 @@ func (v *WorkflowService_ListDomains_Result) MarshalLogObject(enc zapcore.Object // GetSuccess returns the value of Success if it is set or its // zero value if it is unset. -func (v *WorkflowService_ListDomains_Result) GetSuccess() (o *shared.ListDomainsResponse) { +func (v *WorkflowService_ListFailoverHistory_Result) GetSuccess() (o *shared.ListFailoverHistoryResponse) { if v != nil && v.Success != nil { return v.Success } @@ -14509,13 +16340,13 @@ func (v *WorkflowService_ListDomains_Result) GetSuccess() (o *shared.ListDomains } // IsSetSuccess returns true if Success is not nil. -func (v *WorkflowService_ListDomains_Result) IsSetSuccess() bool { +func (v *WorkflowService_ListFailoverHistory_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_ListDomains_Result) GetBadRequestError() (o *shared.BadRequestError) { +func (v *WorkflowService_ListFailoverHistory_Result) GetBadRequestError() (o *shared.BadRequestError) { if v != nil && v.BadRequestError != nil { return v.BadRequestError } @@ -14524,28 +16355,13 @@ func (v *WorkflowService_ListDomains_Result) GetBadRequestError() (o *shared.Bad } // IsSetBadRequestError returns true if BadRequestError is not nil. -func (v *WorkflowService_ListDomains_Result) IsSetBadRequestError() bool { +func (v *WorkflowService_ListFailoverHistory_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_ListDomains_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_ListDomains_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_ListDomains_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { +func (v *WorkflowService_ListFailoverHistory_Result) GetServiceBusyError() (o *shared.ServiceBusyError) { if v != nil && v.ServiceBusyError != nil { return v.ServiceBusyError } @@ -14554,13 +16370,13 @@ func (v *WorkflowService_ListDomains_Result) GetServiceBusyError() (o *shared.Se } // IsSetServiceBusyError returns true if ServiceBusyError is not nil. -func (v *WorkflowService_ListDomains_Result) IsSetServiceBusyError() bool { +func (v *WorkflowService_ListFailoverHistory_Result) IsSetServiceBusyError() bool { return v != nil && v.ServiceBusyError != nil } // GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its // zero value if it is unset. -func (v *WorkflowService_ListDomains_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { +func (v *WorkflowService_ListFailoverHistory_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) { if v != nil && v.ClientVersionNotSupportedError != nil { return v.ClientVersionNotSupportedError } @@ -14569,13 +16385,13 @@ func (v *WorkflowService_ListDomains_Result) GetClientVersionNotSupportedError() } // IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil. -func (v *WorkflowService_ListDomains_Result) IsSetClientVersionNotSupportedError() bool { +func (v *WorkflowService_ListFailoverHistory_Result) IsSetClientVersionNotSupportedError() bool { return v != nil && v.ClientVersionNotSupportedError != nil } // GetAccessDeniedError returns the value of AccessDeniedError if it is set or its // zero value if it is unset. -func (v *WorkflowService_ListDomains_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) { +func (v *WorkflowService_ListFailoverHistory_Result) GetAccessDeniedError() (o *shared.AccessDeniedError) { if v != nil && v.AccessDeniedError != nil { return v.AccessDeniedError } @@ -14584,22 +16400,22 @@ func (v *WorkflowService_ListDomains_Result) GetAccessDeniedError() (o *shared.A } // IsSetAccessDeniedError returns true if AccessDeniedError is not nil. -func (v *WorkflowService_ListDomains_Result) IsSetAccessDeniedError() bool { +func (v *WorkflowService_ListFailoverHistory_Result) IsSetAccessDeniedError() bool { return v != nil && v.AccessDeniedError != 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 "ListDomains" for this struct. -func (v *WorkflowService_ListDomains_Result) MethodName() string { - return "ListDomains" +// This will always be "ListFailoverHistory" for this struct. +func (v *WorkflowService_ListFailoverHistory_Result) MethodName() string { + return "ListFailoverHistory" } // EnvelopeType returns the kind of value inside this struct. // // This will always be Reply for this struct. -func (v *WorkflowService_ListDomains_Result) EnvelopeType() wire.EnvelopeType { +func (v *WorkflowService_ListFailoverHistory_Result) EnvelopeType() wire.EnvelopeType { return wire.Reply } diff --git a/.gen/go/cadence/workflowserviceclient/client.go b/.gen/go/cadence/workflowserviceclient/client.go index 422a206e5cc..5aafedcd1ed 100644 --- a/.gen/go/cadence/workflowserviceclient/client.go +++ b/.gen/go/cadence/workflowserviceclient/client.go @@ -71,6 +71,12 @@ type Interface interface { opts ...yarpc.CallOption, ) (*shared.ClusterInfo, error) + GetFailoverEvent( + ctx context.Context, + GetRequest *shared.GetFailoverEventRequest, + opts ...yarpc.CallOption, + ) (*shared.GetFailoverEventResponse, error) + GetSearchAttributes( ctx context.Context, opts ...yarpc.CallOption, @@ -106,6 +112,12 @@ type Interface interface { opts ...yarpc.CallOption, ) (*shared.ListDomainsResponse, error) + ListFailoverHistory( + ctx context.Context, + ListRequest *shared.ListFailoverHistoryRequest, + opts ...yarpc.CallOption, + ) (*shared.ListFailoverHistoryResponse, error) + ListOpenWorkflowExecutions( ctx context.Context, ListRequest *shared.ListOpenWorkflowExecutionsRequest, @@ -573,6 +585,34 @@ func (c client) GetClusterInfo( return } +func (c client) GetFailoverEvent( + ctx context.Context, + _GetRequest *shared.GetFailoverEventRequest, + opts ...yarpc.CallOption, +) (success *shared.GetFailoverEventResponse, err error) { + + var result cadence.WorkflowService_GetFailoverEvent_Result + args := cadence.WorkflowService_GetFailoverEvent_Helper.Args(_GetRequest) + + if c.nwc != nil && c.nwc.Enabled() { + if err = c.nwc.Call(ctx, args, &result, opts...); err != nil { + return + } + } else { + var body wire.Value + if body, err = c.c.Call(ctx, args, opts...); err != nil { + return + } + + if err = result.FromWire(body); err != nil { + return + } + } + + success, err = cadence.WorkflowService_GetFailoverEvent_Helper.UnwrapResponse(&result) + return +} + func (c client) GetSearchAttributes( ctx context.Context, opts ...yarpc.CallOption, @@ -740,6 +780,34 @@ func (c client) ListDomains( return } +func (c client) ListFailoverHistory( + ctx context.Context, + _ListRequest *shared.ListFailoverHistoryRequest, + opts ...yarpc.CallOption, +) (success *shared.ListFailoverHistoryResponse, err error) { + + var result cadence.WorkflowService_ListFailoverHistory_Result + args := cadence.WorkflowService_ListFailoverHistory_Helper.Args(_ListRequest) + + if c.nwc != nil && c.nwc.Enabled() { + if err = c.nwc.Call(ctx, args, &result, opts...); err != nil { + return + } + } else { + var body wire.Value + if body, err = c.c.Call(ctx, args, opts...); err != nil { + return + } + + if err = result.FromWire(body); err != nil { + return + } + } + + success, err = cadence.WorkflowService_ListFailoverHistory_Helper.UnwrapResponse(&result) + return +} + func (c client) ListOpenWorkflowExecutions( ctx context.Context, _ListRequest *shared.ListOpenWorkflowExecutionsRequest, diff --git a/.gen/go/cadence/workflowserviceserver/server.go b/.gen/go/cadence/workflowserviceserver/server.go index a05dd2df984..91b28f0030d 100644 --- a/.gen/go/cadence/workflowserviceserver/server.go +++ b/.gen/go/cadence/workflowserviceserver/server.go @@ -62,6 +62,11 @@ type Interface interface { ctx context.Context, ) (*shared.ClusterInfo, error) + GetFailoverEvent( + ctx context.Context, + GetRequest *shared.GetFailoverEventRequest, + ) (*shared.GetFailoverEventResponse, error) + GetSearchAttributes( ctx context.Context, ) (*shared.GetSearchAttributesResponse, error) @@ -91,6 +96,11 @@ type Interface interface { ListRequest *shared.ListDomainsRequest, ) (*shared.ListDomainsResponse, error) + ListFailoverHistory( + ctx context.Context, + ListRequest *shared.ListFailoverHistoryRequest, + ) (*shared.ListFailoverHistoryResponse, error) + ListOpenWorkflowExecutions( ctx context.Context, ListRequest *shared.ListOpenWorkflowExecutionsRequest, @@ -366,6 +376,18 @@ func New(impl Interface, opts ...thrift.RegisterOption) []transport.Procedure { ThriftModule: cadence.ThriftModule, }, + thrift.Method{ + Name: "GetFailoverEvent", + HandlerSpec: thrift.HandlerSpec{ + + Type: transport.Unary, + Unary: thrift.UnaryHandler(h.GetFailoverEvent), + NoWire: getfailoverevent_NoWireHandler{impl}, + }, + Signature: "GetFailoverEvent(GetRequest *shared.GetFailoverEventRequest) (*shared.GetFailoverEventResponse)", + ThriftModule: cadence.ThriftModule, + }, + thrift.Method{ Name: "GetSearchAttributes", HandlerSpec: thrift.HandlerSpec{ @@ -438,6 +460,18 @@ func New(impl Interface, opts ...thrift.RegisterOption) []transport.Procedure { ThriftModule: cadence.ThriftModule, }, + thrift.Method{ + Name: "ListFailoverHistory", + HandlerSpec: thrift.HandlerSpec{ + + Type: transport.Unary, + Unary: thrift.UnaryHandler(h.ListFailoverHistory), + NoWire: listfailoverhistory_NoWireHandler{impl}, + }, + Signature: "ListFailoverHistory(ListRequest *shared.ListFailoverHistoryRequest) (*shared.ListFailoverHistoryResponse)", + ThriftModule: cadence.ThriftModule, + }, + thrift.Method{ Name: "ListOpenWorkflowExecutions", HandlerSpec: thrift.HandlerSpec{ @@ -812,7 +846,7 @@ func New(impl Interface, opts ...thrift.RegisterOption) []transport.Procedure { }, } - procedures := make([]transport.Procedure, 0, 46) + procedures := make([]transport.Procedure, 0, 48) procedures = append(procedures, thrift.BuildProcedures(service, opts...)...) return procedures } @@ -1093,6 +1127,36 @@ func (h handler) GetClusterInfo(ctx context.Context, body wire.Value) (thrift.Re return response, err } +func (h handler) GetFailoverEvent(ctx context.Context, body wire.Value) (thrift.Response, error) { + var args cadence.WorkflowService_GetFailoverEvent_Args + if err := args.FromWire(body); err != nil { + return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf( + "could not decode Thrift request for service 'WorkflowService' procedure 'GetFailoverEvent': %w", err) + } + + success, appErr := h.impl.GetFailoverEvent(ctx, args.GetRequest) + + hadError := appErr != nil + result, err := cadence.WorkflowService_GetFailoverEvent_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) GetSearchAttributes(ctx context.Context, body wire.Value) (thrift.Response, error) { var args cadence.WorkflowService_GetSearchAttributes_Args if err := args.FromWire(body); err != nil { @@ -1273,6 +1337,36 @@ func (h handler) ListDomains(ctx context.Context, body wire.Value) (thrift.Respo return response, err } +func (h handler) ListFailoverHistory(ctx context.Context, body wire.Value) (thrift.Response, error) { + var args cadence.WorkflowService_ListFailoverHistory_Args + if err := args.FromWire(body); err != nil { + return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf( + "could not decode Thrift request for service 'WorkflowService' procedure 'ListFailoverHistory': %w", err) + } + + success, appErr := h.impl.ListFailoverHistory(ctx, args.ListRequest) + + hadError := appErr != nil + result, err := cadence.WorkflowService_ListFailoverHistory_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) ListOpenWorkflowExecutions(ctx context.Context, body wire.Value) (thrift.Response, error) { var args cadence.WorkflowService_ListOpenWorkflowExecutions_Args if err := args.FromWire(body); err != nil { @@ -2536,6 +2630,43 @@ func (h getclusterinfo_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thr } +type getfailoverevent_NoWireHandler struct{ impl Interface } + +func (h getfailoverevent_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) { + var ( + args cadence.WorkflowService_GetFailoverEvent_Args + rw stream.ResponseWriter + err error + ) + + rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args) + if err != nil { + return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf( + "could not decode (via no wire) Thrift request for service 'WorkflowService' procedure 'GetFailoverEvent': %w", err) + } + + success, appErr := h.impl.GetFailoverEvent(ctx, args.GetRequest) + + hadError := appErr != nil + result, err := cadence.WorkflowService_GetFailoverEvent_Helper.WrapResponse(success, appErr) + response := thrift.NoWireResponse{ResponseWriter: rw} + 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 + +} + type getsearchattributes_NoWireHandler struct{ impl Interface } func (h getsearchattributes_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) { @@ -2758,6 +2889,43 @@ func (h listdomains_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift } +type listfailoverhistory_NoWireHandler struct{ impl Interface } + +func (h listfailoverhistory_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) { + var ( + args cadence.WorkflowService_ListFailoverHistory_Args + rw stream.ResponseWriter + err error + ) + + rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args) + if err != nil { + return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf( + "could not decode (via no wire) Thrift request for service 'WorkflowService' procedure 'ListFailoverHistory': %w", err) + } + + success, appErr := h.impl.ListFailoverHistory(ctx, args.ListRequest) + + hadError := appErr != nil + result, err := cadence.WorkflowService_ListFailoverHistory_Helper.WrapResponse(success, appErr) + response := thrift.NoWireResponse{ResponseWriter: rw} + 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 + +} + type listopenworkflowexecutions_NoWireHandler struct{ impl Interface } func (h listopenworkflowexecutions_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) { diff --git a/.gen/go/cadence/workflowservicetest/client.go b/.gen/go/cadence/workflowservicetest/client.go index c7f2a93db5b..38da714993c 100644 --- a/.gen/go/cadence/workflowservicetest/client.go +++ b/.gen/go/cadence/workflowservicetest/client.go @@ -335,6 +335,39 @@ func (mr *_MockClientRecorder) GetClusterInfo( return mr.mock.ctrl.RecordCall(mr.mock, "GetClusterInfo", args...) } +// GetFailoverEvent responds to a GetFailoverEvent 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().GetFailoverEvent(gomock.Any(), ...).Return(...) +// ... := client.GetFailoverEvent(...) +func (m *MockClient) GetFailoverEvent( + ctx context.Context, + _GetRequest *shared.GetFailoverEventRequest, + opts ...yarpc.CallOption, +) (success *shared.GetFailoverEventResponse, err error) { + + args := []interface{}{ctx, _GetRequest} + for _, o := range opts { + args = append(args, o) + } + i := 0 + ret := m.ctrl.Call(m, "GetFailoverEvent", args...) + success, _ = ret[i].(*shared.GetFailoverEventResponse) + i++ + err, _ = ret[i].(error) + return +} + +func (mr *_MockClientRecorder) GetFailoverEvent( + ctx interface{}, + _GetRequest interface{}, + opts ...interface{}, +) *gomock.Call { + args := append([]interface{}{ctx, _GetRequest}, opts...) + return mr.mock.ctrl.RecordCall(mr.mock, "GetFailoverEvent", args...) +} + // GetSearchAttributes responds to a GetSearchAttributes 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. @@ -531,6 +564,39 @@ func (mr *_MockClientRecorder) ListDomains( return mr.mock.ctrl.RecordCall(mr.mock, "ListDomains", args...) } +// ListFailoverHistory responds to a ListFailoverHistory 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().ListFailoverHistory(gomock.Any(), ...).Return(...) +// ... := client.ListFailoverHistory(...) +func (m *MockClient) ListFailoverHistory( + ctx context.Context, + _ListRequest *shared.ListFailoverHistoryRequest, + opts ...yarpc.CallOption, +) (success *shared.ListFailoverHistoryResponse, err error) { + + args := []interface{}{ctx, _ListRequest} + for _, o := range opts { + args = append(args, o) + } + i := 0 + ret := m.ctrl.Call(m, "ListFailoverHistory", args...) + success, _ = ret[i].(*shared.ListFailoverHistoryResponse) + i++ + err, _ = ret[i].(error) + return +} + +func (mr *_MockClientRecorder) ListFailoverHistory( + ctx interface{}, + _ListRequest interface{}, + opts ...interface{}, +) *gomock.Call { + args := append([]interface{}{ctx, _ListRequest}, opts...) + return mr.mock.ctrl.RecordCall(mr.mock, "ListFailoverHistory", args...) +} + // ListOpenWorkflowExecutions responds to a ListOpenWorkflowExecutions 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 412af68ea02..329354874b7 100644 --- a/.gen/go/shared/shared.go +++ b/.gen/go/shared/shared.go @@ -15021,6 +15021,396 @@ func (v *ClusterAttributeScope) IsSetClusterAttributes() bool { return v != nil && v.ClusterAttributes != nil } +type ClusterFailover struct { + FromCluster *ActiveClusterInfo `json:"fromCluster,omitempty"` + ToCluster *ActiveClusterInfo `json:"toCluster,omitempty"` + ClusterAttribute *ClusterAttribute `json:"clusterAttribute,omitempty"` + IsDefaultCluster *bool `json:"isDefaultCluster,omitempty"` +} + +// ToWire translates a ClusterFailover 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 *ClusterFailover) ToWire() (wire.Value, error) { + var ( + fields [4]wire.Field + i int = 0 + w wire.Value + err error + ) + + if v.FromCluster != nil { + w, err = v.FromCluster.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 10, Value: w} + i++ + } + if v.ToCluster != nil { + w, err = v.ToCluster.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 20, Value: w} + i++ + } + if v.ClusterAttribute != nil { + w, err = v.ClusterAttribute.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 30, Value: w} + i++ + } + if v.IsDefaultCluster != nil { + w, err = wire.NewValueBool(*(v.IsDefaultCluster)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 40, Value: w} + i++ + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +// FromWire deserializes a ClusterFailover 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 ClusterFailover struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v ClusterFailover +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *ClusterFailover) 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.FromCluster, err = _ActiveClusterInfo_Read(field.Value) + if err != nil { + return err + } + + } + case 20: + if field.Value.Type() == wire.TStruct { + v.ToCluster, err = _ActiveClusterInfo_Read(field.Value) + if err != nil { + return err + } + + } + case 30: + if field.Value.Type() == wire.TStruct { + v.ClusterAttribute, err = _ClusterAttribute_Read(field.Value) + if err != nil { + return err + } + + } + case 40: + if field.Value.Type() == wire.TBool { + var x bool + x, err = field.Value.GetBool(), error(nil) + v.IsDefaultCluster = &x + if err != nil { + return err + } + + } + } + } + + return nil +} + +// Encode serializes a ClusterFailover struct directly into bytes, without going +// through an intermediary type. +// +// An error is returned if a ClusterFailover struct could not be encoded. +func (v *ClusterFailover) Encode(sw stream.Writer) error { + if err := sw.WriteStructBegin(); err != nil { + return err + } + + if v.FromCluster != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TStruct}); err != nil { + return err + } + if err := v.FromCluster.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.ToCluster != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TStruct}); err != nil { + return err + } + if err := v.ToCluster.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.ClusterAttribute != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TStruct}); err != nil { + return err + } + if err := v.ClusterAttribute.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.IsDefaultCluster != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 40, Type: wire.TBool}); err != nil { + return err + } + if err := sw.WriteBool(*(v.IsDefaultCluster)); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + return sw.WriteStructEnd() +} + +// Decode deserializes a ClusterFailover struct directly from its Thrift-level +// representation, without going through an intemediary type. +// +// An error is returned if a ClusterFailover struct could not be generated from the wire +// representation. +func (v *ClusterFailover) Decode(sr stream.Reader) error { + + if err := sr.ReadStructBegin(); err != nil { + return err + } + + fh, ok, err := sr.ReadFieldBegin() + if err != nil { + return err + } + + for ok { + switch { + case fh.ID == 10 && fh.Type == wire.TStruct: + v.FromCluster, err = _ActiveClusterInfo_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 20 && fh.Type == wire.TStruct: + v.ToCluster, err = _ActiveClusterInfo_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 30 && fh.Type == wire.TStruct: + v.ClusterAttribute, err = _ClusterAttribute_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 40 && fh.Type == wire.TBool: + var x bool + x, err = sr.ReadBool() + v.IsDefaultCluster = &x + if err != nil { + return err + } + + default: + if err := sr.Skip(fh.Type); err != nil { + return err + } + } + + if err := sr.ReadFieldEnd(); err != nil { + return err + } + + if fh, ok, err = sr.ReadFieldBegin(); err != nil { + return err + } + } + + if err := sr.ReadStructEnd(); err != nil { + return err + } + + return nil +} + +// String returns a readable string representation of a ClusterFailover +// struct. +func (v *ClusterFailover) String() string { + if v == nil { + return "" + } + + var fields [4]string + i := 0 + if v.FromCluster != nil { + fields[i] = fmt.Sprintf("FromCluster: %v", v.FromCluster) + i++ + } + if v.ToCluster != nil { + fields[i] = fmt.Sprintf("ToCluster: %v", v.ToCluster) + i++ + } + if v.ClusterAttribute != nil { + fields[i] = fmt.Sprintf("ClusterAttribute: %v", v.ClusterAttribute) + i++ + } + if v.IsDefaultCluster != nil { + fields[i] = fmt.Sprintf("IsDefaultCluster: %v", *(v.IsDefaultCluster)) + i++ + } + + return fmt.Sprintf("ClusterFailover{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this ClusterFailover match the +// provided ClusterFailover. +// +// This function performs a deep comparison. +func (v *ClusterFailover) Equals(rhs *ClusterFailover) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !((v.FromCluster == nil && rhs.FromCluster == nil) || (v.FromCluster != nil && rhs.FromCluster != nil && v.FromCluster.Equals(rhs.FromCluster))) { + return false + } + if !((v.ToCluster == nil && rhs.ToCluster == nil) || (v.ToCluster != nil && rhs.ToCluster != nil && v.ToCluster.Equals(rhs.ToCluster))) { + return false + } + if !((v.ClusterAttribute == nil && rhs.ClusterAttribute == nil) || (v.ClusterAttribute != nil && rhs.ClusterAttribute != nil && v.ClusterAttribute.Equals(rhs.ClusterAttribute))) { + return false + } + if !_Bool_EqualsPtr(v.IsDefaultCluster, rhs.IsDefaultCluster) { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of ClusterFailover. +func (v *ClusterFailover) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + if v.FromCluster != nil { + err = multierr.Append(err, enc.AddObject("fromCluster", v.FromCluster)) + } + if v.ToCluster != nil { + err = multierr.Append(err, enc.AddObject("toCluster", v.ToCluster)) + } + if v.ClusterAttribute != nil { + err = multierr.Append(err, enc.AddObject("clusterAttribute", v.ClusterAttribute)) + } + if v.IsDefaultCluster != nil { + enc.AddBool("isDefaultCluster", *v.IsDefaultCluster) + } + return err +} + +// GetFromCluster returns the value of FromCluster if it is set or its +// zero value if it is unset. +func (v *ClusterFailover) GetFromCluster() (o *ActiveClusterInfo) { + if v != nil && v.FromCluster != nil { + return v.FromCluster + } + + return +} + +// IsSetFromCluster returns true if FromCluster is not nil. +func (v *ClusterFailover) IsSetFromCluster() bool { + return v != nil && v.FromCluster != nil +} + +// GetToCluster returns the value of ToCluster if it is set or its +// zero value if it is unset. +func (v *ClusterFailover) GetToCluster() (o *ActiveClusterInfo) { + if v != nil && v.ToCluster != nil { + return v.ToCluster + } + + return +} + +// IsSetToCluster returns true if ToCluster is not nil. +func (v *ClusterFailover) IsSetToCluster() bool { + return v != nil && v.ToCluster != nil +} + +// GetClusterAttribute returns the value of ClusterAttribute if it is set or its +// zero value if it is unset. +func (v *ClusterFailover) GetClusterAttribute() (o *ClusterAttribute) { + if v != nil && v.ClusterAttribute != nil { + return v.ClusterAttribute + } + + return +} + +// IsSetClusterAttribute returns true if ClusterAttribute is not nil. +func (v *ClusterFailover) IsSetClusterAttribute() bool { + return v != nil && v.ClusterAttribute != nil +} + +// GetIsDefaultCluster returns the value of IsDefaultCluster if it is set or its +// zero value if it is unset. +func (v *ClusterFailover) GetIsDefaultCluster() (o bool) { + if v != nil && v.IsDefaultCluster != nil { + return *v.IsDefaultCluster + } + + return +} + +// IsSetIsDefaultCluster returns true if IsDefaultCluster is not nil. +func (v *ClusterFailover) IsSetIsDefaultCluster() bool { + return v != nil && v.IsDefaultCluster != nil +} + type ClusterInfo struct { SupportedClientVersions *SupportedClientVersions `json:"supportedClientVersions,omitempty"` } @@ -42319,6 +42709,366 @@ func (v *FailoverDomainResponse) IsSetIsGlobalDomain() bool { return v != nil && v.IsGlobalDomain != nil } +type FailoverEvent struct { + ID *string `json:"id,omitempty"` + CreatedTime *int64 `json:"createdTime,omitempty"` + FailoverType *FailoverType `json:"failoverType,omitempty"` +} + +// ToWire translates a FailoverEvent 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 *FailoverEvent) ToWire() (wire.Value, error) { + var ( + fields [3]wire.Field + i int = 0 + w wire.Value + err error + ) + + if v.ID != nil { + w, err = wire.NewValueString(*(v.ID)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 10, Value: w} + i++ + } + if v.CreatedTime != nil { + w, err = wire.NewValueI64(*(v.CreatedTime)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 20, Value: w} + i++ + } + if v.FailoverType != nil { + w, err = v.FailoverType.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 30, Value: w} + i++ + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +func _FailoverType_Read(w wire.Value) (FailoverType, error) { + var v FailoverType + err := v.FromWire(w) + return v, err +} + +// FromWire deserializes a FailoverEvent 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 FailoverEvent struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v FailoverEvent +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *FailoverEvent) FromWire(w wire.Value) error { + var err error + + for _, field := range w.GetStruct().Fields { + switch field.ID { + case 10: + if field.Value.Type() == wire.TBinary { + var x string + x, err = field.Value.GetString(), error(nil) + v.ID = &x + if err != nil { + return err + } + + } + case 20: + if field.Value.Type() == wire.TI64 { + var x int64 + x, err = field.Value.GetI64(), error(nil) + v.CreatedTime = &x + if err != nil { + return err + } + + } + case 30: + if field.Value.Type() == wire.TI32 { + var x FailoverType + x, err = _FailoverType_Read(field.Value) + v.FailoverType = &x + if err != nil { + return err + } + + } + } + } + + return nil +} + +// Encode serializes a FailoverEvent struct directly into bytes, without going +// through an intermediary type. +// +// An error is returned if a FailoverEvent struct could not be encoded. +func (v *FailoverEvent) Encode(sw stream.Writer) error { + if err := sw.WriteStructBegin(); err != nil { + return err + } + + if v.ID != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil { + return err + } + if err := sw.WriteString(*(v.ID)); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.CreatedTime != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TI64}); err != nil { + return err + } + if err := sw.WriteInt64(*(v.CreatedTime)); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.FailoverType != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TI32}); err != nil { + return err + } + if err := v.FailoverType.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + return sw.WriteStructEnd() +} + +func _FailoverType_Decode(sr stream.Reader) (FailoverType, error) { + var v FailoverType + err := v.Decode(sr) + return v, err +} + +// Decode deserializes a FailoverEvent struct directly from its Thrift-level +// representation, without going through an intemediary type. +// +// An error is returned if a FailoverEvent struct could not be generated from the wire +// representation. +func (v *FailoverEvent) Decode(sr stream.Reader) error { + + if err := sr.ReadStructBegin(); err != nil { + return err + } + + fh, ok, err := sr.ReadFieldBegin() + if err != nil { + return err + } + + for ok { + switch { + case fh.ID == 10 && fh.Type == wire.TBinary: + var x string + x, err = sr.ReadString() + v.ID = &x + if err != nil { + return err + } + + case fh.ID == 20 && fh.Type == wire.TI64: + var x int64 + x, err = sr.ReadInt64() + v.CreatedTime = &x + if err != nil { + return err + } + + case fh.ID == 30 && fh.Type == wire.TI32: + var x FailoverType + x, err = _FailoverType_Decode(sr) + v.FailoverType = &x + if err != nil { + return err + } + + default: + if err := sr.Skip(fh.Type); err != nil { + return err + } + } + + if err := sr.ReadFieldEnd(); err != nil { + return err + } + + if fh, ok, err = sr.ReadFieldBegin(); err != nil { + return err + } + } + + if err := sr.ReadStructEnd(); err != nil { + return err + } + + return nil +} + +// String returns a readable string representation of a FailoverEvent +// struct. +func (v *FailoverEvent) String() string { + if v == nil { + return "" + } + + var fields [3]string + i := 0 + if v.ID != nil { + fields[i] = fmt.Sprintf("ID: %v", *(v.ID)) + i++ + } + if v.CreatedTime != nil { + fields[i] = fmt.Sprintf("CreatedTime: %v", *(v.CreatedTime)) + i++ + } + if v.FailoverType != nil { + fields[i] = fmt.Sprintf("FailoverType: %v", *(v.FailoverType)) + i++ + } + + return fmt.Sprintf("FailoverEvent{%v}", strings.Join(fields[:i], ", ")) +} + +func _FailoverType_EqualsPtr(lhs, rhs *FailoverType) bool { + if lhs != nil && rhs != nil { + + x := *lhs + y := *rhs + return x.Equals(y) + } + return lhs == nil && rhs == nil +} + +// Equals returns true if all the fields of this FailoverEvent match the +// provided FailoverEvent. +// +// This function performs a deep comparison. +func (v *FailoverEvent) Equals(rhs *FailoverEvent) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !_String_EqualsPtr(v.ID, rhs.ID) { + return false + } + if !_I64_EqualsPtr(v.CreatedTime, rhs.CreatedTime) { + return false + } + if !_FailoverType_EqualsPtr(v.FailoverType, rhs.FailoverType) { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of FailoverEvent. +func (v *FailoverEvent) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + if v.ID != nil { + enc.AddString("id", *v.ID) + } + if v.CreatedTime != nil { + enc.AddInt64("createdTime", *v.CreatedTime) + } + if v.FailoverType != nil { + err = multierr.Append(err, enc.AddObject("failoverType", *v.FailoverType)) + } + return err +} + +// GetID returns the value of ID if it is set or its +// zero value if it is unset. +func (v *FailoverEvent) GetID() (o string) { + if v != nil && v.ID != nil { + return *v.ID + } + + return +} + +// IsSetID returns true if ID is not nil. +func (v *FailoverEvent) IsSetID() bool { + return v != nil && v.ID != nil +} + +// GetCreatedTime returns the value of CreatedTime if it is set or its +// zero value if it is unset. +func (v *FailoverEvent) GetCreatedTime() (o int64) { + if v != nil && v.CreatedTime != nil { + return *v.CreatedTime + } + + return +} + +// IsSetCreatedTime returns true if CreatedTime is not nil. +func (v *FailoverEvent) IsSetCreatedTime() bool { + return v != nil && v.CreatedTime != nil +} + +// GetFailoverType returns the value of FailoverType if it is set or its +// zero value if it is unset. +func (v *FailoverEvent) GetFailoverType() (o FailoverType) { + if v != nil && v.FailoverType != nil { + return *v.FailoverType + } + + return +} + +// IsSetFailoverType returns true if FailoverType is not nil. +func (v *FailoverEvent) IsSetFailoverType() bool { + return v != nil && v.FailoverType != nil +} + type FailoverInfo struct { FailoverVersion *int64 `json:"failoverVersion,omitempty"` FailoverStartTimestamp *int64 `json:"failoverStartTimestamp,omitempty"` @@ -42781,6 +43531,218 @@ func (v *FailoverInfo) IsSetPendingShards() bool { return v != nil && v.PendingShards != nil } +type FailoverType int32 + +const ( + FailoverTypeInvalid FailoverType = 0 + FailoverTypeForce FailoverType = 1 + FailoverTypeGraceful FailoverType = 2 +) + +// FailoverType_Values returns all recognized values of FailoverType. +func FailoverType_Values() []FailoverType { + return []FailoverType{ + FailoverTypeInvalid, + FailoverTypeForce, + FailoverTypeGraceful, + } +} + +// UnmarshalText tries to decode FailoverType from a byte slice +// containing its name. +// +// var v FailoverType +// err := v.UnmarshalText([]byte("INVALID")) +func (v *FailoverType) UnmarshalText(value []byte) error { + switch s := string(value); s { + case "INVALID": + *v = FailoverTypeInvalid + return nil + case "FORCE": + *v = FailoverTypeForce + return nil + case "GRACEFUL": + *v = FailoverTypeGraceful + return nil + default: + val, err := strconv.ParseInt(s, 10, 32) + if err != nil { + return fmt.Errorf("unknown enum value %q for %q: %v", s, "FailoverType", err) + } + *v = FailoverType(val) + return nil + } +} + +// MarshalText encodes FailoverType to text. +// +// If the enum value is recognized, its name is returned. +// Otherwise, its integer value is returned. +// +// This implements the TextMarshaler interface. +func (v FailoverType) MarshalText() ([]byte, error) { + switch int32(v) { + case 0: + return []byte("INVALID"), nil + case 1: + return []byte("FORCE"), nil + case 2: + return []byte("GRACEFUL"), nil + } + return []byte(strconv.FormatInt(int64(v), 10)), nil +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of FailoverType. +// Enums are logged as objects, where the value is logged with key "value", and +// if this value's name is known, the name is logged with key "name". +func (v FailoverType) MarshalLogObject(enc zapcore.ObjectEncoder) error { + enc.AddInt32("value", int32(v)) + switch int32(v) { + case 0: + enc.AddString("name", "INVALID") + case 1: + enc.AddString("name", "FORCE") + case 2: + enc.AddString("name", "GRACEFUL") + } + return nil +} + +// Ptr returns a pointer to this enum value. +func (v FailoverType) Ptr() *FailoverType { + return &v +} + +// Encode encodes FailoverType directly to bytes. +// +// sWriter := BinaryStreamer.Writer(writer) +// +// var v FailoverType +// return v.Encode(sWriter) +func (v FailoverType) Encode(sw stream.Writer) error { + return sw.WriteInt32(int32(v)) +} + +// ToWire translates FailoverType into a Thrift-level intermediate +// representation. This intermediate representation may be serialized +// into bytes using a ThriftRW protocol implementation. +// +// Enums are represented as 32-bit integers over the wire. +func (v FailoverType) ToWire() (wire.Value, error) { + return wire.NewValueI32(int32(v)), nil +} + +// FromWire deserializes FailoverType from its Thrift-level +// representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TI32) +// if err != nil { +// return FailoverType(0), err +// } +// +// var v FailoverType +// if err := v.FromWire(x); err != nil { +// return FailoverType(0), err +// } +// return v, nil +func (v *FailoverType) FromWire(w wire.Value) error { + *v = (FailoverType)(w.GetI32()) + return nil +} + +// Decode reads off the encoded FailoverType directly off of the wire. +// +// sReader := BinaryStreamer.Reader(reader) +// +// var v FailoverType +// if err := v.Decode(sReader); err != nil { +// return FailoverType(0), err +// } +// return v, nil +func (v *FailoverType) Decode(sr stream.Reader) error { + i, err := sr.ReadInt32() + if err != nil { + return err + } + *v = (FailoverType)(i) + return nil +} + +// String returns a readable string representation of FailoverType. +func (v FailoverType) String() string { + w := int32(v) + switch w { + case 0: + return "INVALID" + case 1: + return "FORCE" + case 2: + return "GRACEFUL" + } + return fmt.Sprintf("FailoverType(%d)", w) +} + +// Equals returns true if this FailoverType value matches the provided +// value. +func (v FailoverType) Equals(rhs FailoverType) bool { + return v == rhs +} + +// MarshalJSON serializes FailoverType into JSON. +// +// If the enum value is recognized, its name is returned. +// Otherwise, its integer value is returned. +// +// This implements json.Marshaler. +func (v FailoverType) MarshalJSON() ([]byte, error) { + switch int32(v) { + case 0: + return ([]byte)("\"INVALID\""), nil + case 1: + return ([]byte)("\"FORCE\""), nil + case 2: + return ([]byte)("\"GRACEFUL\""), nil + } + return ([]byte)(strconv.FormatInt(int64(v), 10)), nil +} + +// UnmarshalJSON attempts to decode FailoverType from its JSON +// representation. +// +// This implementation supports both, numeric and string inputs. If a +// string is provided, it must be a known enum name. +// +// This implements json.Unmarshaler. +func (v *FailoverType) UnmarshalJSON(text []byte) error { + d := json.NewDecoder(bytes.NewReader(text)) + d.UseNumber() + t, err := d.Token() + if err != nil { + return err + } + + switch w := t.(type) { + case json.Number: + x, err := w.Int64() + if err != nil { + return err + } + if x > math.MaxInt32 { + return fmt.Errorf("enum overflow from JSON %q for %q", text, "FailoverType") + } + if x < math.MinInt32 { + return fmt.Errorf("enum underflow from JSON %q for %q", text, "FailoverType") + } + *v = (FailoverType)(x) + return nil + case string: + return v.UnmarshalText([]byte(w)) + default: + return fmt.Errorf("invalid JSON value %q (%T) to unmarshal into %q", t, t, "FailoverType") + } +} + type FeatureFlags struct { WorkflowExecutionAlreadyCompletedErrorEnabled *bool `json:"WorkflowExecutionAlreadyCompletedErrorEnabled,omitempty"` } @@ -44229,46 +45191,378 @@ func (v *GetCrossClusterTasksResponse) IsSetFailedCauseByShard() bool { return v != nil && v.FailedCauseByShard != nil } -type GetSearchAttributesResponse struct { - Keys map[string]IndexedValueType `json:"keys,omitempty"` +type GetFailoverEventRequest struct { + DomainID *string `json:"domainID,omitempty"` + FailoverEventID *string `json:"failoverEventID,omitempty"` + CreatedTime *int64 `json:"createdTime,omitempty"` } -type _Map_String_IndexedValueType_MapItemList map[string]IndexedValueType +// ToWire translates a GetFailoverEventRequest 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 *GetFailoverEventRequest) ToWire() (wire.Value, error) { + var ( + fields [3]wire.Field + i int = 0 + w wire.Value + err error + ) -func (m _Map_String_IndexedValueType_MapItemList) ForEach(f func(wire.MapItem) error) error { - for k, v := range m { - kw, err := wire.NewValueString(k), error(nil) + if v.DomainID != nil { + w, err = wire.NewValueString(*(v.DomainID)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 10, Value: w} + i++ + } + if v.FailoverEventID != nil { + w, err = wire.NewValueString(*(v.FailoverEventID)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 20, Value: w} + i++ + } + if v.CreatedTime != nil { + w, err = wire.NewValueI64(*(v.CreatedTime)), error(nil) if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 30, Value: w} + i++ + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +// FromWire deserializes a GetFailoverEventRequest 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 GetFailoverEventRequest struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v GetFailoverEventRequest +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *GetFailoverEventRequest) FromWire(w wire.Value) error { + var err error + + for _, field := range w.GetStruct().Fields { + switch field.ID { + case 10: + if field.Value.Type() == wire.TBinary { + var x string + x, err = field.Value.GetString(), error(nil) + v.DomainID = &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.FailoverEventID = &x + if err != nil { + return err + } + + } + case 30: + if field.Value.Type() == wire.TI64 { + var x int64 + x, err = field.Value.GetI64(), error(nil) + v.CreatedTime = &x + if err != nil { + return err + } + + } + } + } + + return nil +} + +// Encode serializes a GetFailoverEventRequest struct directly into bytes, without going +// through an intermediary type. +// +// An error is returned if a GetFailoverEventRequest struct could not be encoded. +func (v *GetFailoverEventRequest) Encode(sw stream.Writer) error { + if err := sw.WriteStructBegin(); err != nil { + return err + } + + if v.DomainID != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil { + return err + } + if err := sw.WriteString(*(v.DomainID)); err != nil { return err } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } - vw, err := v.ToWire() - if err != nil { + if v.FailoverEventID != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TBinary}); err != nil { return err } - err = f(wire.MapItem{Key: kw, Value: vw}) - if err != nil { + if err := sw.WriteString(*(v.FailoverEventID)); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.CreatedTime != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TI64}); err != nil { + return err + } + if err := sw.WriteInt64(*(v.CreatedTime)); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + return sw.WriteStructEnd() +} + +// Decode deserializes a GetFailoverEventRequest struct directly from its Thrift-level +// representation, without going through an intemediary type. +// +// An error is returned if a GetFailoverEventRequest struct could not be generated from the wire +// representation. +func (v *GetFailoverEventRequest) Decode(sr stream.Reader) error { + + if err := sr.ReadStructBegin(); err != nil { + return err + } + + fh, ok, err := sr.ReadFieldBegin() + if err != nil { + return err + } + + for ok { + switch { + case fh.ID == 10 && fh.Type == wire.TBinary: + var x string + x, err = sr.ReadString() + v.DomainID = &x + if err != nil { + return err + } + + case fh.ID == 20 && fh.Type == wire.TBinary: + var x string + x, err = sr.ReadString() + v.FailoverEventID = &x + if err != nil { + return err + } + + case fh.ID == 30 && fh.Type == wire.TI64: + var x int64 + x, err = sr.ReadInt64() + v.CreatedTime = &x + if err != nil { + return err + } + + default: + if err := sr.Skip(fh.Type); err != nil { + return err + } + } + + if err := sr.ReadFieldEnd(); err != nil { + return err + } + + if fh, ok, err = sr.ReadFieldBegin(); err != nil { return err } } + + if err := sr.ReadStructEnd(); err != nil { + return err + } + return nil } -func (m _Map_String_IndexedValueType_MapItemList) Size() int { - return len(m) +// String returns a readable string representation of a GetFailoverEventRequest +// struct. +func (v *GetFailoverEventRequest) String() string { + if v == nil { + return "" + } + + var fields [3]string + i := 0 + if v.DomainID != nil { + fields[i] = fmt.Sprintf("DomainID: %v", *(v.DomainID)) + i++ + } + if v.FailoverEventID != nil { + fields[i] = fmt.Sprintf("FailoverEventID: %v", *(v.FailoverEventID)) + i++ + } + if v.CreatedTime != nil { + fields[i] = fmt.Sprintf("CreatedTime: %v", *(v.CreatedTime)) + i++ + } + + return fmt.Sprintf("GetFailoverEventRequest{%v}", strings.Join(fields[:i], ", ")) } -func (_Map_String_IndexedValueType_MapItemList) KeyType() wire.Type { - return wire.TBinary +// Equals returns true if all the fields of this GetFailoverEventRequest match the +// provided GetFailoverEventRequest. +// +// This function performs a deep comparison. +func (v *GetFailoverEventRequest) Equals(rhs *GetFailoverEventRequest) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !_String_EqualsPtr(v.DomainID, rhs.DomainID) { + return false + } + if !_String_EqualsPtr(v.FailoverEventID, rhs.FailoverEventID) { + return false + } + if !_I64_EqualsPtr(v.CreatedTime, rhs.CreatedTime) { + return false + } + + return true } -func (_Map_String_IndexedValueType_MapItemList) ValueType() wire.Type { - return wire.TI32 +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of GetFailoverEventRequest. +func (v *GetFailoverEventRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + if v.DomainID != nil { + enc.AddString("domainID", *v.DomainID) + } + if v.FailoverEventID != nil { + enc.AddString("failoverEventID", *v.FailoverEventID) + } + if v.CreatedTime != nil { + enc.AddInt64("createdTime", *v.CreatedTime) + } + return err } -func (_Map_String_IndexedValueType_MapItemList) Close() {} +// GetDomainID returns the value of DomainID if it is set or its +// zero value if it is unset. +func (v *GetFailoverEventRequest) GetDomainID() (o string) { + if v != nil && v.DomainID != nil { + return *v.DomainID + } -// ToWire translates a GetSearchAttributesResponse struct into a Thrift-level intermediate + return +} + +// IsSetDomainID returns true if DomainID is not nil. +func (v *GetFailoverEventRequest) IsSetDomainID() bool { + return v != nil && v.DomainID != nil +} + +// GetFailoverEventID returns the value of FailoverEventID if it is set or its +// zero value if it is unset. +func (v *GetFailoverEventRequest) GetFailoverEventID() (o string) { + if v != nil && v.FailoverEventID != nil { + return *v.FailoverEventID + } + + return +} + +// IsSetFailoverEventID returns true if FailoverEventID is not nil. +func (v *GetFailoverEventRequest) IsSetFailoverEventID() bool { + return v != nil && v.FailoverEventID != nil +} + +// GetCreatedTime returns the value of CreatedTime if it is set or its +// zero value if it is unset. +func (v *GetFailoverEventRequest) GetCreatedTime() (o int64) { + if v != nil && v.CreatedTime != nil { + return *v.CreatedTime + } + + return +} + +// IsSetCreatedTime returns true if CreatedTime is not nil. +func (v *GetFailoverEventRequest) IsSetCreatedTime() bool { + return v != nil && v.CreatedTime != nil +} + +type GetFailoverEventResponse struct { + ClusterFailovers []*ClusterFailover `json:"clusterFailovers,omitempty"` +} + +type _List_ClusterFailover_ValueList []*ClusterFailover + +func (v _List_ClusterFailover_ValueList) ForEach(f func(wire.Value) error) error { + for i, x := range v { + if x == nil { + return fmt.Errorf("invalid list '[]*ClusterFailover', index [%v]: value is nil", i) + } + w, err := x.ToWire() + if err != nil { + return err + } + err = f(w) + if err != nil { + return err + } + } + return nil +} + +func (v _List_ClusterFailover_ValueList) Size() int { + return len(v) +} + +func (_List_ClusterFailover_ValueList) ValueType() wire.Type { + return wire.TStruct +} + +func (_List_ClusterFailover_ValueList) Close() {} + +// ToWire translates a GetFailoverEventResponse struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -44283,7 +45577,7 @@ func (_Map_String_IndexedValueType_MapItemList) Close() {} // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *GetSearchAttributesResponse) ToWire() (wire.Value, error) { +func (v *GetFailoverEventResponse) ToWire() (wire.Value, error) { var ( fields [1]wire.Field i int = 0 @@ -44291,8 +45585,8 @@ func (v *GetSearchAttributesResponse) ToWire() (wire.Value, error) { err error ) - if v.Keys != nil { - w, err = wire.NewValueMap(_Map_String_IndexedValueType_MapItemList(v.Keys)), error(nil) + if v.ClusterFailovers != nil { + w, err = wire.NewValueList(_List_ClusterFailover_ValueList(v.ClusterFailovers)), error(nil) if err != nil { return w, err } @@ -44303,45 +45597,35 @@ func (v *GetSearchAttributesResponse) ToWire() (wire.Value, error) { return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _IndexedValueType_Read(w wire.Value) (IndexedValueType, error) { - var v IndexedValueType +func _ClusterFailover_Read(w wire.Value) (*ClusterFailover, error) { + var v ClusterFailover err := v.FromWire(w) - return v, err + return &v, err } -func _Map_String_IndexedValueType_Read(m wire.MapItemList) (map[string]IndexedValueType, error) { - if m.KeyType() != wire.TBinary { - return nil, nil - } - - if m.ValueType() != wire.TI32 { +func _List_ClusterFailover_Read(l wire.ValueList) ([]*ClusterFailover, error) { + if l.ValueType() != wire.TStruct { return nil, nil } - o := make(map[string]IndexedValueType, m.Size()) - err := m.ForEach(func(x wire.MapItem) error { - k, err := x.Key.GetString(), error(nil) - if err != nil { - return err - } - - v, err := _IndexedValueType_Read(x.Value) + o := make([]*ClusterFailover, 0, l.Size()) + err := l.ForEach(func(x wire.Value) error { + i, err := _ClusterFailover_Read(x) if err != nil { return err } - - o[k] = v + o = append(o, i) return nil }) - m.Close() + l.Close() return o, err } -// FromWire deserializes a GetSearchAttributesResponse struct from its Thrift-level +// FromWire deserializes a GetFailoverEventResponse 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 GetSearchAttributesResponse struct +// An error is returned if we were unable to build a GetFailoverEventResponse struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -44349,19 +45633,19 @@ func _Map_String_IndexedValueType_Read(m wire.MapItemList) (map[string]IndexedVa // return nil, err // } // -// var v GetSearchAttributesResponse +// var v GetFailoverEventResponse // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *GetSearchAttributesResponse) FromWire(w wire.Value) error { +func (v *GetFailoverEventResponse) FromWire(w wire.Value) error { var err error for _, field := range w.GetStruct().Fields { switch field.ID { case 10: - if field.Value.Type() == wire.TMap { - v.Keys, err = _Map_String_IndexedValueType_Read(field.Value.GetMap()) + if field.Value.Type() == wire.TList { + v.ClusterFailovers, err = _List_ClusterFailover_Read(field.Value.GetList()) if err != nil { return err } @@ -44373,43 +45657,41 @@ func (v *GetSearchAttributesResponse) FromWire(w wire.Value) error { return nil } -func _Map_String_IndexedValueType_Encode(val map[string]IndexedValueType, sw stream.Writer) error { +func _List_ClusterFailover_Encode(val []*ClusterFailover, sw stream.Writer) error { - mh := stream.MapHeader{ - KeyType: wire.TBinary, - ValueType: wire.TI32, - Length: len(val), + lh := stream.ListHeader{ + Type: wire.TStruct, + Length: len(val), } - if err := sw.WriteMapBegin(mh); err != nil { + if err := sw.WriteListBegin(lh); err != nil { return err } - for k, v := range val { - if err := sw.WriteString(k); err != nil { - return err + for i, v := range val { + if v == nil { + return fmt.Errorf("invalid list '[]*ClusterFailover', index [%v]: value is nil", i) } if err := v.Encode(sw); err != nil { return err } } - - return sw.WriteMapEnd() + return sw.WriteListEnd() } -// Encode serializes a GetSearchAttributesResponse struct directly into bytes, without going +// Encode serializes a GetFailoverEventResponse struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a GetSearchAttributesResponse struct could not be encoded. -func (v *GetSearchAttributesResponse) Encode(sw stream.Writer) error { +// An error is returned if a GetFailoverEventResponse struct could not be encoded. +func (v *GetFailoverEventResponse) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } - if v.Keys != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TMap}); err != nil { + if v.ClusterFailovers != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TList}); err != nil { return err } - if err := _Map_String_IndexedValueType_Encode(v.Keys, sw); err != nil { + if err := _List_ClusterFailover_Encode(v.ClusterFailovers, sw); err != nil { return err } if err := sw.WriteFieldEnd(); err != nil { @@ -44420,58 +45702,48 @@ func (v *GetSearchAttributesResponse) Encode(sw stream.Writer) error { return sw.WriteStructEnd() } -func _IndexedValueType_Decode(sr stream.Reader) (IndexedValueType, error) { - var v IndexedValueType +func _ClusterFailover_Decode(sr stream.Reader) (*ClusterFailover, error) { + var v ClusterFailover err := v.Decode(sr) - return v, err + return &v, err } -func _Map_String_IndexedValueType_Decode(sr stream.Reader) (map[string]IndexedValueType, error) { - mh, err := sr.ReadMapBegin() +func _List_ClusterFailover_Decode(sr stream.Reader) ([]*ClusterFailover, error) { + lh, err := sr.ReadListBegin() if err != nil { return nil, err } - if mh.KeyType != wire.TBinary || mh.ValueType != wire.TI32 { - for i := 0; i < mh.Length; i++ { - if err := sr.Skip(mh.KeyType); err != nil { - return nil, err - } - - if err := sr.Skip(mh.ValueType); err != nil { + if lh.Type != wire.TStruct { + for i := 0; i < lh.Length; i++ { + if err := sr.Skip(lh.Type); err != nil { return nil, err } } - return nil, sr.ReadMapEnd() + return nil, sr.ReadListEnd() } - o := make(map[string]IndexedValueType, mh.Length) - for i := 0; i < mh.Length; i++ { - k, err := sr.ReadString() - if err != nil { - return nil, err - } - - v, err := _IndexedValueType_Decode(sr) + o := make([]*ClusterFailover, 0, lh.Length) + for i := 0; i < lh.Length; i++ { + v, err := _ClusterFailover_Decode(sr) if err != nil { return nil, err } - - o[k] = v + o = append(o, v) } - if err = sr.ReadMapEnd(); err != nil { + if err = sr.ReadListEnd(); err != nil { return nil, err } return o, err } -// Decode deserializes a GetSearchAttributesResponse struct directly from its Thrift-level +// Decode deserializes a GetFailoverEventResponse struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a GetSearchAttributesResponse struct could not be generated from the wire +// An error is returned if a GetFailoverEventResponse struct could not be generated from the wire // representation. -func (v *GetSearchAttributesResponse) Decode(sr stream.Reader) error { +func (v *GetFailoverEventResponse) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -44484,8 +45756,8 @@ func (v *GetSearchAttributesResponse) Decode(sr stream.Reader) error { for ok { switch { - case fh.ID == 10 && fh.Type == wire.TMap: - v.Keys, err = _Map_String_IndexedValueType_Decode(sr) + case fh.ID == 10 && fh.Type == wire.TList: + v.ClusterFailovers, err = _List_ClusterFailover_Decode(sr) if err != nil { return err } @@ -44512,164 +45784,534 @@ func (v *GetSearchAttributesResponse) Decode(sr stream.Reader) error { return nil } -// String returns a readable string representation of a GetSearchAttributesResponse +// String returns a readable string representation of a GetFailoverEventResponse // struct. -func (v *GetSearchAttributesResponse) String() string { +func (v *GetFailoverEventResponse) String() string { if v == nil { return "" } var fields [1]string i := 0 - if v.Keys != nil { - fields[i] = fmt.Sprintf("Keys: %v", v.Keys) + if v.ClusterFailovers != nil { + fields[i] = fmt.Sprintf("ClusterFailovers: %v", v.ClusterFailovers) i++ } - return fmt.Sprintf("GetSearchAttributesResponse{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("GetFailoverEventResponse{%v}", strings.Join(fields[:i], ", ")) } -func _Map_String_IndexedValueType_Equals(lhs, rhs map[string]IndexedValueType) bool { +func _List_ClusterFailover_Equals(lhs, rhs []*ClusterFailover) bool { if len(lhs) != len(rhs) { return false } - for lk, lv := range lhs { - rv, ok := rhs[lk] - if !ok { - return false - } + for i, lv := range lhs { + rv := rhs[i] if !lv.Equals(rv) { return false } } + return true } -// Equals returns true if all the fields of this GetSearchAttributesResponse match the -// provided GetSearchAttributesResponse. +// Equals returns true if all the fields of this GetFailoverEventResponse match the +// provided GetFailoverEventResponse. // // This function performs a deep comparison. -func (v *GetSearchAttributesResponse) Equals(rhs *GetSearchAttributesResponse) bool { +func (v *GetFailoverEventResponse) Equals(rhs *GetFailoverEventResponse) bool { if v == nil { return rhs == nil } else if rhs == nil { return false } - if !((v.Keys == nil && rhs.Keys == nil) || (v.Keys != nil && rhs.Keys != nil && _Map_String_IndexedValueType_Equals(v.Keys, rhs.Keys))) { + if !((v.ClusterFailovers == nil && rhs.ClusterFailovers == nil) || (v.ClusterFailovers != nil && rhs.ClusterFailovers != nil && _List_ClusterFailover_Equals(v.ClusterFailovers, rhs.ClusterFailovers))) { return false } return true } -type _Map_String_IndexedValueType_Zapper map[string]IndexedValueType +type _List_ClusterFailover_Zapper []*ClusterFailover -// MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of _Map_String_IndexedValueType_Zapper. -func (m _Map_String_IndexedValueType_Zapper) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { - for k, v := range m { - err = multierr.Append(err, enc.AddObject((string)(k), v)) +// MarshalLogArray implements zapcore.ArrayMarshaler, enabling +// fast logging of _List_ClusterFailover_Zapper. +func (l _List_ClusterFailover_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) { + for _, v := range l { + err = multierr.Append(err, enc.AppendObject(v)) } return err } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of GetSearchAttributesResponse. -func (v *GetSearchAttributesResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of GetFailoverEventResponse. +func (v *GetFailoverEventResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } - if v.Keys != nil { - err = multierr.Append(err, enc.AddObject("keys", (_Map_String_IndexedValueType_Zapper)(v.Keys))) + if v.ClusterFailovers != nil { + err = multierr.Append(err, enc.AddArray("clusterFailovers", (_List_ClusterFailover_Zapper)(v.ClusterFailovers))) } return err } -// GetKeys returns the value of Keys if it is set or its +// GetClusterFailovers returns the value of ClusterFailovers if it is set or its // zero value if it is unset. -func (v *GetSearchAttributesResponse) GetKeys() (o map[string]IndexedValueType) { - if v != nil && v.Keys != nil { - return v.Keys +func (v *GetFailoverEventResponse) GetClusterFailovers() (o []*ClusterFailover) { + if v != nil && v.ClusterFailovers != nil { + return v.ClusterFailovers } return } -// IsSetKeys returns true if Keys is not nil. -func (v *GetSearchAttributesResponse) IsSetKeys() bool { - return v != nil && v.Keys != nil +// IsSetClusterFailovers returns true if ClusterFailovers is not nil. +func (v *GetFailoverEventResponse) IsSetClusterFailovers() bool { + return v != nil && v.ClusterFailovers != nil } -type GetTaskFailedCause int32 +type GetSearchAttributesResponse struct { + Keys map[string]IndexedValueType `json:"keys,omitempty"` +} -const ( - GetTaskFailedCauseServiceBusy GetTaskFailedCause = 0 - GetTaskFailedCauseTimeout GetTaskFailedCause = 1 - GetTaskFailedCauseShardOwnershipLost GetTaskFailedCause = 2 - GetTaskFailedCauseUncategorized GetTaskFailedCause = 3 -) +type _Map_String_IndexedValueType_MapItemList map[string]IndexedValueType -// GetTaskFailedCause_Values returns all recognized values of GetTaskFailedCause. -func GetTaskFailedCause_Values() []GetTaskFailedCause { - return []GetTaskFailedCause{ - GetTaskFailedCauseServiceBusy, - GetTaskFailedCauseTimeout, - GetTaskFailedCauseShardOwnershipLost, - GetTaskFailedCauseUncategorized, - } -} +func (m _Map_String_IndexedValueType_MapItemList) ForEach(f func(wire.MapItem) error) error { + for k, v := range m { + kw, err := wire.NewValueString(k), error(nil) + if err != nil { + return err + } -// UnmarshalText tries to decode GetTaskFailedCause from a byte slice -// containing its name. -// -// var v GetTaskFailedCause -// err := v.UnmarshalText([]byte("SERVICE_BUSY")) -func (v *GetTaskFailedCause) UnmarshalText(value []byte) error { - switch s := string(value); s { - case "SERVICE_BUSY": - *v = GetTaskFailedCauseServiceBusy - return nil - case "TIMEOUT": - *v = GetTaskFailedCauseTimeout - return nil - case "SHARD_OWNERSHIP_LOST": - *v = GetTaskFailedCauseShardOwnershipLost - return nil - case "UNCATEGORIZED": - *v = GetTaskFailedCauseUncategorized - return nil - default: - val, err := strconv.ParseInt(s, 10, 32) + vw, err := v.ToWire() if err != nil { - return fmt.Errorf("unknown enum value %q for %q: %v", s, "GetTaskFailedCause", err) + return err + } + err = f(wire.MapItem{Key: kw, Value: vw}) + if err != nil { + return err } - *v = GetTaskFailedCause(val) - return nil } + return nil } -// MarshalText encodes GetTaskFailedCause to text. -// -// If the enum value is recognized, its name is returned. -// Otherwise, its integer value is returned. -// -// This implements the TextMarshaler interface. -func (v GetTaskFailedCause) MarshalText() ([]byte, error) { - switch int32(v) { - case 0: - return []byte("SERVICE_BUSY"), nil - case 1: - return []byte("TIMEOUT"), nil - case 2: - return []byte("SHARD_OWNERSHIP_LOST"), nil - case 3: - return []byte("UNCATEGORIZED"), nil - } - return []byte(strconv.FormatInt(int64(v), 10)), nil +func (m _Map_String_IndexedValueType_MapItemList) Size() int { + return len(m) } -// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +func (_Map_String_IndexedValueType_MapItemList) KeyType() wire.Type { + return wire.TBinary +} + +func (_Map_String_IndexedValueType_MapItemList) ValueType() wire.Type { + return wire.TI32 +} + +func (_Map_String_IndexedValueType_MapItemList) Close() {} + +// ToWire translates a GetSearchAttributesResponse 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 *GetSearchAttributesResponse) ToWire() (wire.Value, error) { + var ( + fields [1]wire.Field + i int = 0 + w wire.Value + err error + ) + + if v.Keys != nil { + w, err = wire.NewValueMap(_Map_String_IndexedValueType_MapItemList(v.Keys)), error(nil) + 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 _IndexedValueType_Read(w wire.Value) (IndexedValueType, error) { + var v IndexedValueType + err := v.FromWire(w) + return v, err +} + +func _Map_String_IndexedValueType_Read(m wire.MapItemList) (map[string]IndexedValueType, error) { + if m.KeyType() != wire.TBinary { + return nil, nil + } + + if m.ValueType() != wire.TI32 { + return nil, nil + } + + o := make(map[string]IndexedValueType, m.Size()) + err := m.ForEach(func(x wire.MapItem) error { + k, err := x.Key.GetString(), error(nil) + if err != nil { + return err + } + + v, err := _IndexedValueType_Read(x.Value) + if err != nil { + return err + } + + o[k] = v + return nil + }) + m.Close() + return o, err +} + +// FromWire deserializes a GetSearchAttributesResponse 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 GetSearchAttributesResponse struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v GetSearchAttributesResponse +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *GetSearchAttributesResponse) FromWire(w wire.Value) error { + var err error + + for _, field := range w.GetStruct().Fields { + switch field.ID { + case 10: + if field.Value.Type() == wire.TMap { + v.Keys, err = _Map_String_IndexedValueType_Read(field.Value.GetMap()) + if err != nil { + return err + } + + } + } + } + + return nil +} + +func _Map_String_IndexedValueType_Encode(val map[string]IndexedValueType, sw stream.Writer) error { + + mh := stream.MapHeader{ + KeyType: wire.TBinary, + ValueType: wire.TI32, + Length: len(val), + } + if err := sw.WriteMapBegin(mh); err != nil { + return err + } + + for k, v := range val { + if err := sw.WriteString(k); err != nil { + return err + } + if err := v.Encode(sw); err != nil { + return err + } + } + + return sw.WriteMapEnd() +} + +// Encode serializes a GetSearchAttributesResponse struct directly into bytes, without going +// through an intermediary type. +// +// An error is returned if a GetSearchAttributesResponse struct could not be encoded. +func (v *GetSearchAttributesResponse) Encode(sw stream.Writer) error { + if err := sw.WriteStructBegin(); err != nil { + return err + } + + if v.Keys != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TMap}); err != nil { + return err + } + if err := _Map_String_IndexedValueType_Encode(v.Keys, sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + return sw.WriteStructEnd() +} + +func _IndexedValueType_Decode(sr stream.Reader) (IndexedValueType, error) { + var v IndexedValueType + err := v.Decode(sr) + return v, err +} + +func _Map_String_IndexedValueType_Decode(sr stream.Reader) (map[string]IndexedValueType, error) { + mh, err := sr.ReadMapBegin() + if err != nil { + return nil, err + } + + if mh.KeyType != wire.TBinary || mh.ValueType != wire.TI32 { + for i := 0; i < mh.Length; i++ { + if err := sr.Skip(mh.KeyType); err != nil { + return nil, err + } + + if err := sr.Skip(mh.ValueType); err != nil { + return nil, err + } + } + return nil, sr.ReadMapEnd() + } + + o := make(map[string]IndexedValueType, mh.Length) + for i := 0; i < mh.Length; i++ { + k, err := sr.ReadString() + if err != nil { + return nil, err + } + + v, err := _IndexedValueType_Decode(sr) + if err != nil { + return nil, err + } + + o[k] = v + } + + if err = sr.ReadMapEnd(); err != nil { + return nil, err + } + return o, err +} + +// Decode deserializes a GetSearchAttributesResponse struct directly from its Thrift-level +// representation, without going through an intemediary type. +// +// An error is returned if a GetSearchAttributesResponse struct could not be generated from the wire +// representation. +func (v *GetSearchAttributesResponse) Decode(sr stream.Reader) error { + + if err := sr.ReadStructBegin(); err != nil { + return err + } + + fh, ok, err := sr.ReadFieldBegin() + if err != nil { + return err + } + + for ok { + switch { + case fh.ID == 10 && fh.Type == wire.TMap: + v.Keys, err = _Map_String_IndexedValueType_Decode(sr) + if err != nil { + return err + } + + default: + if err := sr.Skip(fh.Type); err != nil { + return err + } + } + + if err := sr.ReadFieldEnd(); err != nil { + return err + } + + if fh, ok, err = sr.ReadFieldBegin(); err != nil { + return err + } + } + + if err := sr.ReadStructEnd(); err != nil { + return err + } + + return nil +} + +// String returns a readable string representation of a GetSearchAttributesResponse +// struct. +func (v *GetSearchAttributesResponse) String() string { + if v == nil { + return "" + } + + var fields [1]string + i := 0 + if v.Keys != nil { + fields[i] = fmt.Sprintf("Keys: %v", v.Keys) + i++ + } + + return fmt.Sprintf("GetSearchAttributesResponse{%v}", strings.Join(fields[:i], ", ")) +} + +func _Map_String_IndexedValueType_Equals(lhs, rhs map[string]IndexedValueType) bool { + if len(lhs) != len(rhs) { + return false + } + + for lk, lv := range lhs { + rv, ok := rhs[lk] + if !ok { + return false + } + if !lv.Equals(rv) { + return false + } + } + return true +} + +// Equals returns true if all the fields of this GetSearchAttributesResponse match the +// provided GetSearchAttributesResponse. +// +// This function performs a deep comparison. +func (v *GetSearchAttributesResponse) Equals(rhs *GetSearchAttributesResponse) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !((v.Keys == nil && rhs.Keys == nil) || (v.Keys != nil && rhs.Keys != nil && _Map_String_IndexedValueType_Equals(v.Keys, rhs.Keys))) { + return false + } + + return true +} + +type _Map_String_IndexedValueType_Zapper map[string]IndexedValueType + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of _Map_String_IndexedValueType_Zapper. +func (m _Map_String_IndexedValueType_Zapper) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + for k, v := range m { + err = multierr.Append(err, enc.AddObject((string)(k), v)) + } + return err +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of GetSearchAttributesResponse. +func (v *GetSearchAttributesResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + if v.Keys != nil { + err = multierr.Append(err, enc.AddObject("keys", (_Map_String_IndexedValueType_Zapper)(v.Keys))) + } + return err +} + +// GetKeys returns the value of Keys if it is set or its +// zero value if it is unset. +func (v *GetSearchAttributesResponse) GetKeys() (o map[string]IndexedValueType) { + if v != nil && v.Keys != nil { + return v.Keys + } + + return +} + +// IsSetKeys returns true if Keys is not nil. +func (v *GetSearchAttributesResponse) IsSetKeys() bool { + return v != nil && v.Keys != nil +} + +type GetTaskFailedCause int32 + +const ( + GetTaskFailedCauseServiceBusy GetTaskFailedCause = 0 + GetTaskFailedCauseTimeout GetTaskFailedCause = 1 + GetTaskFailedCauseShardOwnershipLost GetTaskFailedCause = 2 + GetTaskFailedCauseUncategorized GetTaskFailedCause = 3 +) + +// GetTaskFailedCause_Values returns all recognized values of GetTaskFailedCause. +func GetTaskFailedCause_Values() []GetTaskFailedCause { + return []GetTaskFailedCause{ + GetTaskFailedCauseServiceBusy, + GetTaskFailedCauseTimeout, + GetTaskFailedCauseShardOwnershipLost, + GetTaskFailedCauseUncategorized, + } +} + +// UnmarshalText tries to decode GetTaskFailedCause from a byte slice +// containing its name. +// +// var v GetTaskFailedCause +// err := v.UnmarshalText([]byte("SERVICE_BUSY")) +func (v *GetTaskFailedCause) UnmarshalText(value []byte) error { + switch s := string(value); s { + case "SERVICE_BUSY": + *v = GetTaskFailedCauseServiceBusy + return nil + case "TIMEOUT": + *v = GetTaskFailedCauseTimeout + return nil + case "SHARD_OWNERSHIP_LOST": + *v = GetTaskFailedCauseShardOwnershipLost + return nil + case "UNCATEGORIZED": + *v = GetTaskFailedCauseUncategorized + return nil + default: + val, err := strconv.ParseInt(s, 10, 32) + if err != nil { + return fmt.Errorf("unknown enum value %q for %q: %v", s, "GetTaskFailedCause", err) + } + *v = GetTaskFailedCause(val) + return nil + } +} + +// MarshalText encodes GetTaskFailedCause to text. +// +// If the enum value is recognized, its name is returned. +// Otherwise, its integer value is returned. +// +// This implements the TextMarshaler interface. +func (v GetTaskFailedCause) MarshalText() ([]byte, error) { + switch int32(v) { + case 0: + return []byte("SERVICE_BUSY"), nil + case 1: + return []byte("TIMEOUT"), nil + case 2: + return []byte("SHARD_OWNERSHIP_LOST"), nil + case 3: + return []byte("UNCATEGORIZED"), nil + } + return []byte(strconv.FormatInt(int64(v), 10)), nil +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling // fast logging of GetTaskFailedCause. // Enums are logged as objects, where the value is logged with key "value", and // if this value's name is known, the name is logged with key "name". @@ -53802,114 +55444,1536 @@ func (v *LimitExceededError) Decode(sr stream.Reader) error { return err } - fh, ok, err := sr.ReadFieldBegin() - if err != nil { - return err + fh, ok, err := sr.ReadFieldBegin() + if err != nil { + return err + } + + for ok { + switch { + case fh.ID == 1 && fh.Type == wire.TBinary: + v.Message, err = sr.ReadString() + if err != nil { + return err + } + messageIsSet = true + default: + if err := sr.Skip(fh.Type); err != nil { + return err + } + } + + if err := sr.ReadFieldEnd(); err != nil { + return err + } + + if fh, ok, err = sr.ReadFieldBegin(); err != nil { + return err + } + } + + if err := sr.ReadStructEnd(); err != nil { + return err + } + + if !messageIsSet { + return errors.New("field Message of LimitExceededError is required") + } + + return nil +} + +// String returns a readable string representation of a LimitExceededError +// struct. +func (v *LimitExceededError) String() string { + if v == nil { + return "" + } + + var fields [1]string + i := 0 + fields[i] = fmt.Sprintf("Message: %v", v.Message) + i++ + + return fmt.Sprintf("LimitExceededError{%v}", strings.Join(fields[:i], ", ")) +} + +// ErrorName is the name of this type as defined in the Thrift +// file. +func (*LimitExceededError) ErrorName() string { + return "LimitExceededError" +} + +// Equals returns true if all the fields of this LimitExceededError match the +// provided LimitExceededError. +// +// This function performs a deep comparison. +func (v *LimitExceededError) Equals(rhs *LimitExceededError) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !(v.Message == rhs.Message) { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of LimitExceededError. +func (v *LimitExceededError) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + enc.AddString("message", v.Message) + return err +} + +// GetMessage returns the value of Message if it is set or its +// zero value if it is unset. +func (v *LimitExceededError) GetMessage() (o string) { + if v != nil { + o = v.Message + } + return +} + +func (v *LimitExceededError) Error() string { + return v.String() +} + +type ListArchivedWorkflowExecutionsRequest struct { + Domain *string `json:"domain,omitempty"` + PageSize *int32 `json:"pageSize,omitempty"` + NextPageToken []byte `json:"nextPageToken,omitempty"` + Query *string `json:"query,omitempty"` +} + +// ToWire translates a ListArchivedWorkflowExecutionsRequest 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 *ListArchivedWorkflowExecutionsRequest) ToWire() (wire.Value, error) { + var ( + fields [4]wire.Field + i int = 0 + w wire.Value + err error + ) + + if v.Domain != nil { + w, err = wire.NewValueString(*(v.Domain)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 10, Value: w} + i++ + } + if v.PageSize != nil { + w, err = wire.NewValueI32(*(v.PageSize)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 20, Value: w} + i++ + } + if v.NextPageToken != nil { + w, err = wire.NewValueBinary(v.NextPageToken), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 30, Value: w} + i++ + } + if v.Query != nil { + w, err = wire.NewValueString(*(v.Query)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 40, Value: w} + i++ + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +// FromWire deserializes a ListArchivedWorkflowExecutionsRequest 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 ListArchivedWorkflowExecutionsRequest struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v ListArchivedWorkflowExecutionsRequest +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *ListArchivedWorkflowExecutionsRequest) FromWire(w wire.Value) error { + var err error + + for _, field := range w.GetStruct().Fields { + switch field.ID { + case 10: + if field.Value.Type() == wire.TBinary { + var x string + x, err = field.Value.GetString(), error(nil) + v.Domain = &x + if err != nil { + return err + } + + } + case 20: + if field.Value.Type() == wire.TI32 { + var x int32 + x, err = field.Value.GetI32(), error(nil) + v.PageSize = &x + if err != nil { + return err + } + + } + case 30: + if field.Value.Type() == wire.TBinary { + v.NextPageToken, err = field.Value.GetBinary(), error(nil) + if err != nil { + return err + } + + } + case 40: + if field.Value.Type() == wire.TBinary { + var x string + x, err = field.Value.GetString(), error(nil) + v.Query = &x + if err != nil { + return err + } + + } + } + } + + return nil +} + +// Encode serializes a ListArchivedWorkflowExecutionsRequest struct directly into bytes, without going +// through an intermediary type. +// +// An error is returned if a ListArchivedWorkflowExecutionsRequest struct could not be encoded. +func (v *ListArchivedWorkflowExecutionsRequest) Encode(sw stream.Writer) error { + if err := sw.WriteStructBegin(); err != nil { + return err + } + + if v.Domain != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil { + return err + } + if err := sw.WriteString(*(v.Domain)); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.PageSize != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TI32}); err != nil { + return err + } + if err := sw.WriteInt32(*(v.PageSize)); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.NextPageToken != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TBinary}); err != nil { + return err + } + if err := sw.WriteBinary(v.NextPageToken); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.Query != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 40, Type: wire.TBinary}); err != nil { + return err + } + if err := sw.WriteString(*(v.Query)); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + return sw.WriteStructEnd() +} + +// Decode deserializes a ListArchivedWorkflowExecutionsRequest struct directly from its Thrift-level +// representation, without going through an intemediary type. +// +// An error is returned if a ListArchivedWorkflowExecutionsRequest struct could not be generated from the wire +// representation. +func (v *ListArchivedWorkflowExecutionsRequest) Decode(sr stream.Reader) error { + + if err := sr.ReadStructBegin(); err != nil { + return err + } + + fh, ok, err := sr.ReadFieldBegin() + if err != nil { + return err + } + + for ok { + switch { + case fh.ID == 10 && fh.Type == wire.TBinary: + var x string + x, err = sr.ReadString() + v.Domain = &x + if err != nil { + return err + } + + case fh.ID == 20 && fh.Type == wire.TI32: + var x int32 + x, err = sr.ReadInt32() + v.PageSize = &x + if err != nil { + return err + } + + case fh.ID == 30 && fh.Type == wire.TBinary: + v.NextPageToken, err = sr.ReadBinary() + if err != nil { + return err + } + + case fh.ID == 40 && fh.Type == wire.TBinary: + var x string + x, err = sr.ReadString() + v.Query = &x + if err != nil { + return err + } + + default: + if err := sr.Skip(fh.Type); err != nil { + return err + } + } + + if err := sr.ReadFieldEnd(); err != nil { + return err + } + + if fh, ok, err = sr.ReadFieldBegin(); err != nil { + return err + } + } + + if err := sr.ReadStructEnd(); err != nil { + return err + } + + return nil +} + +// String returns a readable string representation of a ListArchivedWorkflowExecutionsRequest +// struct. +func (v *ListArchivedWorkflowExecutionsRequest) String() string { + if v == nil { + return "" + } + + var fields [4]string + i := 0 + if v.Domain != nil { + fields[i] = fmt.Sprintf("Domain: %v", *(v.Domain)) + i++ + } + if v.PageSize != nil { + fields[i] = fmt.Sprintf("PageSize: %v", *(v.PageSize)) + i++ + } + if v.NextPageToken != nil { + fields[i] = fmt.Sprintf("NextPageToken: %v", v.NextPageToken) + i++ + } + if v.Query != nil { + fields[i] = fmt.Sprintf("Query: %v", *(v.Query)) + i++ + } + + return fmt.Sprintf("ListArchivedWorkflowExecutionsRequest{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this ListArchivedWorkflowExecutionsRequest match the +// provided ListArchivedWorkflowExecutionsRequest. +// +// This function performs a deep comparison. +func (v *ListArchivedWorkflowExecutionsRequest) Equals(rhs *ListArchivedWorkflowExecutionsRequest) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !_String_EqualsPtr(v.Domain, rhs.Domain) { + return false + } + if !_I32_EqualsPtr(v.PageSize, rhs.PageSize) { + return false + } + if !((v.NextPageToken == nil && rhs.NextPageToken == nil) || (v.NextPageToken != nil && rhs.NextPageToken != nil && bytes.Equal(v.NextPageToken, rhs.NextPageToken))) { + return false + } + if !_String_EqualsPtr(v.Query, rhs.Query) { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of ListArchivedWorkflowExecutionsRequest. +func (v *ListArchivedWorkflowExecutionsRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + if v.Domain != nil { + enc.AddString("domain", *v.Domain) + } + if v.PageSize != nil { + enc.AddInt32("pageSize", *v.PageSize) + } + if v.NextPageToken != nil { + enc.AddString("nextPageToken", base64.StdEncoding.EncodeToString(v.NextPageToken)) + } + if v.Query != nil { + enc.AddString("query", *v.Query) + } + return err +} + +// GetDomain returns the value of Domain if it is set or its +// zero value if it is unset. +func (v *ListArchivedWorkflowExecutionsRequest) GetDomain() (o string) { + if v != nil && v.Domain != nil { + return *v.Domain + } + + return +} + +// IsSetDomain returns true if Domain is not nil. +func (v *ListArchivedWorkflowExecutionsRequest) IsSetDomain() bool { + return v != nil && v.Domain != nil +} + +// GetPageSize returns the value of PageSize if it is set or its +// zero value if it is unset. +func (v *ListArchivedWorkflowExecutionsRequest) GetPageSize() (o int32) { + if v != nil && v.PageSize != nil { + return *v.PageSize + } + + return +} + +// IsSetPageSize returns true if PageSize is not nil. +func (v *ListArchivedWorkflowExecutionsRequest) IsSetPageSize() bool { + return v != nil && v.PageSize != nil +} + +// GetNextPageToken returns the value of NextPageToken if it is set or its +// zero value if it is unset. +func (v *ListArchivedWorkflowExecutionsRequest) GetNextPageToken() (o []byte) { + if v != nil && v.NextPageToken != nil { + return v.NextPageToken + } + + return +} + +// IsSetNextPageToken returns true if NextPageToken is not nil. +func (v *ListArchivedWorkflowExecutionsRequest) IsSetNextPageToken() bool { + return v != nil && v.NextPageToken != nil +} + +// GetQuery returns the value of Query if it is set or its +// zero value if it is unset. +func (v *ListArchivedWorkflowExecutionsRequest) GetQuery() (o string) { + if v != nil && v.Query != nil { + return *v.Query + } + + return +} + +// IsSetQuery returns true if Query is not nil. +func (v *ListArchivedWorkflowExecutionsRequest) IsSetQuery() bool { + return v != nil && v.Query != nil +} + +type ListArchivedWorkflowExecutionsResponse struct { + Executions []*WorkflowExecutionInfo `json:"executions,omitempty"` + NextPageToken []byte `json:"nextPageToken,omitempty"` +} + +type _List_WorkflowExecutionInfo_ValueList []*WorkflowExecutionInfo + +func (v _List_WorkflowExecutionInfo_ValueList) ForEach(f func(wire.Value) error) error { + for i, x := range v { + if x == nil { + return fmt.Errorf("invalid list '[]*WorkflowExecutionInfo', index [%v]: value is nil", i) + } + w, err := x.ToWire() + if err != nil { + return err + } + err = f(w) + if err != nil { + return err + } + } + return nil +} + +func (v _List_WorkflowExecutionInfo_ValueList) Size() int { + return len(v) +} + +func (_List_WorkflowExecutionInfo_ValueList) ValueType() wire.Type { + return wire.TStruct +} + +func (_List_WorkflowExecutionInfo_ValueList) Close() {} + +// ToWire translates a ListArchivedWorkflowExecutionsResponse 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 *ListArchivedWorkflowExecutionsResponse) ToWire() (wire.Value, error) { + var ( + fields [2]wire.Field + i int = 0 + w wire.Value + err error + ) + + if v.Executions != nil { + w, err = wire.NewValueList(_List_WorkflowExecutionInfo_ValueList(v.Executions)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 10, Value: w} + i++ + } + if v.NextPageToken != nil { + w, err = wire.NewValueBinary(v.NextPageToken), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 20, Value: w} + i++ + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +func _List_WorkflowExecutionInfo_Read(l wire.ValueList) ([]*WorkflowExecutionInfo, error) { + if l.ValueType() != wire.TStruct { + return nil, nil + } + + o := make([]*WorkflowExecutionInfo, 0, l.Size()) + err := l.ForEach(func(x wire.Value) error { + i, err := _WorkflowExecutionInfo_Read(x) + if err != nil { + return err + } + o = append(o, i) + return nil + }) + l.Close() + return o, err +} + +// FromWire deserializes a ListArchivedWorkflowExecutionsResponse 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 ListArchivedWorkflowExecutionsResponse struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v ListArchivedWorkflowExecutionsResponse +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *ListArchivedWorkflowExecutionsResponse) FromWire(w wire.Value) error { + var err error + + for _, field := range w.GetStruct().Fields { + switch field.ID { + case 10: + if field.Value.Type() == wire.TList { + v.Executions, err = _List_WorkflowExecutionInfo_Read(field.Value.GetList()) + if err != nil { + return err + } + + } + case 20: + if field.Value.Type() == wire.TBinary { + v.NextPageToken, err = field.Value.GetBinary(), error(nil) + if err != nil { + return err + } + + } + } + } + + return nil +} + +func _List_WorkflowExecutionInfo_Encode(val []*WorkflowExecutionInfo, sw stream.Writer) error { + + lh := stream.ListHeader{ + Type: wire.TStruct, + Length: len(val), + } + if err := sw.WriteListBegin(lh); err != nil { + return err + } + + for i, v := range val { + if v == nil { + return fmt.Errorf("invalid list '[]*WorkflowExecutionInfo', index [%v]: value is nil", i) + } + if err := v.Encode(sw); err != nil { + return err + } + } + return sw.WriteListEnd() +} + +// Encode serializes a ListArchivedWorkflowExecutionsResponse struct directly into bytes, without going +// through an intermediary type. +// +// An error is returned if a ListArchivedWorkflowExecutionsResponse struct could not be encoded. +func (v *ListArchivedWorkflowExecutionsResponse) Encode(sw stream.Writer) error { + if err := sw.WriteStructBegin(); err != nil { + return err + } + + if v.Executions != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TList}); err != nil { + return err + } + if err := _List_WorkflowExecutionInfo_Encode(v.Executions, sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.NextPageToken != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TBinary}); err != nil { + return err + } + if err := sw.WriteBinary(v.NextPageToken); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + return sw.WriteStructEnd() +} + +func _List_WorkflowExecutionInfo_Decode(sr stream.Reader) ([]*WorkflowExecutionInfo, error) { + lh, err := sr.ReadListBegin() + if err != nil { + return nil, err + } + + if lh.Type != wire.TStruct { + for i := 0; i < lh.Length; i++ { + if err := sr.Skip(lh.Type); err != nil { + return nil, err + } + } + return nil, sr.ReadListEnd() + } + + o := make([]*WorkflowExecutionInfo, 0, lh.Length) + for i := 0; i < lh.Length; i++ { + v, err := _WorkflowExecutionInfo_Decode(sr) + if err != nil { + return nil, err + } + o = append(o, v) + } + + if err = sr.ReadListEnd(); err != nil { + return nil, err + } + return o, err +} + +// Decode deserializes a ListArchivedWorkflowExecutionsResponse struct directly from its Thrift-level +// representation, without going through an intemediary type. +// +// An error is returned if a ListArchivedWorkflowExecutionsResponse struct could not be generated from the wire +// representation. +func (v *ListArchivedWorkflowExecutionsResponse) Decode(sr stream.Reader) error { + + if err := sr.ReadStructBegin(); err != nil { + return err + } + + fh, ok, err := sr.ReadFieldBegin() + if err != nil { + return err + } + + for ok { + switch { + case fh.ID == 10 && fh.Type == wire.TList: + v.Executions, err = _List_WorkflowExecutionInfo_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 20 && fh.Type == wire.TBinary: + v.NextPageToken, err = sr.ReadBinary() + if err != nil { + return err + } + + default: + if err := sr.Skip(fh.Type); err != nil { + return err + } + } + + if err := sr.ReadFieldEnd(); err != nil { + return err + } + + if fh, ok, err = sr.ReadFieldBegin(); err != nil { + return err + } + } + + if err := sr.ReadStructEnd(); err != nil { + return err + } + + return nil +} + +// String returns a readable string representation of a ListArchivedWorkflowExecutionsResponse +// struct. +func (v *ListArchivedWorkflowExecutionsResponse) String() string { + if v == nil { + return "" + } + + var fields [2]string + i := 0 + if v.Executions != nil { + fields[i] = fmt.Sprintf("Executions: %v", v.Executions) + i++ + } + if v.NextPageToken != nil { + fields[i] = fmt.Sprintf("NextPageToken: %v", v.NextPageToken) + i++ + } + + return fmt.Sprintf("ListArchivedWorkflowExecutionsResponse{%v}", strings.Join(fields[:i], ", ")) +} + +func _List_WorkflowExecutionInfo_Equals(lhs, rhs []*WorkflowExecutionInfo) bool { + if len(lhs) != len(rhs) { + return false + } + + for i, lv := range lhs { + rv := rhs[i] + if !lv.Equals(rv) { + return false + } + } + + return true +} + +// Equals returns true if all the fields of this ListArchivedWorkflowExecutionsResponse match the +// provided ListArchivedWorkflowExecutionsResponse. +// +// This function performs a deep comparison. +func (v *ListArchivedWorkflowExecutionsResponse) Equals(rhs *ListArchivedWorkflowExecutionsResponse) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !((v.Executions == nil && rhs.Executions == nil) || (v.Executions != nil && rhs.Executions != nil && _List_WorkflowExecutionInfo_Equals(v.Executions, rhs.Executions))) { + return false + } + if !((v.NextPageToken == nil && rhs.NextPageToken == nil) || (v.NextPageToken != nil && rhs.NextPageToken != nil && bytes.Equal(v.NextPageToken, rhs.NextPageToken))) { + return false + } + + return true +} + +type _List_WorkflowExecutionInfo_Zapper []*WorkflowExecutionInfo + +// MarshalLogArray implements zapcore.ArrayMarshaler, enabling +// fast logging of _List_WorkflowExecutionInfo_Zapper. +func (l _List_WorkflowExecutionInfo_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) { + for _, v := range l { + err = multierr.Append(err, enc.AppendObject(v)) + } + return err +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of ListArchivedWorkflowExecutionsResponse. +func (v *ListArchivedWorkflowExecutionsResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + if v.Executions != nil { + err = multierr.Append(err, enc.AddArray("executions", (_List_WorkflowExecutionInfo_Zapper)(v.Executions))) + } + if v.NextPageToken != nil { + enc.AddString("nextPageToken", base64.StdEncoding.EncodeToString(v.NextPageToken)) + } + return err +} + +// GetExecutions returns the value of Executions if it is set or its +// zero value if it is unset. +func (v *ListArchivedWorkflowExecutionsResponse) GetExecutions() (o []*WorkflowExecutionInfo) { + if v != nil && v.Executions != nil { + return v.Executions + } + + return +} + +// IsSetExecutions returns true if Executions is not nil. +func (v *ListArchivedWorkflowExecutionsResponse) IsSetExecutions() bool { + return v != nil && v.Executions != nil +} + +// GetNextPageToken returns the value of NextPageToken if it is set or its +// zero value if it is unset. +func (v *ListArchivedWorkflowExecutionsResponse) GetNextPageToken() (o []byte) { + if v != nil && v.NextPageToken != nil { + return v.NextPageToken + } + + return +} + +// IsSetNextPageToken returns true if NextPageToken is not nil. +func (v *ListArchivedWorkflowExecutionsResponse) IsSetNextPageToken() bool { + return v != nil && v.NextPageToken != nil +} + +type ListClosedWorkflowExecutionsRequest struct { + Domain *string `json:"domain,omitempty"` + MaximumPageSize *int32 `json:"maximumPageSize,omitempty"` + NextPageToken []byte `json:"nextPageToken,omitempty"` + StartTimeFilter *StartTimeFilter `json:"StartTimeFilter,omitempty"` + ExecutionFilter *WorkflowExecutionFilter `json:"executionFilter,omitempty"` + TypeFilter *WorkflowTypeFilter `json:"typeFilter,omitempty"` + StatusFilter *WorkflowExecutionCloseStatus `json:"statusFilter,omitempty"` +} + +// ToWire translates a ListClosedWorkflowExecutionsRequest 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 *ListClosedWorkflowExecutionsRequest) ToWire() (wire.Value, error) { + var ( + fields [7]wire.Field + i int = 0 + w wire.Value + err error + ) + + if v.Domain != nil { + w, err = wire.NewValueString(*(v.Domain)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 10, Value: w} + i++ + } + if v.MaximumPageSize != nil { + w, err = wire.NewValueI32(*(v.MaximumPageSize)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 20, Value: w} + i++ + } + if v.NextPageToken != nil { + w, err = wire.NewValueBinary(v.NextPageToken), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 30, Value: w} + i++ + } + if v.StartTimeFilter != nil { + w, err = v.StartTimeFilter.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 40, Value: w} + i++ + } + if v.ExecutionFilter != nil { + w, err = v.ExecutionFilter.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 50, Value: w} + i++ + } + if v.TypeFilter != nil { + w, err = v.TypeFilter.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 60, Value: w} + i++ + } + if v.StatusFilter != nil { + w, err = v.StatusFilter.ToWire() + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 70, Value: w} + i++ + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +func _StartTimeFilter_Read(w wire.Value) (*StartTimeFilter, error) { + var v StartTimeFilter + err := v.FromWire(w) + return &v, err +} + +func _WorkflowExecutionFilter_Read(w wire.Value) (*WorkflowExecutionFilter, error) { + var v WorkflowExecutionFilter + err := v.FromWire(w) + return &v, err +} + +func _WorkflowTypeFilter_Read(w wire.Value) (*WorkflowTypeFilter, error) { + var v WorkflowTypeFilter + err := v.FromWire(w) + return &v, err +} + +func _WorkflowExecutionCloseStatus_Read(w wire.Value) (WorkflowExecutionCloseStatus, error) { + var v WorkflowExecutionCloseStatus + err := v.FromWire(w) + return v, err +} + +// FromWire deserializes a ListClosedWorkflowExecutionsRequest 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 ListClosedWorkflowExecutionsRequest struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v ListClosedWorkflowExecutionsRequest +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *ListClosedWorkflowExecutionsRequest) FromWire(w wire.Value) error { + var err error + + for _, field := range w.GetStruct().Fields { + switch field.ID { + case 10: + if field.Value.Type() == wire.TBinary { + var x string + x, err = field.Value.GetString(), error(nil) + v.Domain = &x + if err != nil { + return err + } + + } + case 20: + if field.Value.Type() == wire.TI32 { + var x int32 + x, err = field.Value.GetI32(), error(nil) + v.MaximumPageSize = &x + if err != nil { + return err + } + + } + case 30: + if field.Value.Type() == wire.TBinary { + v.NextPageToken, err = field.Value.GetBinary(), error(nil) + if err != nil { + return err + } + + } + case 40: + if field.Value.Type() == wire.TStruct { + v.StartTimeFilter, err = _StartTimeFilter_Read(field.Value) + if err != nil { + return err + } + + } + case 50: + if field.Value.Type() == wire.TStruct { + v.ExecutionFilter, err = _WorkflowExecutionFilter_Read(field.Value) + if err != nil { + return err + } + + } + case 60: + if field.Value.Type() == wire.TStruct { + v.TypeFilter, err = _WorkflowTypeFilter_Read(field.Value) + if err != nil { + return err + } + + } + case 70: + if field.Value.Type() == wire.TI32 { + var x WorkflowExecutionCloseStatus + x, err = _WorkflowExecutionCloseStatus_Read(field.Value) + v.StatusFilter = &x + if err != nil { + return err + } + + } + } + } + + return nil +} + +// Encode serializes a ListClosedWorkflowExecutionsRequest struct directly into bytes, without going +// through an intermediary type. +// +// An error is returned if a ListClosedWorkflowExecutionsRequest struct could not be encoded. +func (v *ListClosedWorkflowExecutionsRequest) Encode(sw stream.Writer) error { + if err := sw.WriteStructBegin(); err != nil { + return err + } + + if v.Domain != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil { + return err + } + if err := sw.WriteString(*(v.Domain)); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.MaximumPageSize != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TI32}); err != nil { + return err + } + if err := sw.WriteInt32(*(v.MaximumPageSize)); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.NextPageToken != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TBinary}); err != nil { + return err + } + if err := sw.WriteBinary(v.NextPageToken); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.StartTimeFilter != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 40, Type: wire.TStruct}); err != nil { + return err + } + if err := v.StartTimeFilter.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.ExecutionFilter != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 50, Type: wire.TStruct}); err != nil { + return err + } + if err := v.ExecutionFilter.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.TypeFilter != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 60, Type: wire.TStruct}); err != nil { + return err + } + if err := v.TypeFilter.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.StatusFilter != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 70, Type: wire.TI32}); err != nil { + return err + } + if err := v.StatusFilter.Encode(sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + return sw.WriteStructEnd() +} + +func _StartTimeFilter_Decode(sr stream.Reader) (*StartTimeFilter, error) { + var v StartTimeFilter + err := v.Decode(sr) + return &v, err +} + +func _WorkflowExecutionFilter_Decode(sr stream.Reader) (*WorkflowExecutionFilter, error) { + var v WorkflowExecutionFilter + err := v.Decode(sr) + return &v, err +} + +func _WorkflowTypeFilter_Decode(sr stream.Reader) (*WorkflowTypeFilter, error) { + var v WorkflowTypeFilter + err := v.Decode(sr) + return &v, err +} + +func _WorkflowExecutionCloseStatus_Decode(sr stream.Reader) (WorkflowExecutionCloseStatus, error) { + var v WorkflowExecutionCloseStatus + err := v.Decode(sr) + return v, err +} + +// Decode deserializes a ListClosedWorkflowExecutionsRequest struct directly from its Thrift-level +// representation, without going through an intemediary type. +// +// An error is returned if a ListClosedWorkflowExecutionsRequest struct could not be generated from the wire +// representation. +func (v *ListClosedWorkflowExecutionsRequest) Decode(sr stream.Reader) error { + + if err := sr.ReadStructBegin(); err != nil { + return err + } + + fh, ok, err := sr.ReadFieldBegin() + if err != nil { + return err + } + + for ok { + switch { + case fh.ID == 10 && fh.Type == wire.TBinary: + var x string + x, err = sr.ReadString() + v.Domain = &x + if err != nil { + return err + } + + case fh.ID == 20 && fh.Type == wire.TI32: + var x int32 + x, err = sr.ReadInt32() + v.MaximumPageSize = &x + if err != nil { + return err + } + + case fh.ID == 30 && fh.Type == wire.TBinary: + v.NextPageToken, err = sr.ReadBinary() + if err != nil { + return err + } + + case fh.ID == 40 && fh.Type == wire.TStruct: + v.StartTimeFilter, err = _StartTimeFilter_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 50 && fh.Type == wire.TStruct: + v.ExecutionFilter, err = _WorkflowExecutionFilter_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 60 && fh.Type == wire.TStruct: + v.TypeFilter, err = _WorkflowTypeFilter_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 70 && fh.Type == wire.TI32: + var x WorkflowExecutionCloseStatus + x, err = _WorkflowExecutionCloseStatus_Decode(sr) + v.StatusFilter = &x + if err != nil { + return err + } + + default: + if err := sr.Skip(fh.Type); err != nil { + return err + } + } + + if err := sr.ReadFieldEnd(); err != nil { + return err + } + + if fh, ok, err = sr.ReadFieldBegin(); err != nil { + return err + } + } + + if err := sr.ReadStructEnd(); err != nil { + return err + } + + return nil +} + +// String returns a readable string representation of a ListClosedWorkflowExecutionsRequest +// struct. +func (v *ListClosedWorkflowExecutionsRequest) String() string { + if v == nil { + return "" + } + + var fields [7]string + i := 0 + if v.Domain != nil { + fields[i] = fmt.Sprintf("Domain: %v", *(v.Domain)) + i++ + } + if v.MaximumPageSize != nil { + fields[i] = fmt.Sprintf("MaximumPageSize: %v", *(v.MaximumPageSize)) + i++ + } + if v.NextPageToken != nil { + fields[i] = fmt.Sprintf("NextPageToken: %v", v.NextPageToken) + i++ + } + if v.StartTimeFilter != nil { + fields[i] = fmt.Sprintf("StartTimeFilter: %v", v.StartTimeFilter) + i++ + } + if v.ExecutionFilter != nil { + fields[i] = fmt.Sprintf("ExecutionFilter: %v", v.ExecutionFilter) + i++ + } + if v.TypeFilter != nil { + fields[i] = fmt.Sprintf("TypeFilter: %v", v.TypeFilter) + i++ + } + if v.StatusFilter != nil { + fields[i] = fmt.Sprintf("StatusFilter: %v", *(v.StatusFilter)) + i++ + } + + return fmt.Sprintf("ListClosedWorkflowExecutionsRequest{%v}", strings.Join(fields[:i], ", ")) +} + +func _WorkflowExecutionCloseStatus_EqualsPtr(lhs, rhs *WorkflowExecutionCloseStatus) bool { + if lhs != nil && rhs != nil { + + x := *lhs + y := *rhs + return x.Equals(y) + } + return lhs == nil && rhs == nil +} + +// Equals returns true if all the fields of this ListClosedWorkflowExecutionsRequest match the +// provided ListClosedWorkflowExecutionsRequest. +// +// This function performs a deep comparison. +func (v *ListClosedWorkflowExecutionsRequest) Equals(rhs *ListClosedWorkflowExecutionsRequest) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !_String_EqualsPtr(v.Domain, rhs.Domain) { + return false + } + if !_I32_EqualsPtr(v.MaximumPageSize, rhs.MaximumPageSize) { + return false + } + if !((v.NextPageToken == nil && rhs.NextPageToken == nil) || (v.NextPageToken != nil && rhs.NextPageToken != nil && bytes.Equal(v.NextPageToken, rhs.NextPageToken))) { + return false + } + if !((v.StartTimeFilter == nil && rhs.StartTimeFilter == nil) || (v.StartTimeFilter != nil && rhs.StartTimeFilter != nil && v.StartTimeFilter.Equals(rhs.StartTimeFilter))) { + return false + } + if !((v.ExecutionFilter == nil && rhs.ExecutionFilter == nil) || (v.ExecutionFilter != nil && rhs.ExecutionFilter != nil && v.ExecutionFilter.Equals(rhs.ExecutionFilter))) { + return false + } + if !((v.TypeFilter == nil && rhs.TypeFilter == nil) || (v.TypeFilter != nil && rhs.TypeFilter != nil && v.TypeFilter.Equals(rhs.TypeFilter))) { + return false + } + if !_WorkflowExecutionCloseStatus_EqualsPtr(v.StatusFilter, rhs.StatusFilter) { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of ListClosedWorkflowExecutionsRequest. +func (v *ListClosedWorkflowExecutionsRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + if v.Domain != nil { + enc.AddString("domain", *v.Domain) + } + if v.MaximumPageSize != nil { + enc.AddInt32("maximumPageSize", *v.MaximumPageSize) + } + if v.NextPageToken != nil { + enc.AddString("nextPageToken", base64.StdEncoding.EncodeToString(v.NextPageToken)) + } + if v.StartTimeFilter != nil { + err = multierr.Append(err, enc.AddObject("StartTimeFilter", v.StartTimeFilter)) + } + if v.ExecutionFilter != nil { + err = multierr.Append(err, enc.AddObject("executionFilter", v.ExecutionFilter)) + } + if v.TypeFilter != nil { + err = multierr.Append(err, enc.AddObject("typeFilter", v.TypeFilter)) + } + if v.StatusFilter != nil { + err = multierr.Append(err, enc.AddObject("statusFilter", *v.StatusFilter)) + } + return err +} + +// GetDomain returns the value of Domain if it is set or its +// zero value if it is unset. +func (v *ListClosedWorkflowExecutionsRequest) GetDomain() (o string) { + if v != nil && v.Domain != nil { + return *v.Domain + } + + return +} + +// IsSetDomain returns true if Domain is not nil. +func (v *ListClosedWorkflowExecutionsRequest) IsSetDomain() bool { + return v != nil && v.Domain != nil +} + +// GetMaximumPageSize returns the value of MaximumPageSize if it is set or its +// zero value if it is unset. +func (v *ListClosedWorkflowExecutionsRequest) GetMaximumPageSize() (o int32) { + if v != nil && v.MaximumPageSize != nil { + return *v.MaximumPageSize } - for ok { - switch { - case fh.ID == 1 && fh.Type == wire.TBinary: - v.Message, err = sr.ReadString() - if err != nil { - return err - } - messageIsSet = true - default: - if err := sr.Skip(fh.Type); err != nil { - return err - } - } + return +} - if err := sr.ReadFieldEnd(); err != nil { - return err - } +// IsSetMaximumPageSize returns true if MaximumPageSize is not nil. +func (v *ListClosedWorkflowExecutionsRequest) IsSetMaximumPageSize() bool { + return v != nil && v.MaximumPageSize != nil +} - if fh, ok, err = sr.ReadFieldBegin(); err != nil { - return err - } +// GetNextPageToken returns the value of NextPageToken if it is set or its +// zero value if it is unset. +func (v *ListClosedWorkflowExecutionsRequest) GetNextPageToken() (o []byte) { + if v != nil && v.NextPageToken != nil { + return v.NextPageToken } - if err := sr.ReadStructEnd(); err != nil { - return err - } + return +} - if !messageIsSet { - return errors.New("field Message of LimitExceededError is required") +// IsSetNextPageToken returns true if NextPageToken is not nil. +func (v *ListClosedWorkflowExecutionsRequest) IsSetNextPageToken() bool { + return v != nil && v.NextPageToken != nil +} + +// GetStartTimeFilter returns the value of StartTimeFilter if it is set or its +// zero value if it is unset. +func (v *ListClosedWorkflowExecutionsRequest) GetStartTimeFilter() (o *StartTimeFilter) { + if v != nil && v.StartTimeFilter != nil { + return v.StartTimeFilter } - return nil + return } -// String returns a readable string representation of a LimitExceededError -// struct. -func (v *LimitExceededError) String() string { - if v == nil { - return "" - } +// IsSetStartTimeFilter returns true if StartTimeFilter is not nil. +func (v *ListClosedWorkflowExecutionsRequest) IsSetStartTimeFilter() bool { + return v != nil && v.StartTimeFilter != nil +} - var fields [1]string - i := 0 - fields[i] = fmt.Sprintf("Message: %v", v.Message) - i++ +// GetExecutionFilter returns the value of ExecutionFilter if it is set or its +// zero value if it is unset. +func (v *ListClosedWorkflowExecutionsRequest) GetExecutionFilter() (o *WorkflowExecutionFilter) { + if v != nil && v.ExecutionFilter != nil { + return v.ExecutionFilter + } - return fmt.Sprintf("LimitExceededError{%v}", strings.Join(fields[:i], ", ")) + return } -// ErrorName is the name of this type as defined in the Thrift -// file. -func (*LimitExceededError) ErrorName() string { - return "LimitExceededError" +// IsSetExecutionFilter returns true if ExecutionFilter is not nil. +func (v *ListClosedWorkflowExecutionsRequest) IsSetExecutionFilter() bool { + return v != nil && v.ExecutionFilter != nil } -// Equals returns true if all the fields of this LimitExceededError match the -// provided LimitExceededError. -// -// This function performs a deep comparison. -func (v *LimitExceededError) Equals(rhs *LimitExceededError) bool { - if v == nil { - return rhs == nil - } else if rhs == nil { - return false - } - if !(v.Message == rhs.Message) { - return false +// GetTypeFilter returns the value of TypeFilter if it is set or its +// zero value if it is unset. +func (v *ListClosedWorkflowExecutionsRequest) GetTypeFilter() (o *WorkflowTypeFilter) { + if v != nil && v.TypeFilter != nil { + return v.TypeFilter } - return true + return } -// MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of LimitExceededError. -func (v *LimitExceededError) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { - if v == nil { - return nil - } - enc.AddString("message", v.Message) - return err +// IsSetTypeFilter returns true if TypeFilter is not nil. +func (v *ListClosedWorkflowExecutionsRequest) IsSetTypeFilter() bool { + return v != nil && v.TypeFilter != nil } -// GetMessage returns the value of Message if it is set or its +// GetStatusFilter returns the value of StatusFilter if it is set or its // zero value if it is unset. -func (v *LimitExceededError) GetMessage() (o string) { - if v != nil { - o = v.Message +func (v *ListClosedWorkflowExecutionsRequest) GetStatusFilter() (o WorkflowExecutionCloseStatus) { + if v != nil && v.StatusFilter != nil { + return *v.StatusFilter } + return } -func (v *LimitExceededError) Error() string { - return v.String() +// IsSetStatusFilter returns true if StatusFilter is not nil. +func (v *ListClosedWorkflowExecutionsRequest) IsSetStatusFilter() bool { + return v != nil && v.StatusFilter != nil } -type ListArchivedWorkflowExecutionsRequest struct { - Domain *string `json:"domain,omitempty"` - PageSize *int32 `json:"pageSize,omitempty"` - NextPageToken []byte `json:"nextPageToken,omitempty"` - Query *string `json:"query,omitempty"` +type ListClosedWorkflowExecutionsResponse struct { + Executions []*WorkflowExecutionInfo `json:"executions,omitempty"` + NextPageToken []byte `json:"nextPageToken,omitempty"` } -// ToWire translates a ListArchivedWorkflowExecutionsRequest struct into a Thrift-level intermediate +// ToWire translates a ListClosedWorkflowExecutionsResponse struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -53924,55 +56988,39 @@ type ListArchivedWorkflowExecutionsRequest struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *ListArchivedWorkflowExecutionsRequest) ToWire() (wire.Value, error) { +func (v *ListClosedWorkflowExecutionsResponse) ToWire() (wire.Value, error) { var ( - fields [4]wire.Field + fields [2]wire.Field i int = 0 w wire.Value err error ) - if v.Domain != nil { - w, err = wire.NewValueString(*(v.Domain)), error(nil) + if v.Executions != nil { + w, err = wire.NewValueList(_List_WorkflowExecutionInfo_ValueList(v.Executions)), error(nil) if err != nil { return w, err } fields[i] = wire.Field{ID: 10, Value: w} i++ } - if v.PageSize != nil { - w, err = wire.NewValueI32(*(v.PageSize)), error(nil) - if err != nil { - return w, err - } - fields[i] = wire.Field{ID: 20, Value: w} - i++ - } if v.NextPageToken != nil { w, err = wire.NewValueBinary(v.NextPageToken), error(nil) if err != nil { return w, err } - fields[i] = wire.Field{ID: 30, Value: w} - i++ - } - if v.Query != nil { - w, err = wire.NewValueString(*(v.Query)), error(nil) - if err != nil { - return w, err - } - fields[i] = wire.Field{ID: 40, Value: w} + fields[i] = wire.Field{ID: 20, Value: w} i++ } return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -// FromWire deserializes a ListArchivedWorkflowExecutionsRequest struct from its Thrift-level +// FromWire deserializes a ListClosedWorkflowExecutionsResponse 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 ListArchivedWorkflowExecutionsRequest struct +// An error is returned if we were unable to build a ListClosedWorkflowExecutionsResponse struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -53980,53 +57028,31 @@ func (v *ListArchivedWorkflowExecutionsRequest) ToWire() (wire.Value, error) { // return nil, err // } // -// var v ListArchivedWorkflowExecutionsRequest +// var v ListClosedWorkflowExecutionsResponse // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *ListArchivedWorkflowExecutionsRequest) FromWire(w wire.Value) error { +func (v *ListClosedWorkflowExecutionsResponse) FromWire(w wire.Value) error { var err error for _, field := range w.GetStruct().Fields { switch field.ID { case 10: - if field.Value.Type() == wire.TBinary { - var x string - x, err = field.Value.GetString(), error(nil) - v.Domain = &x + if field.Value.Type() == wire.TList { + v.Executions, err = _List_WorkflowExecutionInfo_Read(field.Value.GetList()) if err != nil { return err } } case 20: - if field.Value.Type() == wire.TI32 { - var x int32 - x, err = field.Value.GetI32(), error(nil) - v.PageSize = &x - if err != nil { - return err - } - - } - case 30: if field.Value.Type() == wire.TBinary { v.NextPageToken, err = field.Value.GetBinary(), error(nil) if err != nil { return err } - } - case 40: - if field.Value.Type() == wire.TBinary { - var x string - x, err = field.Value.GetString(), error(nil) - v.Query = &x - if err != nil { - return err - } - } } } @@ -54034,32 +57060,20 @@ func (v *ListArchivedWorkflowExecutionsRequest) FromWire(w wire.Value) error { return nil } -// Encode serializes a ListArchivedWorkflowExecutionsRequest struct directly into bytes, without going +// Encode serializes a ListClosedWorkflowExecutionsResponse struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a ListArchivedWorkflowExecutionsRequest struct could not be encoded. -func (v *ListArchivedWorkflowExecutionsRequest) Encode(sw stream.Writer) error { +// An error is returned if a ListClosedWorkflowExecutionsResponse struct could not be encoded. +func (v *ListClosedWorkflowExecutionsResponse) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } - if v.Domain != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil { - return err - } - if err := sw.WriteString(*(v.Domain)); err != nil { - return err - } - if err := sw.WriteFieldEnd(); err != nil { - return err - } - } - - if v.PageSize != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TI32}); err != nil { + if v.Executions != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TList}); err != nil { return err } - if err := sw.WriteInt32(*(v.PageSize)); err != nil { + if err := _List_WorkflowExecutionInfo_Encode(v.Executions, sw); err != nil { return err } if err := sw.WriteFieldEnd(); err != nil { @@ -54068,7 +57082,7 @@ func (v *ListArchivedWorkflowExecutionsRequest) Encode(sw stream.Writer) error { } if v.NextPageToken != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TBinary}); err != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TBinary}); err != nil { return err } if err := sw.WriteBinary(v.NextPageToken); err != nil { @@ -54079,27 +57093,15 @@ func (v *ListArchivedWorkflowExecutionsRequest) Encode(sw stream.Writer) error { } } - if v.Query != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 40, Type: wire.TBinary}); err != nil { - return err - } - if err := sw.WriteString(*(v.Query)); err != nil { - return err - } - if err := sw.WriteFieldEnd(); err != nil { - return err - } - } - return sw.WriteStructEnd() } -// Decode deserializes a ListArchivedWorkflowExecutionsRequest struct directly from its Thrift-level +// Decode deserializes a ListClosedWorkflowExecutionsResponse struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a ListArchivedWorkflowExecutionsRequest struct could not be generated from the wire +// An error is returned if a ListClosedWorkflowExecutionsResponse struct could not be generated from the wire // representation. -func (v *ListArchivedWorkflowExecutionsRequest) Decode(sr stream.Reader) error { +func (v *ListClosedWorkflowExecutionsResponse) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -54112,36 +57114,18 @@ func (v *ListArchivedWorkflowExecutionsRequest) Decode(sr stream.Reader) error { for ok { switch { - case fh.ID == 10 && fh.Type == wire.TBinary: - var x string - x, err = sr.ReadString() - v.Domain = &x - if err != nil { - return err - } - - case fh.ID == 20 && fh.Type == wire.TI32: - var x int32 - x, err = sr.ReadInt32() - v.PageSize = &x + case fh.ID == 10 && fh.Type == wire.TList: + v.Executions, err = _List_WorkflowExecutionInfo_Decode(sr) if err != nil { return err } - case fh.ID == 30 && fh.Type == wire.TBinary: + case fh.ID == 20 && fh.Type == wire.TBinary: v.NextPageToken, err = sr.ReadBinary() if err != nil { return err } - case fh.ID == 40 && fh.Type == wire.TBinary: - var x string - x, err = sr.ReadString() - v.Query = &x - if err != nil { - return err - } - default: if err := sr.Skip(fh.Type); err != nil { return err @@ -54164,115 +57148,80 @@ func (v *ListArchivedWorkflowExecutionsRequest) Decode(sr stream.Reader) error { return nil } -// String returns a readable string representation of a ListArchivedWorkflowExecutionsRequest +// String returns a readable string representation of a ListClosedWorkflowExecutionsResponse // struct. -func (v *ListArchivedWorkflowExecutionsRequest) String() string { +func (v *ListClosedWorkflowExecutionsResponse) String() string { if v == nil { return "" } - var fields [4]string + var fields [2]string i := 0 - if v.Domain != nil { - fields[i] = fmt.Sprintf("Domain: %v", *(v.Domain)) - i++ - } - if v.PageSize != nil { - fields[i] = fmt.Sprintf("PageSize: %v", *(v.PageSize)) + if v.Executions != nil { + fields[i] = fmt.Sprintf("Executions: %v", v.Executions) i++ } if v.NextPageToken != nil { fields[i] = fmt.Sprintf("NextPageToken: %v", v.NextPageToken) i++ } - if v.Query != nil { - fields[i] = fmt.Sprintf("Query: %v", *(v.Query)) - i++ - } - return fmt.Sprintf("ListArchivedWorkflowExecutionsRequest{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("ListClosedWorkflowExecutionsResponse{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this ListArchivedWorkflowExecutionsRequest match the -// provided ListArchivedWorkflowExecutionsRequest. +// Equals returns true if all the fields of this ListClosedWorkflowExecutionsResponse match the +// provided ListClosedWorkflowExecutionsResponse. // // This function performs a deep comparison. -func (v *ListArchivedWorkflowExecutionsRequest) Equals(rhs *ListArchivedWorkflowExecutionsRequest) bool { +func (v *ListClosedWorkflowExecutionsResponse) Equals(rhs *ListClosedWorkflowExecutionsResponse) bool { if v == nil { return rhs == nil } else if rhs == nil { return false } - if !_String_EqualsPtr(v.Domain, rhs.Domain) { - return false - } - if !_I32_EqualsPtr(v.PageSize, rhs.PageSize) { + if !((v.Executions == nil && rhs.Executions == nil) || (v.Executions != nil && rhs.Executions != nil && _List_WorkflowExecutionInfo_Equals(v.Executions, rhs.Executions))) { return false } if !((v.NextPageToken == nil && rhs.NextPageToken == nil) || (v.NextPageToken != nil && rhs.NextPageToken != nil && bytes.Equal(v.NextPageToken, rhs.NextPageToken))) { return false } - if !_String_EqualsPtr(v.Query, rhs.Query) { - return false - } return true } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of ListArchivedWorkflowExecutionsRequest. -func (v *ListArchivedWorkflowExecutionsRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of ListClosedWorkflowExecutionsResponse. +func (v *ListClosedWorkflowExecutionsResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } - if v.Domain != nil { - enc.AddString("domain", *v.Domain) - } - if v.PageSize != nil { - enc.AddInt32("pageSize", *v.PageSize) + if v.Executions != nil { + err = multierr.Append(err, enc.AddArray("executions", (_List_WorkflowExecutionInfo_Zapper)(v.Executions))) } if v.NextPageToken != nil { enc.AddString("nextPageToken", base64.StdEncoding.EncodeToString(v.NextPageToken)) } - if v.Query != nil { - enc.AddString("query", *v.Query) - } return err } -// GetDomain returns the value of Domain if it is set or its -// zero value if it is unset. -func (v *ListArchivedWorkflowExecutionsRequest) GetDomain() (o string) { - if v != nil && v.Domain != nil { - return *v.Domain - } - - return -} - -// IsSetDomain returns true if Domain is not nil. -func (v *ListArchivedWorkflowExecutionsRequest) IsSetDomain() bool { - return v != nil && v.Domain != nil -} - -// GetPageSize returns the value of PageSize if it is set or its +// GetExecutions returns the value of Executions if it is set or its // zero value if it is unset. -func (v *ListArchivedWorkflowExecutionsRequest) GetPageSize() (o int32) { - if v != nil && v.PageSize != nil { - return *v.PageSize +func (v *ListClosedWorkflowExecutionsResponse) GetExecutions() (o []*WorkflowExecutionInfo) { + if v != nil && v.Executions != nil { + return v.Executions } return } -// IsSetPageSize returns true if PageSize is not nil. -func (v *ListArchivedWorkflowExecutionsRequest) IsSetPageSize() bool { - return v != nil && v.PageSize != nil +// IsSetExecutions returns true if Executions is not nil. +func (v *ListClosedWorkflowExecutionsResponse) IsSetExecutions() bool { + return v != nil && v.Executions != nil } // GetNextPageToken returns the value of NextPageToken if it is set or its // zero value if it is unset. -func (v *ListArchivedWorkflowExecutionsRequest) GetNextPageToken() (o []byte) { +func (v *ListClosedWorkflowExecutionsResponse) GetNextPageToken() (o []byte) { if v != nil && v.NextPageToken != nil { return v.NextPageToken } @@ -54281,60 +57230,16 @@ func (v *ListArchivedWorkflowExecutionsRequest) GetNextPageToken() (o []byte) { } // IsSetNextPageToken returns true if NextPageToken is not nil. -func (v *ListArchivedWorkflowExecutionsRequest) IsSetNextPageToken() bool { +func (v *ListClosedWorkflowExecutionsResponse) IsSetNextPageToken() bool { return v != nil && v.NextPageToken != nil } -// GetQuery returns the value of Query if it is set or its -// zero value if it is unset. -func (v *ListArchivedWorkflowExecutionsRequest) GetQuery() (o string) { - if v != nil && v.Query != nil { - return *v.Query - } - - return -} - -// IsSetQuery returns true if Query is not nil. -func (v *ListArchivedWorkflowExecutionsRequest) IsSetQuery() bool { - return v != nil && v.Query != nil -} - -type ListArchivedWorkflowExecutionsResponse struct { - Executions []*WorkflowExecutionInfo `json:"executions,omitempty"` - NextPageToken []byte `json:"nextPageToken,omitempty"` -} - -type _List_WorkflowExecutionInfo_ValueList []*WorkflowExecutionInfo - -func (v _List_WorkflowExecutionInfo_ValueList) ForEach(f func(wire.Value) error) error { - for i, x := range v { - if x == nil { - return fmt.Errorf("invalid list '[]*WorkflowExecutionInfo', index [%v]: value is nil", i) - } - w, err := x.ToWire() - if err != nil { - return err - } - err = f(w) - if err != nil { - return err - } - } - return nil -} - -func (v _List_WorkflowExecutionInfo_ValueList) Size() int { - return len(v) -} - -func (_List_WorkflowExecutionInfo_ValueList) ValueType() wire.Type { - return wire.TStruct +type ListDomainsRequest struct { + PageSize *int32 `json:"pageSize,omitempty"` + NextPageToken []byte `json:"nextPageToken,omitempty"` } -func (_List_WorkflowExecutionInfo_ValueList) Close() {} - -// ToWire translates a ListArchivedWorkflowExecutionsResponse struct into a Thrift-level intermediate +// ToWire translates a ListDomainsRequest struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -54349,7 +57254,7 @@ func (_List_WorkflowExecutionInfo_ValueList) Close() {} // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *ListArchivedWorkflowExecutionsResponse) ToWire() (wire.Value, error) { +func (v *ListDomainsRequest) ToWire() (wire.Value, error) { var ( fields [2]wire.Field i int = 0 @@ -54357,8 +57262,8 @@ func (v *ListArchivedWorkflowExecutionsResponse) ToWire() (wire.Value, error) { err error ) - if v.Executions != nil { - w, err = wire.NewValueList(_List_WorkflowExecutionInfo_ValueList(v.Executions)), error(nil) + if v.PageSize != nil { + w, err = wire.NewValueI32(*(v.PageSize)), error(nil) if err != nil { return w, err } @@ -54377,29 +57282,11 @@ func (v *ListArchivedWorkflowExecutionsResponse) ToWire() (wire.Value, error) { return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _List_WorkflowExecutionInfo_Read(l wire.ValueList) ([]*WorkflowExecutionInfo, error) { - if l.ValueType() != wire.TStruct { - return nil, nil - } - - o := make([]*WorkflowExecutionInfo, 0, l.Size()) - err := l.ForEach(func(x wire.Value) error { - i, err := _WorkflowExecutionInfo_Read(x) - if err != nil { - return err - } - o = append(o, i) - return nil - }) - l.Close() - return o, err -} - -// FromWire deserializes a ListArchivedWorkflowExecutionsResponse struct from its Thrift-level +// FromWire deserializes a ListDomainsRequest 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 ListArchivedWorkflowExecutionsResponse struct +// An error is returned if we were unable to build a ListDomainsRequest struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -54407,19 +57294,21 @@ func _List_WorkflowExecutionInfo_Read(l wire.ValueList) ([]*WorkflowExecutionInf // return nil, err // } // -// var v ListArchivedWorkflowExecutionsResponse +// var v ListDomainsRequest // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *ListArchivedWorkflowExecutionsResponse) FromWire(w wire.Value) error { +func (v *ListDomainsRequest) FromWire(w wire.Value) error { var err error for _, field := range w.GetStruct().Fields { switch field.ID { case 10: - if field.Value.Type() == wire.TList { - v.Executions, err = _List_WorkflowExecutionInfo_Read(field.Value.GetList()) + if field.Value.Type() == wire.TI32 { + var x int32 + x, err = field.Value.GetI32(), error(nil) + v.PageSize = &x if err != nil { return err } @@ -54439,41 +57328,20 @@ func (v *ListArchivedWorkflowExecutionsResponse) FromWire(w wire.Value) error { return nil } -func _List_WorkflowExecutionInfo_Encode(val []*WorkflowExecutionInfo, sw stream.Writer) error { - - lh := stream.ListHeader{ - Type: wire.TStruct, - Length: len(val), - } - if err := sw.WriteListBegin(lh); err != nil { - return err - } - - for i, v := range val { - if v == nil { - return fmt.Errorf("invalid list '[]*WorkflowExecutionInfo', index [%v]: value is nil", i) - } - if err := v.Encode(sw); err != nil { - return err - } - } - return sw.WriteListEnd() -} - -// Encode serializes a ListArchivedWorkflowExecutionsResponse struct directly into bytes, without going +// Encode serializes a ListDomainsRequest struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a ListArchivedWorkflowExecutionsResponse struct could not be encoded. -func (v *ListArchivedWorkflowExecutionsResponse) Encode(sw stream.Writer) error { +// An error is returned if a ListDomainsRequest struct could not be encoded. +func (v *ListDomainsRequest) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } - if v.Executions != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TList}); err != nil { + if v.PageSize != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TI32}); err != nil { return err } - if err := _List_WorkflowExecutionInfo_Encode(v.Executions, sw); err != nil { + if err := sw.WriteInt32(*(v.PageSize)); err != nil { return err } if err := sw.WriteFieldEnd(); err != nil { @@ -54496,42 +57364,12 @@ func (v *ListArchivedWorkflowExecutionsResponse) Encode(sw stream.Writer) error return sw.WriteStructEnd() } -func _List_WorkflowExecutionInfo_Decode(sr stream.Reader) ([]*WorkflowExecutionInfo, error) { - lh, err := sr.ReadListBegin() - if err != nil { - return nil, err - } - - if lh.Type != wire.TStruct { - for i := 0; i < lh.Length; i++ { - if err := sr.Skip(lh.Type); err != nil { - return nil, err - } - } - return nil, sr.ReadListEnd() - } - - o := make([]*WorkflowExecutionInfo, 0, lh.Length) - for i := 0; i < lh.Length; i++ { - v, err := _WorkflowExecutionInfo_Decode(sr) - if err != nil { - return nil, err - } - o = append(o, v) - } - - if err = sr.ReadListEnd(); err != nil { - return nil, err - } - return o, err -} - -// Decode deserializes a ListArchivedWorkflowExecutionsResponse struct directly from its Thrift-level +// Decode deserializes a ListDomainsRequest struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a ListArchivedWorkflowExecutionsResponse struct could not be generated from the wire +// An error is returned if a ListDomainsRequest struct could not be generated from the wire // representation. -func (v *ListArchivedWorkflowExecutionsResponse) Decode(sr stream.Reader) error { +func (v *ListDomainsRequest) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -54544,8 +57382,10 @@ func (v *ListArchivedWorkflowExecutionsResponse) Decode(sr stream.Reader) error for ok { switch { - case fh.ID == 10 && fh.Type == wire.TList: - v.Executions, err = _List_WorkflowExecutionInfo_Decode(sr) + case fh.ID == 10 && fh.Type == wire.TI32: + var x int32 + x, err = sr.ReadInt32() + v.PageSize = &x if err != nil { return err } @@ -54578,17 +57418,17 @@ func (v *ListArchivedWorkflowExecutionsResponse) Decode(sr stream.Reader) error return nil } -// String returns a readable string representation of a ListArchivedWorkflowExecutionsResponse +// String returns a readable string representation of a ListDomainsRequest // struct. -func (v *ListArchivedWorkflowExecutionsResponse) String() string { +func (v *ListDomainsRequest) String() string { if v == nil { return "" } var fields [2]string i := 0 - if v.Executions != nil { - fields[i] = fmt.Sprintf("Executions: %v", v.Executions) + if v.PageSize != nil { + fields[i] = fmt.Sprintf("PageSize: %v", *(v.PageSize)) i++ } if v.NextPageToken != nil { @@ -54596,35 +57436,20 @@ func (v *ListArchivedWorkflowExecutionsResponse) String() string { i++ } - return fmt.Sprintf("ListArchivedWorkflowExecutionsResponse{%v}", strings.Join(fields[:i], ", ")) -} - -func _List_WorkflowExecutionInfo_Equals(lhs, rhs []*WorkflowExecutionInfo) bool { - if len(lhs) != len(rhs) { - return false - } - - for i, lv := range lhs { - rv := rhs[i] - if !lv.Equals(rv) { - return false - } - } - - return true + return fmt.Sprintf("ListDomainsRequest{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this ListArchivedWorkflowExecutionsResponse match the -// provided ListArchivedWorkflowExecutionsResponse. +// Equals returns true if all the fields of this ListDomainsRequest match the +// provided ListDomainsRequest. // // This function performs a deep comparison. -func (v *ListArchivedWorkflowExecutionsResponse) Equals(rhs *ListArchivedWorkflowExecutionsResponse) bool { +func (v *ListDomainsRequest) Equals(rhs *ListDomainsRequest) bool { if v == nil { return rhs == nil } else if rhs == nil { return false } - if !((v.Executions == nil && rhs.Executions == nil) || (v.Executions != nil && rhs.Executions != nil && _List_WorkflowExecutionInfo_Equals(v.Executions, rhs.Executions))) { + if !_I32_EqualsPtr(v.PageSize, rhs.PageSize) { return false } if !((v.NextPageToken == nil && rhs.NextPageToken == nil) || (v.NextPageToken != nil && rhs.NextPageToken != nil && bytes.Equal(v.NextPageToken, rhs.NextPageToken))) { @@ -54634,25 +57459,14 @@ func (v *ListArchivedWorkflowExecutionsResponse) Equals(rhs *ListArchivedWorkflo return true } -type _List_WorkflowExecutionInfo_Zapper []*WorkflowExecutionInfo - -// MarshalLogArray implements zapcore.ArrayMarshaler, enabling -// fast logging of _List_WorkflowExecutionInfo_Zapper. -func (l _List_WorkflowExecutionInfo_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) { - for _, v := range l { - err = multierr.Append(err, enc.AppendObject(v)) - } - return err -} - // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of ListArchivedWorkflowExecutionsResponse. -func (v *ListArchivedWorkflowExecutionsResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of ListDomainsRequest. +func (v *ListDomainsRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } - if v.Executions != nil { - err = multierr.Append(err, enc.AddArray("executions", (_List_WorkflowExecutionInfo_Zapper)(v.Executions))) + if v.PageSize != nil { + enc.AddInt32("pageSize", *v.PageSize) } if v.NextPageToken != nil { enc.AddString("nextPageToken", base64.StdEncoding.EncodeToString(v.NextPageToken)) @@ -54660,24 +57474,24 @@ func (v *ListArchivedWorkflowExecutionsResponse) MarshalLogObject(enc zapcore.Ob return err } -// GetExecutions returns the value of Executions if it is set or its +// GetPageSize returns the value of PageSize if it is set or its // zero value if it is unset. -func (v *ListArchivedWorkflowExecutionsResponse) GetExecutions() (o []*WorkflowExecutionInfo) { - if v != nil && v.Executions != nil { - return v.Executions +func (v *ListDomainsRequest) GetPageSize() (o int32) { + if v != nil && v.PageSize != nil { + return *v.PageSize } return } -// IsSetExecutions returns true if Executions is not nil. -func (v *ListArchivedWorkflowExecutionsResponse) IsSetExecutions() bool { - return v != nil && v.Executions != nil +// IsSetPageSize returns true if PageSize is not nil. +func (v *ListDomainsRequest) IsSetPageSize() bool { + return v != nil && v.PageSize != nil } // GetNextPageToken returns the value of NextPageToken if it is set or its // zero value if it is unset. -func (v *ListArchivedWorkflowExecutionsResponse) GetNextPageToken() (o []byte) { +func (v *ListDomainsRequest) GetNextPageToken() (o []byte) { if v != nil && v.NextPageToken != nil { return v.NextPageToken } @@ -54686,21 +57500,45 @@ func (v *ListArchivedWorkflowExecutionsResponse) GetNextPageToken() (o []byte) { } // IsSetNextPageToken returns true if NextPageToken is not nil. -func (v *ListArchivedWorkflowExecutionsResponse) IsSetNextPageToken() bool { +func (v *ListDomainsRequest) IsSetNextPageToken() bool { return v != nil && v.NextPageToken != nil } -type ListClosedWorkflowExecutionsRequest struct { - Domain *string `json:"domain,omitempty"` - MaximumPageSize *int32 `json:"maximumPageSize,omitempty"` - NextPageToken []byte `json:"nextPageToken,omitempty"` - StartTimeFilter *StartTimeFilter `json:"StartTimeFilter,omitempty"` - ExecutionFilter *WorkflowExecutionFilter `json:"executionFilter,omitempty"` - TypeFilter *WorkflowTypeFilter `json:"typeFilter,omitempty"` - StatusFilter *WorkflowExecutionCloseStatus `json:"statusFilter,omitempty"` +type ListDomainsResponse struct { + Domains []*DescribeDomainResponse `json:"domains,omitempty"` + NextPageToken []byte `json:"nextPageToken,omitempty"` } -// ToWire translates a ListClosedWorkflowExecutionsRequest struct into a Thrift-level intermediate +type _List_DescribeDomainResponse_ValueList []*DescribeDomainResponse + +func (v _List_DescribeDomainResponse_ValueList) ForEach(f func(wire.Value) error) error { + for i, x := range v { + if x == nil { + return fmt.Errorf("invalid list '[]*DescribeDomainResponse', index [%v]: value is nil", i) + } + w, err := x.ToWire() + if err != nil { + return err + } + err = f(w) + if err != nil { + return err + } + } + return nil +} + +func (v _List_DescribeDomainResponse_ValueList) Size() int { + return len(v) +} + +func (_List_DescribeDomainResponse_ValueList) ValueType() wire.Type { + return wire.TStruct +} + +func (_List_DescribeDomainResponse_ValueList) Close() {} + +// ToWire translates a ListDomainsResponse struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -54715,103 +57553,63 @@ type ListClosedWorkflowExecutionsRequest struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *ListClosedWorkflowExecutionsRequest) ToWire() (wire.Value, error) { +func (v *ListDomainsResponse) ToWire() (wire.Value, error) { var ( - fields [7]wire.Field + fields [2]wire.Field i int = 0 w wire.Value err error ) - if v.Domain != nil { - w, err = wire.NewValueString(*(v.Domain)), error(nil) + if v.Domains != nil { + w, err = wire.NewValueList(_List_DescribeDomainResponse_ValueList(v.Domains)), error(nil) if err != nil { return w, err } fields[i] = wire.Field{ID: 10, Value: w} i++ } - if v.MaximumPageSize != nil { - w, err = wire.NewValueI32(*(v.MaximumPageSize)), error(nil) - if err != nil { - return w, err - } - fields[i] = wire.Field{ID: 20, Value: w} - i++ - } if v.NextPageToken != nil { w, err = wire.NewValueBinary(v.NextPageToken), error(nil) if err != nil { return w, err } - fields[i] = wire.Field{ID: 30, Value: w} - i++ - } - if v.StartTimeFilter != nil { - w, err = v.StartTimeFilter.ToWire() - if err != nil { - return w, err - } - fields[i] = wire.Field{ID: 40, Value: w} - i++ - } - if v.ExecutionFilter != nil { - w, err = v.ExecutionFilter.ToWire() - if err != nil { - return w, err - } - fields[i] = wire.Field{ID: 50, Value: w} - i++ - } - if v.TypeFilter != nil { - w, err = v.TypeFilter.ToWire() - if err != nil { - return w, err - } - fields[i] = wire.Field{ID: 60, Value: w} - i++ - } - if v.StatusFilter != nil { - w, err = v.StatusFilter.ToWire() - if err != nil { - return w, err - } - fields[i] = wire.Field{ID: 70, Value: w} + fields[i] = wire.Field{ID: 20, Value: w} i++ } return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _StartTimeFilter_Read(w wire.Value) (*StartTimeFilter, error) { - var v StartTimeFilter - err := v.FromWire(w) - return &v, err -} - -func _WorkflowExecutionFilter_Read(w wire.Value) (*WorkflowExecutionFilter, error) { - var v WorkflowExecutionFilter +func _DescribeDomainResponse_Read(w wire.Value) (*DescribeDomainResponse, error) { + var v DescribeDomainResponse err := v.FromWire(w) return &v, err } -func _WorkflowTypeFilter_Read(w wire.Value) (*WorkflowTypeFilter, error) { - var v WorkflowTypeFilter - err := v.FromWire(w) - return &v, err -} +func _List_DescribeDomainResponse_Read(l wire.ValueList) ([]*DescribeDomainResponse, error) { + if l.ValueType() != wire.TStruct { + return nil, nil + } -func _WorkflowExecutionCloseStatus_Read(w wire.Value) (WorkflowExecutionCloseStatus, error) { - var v WorkflowExecutionCloseStatus - err := v.FromWire(w) - return v, err + o := make([]*DescribeDomainResponse, 0, l.Size()) + err := l.ForEach(func(x wire.Value) error { + i, err := _DescribeDomainResponse_Read(x) + if err != nil { + return err + } + o = append(o, i) + return nil + }) + l.Close() + return o, err } -// FromWire deserializes a ListClosedWorkflowExecutionsRequest struct from its Thrift-level +// FromWire deserializes a ListDomainsResponse 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 ListClosedWorkflowExecutionsRequest struct +// An error is returned if we were unable to build a ListDomainsResponse struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -54819,77 +57617,31 @@ func _WorkflowExecutionCloseStatus_Read(w wire.Value) (WorkflowExecutionCloseSta // return nil, err // } // -// var v ListClosedWorkflowExecutionsRequest +// var v ListDomainsResponse // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *ListClosedWorkflowExecutionsRequest) FromWire(w wire.Value) error { +func (v *ListDomainsResponse) FromWire(w wire.Value) error { var err error for _, field := range w.GetStruct().Fields { switch field.ID { case 10: - if field.Value.Type() == wire.TBinary { - var x string - x, err = field.Value.GetString(), error(nil) - v.Domain = &x + if field.Value.Type() == wire.TList { + v.Domains, err = _List_DescribeDomainResponse_Read(field.Value.GetList()) if err != nil { return err } } case 20: - if field.Value.Type() == wire.TI32 { - var x int32 - x, err = field.Value.GetI32(), error(nil) - v.MaximumPageSize = &x - if err != nil { - return err - } - - } - case 30: if field.Value.Type() == wire.TBinary { v.NextPageToken, err = field.Value.GetBinary(), error(nil) if err != nil { return err } - } - case 40: - if field.Value.Type() == wire.TStruct { - v.StartTimeFilter, err = _StartTimeFilter_Read(field.Value) - if err != nil { - return err - } - - } - case 50: - if field.Value.Type() == wire.TStruct { - v.ExecutionFilter, err = _WorkflowExecutionFilter_Read(field.Value) - if err != nil { - return err - } - - } - case 60: - if field.Value.Type() == wire.TStruct { - v.TypeFilter, err = _WorkflowTypeFilter_Read(field.Value) - if err != nil { - return err - } - - } - case 70: - if field.Value.Type() == wire.TI32 { - var x WorkflowExecutionCloseStatus - x, err = _WorkflowExecutionCloseStatus_Read(field.Value) - v.StatusFilter = &x - if err != nil { - return err - } - } } } @@ -54897,80 +57649,41 @@ func (v *ListClosedWorkflowExecutionsRequest) FromWire(w wire.Value) error { return nil } -// Encode serializes a ListClosedWorkflowExecutionsRequest struct directly into bytes, without going -// through an intermediary type. -// -// An error is returned if a ListClosedWorkflowExecutionsRequest struct could not be encoded. -func (v *ListClosedWorkflowExecutionsRequest) Encode(sw stream.Writer) error { - if err := sw.WriteStructBegin(); err != nil { - return err - } - - if v.Domain != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil { - return err - } - if err := sw.WriteString(*(v.Domain)); err != nil { - return err - } - if err := sw.WriteFieldEnd(); err != nil { - return err - } - } +func _List_DescribeDomainResponse_Encode(val []*DescribeDomainResponse, sw stream.Writer) error { - if v.MaximumPageSize != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TI32}); err != nil { - return err - } - if err := sw.WriteInt32(*(v.MaximumPageSize)); err != nil { - return err - } - if err := sw.WriteFieldEnd(); err != nil { - return err - } + lh := stream.ListHeader{ + Type: wire.TStruct, + Length: len(val), } - - if v.NextPageToken != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TBinary}); err != nil { - return err - } - if err := sw.WriteBinary(v.NextPageToken); err != nil { - return err - } - if err := sw.WriteFieldEnd(); err != nil { - return err - } + if err := sw.WriteListBegin(lh); err != nil { + return err } - if v.StartTimeFilter != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 40, Type: wire.TStruct}); err != nil { - return err - } - if err := v.StartTimeFilter.Encode(sw); err != nil { - return err + for i, v := range val { + if v == nil { + return fmt.Errorf("invalid list '[]*DescribeDomainResponse', index [%v]: value is nil", i) } - if err := sw.WriteFieldEnd(); err != nil { + if err := v.Encode(sw); err != nil { return err } } + return sw.WriteListEnd() +} - if v.ExecutionFilter != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 50, Type: wire.TStruct}); err != nil { - return err - } - if err := v.ExecutionFilter.Encode(sw); err != nil { - return err - } - if err := sw.WriteFieldEnd(); err != nil { - return err - } +// Encode serializes a ListDomainsResponse struct directly into bytes, without going +// through an intermediary type. +// +// An error is returned if a ListDomainsResponse struct could not be encoded. +func (v *ListDomainsResponse) Encode(sw stream.Writer) error { + if err := sw.WriteStructBegin(); err != nil { + return err } - if v.TypeFilter != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 60, Type: wire.TStruct}); err != nil { + if v.Domains != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TList}); err != nil { return err } - if err := v.TypeFilter.Encode(sw); err != nil { + if err := _List_DescribeDomainResponse_Encode(v.Domains, sw); err != nil { return err } if err := sw.WriteFieldEnd(); err != nil { @@ -54978,11 +57691,11 @@ func (v *ListClosedWorkflowExecutionsRequest) Encode(sw stream.Writer) error { } } - if v.StatusFilter != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 70, Type: wire.TI32}); err != nil { + if v.NextPageToken != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TBinary}); err != nil { return err } - if err := v.StatusFilter.Encode(sw); err != nil { + if err := sw.WriteBinary(v.NextPageToken); err != nil { return err } if err := sw.WriteFieldEnd(); err != nil { @@ -54993,36 +57706,48 @@ func (v *ListClosedWorkflowExecutionsRequest) Encode(sw stream.Writer) error { return sw.WriteStructEnd() } -func _StartTimeFilter_Decode(sr stream.Reader) (*StartTimeFilter, error) { - var v StartTimeFilter +func _DescribeDomainResponse_Decode(sr stream.Reader) (*DescribeDomainResponse, error) { + var v DescribeDomainResponse err := v.Decode(sr) return &v, err } -func _WorkflowExecutionFilter_Decode(sr stream.Reader) (*WorkflowExecutionFilter, error) { - var v WorkflowExecutionFilter - err := v.Decode(sr) - return &v, err -} +func _List_DescribeDomainResponse_Decode(sr stream.Reader) ([]*DescribeDomainResponse, error) { + lh, err := sr.ReadListBegin() + if err != nil { + return nil, err + } -func _WorkflowTypeFilter_Decode(sr stream.Reader) (*WorkflowTypeFilter, error) { - var v WorkflowTypeFilter - err := v.Decode(sr) - return &v, err -} + if lh.Type != wire.TStruct { + for i := 0; i < lh.Length; i++ { + if err := sr.Skip(lh.Type); err != nil { + return nil, err + } + } + return nil, sr.ReadListEnd() + } -func _WorkflowExecutionCloseStatus_Decode(sr stream.Reader) (WorkflowExecutionCloseStatus, error) { - var v WorkflowExecutionCloseStatus - err := v.Decode(sr) - return v, err + o := make([]*DescribeDomainResponse, 0, lh.Length) + for i := 0; i < lh.Length; i++ { + v, err := _DescribeDomainResponse_Decode(sr) + if err != nil { + return nil, err + } + o = append(o, v) + } + + if err = sr.ReadListEnd(); err != nil { + return nil, err + } + return o, err } -// Decode deserializes a ListClosedWorkflowExecutionsRequest struct directly from its Thrift-level +// Decode deserializes a ListDomainsResponse struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a ListClosedWorkflowExecutionsRequest struct could not be generated from the wire +// An error is returned if a ListDomainsResponse struct could not be generated from the wire // representation. -func (v *ListClosedWorkflowExecutionsRequest) Decode(sr stream.Reader) error { +func (v *ListDomainsResponse) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -55035,54 +57760,18 @@ func (v *ListClosedWorkflowExecutionsRequest) Decode(sr stream.Reader) error { for ok { switch { - case fh.ID == 10 && fh.Type == wire.TBinary: - var x string - x, err = sr.ReadString() - v.Domain = &x - if err != nil { - return err - } - - case fh.ID == 20 && fh.Type == wire.TI32: - var x int32 - x, err = sr.ReadInt32() - v.MaximumPageSize = &x + case fh.ID == 10 && fh.Type == wire.TList: + v.Domains, err = _List_DescribeDomainResponse_Decode(sr) if err != nil { return err } - case fh.ID == 30 && fh.Type == wire.TBinary: + case fh.ID == 20 && fh.Type == wire.TBinary: v.NextPageToken, err = sr.ReadBinary() if err != nil { return err } - case fh.ID == 40 && fh.Type == wire.TStruct: - v.StartTimeFilter, err = _StartTimeFilter_Decode(sr) - if err != nil { - return err - } - - case fh.ID == 50 && fh.Type == wire.TStruct: - v.ExecutionFilter, err = _WorkflowExecutionFilter_Decode(sr) - if err != nil { - return err - } - - case fh.ID == 60 && fh.Type == wire.TStruct: - v.TypeFilter, err = _WorkflowTypeFilter_Decode(sr) - if err != nil { - return err - } - - case fh.ID == 70 && fh.Type == wire.TI32: - var x WorkflowExecutionCloseStatus - x, err = _WorkflowExecutionCloseStatus_Decode(sr) - v.StatusFilter = &x - if err != nil { - return err - } - default: if err := sr.Skip(fh.Type); err != nil { return err @@ -55105,155 +57794,106 @@ func (v *ListClosedWorkflowExecutionsRequest) Decode(sr stream.Reader) error { return nil } -// String returns a readable string representation of a ListClosedWorkflowExecutionsRequest +// String returns a readable string representation of a ListDomainsResponse // struct. -func (v *ListClosedWorkflowExecutionsRequest) String() string { +func (v *ListDomainsResponse) String() string { if v == nil { return "" } - var fields [7]string + var fields [2]string i := 0 - if v.Domain != nil { - fields[i] = fmt.Sprintf("Domain: %v", *(v.Domain)) - i++ - } - if v.MaximumPageSize != nil { - fields[i] = fmt.Sprintf("MaximumPageSize: %v", *(v.MaximumPageSize)) + if v.Domains != nil { + fields[i] = fmt.Sprintf("Domains: %v", v.Domains) i++ } if v.NextPageToken != nil { fields[i] = fmt.Sprintf("NextPageToken: %v", v.NextPageToken) i++ } - if v.StartTimeFilter != nil { - fields[i] = fmt.Sprintf("StartTimeFilter: %v", v.StartTimeFilter) - i++ - } - if v.ExecutionFilter != nil { - fields[i] = fmt.Sprintf("ExecutionFilter: %v", v.ExecutionFilter) - i++ - } - if v.TypeFilter != nil { - fields[i] = fmt.Sprintf("TypeFilter: %v", v.TypeFilter) - i++ - } - if v.StatusFilter != nil { - fields[i] = fmt.Sprintf("StatusFilter: %v", *(v.StatusFilter)) - i++ - } - return fmt.Sprintf("ListClosedWorkflowExecutionsRequest{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("ListDomainsResponse{%v}", strings.Join(fields[:i], ", ")) } -func _WorkflowExecutionCloseStatus_EqualsPtr(lhs, rhs *WorkflowExecutionCloseStatus) bool { - if lhs != nil && rhs != nil { +func _List_DescribeDomainResponse_Equals(lhs, rhs []*DescribeDomainResponse) bool { + if len(lhs) != len(rhs) { + return false + } - x := *lhs - y := *rhs - return x.Equals(y) + for i, lv := range lhs { + rv := rhs[i] + if !lv.Equals(rv) { + return false + } } - return lhs == nil && rhs == nil + + return true } -// Equals returns true if all the fields of this ListClosedWorkflowExecutionsRequest match the -// provided ListClosedWorkflowExecutionsRequest. +// Equals returns true if all the fields of this ListDomainsResponse match the +// provided ListDomainsResponse. // -// This function performs a deep comparison. -func (v *ListClosedWorkflowExecutionsRequest) Equals(rhs *ListClosedWorkflowExecutionsRequest) bool { - if v == nil { - return rhs == nil - } else if rhs == nil { - return false - } - if !_String_EqualsPtr(v.Domain, rhs.Domain) { - return false - } - if !_I32_EqualsPtr(v.MaximumPageSize, rhs.MaximumPageSize) { - return false - } - if !((v.NextPageToken == nil && rhs.NextPageToken == nil) || (v.NextPageToken != nil && rhs.NextPageToken != nil && bytes.Equal(v.NextPageToken, rhs.NextPageToken))) { - return false - } - if !((v.StartTimeFilter == nil && rhs.StartTimeFilter == nil) || (v.StartTimeFilter != nil && rhs.StartTimeFilter != nil && v.StartTimeFilter.Equals(rhs.StartTimeFilter))) { - return false - } - if !((v.ExecutionFilter == nil && rhs.ExecutionFilter == nil) || (v.ExecutionFilter != nil && rhs.ExecutionFilter != nil && v.ExecutionFilter.Equals(rhs.ExecutionFilter))) { +// This function performs a deep comparison. +func (v *ListDomainsResponse) Equals(rhs *ListDomainsResponse) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { return false } - if !((v.TypeFilter == nil && rhs.TypeFilter == nil) || (v.TypeFilter != nil && rhs.TypeFilter != nil && v.TypeFilter.Equals(rhs.TypeFilter))) { + if !((v.Domains == nil && rhs.Domains == nil) || (v.Domains != nil && rhs.Domains != nil && _List_DescribeDomainResponse_Equals(v.Domains, rhs.Domains))) { return false } - if !_WorkflowExecutionCloseStatus_EqualsPtr(v.StatusFilter, rhs.StatusFilter) { + if !((v.NextPageToken == nil && rhs.NextPageToken == nil) || (v.NextPageToken != nil && rhs.NextPageToken != nil && bytes.Equal(v.NextPageToken, rhs.NextPageToken))) { return false } return true } +type _List_DescribeDomainResponse_Zapper []*DescribeDomainResponse + +// MarshalLogArray implements zapcore.ArrayMarshaler, enabling +// fast logging of _List_DescribeDomainResponse_Zapper. +func (l _List_DescribeDomainResponse_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) { + for _, v := range l { + err = multierr.Append(err, enc.AppendObject(v)) + } + return err +} + // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of ListClosedWorkflowExecutionsRequest. -func (v *ListClosedWorkflowExecutionsRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of ListDomainsResponse. +func (v *ListDomainsResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } - if v.Domain != nil { - enc.AddString("domain", *v.Domain) - } - if v.MaximumPageSize != nil { - enc.AddInt32("maximumPageSize", *v.MaximumPageSize) + if v.Domains != nil { + err = multierr.Append(err, enc.AddArray("domains", (_List_DescribeDomainResponse_Zapper)(v.Domains))) } if v.NextPageToken != nil { enc.AddString("nextPageToken", base64.StdEncoding.EncodeToString(v.NextPageToken)) } - if v.StartTimeFilter != nil { - err = multierr.Append(err, enc.AddObject("StartTimeFilter", v.StartTimeFilter)) - } - if v.ExecutionFilter != nil { - err = multierr.Append(err, enc.AddObject("executionFilter", v.ExecutionFilter)) - } - if v.TypeFilter != nil { - err = multierr.Append(err, enc.AddObject("typeFilter", v.TypeFilter)) - } - if v.StatusFilter != nil { - err = multierr.Append(err, enc.AddObject("statusFilter", *v.StatusFilter)) - } return err } -// GetDomain returns the value of Domain if it is set or its -// zero value if it is unset. -func (v *ListClosedWorkflowExecutionsRequest) GetDomain() (o string) { - if v != nil && v.Domain != nil { - return *v.Domain - } - - return -} - -// IsSetDomain returns true if Domain is not nil. -func (v *ListClosedWorkflowExecutionsRequest) IsSetDomain() bool { - return v != nil && v.Domain != nil -} - -// GetMaximumPageSize returns the value of MaximumPageSize if it is set or its +// GetDomains returns the value of Domains if it is set or its // zero value if it is unset. -func (v *ListClosedWorkflowExecutionsRequest) GetMaximumPageSize() (o int32) { - if v != nil && v.MaximumPageSize != nil { - return *v.MaximumPageSize +func (v *ListDomainsResponse) GetDomains() (o []*DescribeDomainResponse) { + if v != nil && v.Domains != nil { + return v.Domains } return } -// IsSetMaximumPageSize returns true if MaximumPageSize is not nil. -func (v *ListClosedWorkflowExecutionsRequest) IsSetMaximumPageSize() bool { - return v != nil && v.MaximumPageSize != nil +// IsSetDomains returns true if Domains is not nil. +func (v *ListDomainsResponse) IsSetDomains() bool { + return v != nil && v.Domains != nil } // GetNextPageToken returns the value of NextPageToken if it is set or its // zero value if it is unset. -func (v *ListClosedWorkflowExecutionsRequest) GetNextPageToken() (o []byte) { +func (v *ListDomainsResponse) GetNextPageToken() (o []byte) { if v != nil && v.NextPageToken != nil { return v.NextPageToken } @@ -55262,76 +57902,16 @@ func (v *ListClosedWorkflowExecutionsRequest) GetNextPageToken() (o []byte) { } // IsSetNextPageToken returns true if NextPageToken is not nil. -func (v *ListClosedWorkflowExecutionsRequest) IsSetNextPageToken() bool { +func (v *ListDomainsResponse) IsSetNextPageToken() bool { return v != nil && v.NextPageToken != nil } -// GetStartTimeFilter returns the value of StartTimeFilter if it is set or its -// zero value if it is unset. -func (v *ListClosedWorkflowExecutionsRequest) GetStartTimeFilter() (o *StartTimeFilter) { - if v != nil && v.StartTimeFilter != nil { - return v.StartTimeFilter - } - - return -} - -// IsSetStartTimeFilter returns true if StartTimeFilter is not nil. -func (v *ListClosedWorkflowExecutionsRequest) IsSetStartTimeFilter() bool { - return v != nil && v.StartTimeFilter != nil -} - -// GetExecutionFilter returns the value of ExecutionFilter if it is set or its -// zero value if it is unset. -func (v *ListClosedWorkflowExecutionsRequest) GetExecutionFilter() (o *WorkflowExecutionFilter) { - if v != nil && v.ExecutionFilter != nil { - return v.ExecutionFilter - } - - return -} - -// IsSetExecutionFilter returns true if ExecutionFilter is not nil. -func (v *ListClosedWorkflowExecutionsRequest) IsSetExecutionFilter() bool { - return v != nil && v.ExecutionFilter != nil -} - -// GetTypeFilter returns the value of TypeFilter if it is set or its -// zero value if it is unset. -func (v *ListClosedWorkflowExecutionsRequest) GetTypeFilter() (o *WorkflowTypeFilter) { - if v != nil && v.TypeFilter != nil { - return v.TypeFilter - } - - return -} - -// IsSetTypeFilter returns true if TypeFilter is not nil. -func (v *ListClosedWorkflowExecutionsRequest) IsSetTypeFilter() bool { - return v != nil && v.TypeFilter != nil -} - -// GetStatusFilter returns the value of StatusFilter if it is set or its -// zero value if it is unset. -func (v *ListClosedWorkflowExecutionsRequest) GetStatusFilter() (o WorkflowExecutionCloseStatus) { - if v != nil && v.StatusFilter != nil { - return *v.StatusFilter - } - - return -} - -// IsSetStatusFilter returns true if StatusFilter is not nil. -func (v *ListClosedWorkflowExecutionsRequest) IsSetStatusFilter() bool { - return v != nil && v.StatusFilter != nil -} - -type ListClosedWorkflowExecutionsResponse struct { - Executions []*WorkflowExecutionInfo `json:"executions,omitempty"` - NextPageToken []byte `json:"nextPageToken,omitempty"` +type ListFailoverHistoryRequest struct { + Filters *ListFailoverHistoryRequestFilters `json:"filters,omitempty"` + Pagination *PaginationOptions `json:"pagination,omitempty"` } -// ToWire translates a ListClosedWorkflowExecutionsResponse struct into a Thrift-level intermediate +// ToWire translates a ListFailoverHistoryRequest struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -55346,7 +57926,7 @@ type ListClosedWorkflowExecutionsResponse struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *ListClosedWorkflowExecutionsResponse) ToWire() (wire.Value, error) { +func (v *ListFailoverHistoryRequest) ToWire() (wire.Value, error) { var ( fields [2]wire.Field i int = 0 @@ -55354,16 +57934,16 @@ func (v *ListClosedWorkflowExecutionsResponse) ToWire() (wire.Value, error) { err error ) - if v.Executions != nil { - w, err = wire.NewValueList(_List_WorkflowExecutionInfo_ValueList(v.Executions)), error(nil) + if v.Filters != nil { + w, err = v.Filters.ToWire() if err != nil { return w, err } fields[i] = wire.Field{ID: 10, Value: w} i++ } - if v.NextPageToken != nil { - w, err = wire.NewValueBinary(v.NextPageToken), error(nil) + if v.Pagination != nil { + w, err = v.Pagination.ToWire() if err != nil { return w, err } @@ -55374,11 +57954,23 @@ func (v *ListClosedWorkflowExecutionsResponse) ToWire() (wire.Value, error) { return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -// FromWire deserializes a ListClosedWorkflowExecutionsResponse struct from its Thrift-level +func _ListFailoverHistoryRequestFilters_Read(w wire.Value) (*ListFailoverHistoryRequestFilters, error) { + var v ListFailoverHistoryRequestFilters + err := v.FromWire(w) + return &v, err +} + +func _PaginationOptions_Read(w wire.Value) (*PaginationOptions, error) { + var v PaginationOptions + err := v.FromWire(w) + return &v, err +} + +// FromWire deserializes a ListFailoverHistoryRequest 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 ListClosedWorkflowExecutionsResponse struct +// An error is returned if we were unable to build a ListFailoverHistoryRequest struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -55386,27 +57978,27 @@ func (v *ListClosedWorkflowExecutionsResponse) ToWire() (wire.Value, error) { // return nil, err // } // -// var v ListClosedWorkflowExecutionsResponse +// var v ListFailoverHistoryRequest // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *ListClosedWorkflowExecutionsResponse) FromWire(w wire.Value) error { +func (v *ListFailoverHistoryRequest) FromWire(w wire.Value) error { var err error for _, field := range w.GetStruct().Fields { switch field.ID { case 10: - if field.Value.Type() == wire.TList { - v.Executions, err = _List_WorkflowExecutionInfo_Read(field.Value.GetList()) + if field.Value.Type() == wire.TStruct { + v.Filters, err = _ListFailoverHistoryRequestFilters_Read(field.Value) if err != nil { return err } } case 20: - if field.Value.Type() == wire.TBinary { - v.NextPageToken, err = field.Value.GetBinary(), error(nil) + if field.Value.Type() == wire.TStruct { + v.Pagination, err = _PaginationOptions_Read(field.Value) if err != nil { return err } @@ -55418,20 +58010,20 @@ func (v *ListClosedWorkflowExecutionsResponse) FromWire(w wire.Value) error { return nil } -// Encode serializes a ListClosedWorkflowExecutionsResponse struct directly into bytes, without going +// Encode serializes a ListFailoverHistoryRequest struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a ListClosedWorkflowExecutionsResponse struct could not be encoded. -func (v *ListClosedWorkflowExecutionsResponse) Encode(sw stream.Writer) error { +// An error is returned if a ListFailoverHistoryRequest struct could not be encoded. +func (v *ListFailoverHistoryRequest) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } - if v.Executions != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TList}); err != nil { + if v.Filters != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TStruct}); err != nil { return err } - if err := _List_WorkflowExecutionInfo_Encode(v.Executions, sw); err != nil { + if err := v.Filters.Encode(sw); err != nil { return err } if err := sw.WriteFieldEnd(); err != nil { @@ -55439,11 +58031,11 @@ func (v *ListClosedWorkflowExecutionsResponse) Encode(sw stream.Writer) error { } } - if v.NextPageToken != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TBinary}); err != nil { + if v.Pagination != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TStruct}); err != nil { return err } - if err := sw.WriteBinary(v.NextPageToken); err != nil { + if err := v.Pagination.Encode(sw); err != nil { return err } if err := sw.WriteFieldEnd(); err != nil { @@ -55454,12 +58046,24 @@ func (v *ListClosedWorkflowExecutionsResponse) Encode(sw stream.Writer) error { return sw.WriteStructEnd() } -// Decode deserializes a ListClosedWorkflowExecutionsResponse struct directly from its Thrift-level +func _ListFailoverHistoryRequestFilters_Decode(sr stream.Reader) (*ListFailoverHistoryRequestFilters, error) { + var v ListFailoverHistoryRequestFilters + err := v.Decode(sr) + return &v, err +} + +func _PaginationOptions_Decode(sr stream.Reader) (*PaginationOptions, error) { + var v PaginationOptions + err := v.Decode(sr) + return &v, err +} + +// Decode deserializes a ListFailoverHistoryRequest struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a ListClosedWorkflowExecutionsResponse struct could not be generated from the wire +// An error is returned if a ListFailoverHistoryRequest struct could not be generated from the wire // representation. -func (v *ListClosedWorkflowExecutionsResponse) Decode(sr stream.Reader) error { +func (v *ListFailoverHistoryRequest) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -55472,14 +58076,14 @@ func (v *ListClosedWorkflowExecutionsResponse) Decode(sr stream.Reader) error { for ok { switch { - case fh.ID == 10 && fh.Type == wire.TList: - v.Executions, err = _List_WorkflowExecutionInfo_Decode(sr) + case fh.ID == 10 && fh.Type == wire.TStruct: + v.Filters, err = _ListFailoverHistoryRequestFilters_Decode(sr) if err != nil { return err } - case fh.ID == 20 && fh.Type == wire.TBinary: - v.NextPageToken, err = sr.ReadBinary() + case fh.ID == 20 && fh.Type == wire.TStruct: + v.Pagination, err = _PaginationOptions_Decode(sr) if err != nil { return err } @@ -55506,41 +58110,41 @@ func (v *ListClosedWorkflowExecutionsResponse) Decode(sr stream.Reader) error { return nil } -// String returns a readable string representation of a ListClosedWorkflowExecutionsResponse +// String returns a readable string representation of a ListFailoverHistoryRequest // struct. -func (v *ListClosedWorkflowExecutionsResponse) String() string { +func (v *ListFailoverHistoryRequest) String() string { if v == nil { return "" } var fields [2]string i := 0 - if v.Executions != nil { - fields[i] = fmt.Sprintf("Executions: %v", v.Executions) + if v.Filters != nil { + fields[i] = fmt.Sprintf("Filters: %v", v.Filters) i++ } - if v.NextPageToken != nil { - fields[i] = fmt.Sprintf("NextPageToken: %v", v.NextPageToken) + if v.Pagination != nil { + fields[i] = fmt.Sprintf("Pagination: %v", v.Pagination) i++ } - return fmt.Sprintf("ListClosedWorkflowExecutionsResponse{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("ListFailoverHistoryRequest{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this ListClosedWorkflowExecutionsResponse match the -// provided ListClosedWorkflowExecutionsResponse. +// Equals returns true if all the fields of this ListFailoverHistoryRequest match the +// provided ListFailoverHistoryRequest. // // This function performs a deep comparison. -func (v *ListClosedWorkflowExecutionsResponse) Equals(rhs *ListClosedWorkflowExecutionsResponse) bool { +func (v *ListFailoverHistoryRequest) Equals(rhs *ListFailoverHistoryRequest) bool { if v == nil { return rhs == nil } else if rhs == nil { return false } - if !((v.Executions == nil && rhs.Executions == nil) || (v.Executions != nil && rhs.Executions != nil && _List_WorkflowExecutionInfo_Equals(v.Executions, rhs.Executions))) { + if !((v.Filters == nil && rhs.Filters == nil) || (v.Filters != nil && rhs.Filters != nil && v.Filters.Equals(rhs.Filters))) { return false } - if !((v.NextPageToken == nil && rhs.NextPageToken == nil) || (v.NextPageToken != nil && rhs.NextPageToken != nil && bytes.Equal(v.NextPageToken, rhs.NextPageToken))) { + if !((v.Pagination == nil && rhs.Pagination == nil) || (v.Pagination != nil && rhs.Pagination != nil && v.Pagination.Equals(rhs.Pagination))) { return false } @@ -55548,56 +58152,86 @@ func (v *ListClosedWorkflowExecutionsResponse) Equals(rhs *ListClosedWorkflowExe } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of ListClosedWorkflowExecutionsResponse. -func (v *ListClosedWorkflowExecutionsResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of ListFailoverHistoryRequest. +func (v *ListFailoverHistoryRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } - if v.Executions != nil { - err = multierr.Append(err, enc.AddArray("executions", (_List_WorkflowExecutionInfo_Zapper)(v.Executions))) + if v.Filters != nil { + err = multierr.Append(err, enc.AddObject("filters", v.Filters)) } - if v.NextPageToken != nil { - enc.AddString("nextPageToken", base64.StdEncoding.EncodeToString(v.NextPageToken)) + if v.Pagination != nil { + err = multierr.Append(err, enc.AddObject("pagination", v.Pagination)) } return err } -// GetExecutions returns the value of Executions if it is set or its +// GetFilters returns the value of Filters if it is set or its // zero value if it is unset. -func (v *ListClosedWorkflowExecutionsResponse) GetExecutions() (o []*WorkflowExecutionInfo) { - if v != nil && v.Executions != nil { - return v.Executions +func (v *ListFailoverHistoryRequest) GetFilters() (o *ListFailoverHistoryRequestFilters) { + if v != nil && v.Filters != nil { + return v.Filters } return } -// IsSetExecutions returns true if Executions is not nil. -func (v *ListClosedWorkflowExecutionsResponse) IsSetExecutions() bool { - return v != nil && v.Executions != nil +// IsSetFilters returns true if Filters is not nil. +func (v *ListFailoverHistoryRequest) IsSetFilters() bool { + return v != nil && v.Filters != nil } -// GetNextPageToken returns the value of NextPageToken if it is set or its +// GetPagination returns the value of Pagination if it is set or its // zero value if it is unset. -func (v *ListClosedWorkflowExecutionsResponse) GetNextPageToken() (o []byte) { - if v != nil && v.NextPageToken != nil { - return v.NextPageToken +func (v *ListFailoverHistoryRequest) GetPagination() (o *PaginationOptions) { + if v != nil && v.Pagination != nil { + return v.Pagination } return } -// IsSetNextPageToken returns true if NextPageToken is not nil. -func (v *ListClosedWorkflowExecutionsResponse) IsSetNextPageToken() bool { - return v != nil && v.NextPageToken != nil +// IsSetPagination returns true if Pagination is not nil. +func (v *ListFailoverHistoryRequest) IsSetPagination() bool { + return v != nil && v.Pagination != nil } -type ListDomainsRequest struct { - PageSize *int32 `json:"pageSize,omitempty"` - NextPageToken []byte `json:"nextPageToken,omitempty"` +type ListFailoverHistoryRequestFilters struct { + DomainID *string `json:"domainID,omitempty"` + Attributes []*ClusterAttribute `json:"attributes,omitempty"` + DefaultActiveCluster *bool `json:"defaultActiveCluster,omitempty"` } -// ToWire translates a ListDomainsRequest struct into a Thrift-level intermediate +type _List_ClusterAttribute_ValueList []*ClusterAttribute + +func (v _List_ClusterAttribute_ValueList) ForEach(f func(wire.Value) error) error { + for i, x := range v { + if x == nil { + return fmt.Errorf("invalid list '[]*ClusterAttribute', index [%v]: value is nil", i) + } + w, err := x.ToWire() + if err != nil { + return err + } + err = f(w) + if err != nil { + return err + } + } + return nil +} + +func (v _List_ClusterAttribute_ValueList) Size() int { + return len(v) +} + +func (_List_ClusterAttribute_ValueList) ValueType() wire.Type { + return wire.TStruct +} + +func (_List_ClusterAttribute_ValueList) Close() {} + +// ToWire translates a ListFailoverHistoryRequestFilters struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -55612,39 +58246,65 @@ type ListDomainsRequest struct { // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *ListDomainsRequest) ToWire() (wire.Value, error) { +func (v *ListFailoverHistoryRequestFilters) ToWire() (wire.Value, error) { var ( - fields [2]wire.Field + fields [3]wire.Field i int = 0 w wire.Value err error ) - if v.PageSize != nil { - w, err = wire.NewValueI32(*(v.PageSize)), error(nil) + if v.DomainID != nil { + w, err = wire.NewValueString(*(v.DomainID)), error(nil) if err != nil { return w, err } fields[i] = wire.Field{ID: 10, Value: w} i++ } - if v.NextPageToken != nil { - w, err = wire.NewValueBinary(v.NextPageToken), error(nil) + if v.Attributes != nil { + w, err = wire.NewValueList(_List_ClusterAttribute_ValueList(v.Attributes)), error(nil) if err != nil { return w, err } fields[i] = wire.Field{ID: 20, Value: w} i++ } + if v.DefaultActiveCluster != nil { + w, err = wire.NewValueBool(*(v.DefaultActiveCluster)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 30, Value: w} + i++ + } return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -// FromWire deserializes a ListDomainsRequest struct from its Thrift-level +func _List_ClusterAttribute_Read(l wire.ValueList) ([]*ClusterAttribute, error) { + if l.ValueType() != wire.TStruct { + return nil, nil + } + + o := make([]*ClusterAttribute, 0, l.Size()) + err := l.ForEach(func(x wire.Value) error { + i, err := _ClusterAttribute_Read(x) + if err != nil { + return err + } + o = append(o, i) + return nil + }) + l.Close() + return o, err +} + +// FromWire deserializes a ListFailoverHistoryRequestFilters 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 ListDomainsRequest struct +// An error is returned if we were unable to build a ListFailoverHistoryRequestFilters struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -55652,29 +58312,39 @@ func (v *ListDomainsRequest) ToWire() (wire.Value, error) { // return nil, err // } // -// var v ListDomainsRequest +// var v ListFailoverHistoryRequestFilters // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *ListDomainsRequest) FromWire(w wire.Value) error { +func (v *ListFailoverHistoryRequestFilters) FromWire(w wire.Value) error { var err error for _, field := range w.GetStruct().Fields { switch field.ID { case 10: - if field.Value.Type() == wire.TI32 { - var x int32 - x, err = field.Value.GetI32(), error(nil) - v.PageSize = &x + if field.Value.Type() == wire.TBinary { + var x string + x, err = field.Value.GetString(), error(nil) + v.DomainID = &x if err != nil { return err } } case 20: - if field.Value.Type() == wire.TBinary { - v.NextPageToken, err = field.Value.GetBinary(), error(nil) + if field.Value.Type() == wire.TList { + v.Attributes, err = _List_ClusterAttribute_Read(field.Value.GetList()) + if err != nil { + return err + } + + } + case 30: + if field.Value.Type() == wire.TBool { + var x bool + x, err = field.Value.GetBool(), error(nil) + v.DefaultActiveCluster = &x if err != nil { return err } @@ -55686,20 +58356,41 @@ func (v *ListDomainsRequest) FromWire(w wire.Value) error { return nil } -// Encode serializes a ListDomainsRequest struct directly into bytes, without going +func _List_ClusterAttribute_Encode(val []*ClusterAttribute, sw stream.Writer) error { + + lh := stream.ListHeader{ + Type: wire.TStruct, + Length: len(val), + } + if err := sw.WriteListBegin(lh); err != nil { + return err + } + + for i, v := range val { + if v == nil { + return fmt.Errorf("invalid list '[]*ClusterAttribute', index [%v]: value is nil", i) + } + if err := v.Encode(sw); err != nil { + return err + } + } + return sw.WriteListEnd() +} + +// Encode serializes a ListFailoverHistoryRequestFilters struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a ListDomainsRequest struct could not be encoded. -func (v *ListDomainsRequest) Encode(sw stream.Writer) error { +// An error is returned if a ListFailoverHistoryRequestFilters struct could not be encoded. +func (v *ListFailoverHistoryRequestFilters) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } - if v.PageSize != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TI32}); err != nil { + if v.DomainID != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TBinary}); err != nil { return err } - if err := sw.WriteInt32(*(v.PageSize)); err != nil { + if err := sw.WriteString(*(v.DomainID)); err != nil { return err } if err := sw.WriteFieldEnd(); err != nil { @@ -55707,11 +58398,23 @@ func (v *ListDomainsRequest) Encode(sw stream.Writer) error { } } - if v.NextPageToken != nil { - if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TBinary}); err != nil { + if v.Attributes != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TList}); err != nil { return err } - if err := sw.WriteBinary(v.NextPageToken); err != nil { + if err := _List_ClusterAttribute_Encode(v.Attributes, sw); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.DefaultActiveCluster != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 30, Type: wire.TBool}); err != nil { + return err + } + if err := sw.WriteBool(*(v.DefaultActiveCluster)); err != nil { return err } if err := sw.WriteFieldEnd(); err != nil { @@ -55722,12 +58425,42 @@ func (v *ListDomainsRequest) Encode(sw stream.Writer) error { return sw.WriteStructEnd() } -// Decode deserializes a ListDomainsRequest struct directly from its Thrift-level +func _List_ClusterAttribute_Decode(sr stream.Reader) ([]*ClusterAttribute, error) { + lh, err := sr.ReadListBegin() + if err != nil { + return nil, err + } + + if lh.Type != wire.TStruct { + for i := 0; i < lh.Length; i++ { + if err := sr.Skip(lh.Type); err != nil { + return nil, err + } + } + return nil, sr.ReadListEnd() + } + + o := make([]*ClusterAttribute, 0, lh.Length) + for i := 0; i < lh.Length; i++ { + v, err := _ClusterAttribute_Decode(sr) + if err != nil { + return nil, err + } + o = append(o, v) + } + + if err = sr.ReadListEnd(); err != nil { + return nil, err + } + return o, err +} + +// Decode deserializes a ListFailoverHistoryRequestFilters struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a ListDomainsRequest struct could not be generated from the wire +// An error is returned if a ListFailoverHistoryRequestFilters struct could not be generated from the wire // representation. -func (v *ListDomainsRequest) Decode(sr stream.Reader) error { +func (v *ListFailoverHistoryRequestFilters) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -55740,16 +58473,24 @@ func (v *ListDomainsRequest) Decode(sr stream.Reader) error { for ok { switch { - case fh.ID == 10 && fh.Type == wire.TI32: - var x int32 - x, err = sr.ReadInt32() - v.PageSize = &x + case fh.ID == 10 && fh.Type == wire.TBinary: + var x string + x, err = sr.ReadString() + v.DomainID = &x if err != nil { return err } - case fh.ID == 20 && fh.Type == wire.TBinary: - v.NextPageToken, err = sr.ReadBinary() + case fh.ID == 20 && fh.Type == wire.TList: + v.Attributes, err = _List_ClusterAttribute_Decode(sr) + if err != nil { + return err + } + + case fh.ID == 30 && fh.Type == wire.TBool: + var x bool + x, err = sr.ReadBool() + v.DefaultActiveCluster = &x if err != nil { return err } @@ -55776,103 +58517,154 @@ func (v *ListDomainsRequest) Decode(sr stream.Reader) error { return nil } -// String returns a readable string representation of a ListDomainsRequest +// String returns a readable string representation of a ListFailoverHistoryRequestFilters // struct. -func (v *ListDomainsRequest) String() string { +func (v *ListFailoverHistoryRequestFilters) String() string { if v == nil { return "" } - var fields [2]string + var fields [3]string i := 0 - if v.PageSize != nil { - fields[i] = fmt.Sprintf("PageSize: %v", *(v.PageSize)) + if v.DomainID != nil { + fields[i] = fmt.Sprintf("DomainID: %v", *(v.DomainID)) i++ } - if v.NextPageToken != nil { - fields[i] = fmt.Sprintf("NextPageToken: %v", v.NextPageToken) + if v.Attributes != nil { + fields[i] = fmt.Sprintf("Attributes: %v", v.Attributes) + i++ + } + if v.DefaultActiveCluster != nil { + fields[i] = fmt.Sprintf("DefaultActiveCluster: %v", *(v.DefaultActiveCluster)) i++ } - return fmt.Sprintf("ListDomainsRequest{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("ListFailoverHistoryRequestFilters{%v}", strings.Join(fields[:i], ", ")) } -// Equals returns true if all the fields of this ListDomainsRequest match the -// provided ListDomainsRequest. +func _List_ClusterAttribute_Equals(lhs, rhs []*ClusterAttribute) bool { + if len(lhs) != len(rhs) { + return false + } + + for i, lv := range lhs { + rv := rhs[i] + if !lv.Equals(rv) { + return false + } + } + + return true +} + +// Equals returns true if all the fields of this ListFailoverHistoryRequestFilters match the +// provided ListFailoverHistoryRequestFilters. // // This function performs a deep comparison. -func (v *ListDomainsRequest) Equals(rhs *ListDomainsRequest) bool { +func (v *ListFailoverHistoryRequestFilters) Equals(rhs *ListFailoverHistoryRequestFilters) bool { if v == nil { return rhs == nil } else if rhs == nil { return false } - if !_I32_EqualsPtr(v.PageSize, rhs.PageSize) { + if !_String_EqualsPtr(v.DomainID, rhs.DomainID) { return false } - if !((v.NextPageToken == nil && rhs.NextPageToken == nil) || (v.NextPageToken != nil && rhs.NextPageToken != nil && bytes.Equal(v.NextPageToken, rhs.NextPageToken))) { + if !((v.Attributes == nil && rhs.Attributes == nil) || (v.Attributes != nil && rhs.Attributes != nil && _List_ClusterAttribute_Equals(v.Attributes, rhs.Attributes))) { + return false + } + if !_Bool_EqualsPtr(v.DefaultActiveCluster, rhs.DefaultActiveCluster) { return false } return true } +type _List_ClusterAttribute_Zapper []*ClusterAttribute + +// MarshalLogArray implements zapcore.ArrayMarshaler, enabling +// fast logging of _List_ClusterAttribute_Zapper. +func (l _List_ClusterAttribute_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) { + for _, v := range l { + err = multierr.Append(err, enc.AppendObject(v)) + } + return err +} + // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of ListDomainsRequest. -func (v *ListDomainsRequest) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of ListFailoverHistoryRequestFilters. +func (v *ListFailoverHistoryRequestFilters) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } - if v.PageSize != nil { - enc.AddInt32("pageSize", *v.PageSize) + if v.DomainID != nil { + enc.AddString("domainID", *v.DomainID) } - if v.NextPageToken != nil { - enc.AddString("nextPageToken", base64.StdEncoding.EncodeToString(v.NextPageToken)) + if v.Attributes != nil { + err = multierr.Append(err, enc.AddArray("attributes", (_List_ClusterAttribute_Zapper)(v.Attributes))) + } + if v.DefaultActiveCluster != nil { + enc.AddBool("defaultActiveCluster", *v.DefaultActiveCluster) } return err } -// GetPageSize returns the value of PageSize if it is set or its +// GetDomainID returns the value of DomainID if it is set or its // zero value if it is unset. -func (v *ListDomainsRequest) GetPageSize() (o int32) { - if v != nil && v.PageSize != nil { - return *v.PageSize +func (v *ListFailoverHistoryRequestFilters) GetDomainID() (o string) { + if v != nil && v.DomainID != nil { + return *v.DomainID } return } -// IsSetPageSize returns true if PageSize is not nil. -func (v *ListDomainsRequest) IsSetPageSize() bool { - return v != nil && v.PageSize != nil +// IsSetDomainID returns true if DomainID is not nil. +func (v *ListFailoverHistoryRequestFilters) IsSetDomainID() bool { + return v != nil && v.DomainID != nil } -// GetNextPageToken returns the value of NextPageToken if it is set or its +// GetAttributes returns the value of Attributes if it is set or its // zero value if it is unset. -func (v *ListDomainsRequest) GetNextPageToken() (o []byte) { - if v != nil && v.NextPageToken != nil { - return v.NextPageToken +func (v *ListFailoverHistoryRequestFilters) GetAttributes() (o []*ClusterAttribute) { + if v != nil && v.Attributes != nil { + return v.Attributes } return } -// IsSetNextPageToken returns true if NextPageToken is not nil. -func (v *ListDomainsRequest) IsSetNextPageToken() bool { - return v != nil && v.NextPageToken != nil +// IsSetAttributes returns true if Attributes is not nil. +func (v *ListFailoverHistoryRequestFilters) IsSetAttributes() bool { + return v != nil && v.Attributes != nil } -type ListDomainsResponse struct { - Domains []*DescribeDomainResponse `json:"domains,omitempty"` - NextPageToken []byte `json:"nextPageToken,omitempty"` +// GetDefaultActiveCluster returns the value of DefaultActiveCluster if it is set or its +// zero value if it is unset. +func (v *ListFailoverHistoryRequestFilters) GetDefaultActiveCluster() (o bool) { + if v != nil && v.DefaultActiveCluster != nil { + return *v.DefaultActiveCluster + } + + return } -type _List_DescribeDomainResponse_ValueList []*DescribeDomainResponse +// IsSetDefaultActiveCluster returns true if DefaultActiveCluster is not nil. +func (v *ListFailoverHistoryRequestFilters) IsSetDefaultActiveCluster() bool { + return v != nil && v.DefaultActiveCluster != nil +} -func (v _List_DescribeDomainResponse_ValueList) ForEach(f func(wire.Value) error) error { +type ListFailoverHistoryResponse struct { + FailoverEvents []*FailoverEvent `json:"failoverEvents,omitempty"` + NextPageToken []byte `json:"nextPageToken,omitempty"` +} + +type _List_FailoverEvent_ValueList []*FailoverEvent + +func (v _List_FailoverEvent_ValueList) ForEach(f func(wire.Value) error) error { for i, x := range v { if x == nil { - return fmt.Errorf("invalid list '[]*DescribeDomainResponse', index [%v]: value is nil", i) + return fmt.Errorf("invalid list '[]*FailoverEvent', index [%v]: value is nil", i) } w, err := x.ToWire() if err != nil { @@ -55886,17 +58678,17 @@ func (v _List_DescribeDomainResponse_ValueList) ForEach(f func(wire.Value) error return nil } -func (v _List_DescribeDomainResponse_ValueList) Size() int { +func (v _List_FailoverEvent_ValueList) Size() int { return len(v) } -func (_List_DescribeDomainResponse_ValueList) ValueType() wire.Type { +func (_List_FailoverEvent_ValueList) ValueType() wire.Type { return wire.TStruct } -func (_List_DescribeDomainResponse_ValueList) Close() {} +func (_List_FailoverEvent_ValueList) Close() {} -// ToWire translates a ListDomainsResponse struct into a Thrift-level intermediate +// ToWire translates a ListFailoverHistoryResponse struct into a Thrift-level intermediate // representation. This intermediate representation may be serialized // into bytes using a ThriftRW protocol implementation. // @@ -55911,7 +58703,7 @@ func (_List_DescribeDomainResponse_ValueList) Close() {} // if err := binaryProtocol.Encode(x, writer); err != nil { // return err // } -func (v *ListDomainsResponse) ToWire() (wire.Value, error) { +func (v *ListFailoverHistoryResponse) ToWire() (wire.Value, error) { var ( fields [2]wire.Field i int = 0 @@ -55919,8 +58711,8 @@ func (v *ListDomainsResponse) ToWire() (wire.Value, error) { err error ) - if v.Domains != nil { - w, err = wire.NewValueList(_List_DescribeDomainResponse_ValueList(v.Domains)), error(nil) + if v.FailoverEvents != nil { + w, err = wire.NewValueList(_List_FailoverEvent_ValueList(v.FailoverEvents)), error(nil) if err != nil { return w, err } @@ -55939,20 +58731,20 @@ func (v *ListDomainsResponse) ToWire() (wire.Value, error) { return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil } -func _DescribeDomainResponse_Read(w wire.Value) (*DescribeDomainResponse, error) { - var v DescribeDomainResponse +func _FailoverEvent_Read(w wire.Value) (*FailoverEvent, error) { + var v FailoverEvent err := v.FromWire(w) return &v, err } -func _List_DescribeDomainResponse_Read(l wire.ValueList) ([]*DescribeDomainResponse, error) { +func _List_FailoverEvent_Read(l wire.ValueList) ([]*FailoverEvent, error) { if l.ValueType() != wire.TStruct { return nil, nil } - o := make([]*DescribeDomainResponse, 0, l.Size()) + o := make([]*FailoverEvent, 0, l.Size()) err := l.ForEach(func(x wire.Value) error { - i, err := _DescribeDomainResponse_Read(x) + i, err := _FailoverEvent_Read(x) if err != nil { return err } @@ -55963,11 +58755,11 @@ func _List_DescribeDomainResponse_Read(l wire.ValueList) ([]*DescribeDomainRespo return o, err } -// FromWire deserializes a ListDomainsResponse struct from its Thrift-level +// FromWire deserializes a ListFailoverHistoryResponse 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 ListDomainsResponse struct +// An error is returned if we were unable to build a ListFailoverHistoryResponse struct // from the provided intermediate representation. // // x, err := binaryProtocol.Decode(reader, wire.TStruct) @@ -55975,19 +58767,19 @@ func _List_DescribeDomainResponse_Read(l wire.ValueList) ([]*DescribeDomainRespo // return nil, err // } // -// var v ListDomainsResponse +// var v ListFailoverHistoryResponse // if err := v.FromWire(x); err != nil { // return nil, err // } // return &v, nil -func (v *ListDomainsResponse) FromWire(w wire.Value) error { +func (v *ListFailoverHistoryResponse) FromWire(w wire.Value) error { var err error for _, field := range w.GetStruct().Fields { switch field.ID { case 10: if field.Value.Type() == wire.TList { - v.Domains, err = _List_DescribeDomainResponse_Read(field.Value.GetList()) + v.FailoverEvents, err = _List_FailoverEvent_Read(field.Value.GetList()) if err != nil { return err } @@ -56007,7 +58799,7 @@ func (v *ListDomainsResponse) FromWire(w wire.Value) error { return nil } -func _List_DescribeDomainResponse_Encode(val []*DescribeDomainResponse, sw stream.Writer) error { +func _List_FailoverEvent_Encode(val []*FailoverEvent, sw stream.Writer) error { lh := stream.ListHeader{ Type: wire.TStruct, @@ -56019,7 +58811,7 @@ func _List_DescribeDomainResponse_Encode(val []*DescribeDomainResponse, sw strea for i, v := range val { if v == nil { - return fmt.Errorf("invalid list '[]*DescribeDomainResponse', index [%v]: value is nil", i) + return fmt.Errorf("invalid list '[]*FailoverEvent', index [%v]: value is nil", i) } if err := v.Encode(sw); err != nil { return err @@ -56028,20 +58820,20 @@ func _List_DescribeDomainResponse_Encode(val []*DescribeDomainResponse, sw strea return sw.WriteListEnd() } -// Encode serializes a ListDomainsResponse struct directly into bytes, without going +// Encode serializes a ListFailoverHistoryResponse struct directly into bytes, without going // through an intermediary type. // -// An error is returned if a ListDomainsResponse struct could not be encoded. -func (v *ListDomainsResponse) Encode(sw stream.Writer) error { +// An error is returned if a ListFailoverHistoryResponse struct could not be encoded. +func (v *ListFailoverHistoryResponse) Encode(sw stream.Writer) error { if err := sw.WriteStructBegin(); err != nil { return err } - if v.Domains != nil { + if v.FailoverEvents != nil { if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TList}); err != nil { return err } - if err := _List_DescribeDomainResponse_Encode(v.Domains, sw); err != nil { + if err := _List_FailoverEvent_Encode(v.FailoverEvents, sw); err != nil { return err } if err := sw.WriteFieldEnd(); err != nil { @@ -56064,13 +58856,13 @@ func (v *ListDomainsResponse) Encode(sw stream.Writer) error { return sw.WriteStructEnd() } -func _DescribeDomainResponse_Decode(sr stream.Reader) (*DescribeDomainResponse, error) { - var v DescribeDomainResponse +func _FailoverEvent_Decode(sr stream.Reader) (*FailoverEvent, error) { + var v FailoverEvent err := v.Decode(sr) return &v, err } -func _List_DescribeDomainResponse_Decode(sr stream.Reader) ([]*DescribeDomainResponse, error) { +func _List_FailoverEvent_Decode(sr stream.Reader) ([]*FailoverEvent, error) { lh, err := sr.ReadListBegin() if err != nil { return nil, err @@ -56085,9 +58877,9 @@ func _List_DescribeDomainResponse_Decode(sr stream.Reader) ([]*DescribeDomainRes return nil, sr.ReadListEnd() } - o := make([]*DescribeDomainResponse, 0, lh.Length) + o := make([]*FailoverEvent, 0, lh.Length) for i := 0; i < lh.Length; i++ { - v, err := _DescribeDomainResponse_Decode(sr) + v, err := _FailoverEvent_Decode(sr) if err != nil { return nil, err } @@ -56100,12 +58892,12 @@ func _List_DescribeDomainResponse_Decode(sr stream.Reader) ([]*DescribeDomainRes return o, err } -// Decode deserializes a ListDomainsResponse struct directly from its Thrift-level +// Decode deserializes a ListFailoverHistoryResponse struct directly from its Thrift-level // representation, without going through an intemediary type. // -// An error is returned if a ListDomainsResponse struct could not be generated from the wire +// An error is returned if a ListFailoverHistoryResponse struct could not be generated from the wire // representation. -func (v *ListDomainsResponse) Decode(sr stream.Reader) error { +func (v *ListFailoverHistoryResponse) Decode(sr stream.Reader) error { if err := sr.ReadStructBegin(); err != nil { return err @@ -56119,7 +58911,7 @@ func (v *ListDomainsResponse) Decode(sr stream.Reader) error { for ok { switch { case fh.ID == 10 && fh.Type == wire.TList: - v.Domains, err = _List_DescribeDomainResponse_Decode(sr) + v.FailoverEvents, err = _List_FailoverEvent_Decode(sr) if err != nil { return err } @@ -56152,17 +58944,17 @@ func (v *ListDomainsResponse) Decode(sr stream.Reader) error { return nil } -// String returns a readable string representation of a ListDomainsResponse +// String returns a readable string representation of a ListFailoverHistoryResponse // struct. -func (v *ListDomainsResponse) String() string { +func (v *ListFailoverHistoryResponse) String() string { if v == nil { return "" } var fields [2]string i := 0 - if v.Domains != nil { - fields[i] = fmt.Sprintf("Domains: %v", v.Domains) + if v.FailoverEvents != nil { + fields[i] = fmt.Sprintf("FailoverEvents: %v", v.FailoverEvents) i++ } if v.NextPageToken != nil { @@ -56170,10 +58962,10 @@ func (v *ListDomainsResponse) String() string { i++ } - return fmt.Sprintf("ListDomainsResponse{%v}", strings.Join(fields[:i], ", ")) + return fmt.Sprintf("ListFailoverHistoryResponse{%v}", strings.Join(fields[:i], ", ")) } -func _List_DescribeDomainResponse_Equals(lhs, rhs []*DescribeDomainResponse) bool { +func _List_FailoverEvent_Equals(lhs, rhs []*FailoverEvent) bool { if len(lhs) != len(rhs) { return false } @@ -56188,17 +58980,17 @@ func _List_DescribeDomainResponse_Equals(lhs, rhs []*DescribeDomainResponse) boo return true } -// Equals returns true if all the fields of this ListDomainsResponse match the -// provided ListDomainsResponse. +// Equals returns true if all the fields of this ListFailoverHistoryResponse match the +// provided ListFailoverHistoryResponse. // // This function performs a deep comparison. -func (v *ListDomainsResponse) Equals(rhs *ListDomainsResponse) bool { +func (v *ListFailoverHistoryResponse) Equals(rhs *ListFailoverHistoryResponse) bool { if v == nil { return rhs == nil } else if rhs == nil { return false } - if !((v.Domains == nil && rhs.Domains == nil) || (v.Domains != nil && rhs.Domains != nil && _List_DescribeDomainResponse_Equals(v.Domains, rhs.Domains))) { + if !((v.FailoverEvents == nil && rhs.FailoverEvents == nil) || (v.FailoverEvents != nil && rhs.FailoverEvents != nil && _List_FailoverEvent_Equals(v.FailoverEvents, rhs.FailoverEvents))) { return false } if !((v.NextPageToken == nil && rhs.NextPageToken == nil) || (v.NextPageToken != nil && rhs.NextPageToken != nil && bytes.Equal(v.NextPageToken, rhs.NextPageToken))) { @@ -56208,11 +59000,11 @@ func (v *ListDomainsResponse) Equals(rhs *ListDomainsResponse) bool { return true } -type _List_DescribeDomainResponse_Zapper []*DescribeDomainResponse +type _List_FailoverEvent_Zapper []*FailoverEvent // MarshalLogArray implements zapcore.ArrayMarshaler, enabling -// fast logging of _List_DescribeDomainResponse_Zapper. -func (l _List_DescribeDomainResponse_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) { +// fast logging of _List_FailoverEvent_Zapper. +func (l _List_FailoverEvent_Zapper) MarshalLogArray(enc zapcore.ArrayEncoder) (err error) { for _, v := range l { err = multierr.Append(err, enc.AppendObject(v)) } @@ -56220,13 +59012,13 @@ func (l _List_DescribeDomainResponse_Zapper) MarshalLogArray(enc zapcore.ArrayEn } // MarshalLogObject implements zapcore.ObjectMarshaler, enabling -// fast logging of ListDomainsResponse. -func (v *ListDomainsResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { +// fast logging of ListFailoverHistoryResponse. +func (v *ListFailoverHistoryResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { if v == nil { return nil } - if v.Domains != nil { - err = multierr.Append(err, enc.AddArray("domains", (_List_DescribeDomainResponse_Zapper)(v.Domains))) + if v.FailoverEvents != nil { + err = multierr.Append(err, enc.AddArray("failoverEvents", (_List_FailoverEvent_Zapper)(v.FailoverEvents))) } if v.NextPageToken != nil { enc.AddString("nextPageToken", base64.StdEncoding.EncodeToString(v.NextPageToken)) @@ -56234,24 +59026,24 @@ func (v *ListDomainsResponse) MarshalLogObject(enc zapcore.ObjectEncoder) (err e return err } -// GetDomains returns the value of Domains if it is set or its +// GetFailoverEvents returns the value of FailoverEvents if it is set or its // zero value if it is unset. -func (v *ListDomainsResponse) GetDomains() (o []*DescribeDomainResponse) { - if v != nil && v.Domains != nil { - return v.Domains +func (v *ListFailoverHistoryResponse) GetFailoverEvents() (o []*FailoverEvent) { + if v != nil && v.FailoverEvents != nil { + return v.FailoverEvents } return } -// IsSetDomains returns true if Domains is not nil. -func (v *ListDomainsResponse) IsSetDomains() bool { - return v != nil && v.Domains != nil +// IsSetFailoverEvents returns true if FailoverEvents is not nil. +func (v *ListFailoverHistoryResponse) IsSetFailoverEvents() bool { + return v != nil && v.FailoverEvents != nil } // GetNextPageToken returns the value of NextPageToken if it is set or its // zero value if it is unset. -func (v *ListDomainsResponse) GetNextPageToken() (o []byte) { +func (v *ListFailoverHistoryResponse) GetNextPageToken() (o []byte) { if v != nil && v.NextPageToken != nil { return v.NextPageToken } @@ -56260,7 +59052,7 @@ func (v *ListDomainsResponse) GetNextPageToken() (o []byte) { } // IsSetNextPageToken returns true if NextPageToken is not nil. -func (v *ListDomainsResponse) IsSetNextPageToken() bool { +func (v *ListFailoverHistoryResponse) IsSetNextPageToken() bool { return v != nil && v.NextPageToken != nil } @@ -58980,6 +61772,276 @@ func (v *Memo) IsSetFields() bool { return v != nil && v.Fields != nil } +type PaginationOptions struct { + PageSize *int32 `json:"pageSize,omitempty"` + NextPageToken []byte `json:"nextPageToken,omitempty"` +} + +// ToWire translates a PaginationOptions 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 *PaginationOptions) ToWire() (wire.Value, error) { + var ( + fields [2]wire.Field + i int = 0 + w wire.Value + err error + ) + + if v.PageSize != nil { + w, err = wire.NewValueI32(*(v.PageSize)), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 10, Value: w} + i++ + } + if v.NextPageToken != nil { + w, err = wire.NewValueBinary(v.NextPageToken), error(nil) + if err != nil { + return w, err + } + fields[i] = wire.Field{ID: 20, Value: w} + i++ + } + + return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil +} + +// FromWire deserializes a PaginationOptions 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 PaginationOptions struct +// from the provided intermediate representation. +// +// x, err := binaryProtocol.Decode(reader, wire.TStruct) +// if err != nil { +// return nil, err +// } +// +// var v PaginationOptions +// if err := v.FromWire(x); err != nil { +// return nil, err +// } +// return &v, nil +func (v *PaginationOptions) FromWire(w wire.Value) error { + var err error + + for _, field := range w.GetStruct().Fields { + switch field.ID { + case 10: + if field.Value.Type() == wire.TI32 { + var x int32 + x, err = field.Value.GetI32(), error(nil) + v.PageSize = &x + if err != nil { + return err + } + + } + case 20: + if field.Value.Type() == wire.TBinary { + v.NextPageToken, err = field.Value.GetBinary(), error(nil) + if err != nil { + return err + } + + } + } + } + + return nil +} + +// Encode serializes a PaginationOptions struct directly into bytes, without going +// through an intermediary type. +// +// An error is returned if a PaginationOptions struct could not be encoded. +func (v *PaginationOptions) Encode(sw stream.Writer) error { + if err := sw.WriteStructBegin(); err != nil { + return err + } + + if v.PageSize != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 10, Type: wire.TI32}); err != nil { + return err + } + if err := sw.WriteInt32(*(v.PageSize)); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + if v.NextPageToken != nil { + if err := sw.WriteFieldBegin(stream.FieldHeader{ID: 20, Type: wire.TBinary}); err != nil { + return err + } + if err := sw.WriteBinary(v.NextPageToken); err != nil { + return err + } + if err := sw.WriteFieldEnd(); err != nil { + return err + } + } + + return sw.WriteStructEnd() +} + +// Decode deserializes a PaginationOptions struct directly from its Thrift-level +// representation, without going through an intemediary type. +// +// An error is returned if a PaginationOptions struct could not be generated from the wire +// representation. +func (v *PaginationOptions) Decode(sr stream.Reader) error { + + if err := sr.ReadStructBegin(); err != nil { + return err + } + + fh, ok, err := sr.ReadFieldBegin() + if err != nil { + return err + } + + for ok { + switch { + case fh.ID == 10 && fh.Type == wire.TI32: + var x int32 + x, err = sr.ReadInt32() + v.PageSize = &x + if err != nil { + return err + } + + case fh.ID == 20 && fh.Type == wire.TBinary: + v.NextPageToken, err = sr.ReadBinary() + if err != nil { + return err + } + + default: + if err := sr.Skip(fh.Type); err != nil { + return err + } + } + + if err := sr.ReadFieldEnd(); err != nil { + return err + } + + if fh, ok, err = sr.ReadFieldBegin(); err != nil { + return err + } + } + + if err := sr.ReadStructEnd(); err != nil { + return err + } + + return nil +} + +// String returns a readable string representation of a PaginationOptions +// struct. +func (v *PaginationOptions) String() string { + if v == nil { + return "" + } + + var fields [2]string + i := 0 + if v.PageSize != nil { + fields[i] = fmt.Sprintf("PageSize: %v", *(v.PageSize)) + i++ + } + if v.NextPageToken != nil { + fields[i] = fmt.Sprintf("NextPageToken: %v", v.NextPageToken) + i++ + } + + return fmt.Sprintf("PaginationOptions{%v}", strings.Join(fields[:i], ", ")) +} + +// Equals returns true if all the fields of this PaginationOptions match the +// provided PaginationOptions. +// +// This function performs a deep comparison. +func (v *PaginationOptions) Equals(rhs *PaginationOptions) bool { + if v == nil { + return rhs == nil + } else if rhs == nil { + return false + } + if !_I32_EqualsPtr(v.PageSize, rhs.PageSize) { + return false + } + if !((v.NextPageToken == nil && rhs.NextPageToken == nil) || (v.NextPageToken != nil && rhs.NextPageToken != nil && bytes.Equal(v.NextPageToken, rhs.NextPageToken))) { + return false + } + + return true +} + +// MarshalLogObject implements zapcore.ObjectMarshaler, enabling +// fast logging of PaginationOptions. +func (v *PaginationOptions) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) { + if v == nil { + return nil + } + if v.PageSize != nil { + enc.AddInt32("pageSize", *v.PageSize) + } + if v.NextPageToken != nil { + enc.AddString("nextPageToken", base64.StdEncoding.EncodeToString(v.NextPageToken)) + } + return err +} + +// GetPageSize returns the value of PageSize if it is set or its +// zero value if it is unset. +func (v *PaginationOptions) GetPageSize() (o int32) { + if v != nil && v.PageSize != nil { + return *v.PageSize + } + + return +} + +// IsSetPageSize returns true if PageSize is not nil. +func (v *PaginationOptions) IsSetPageSize() bool { + return v != nil && v.PageSize != nil +} + +// GetNextPageToken returns the value of NextPageToken if it is set or its +// zero value if it is unset. +func (v *PaginationOptions) GetNextPageToken() (o []byte) { + if v != nil && v.NextPageToken != nil { + return v.NextPageToken + } + + return +} + +// IsSetNextPageToken returns true if NextPageToken is not nil. +func (v *PaginationOptions) IsSetNextPageToken() bool { + return v != nil && v.NextPageToken != nil +} + type ParentClosePolicy int32 const ( @@ -116430,8 +119492,8 @@ var ThriftModule = &thriftreflect.ThriftModule{ Name: "shared", Package: "github.com/uber/cadence/.gen/go/shared", FilePath: "shared.thrift", - SHA1: "f6ba7719fb3d987d5173da1b1a6a19f0ce1927c2", + SHA1: "c012042c13930afa61e6fe6889afae994827c2a2", 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 4: required list activeClusters // todo(david.porter) remove as its disused\n}\n\nexception ServiceBusyError {\n 1: required string message\n 2: optional string reason\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 5: required list activeClusters // todo (david.porter) remove this field as it's disused\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\nexception TaskListNotOwnedByHostError {\n 1: required string ownedByIdentity\n 2: required string myIdentity\n 3: required string tasklistName\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 WORKFLOW_ALREADY_COMPLETED,\n}\n\nenum SignalExternalWorkflowExecutionFailedCause {\n UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION,\n WORKFLOW_ALREADY_COMPLETED,\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 EPHEMERAL,\n}\n\nenum ArchivalStatus {\n DISABLED,\n ENABLED,\n}\n\nenum CronOverlapPolicy {\n SKIPPED,\n BUFFERONE,\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 121: optional TaskList taskListInfo\n 130: optional bool isCron\n 140: optional i64 (js.type = \"Long\") updateTime\n 150: optional map partitionConfig\n 160: optional CronOverlapPolicy cronOverlapPolicy\n 170: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 170: optional CronOverlapPolicy cronOverlapPolicy\n 180: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 160: optional CronOverlapPolicy cronOverlapPolicy\n 170: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 160: optional string requestId\n 170: optional CronOverlapPolicy cronOverlapPolicy\n 180: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 160: optional CronOverlapPolicy cronOverlapPolicy\n 170: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 90: optional string requestId\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 100: optional string requestId\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 50: optional string requestId\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 40: optional string requestId\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 190: optional i64 (js.type = \"Long\") firstRunAtTimestamp\n 200: optional CronOverlapPolicy cronOverlapPolicy\n 210: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 // activeClusterName is the name of the active cluster for active-passive domain\n 10: optional string activeClusterName\n\n // clusters is list of all active and passive clusters of domain\n 20: optional list clusters\n\n // activeClusters contains active cluster(s) information for active-active domain\n 30: optional ActiveClusters activeClusters\n}\n\n// ClusterAttributeScope is a mapping of the cluster atribute to the scope's\n// current stae and failover version, indicating how recently the change was made\nstruct ClusterAttributeScope {\n 10: optional map clusterAttributes;\n}\n\n// activeClustersByClusterAttribute is a map of whatever subdivision of the domain chosen\n// to active cluster info for active-active domains. The key refers to the type of\n// cluster attribute and the value refers to its cluster mappings.\n// \n// For example, a request to update the domain for two locations\n// \n// UpdateDomainRequest{\n// ReplicationConfiguration: {\n// ActiveClusters: {\n// ActiveClustersByClusterAttribute: {\n// \"location\": ClusterAttributeScope{\n// \"Tokyo\": {ActiveClusterInfo: \"cluster0, FailoverVersion: 123}, \n// \"Morocco\": {ActiveClusterInfo: \"cluster1\", FailoverVersion: 100}, \n// }\n// }\n// }\n// }\n// }\nstruct ActiveClusters {\n 10: optional map activeClustersByRegion // todo (david.porter) remove this as it's no longer used\n 11: optional map activeClustersByClusterAttribute\n}\n\n// ActiveClusterInfo contains the configuration of active-active domain's active\n// cluster & failover version for a specific region\nstruct ActiveClusterInfo {\n 10: optional string activeClusterName\n 20: optional i64 (js.type = \"Long\") failoverVersion\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 // todo (david.porter) remove this field as it's not going to be used\n 75: optional map activeClustersByRegion\n // activeClusters is a map of cluster-attribute name to active cluster name for active-active domain\n 76: optional ActiveClusters activeClusters\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 FailoverDomainRequest {\n 10: optional string domainName\n 20: optional string domainActiveClusterName\n // only applicable to active-active domains where \n // specific cluster-attributes are being failed over\n 30: optional ActiveClusters activeClusters\n}\n\nstruct FailoverDomainResponse {\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 DeleteDomainRequest {\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 180: optional i64 (js.type = \"Long\") firstRunAtTimestamp\n 190: optional CronOverlapPolicy cronOverlapPolicy\n 200: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 DiagnoseWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional WorkflowExecution workflowExecution\n 30: optional string identity\n}\n\nstruct DiagnoseWorkflowExecutionResponse {\n 10: optional string domain\n 20: optional WorkflowExecution diagnosticWorkflowExecution\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 150: optional AutoConfigHint autoConfigHint\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 180: optional AutoConfigHint autoConfigHint\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 80: optional QueryConsistencyLevel queryConsistencyLevel\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 200: optional i64 (js.type = \"Long\") firstRunAtTimestamp\n 210: optional CronOverlapPolicy cronOverlapPolicy\n 220: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 30: optional QueryConsistencyLevel queryConsistencyLevel\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 150: optional i64 (js.type = \"Long\") scheduleID\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 60: optional i64 (js.type = \"Long\") scheduleID\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 // The TaskList being described\n 30: optional TaskList taskList\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 IsolationGroupMetrics {\n 10: optional double newTasksPerSecond\n 20: optional i64 (js.type = \"Long\") pollerCount\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 50: optional map isolationGroupMetrics\n 60: optional double newTasksPerSecond\n 70: optional bool empty\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\n/**\n* Any is a logical duplicate of google.protobuf.Any.\n*\n* The intent of the type is the same, but it is not intended to be directly\n* compatible with google.protobuf.Any or any Thrift equivalent - this blob is\n* RPC-type agnostic by design (as the underlying data may be transported over\n* proto or thrift), and the data-bytes may be in any encoding.\n*\n* This is intentionally different from DataBlob, which supports only a handful\n* of known encodings so it can be interpreted everywhere. Any supports literally\n* any contents, and needs to be considered opaque until it is given to something\n* that is expecting it.\n*\n* See ValueType to interpret the contents.\n**/\nstruct Any {\n // Type-string describing value's contents, and intentionally avoiding the\n // name \"type\" as it is often a special term.\n // This should usually be a hard-coded string of some kind.\n 10: optional string ValueType\n // Arbitrarily-encoded bytes, to be deserialized by a runtime implementation.\n // The contents are described by ValueType.\n 20: optional binary Value\n}\n\nstruct AutoConfigHint {\n 10: optional bool enableAutoConfig\n 20: optional i64 pollerWaitTimeInMs\n}\n\nstruct QueueState {\n 10: optional map virtualQueueStates\n 20: optional TaskKey exclusiveMaxReadLevel\n}\n\nstruct VirtualQueueState {\n 10: optional list virtualSliceStates\n}\n\nstruct VirtualSliceState {\n 10: optional TaskRange taskRange\n 20: optional Predicate predicate\n}\n\nstruct TaskRange {\n 10: optional TaskKey inclusiveMin\n 20: optional TaskKey exclusiveMax\n}\n\nstruct TaskKey {\n 10: optional i64 scheduledTimeNano\n 20: optional i64 taskID\n}\n\n// ActiveClusterSelectionPolicy is for active-active domains, it serves as a means to select\n// the active cluster, by specifying the attribute by which to divide the workflows\n// in that domain.\nstruct ActiveClusterSelectionPolicy {\n 1: optional ClusterAttribute clusterAttribute\n\n 10: optional ActiveClusterSelectionStrategy strategy // todo (david.porter) remove these as they're not used anymore\n 20: optional string stickyRegion // todo (david.porter) remove these as they're not used anymore\n 30: optional string externalEntityType // todo (david.porter) remove these as they're not used anymore\n 40: optional string externalEntityKey // todo (david.porter) remove these as they're not used anymore\n}\n\n// ClusterAttribute is used for subdividing workflows in a domain into their active\n// and passive clusters. Examples of this might be 'region' and 'cluster1' as\n// respective region and scope fields.\n// \n// for example, a workflow may specify this in it's start request:\n// \n// StartWorkflowRequest{\n// ActiveClusterSelectionPolicy: {\n// ClusterAttribute: {\n// Scope: \"cityID\",\n// Name: \"Lisbon\" \n// }\n// }\n// }\n// \n// and this means that this workflow will be associate with the domain's cluster attribute 'Lisbon',\n// be active in the cluster that has Lisbon active and \n// failover when that cluster-attribute is set to failover.\nstruct ClusterAttribute {\n 1: optional string scope\n 2: optional string name\n}\n\n// todo (david.porter) Remove this, as it's no longer needed\n// with the active/active configuration we have\nenum ActiveClusterSelectionStrategy {\n REGION_STICKY,\n EXTERNAL_ENTITY,\n}\n\nenum PredicateType {\n Universal,\n Empty,\n DomainID,\n}\n\nstruct UniversalPredicateAttributes {}\n\nstruct EmptyPredicateAttributes {}\n\nstruct DomainIDPredicateAttributes {\n 10: optional list domainIDs\n 20: optional bool isExclusive\n}\n\nstruct Predicate {\n 10: optional PredicateType predicateType\n 20: optional UniversalPredicateAttributes universalPredicateAttributes\n 30: optional EmptyPredicateAttributes emptyPredicateAttributes\n 40: optional DomainIDPredicateAttributes domainIDPredicateAttributes\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 4: required list activeClusters // todo(david.porter) remove as its disused\n}\n\nexception ServiceBusyError {\n 1: required string message\n 2: optional string reason\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 5: required list activeClusters // todo (david.porter) remove this field as it's disused\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\nexception TaskListNotOwnedByHostError {\n 1: required string ownedByIdentity\n 2: required string myIdentity\n 3: required string tasklistName\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 WORKFLOW_ALREADY_COMPLETED,\n}\n\nenum SignalExternalWorkflowExecutionFailedCause {\n UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION,\n WORKFLOW_ALREADY_COMPLETED,\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 EPHEMERAL,\n}\n\nenum ArchivalStatus {\n DISABLED,\n ENABLED,\n}\n\nenum CronOverlapPolicy {\n SKIPPED,\n BUFFERONE,\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 121: optional TaskList taskListInfo\n 130: optional bool isCron\n 140: optional i64 (js.type = \"Long\") updateTime\n 150: optional map partitionConfig\n 160: optional CronOverlapPolicy cronOverlapPolicy\n 170: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 170: optional CronOverlapPolicy cronOverlapPolicy\n 180: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 160: optional CronOverlapPolicy cronOverlapPolicy\n 170: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 160: optional string requestId\n 170: optional CronOverlapPolicy cronOverlapPolicy\n 180: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 160: optional CronOverlapPolicy cronOverlapPolicy\n 170: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 90: optional string requestId\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 100: optional string requestId\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 50: optional string requestId\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 40: optional string requestId\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 190: optional i64 (js.type = \"Long\") firstRunAtTimestamp\n 200: optional CronOverlapPolicy cronOverlapPolicy\n 210: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 // activeClusterName is the name of the active cluster for active-passive domain\n 10: optional string activeClusterName\n\n // clusters is list of all active and passive clusters of domain\n 20: optional list clusters\n\n // activeClusters contains active cluster(s) information for active-active domain\n 30: optional ActiveClusters activeClusters\n}\n\n// ClusterAttributeScope is a mapping of the cluster atribute to the scope's\n// current stae and failover version, indicating how recently the change was made\nstruct ClusterAttributeScope {\n 10: optional map clusterAttributes;\n}\n\n// activeClustersByClusterAttribute is a map of whatever subdivision of the domain chosen\n// to active cluster info for active-active domains. The key refers to the type of\n// cluster attribute and the value refers to its cluster mappings.\n//\n// For example, a request to update the domain for two locations\n//\n// UpdateDomainRequest{\n// ReplicationConfiguration: {\n// ActiveClusters: {\n// ActiveClustersByClusterAttribute: {\n// \"location\": ClusterAttributeScope{\n// \"Tokyo\": {ActiveClusterInfo: \"cluster0, FailoverVersion: 123},\n// \"Morocco\": {ActiveClusterInfo: \"cluster1\", FailoverVersion: 100},\n// }\n// }\n// }\n// }\n// }\nstruct ActiveClusters {\n 10: optional map activeClustersByRegion // todo (david.porter) remove this as it's no longer used\n 11: optional map activeClustersByClusterAttribute\n}\n\n// ActiveClusterInfo contains the configuration of active-active domain's active\n// cluster & failover version for a specific region\nstruct ActiveClusterInfo {\n 10: optional string activeClusterName\n 20: optional i64 (js.type = \"Long\") failoverVersion\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 // todo (david.porter) remove this field as it's not going to be used\n 75: optional map activeClustersByRegion\n // activeClusters is a map of cluster-attribute name to active cluster name for active-active domain\n 76: optional ActiveClusters activeClusters\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 FailoverDomainRequest {\n 10: optional string domainName\n 20: optional string domainActiveClusterName\n // only applicable to active-active domains where \n // specific cluster-attributes are being failed over\n 30: optional ActiveClusters activeClusters\n}\n\nstruct FailoverDomainResponse {\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 DeleteDomainRequest {\n 10: optional string name\n 20: optional string securityToken\n}\n\nstruct ListFailoverHistoryRequest {\n // ListFailoverHistoryRequestFilters specifies the filters to apply to the request.\n // If not provided all failover events will be returned.\n 10: optional ListFailoverHistoryRequestFilters filters\n // PaginationOptions will be used to paginate the results.\n // If not provided the first 5 events will be returned.\n 20: optional PaginationOptions pagination\n}\n\nstruct ListFailoverHistoryRequestFilters {\n // domain_id is the id of the domain to list failover history for.\n 10: optional string domainID\n // attributes specifies every attribute type that should be returned on the request. If none are specified, defaults to all ClusterAttributes.\n // If multiple attributes are specified all failover events containing any of the attributes will be returned.\n 20: optional list attributes\n // default_active_cluster: when true, retrieves the domain wide ActiveClusterName failover events.\n 30: optional bool defaultActiveCluster\n}\n\nstruct ListFailoverHistoryResponse {\n 10: optional list failoverEvents\n // next_page_token can be passed in a subsequent request to fetch the next set of events.\n 20: optional binary nextPageToken\n}\n\nstruct FailoverEvent {\n // id of the failover event\n // Can be passed with the created time to fetch a specific event.\n 10: optional string id\n // created_time is the time the failover event was created.\n // Can be passed with the ID to fetch a specific event.\n 20: optional i64 (js.type = \"Long\") createdTime\n 30: optional FailoverType failoverType\n}\n\nstruct ClusterFailover {\n 10: optional ActiveClusterInfo fromCluster\n 20: optional ActiveClusterInfo toCluster\n // cluster_attribute is the scope and name for the attribute that was failed over.\n // It will not be defined when is_default_cluster is true.\n 30: optional ClusterAttribute clusterAttribute\n // If the failover was for the default domain-wide active cluster name.\n 40: optional bool isDefaultCluster\n}\n\n// GetFailoverEventRequest is used to fetch a specific failover event by id and created time.\nstruct GetFailoverEventRequest {\n 10: optional string domainID\n 20: optional string failoverEventID\n 30: optional i64 (js.type = \"Long\") createdTime\n}\n\n// GetFailoverEventResponse contains the cluster failovers that occurred as part of the failover event.\n// It may be a large response if 1000s of ClusterAttributes were failed over as part of the event.\nstruct GetFailoverEventResponse {\n 10: optional list clusterFailovers\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 180: optional i64 (js.type = \"Long\") firstRunAtTimestamp\n 190: optional CronOverlapPolicy cronOverlapPolicy\n 200: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 DiagnoseWorkflowExecutionRequest {\n 10: optional string domain\n 20: optional WorkflowExecution workflowExecution\n 30: optional string identity\n}\n\nstruct DiagnoseWorkflowExecutionResponse {\n 10: optional string domain\n 20: optional WorkflowExecution diagnosticWorkflowExecution\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 150: optional AutoConfigHint autoConfigHint\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 180: optional AutoConfigHint autoConfigHint\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 80: optional QueryConsistencyLevel queryConsistencyLevel\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 200: optional i64 (js.type = \"Long\") firstRunAtTimestamp\n 210: optional CronOverlapPolicy cronOverlapPolicy\n 220: optional ActiveClusterSelectionPolicy activeClusterSelectionPolicy\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 30: optional QueryConsistencyLevel queryConsistencyLevel\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 150: optional i64 (js.type = \"Long\") scheduleID\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 60: optional i64 (js.type = \"Long\") scheduleID\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 // The TaskList being described\n 30: optional TaskList taskList\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 IsolationGroupMetrics {\n 10: optional double newTasksPerSecond\n 20: optional i64 (js.type = \"Long\") pollerCount\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 50: optional map isolationGroupMetrics\n 60: optional double newTasksPerSecond\n 70: optional bool empty\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\n/**\n* Any is a logical duplicate of google.protobuf.Any.\n*\n* The intent of the type is the same, but it is not intended to be directly\n* compatible with google.protobuf.Any or any Thrift equivalent - this blob is\n* RPC-type agnostic by design (as the underlying data may be transported over\n* proto or thrift), and the data-bytes may be in any encoding.\n*\n* This is intentionally different from DataBlob, which supports only a handful\n* of known encodings so it can be interpreted everywhere. Any supports literally\n* any contents, and needs to be considered opaque until it is given to something\n* that is expecting it.\n*\n* See ValueType to interpret the contents.\n**/\nstruct Any {\n // Type-string describing value's contents, and intentionally avoiding the\n // name \"type\" as it is often a special term.\n // This should usually be a hard-coded string of some kind.\n 10: optional string ValueType\n // Arbitrarily-encoded bytes, to be deserialized by a runtime implementation.\n // The contents are described by ValueType.\n 20: optional binary Value\n}\n\nstruct AutoConfigHint {\n 10: optional bool enableAutoConfig\n 20: optional i64 pollerWaitTimeInMs\n}\n\nstruct QueueState {\n 10: optional map virtualQueueStates\n 20: optional TaskKey exclusiveMaxReadLevel\n}\n\nstruct VirtualQueueState {\n 10: optional list virtualSliceStates\n}\n\nstruct VirtualSliceState {\n 10: optional TaskRange taskRange\n 20: optional Predicate predicate\n}\n\nstruct TaskRange {\n 10: optional TaskKey inclusiveMin\n 20: optional TaskKey exclusiveMax\n}\n\nstruct TaskKey {\n 10: optional i64 scheduledTimeNano\n 20: optional i64 taskID\n}\n\n// ActiveClusterSelectionPolicy is for active-active domains, it serves as a means to select\n// the active cluster, by specifying the attribute by which to divide the workflows\n// in that domain.\nstruct ActiveClusterSelectionPolicy {\n 1: optional ClusterAttribute clusterAttribute\n\n 10: optional ActiveClusterSelectionStrategy strategy // todo (david.porter) remove these as they're not used anymore\n 20: optional string stickyRegion // todo (david.porter) remove these as they're not used anymore\n 30: optional string externalEntityType // todo (david.porter) remove these as they're not used anymore\n 40: optional string externalEntityKey // todo (david.porter) remove these as they're not used anymore\n}\n\n// ClusterAttribute is used for subdividing workflows in a domain into their active\n// and passive clusters. Examples of this might be 'region' and 'cluster1' as\n// respective region and scope fields.\n//\n// for example, a workflow may specify this in it's start request:\n//\n// StartWorkflowRequest{\n// ActiveClusterSelectionPolicy: {\n// ClusterAttribute: {\n// Scope: \"cityID\",\n// Name: \"Lisbon\"\n// }\n// }\n// }\n//\n// and this means that this workflow will be associate with the domain's cluster attribute 'Lisbon',\n// be active in the cluster that has Lisbon active and\n// failover when that cluster-attribute is set to failover.\nstruct ClusterAttribute {\n 1: optional string scope\n 2: optional string name\n}\n\n// FailoverType describes how a failover operation will be performed.\nenum FailoverType {\n INVALID,\n FORCE,\n GRACEFUL,\n}\n\n// PaginationOptions provides common options for paginated RPCs.\nstruct PaginationOptions {\n // page_size configures the number of results to be returned as part of each page\n 10: optional i32 pageSize\n // next_page_token should be provided from a previous response to fetch the next page.\n // if empty, the first page will be returned.\n 20: optional binary nextPageToken\n}\n\n// todo (david.porter) Remove this, as it's no longer needed\n// with the active/active configuration we have\nenum ActiveClusterSelectionStrategy {\n REGION_STICKY,\n EXTERNAL_ENTITY,\n}\n\nenum PredicateType {\n Universal,\n Empty,\n DomainID,\n}\n\nstruct UniversalPredicateAttributes {}\n\nstruct EmptyPredicateAttributes {}\n\nstruct DomainIDPredicateAttributes {\n 10: optional list domainIDs\n 20: optional bool isExclusive\n}\n\nstruct Predicate {\n 10: optional PredicateType predicateType\n 20: optional UniversalPredicateAttributes universalPredicateAttributes\n 30: optional EmptyPredicateAttributes emptyPredicateAttributes\n 40: optional DomainIDPredicateAttributes domainIDPredicateAttributes\n}\n" diff --git a/.gen/proto/history/v1/service.pb.yarpc.go b/.gen/proto/history/v1/service.pb.yarpc.go index 047196ef79a..e4f4882de60 100644 --- a/.gen/proto/history/v1/service.pb.yarpc.go +++ b/.gen/proto/history/v1/service.pb.yarpc.go @@ -2747,91 +2747,97 @@ var yarpcFileDescriptorClosurefee8ff76963a38ed = [][]byte{ }, // uber/cadence/api/v1/common.proto []byte{ - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x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 0x63, 0x45, 0xfe, 0x6c, 0x40, 0xae, 0x49, 0x89, 0x70, 0xdf, 0x55, 0xa4, - 0x14, 0xac, 0x15, 0x49, 0x1a, 0x22, 0x07, 0x96, 0x59, 0xe0, 0xd1, 0x0b, 0xea, 0x39, 0x63, 0xb2, - 0x5f, 0x4c, 0x8c, 0x7a, 0x95, 0x5e, 0xb4, 0x12, 0xee, 0x68, 0x1e, 0x37, 0xd8, 0xa8, 0x6d, 0xfd, - 0x73, 0x40, 0xbf, 0x05, 0xfd, 0x8e, 0x59, 0xb5, 0x61, 0x61, 0x9f, 0x48, 0xb2, 0xe7, 0xf3, 0x16, - 0x3a, 0x80, 0x1b, 0x34, 0x70, 0xb9, 0xc7, 0x82, 0x8e, 0x23, 0x07, 0xbd, 0xe4, 0x82, 0x2e, 0x97, - 0xb7, 0x26, 0xc6, 0x32, 0x35, 0x32, 0xbe, 0xd1, 0x78, 0x89, 0x8e, 0xac, 0x86, 0x17, 0x78, 0x66, - 0xe4, 0x02, 0x37, 0x92, 0xa2, 0xa3, 0xe2, 0x2d, 0x15, 0x21, 0xe3, 0x81, 0x15, 0xb4, 0x79, 0x0c, - 0x64, 0xdd, 0x9e, 0x9f, 0x16, 0x42, 0xfc, 0x8c, 0x9e, 0xc0, 0x4a, 0x9b, 0x12, 0x19, 0x09, 0xea, - 0xf4, 0x13, 0xa8, 0x2e, 0xb8, 0x65, 0x6d, 0xd6, 0x01, 0x0a, 0xc7, 0x70, 0xa7, 0x19, 0xf5, 0x7a, - 0x5c, 0x48, 0xea, 0x55, 0x7d, 0x46, 0x03, 0xa9, 0x3d, 0x61, 0x5c, 0xab, 0x1d, 0xee, 0x84, 0xde, - 0xb9, 0x8e, 0x3c, 0xdb, 0xe1, 0x4d, 0xef, 0x1c, 0xdd, 0x85, 0x85, 0x2f, 0x48, 0x9f, 0x28, 0x47, - 0x12, 0x73, 0x3e, 0x5e, 0x37, 0xbd, 0xf3, 0xc2, 0xd7, 0x19, 0xc8, 0x62, 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 0xb8, 0x04, 0xb2, 0x69, 0xe8, 0x67, 0x85, 0x20, 0x7f, 0xa3, 0x8f, 0x61, 0x6f, 0x44, 0x89, 0x48, + 0x22, 0xea, 0xcc, 0x52, 0xa8, 0x2e, 0xb8, 0x7b, 0xda, 0xac, 0x03, 0x54, 0x5f, 0xc3, 0xa3, 0x41, + 0x12, 0x86, 0x3c, 0x12, 0xd4, 0x6b, 0xf9, 0x8c, 0x06, 0x42, 0x7b, 0x62, 0x59, 0xab, 0x63, 0xee, + 0xc4, 0xde, 0x44, 0x47, 0x2e, 0x8c, 0xf9, 0xc0, 0x9b, 0xa0, 0xc7, 0xb0, 0xf3, 0x7b, 0x32, 0x23, + 0xca, 0x91, 0xc6, 0xdc, 0x96, 0xeb, 0x81, 0x37, 0xa9, 0xfe, 0x29, 0x0f, 0x45, 0x4c, 0x45, 0x34, + 0xef, 0x73, 0x9f, 0xb9, 0x73, 0x74, 0x0a, 0x65, 0x16, 0x30, 0xc1, 0x88, 0xef, 0xb0, 0x40, 0xd0, + 0x68, 0x46, 0x52, 0x95, 0xc5, 0xc6, 0xe3, 0x5a, 0xda, 0x5e, 0x6a, 0x59, 0x7b, 0xa9, 0x9d, 0xea, + 0xf6, 0x82, 0xf7, 0x34, 0xc5, 0xd2, 0x0c, 0x54, 0x87, 0x83, 0x21, 0x71, 0x27, 0x7c, 0x34, 0x72, + 0x5c, 0x4e, 0x47, 0x23, 0xe6, 0x4a, 0x99, 0x6a, 0x6f, 0x03, 0x23, 0xed, 0x6a, 0xdd, 0x78, 0xe4, + 0xb6, 0x53, 0x72, 0xcd, 0xa6, 0xc9, 0xf4, 0x66, 0xdb, 0xfc, 0xc6, 0x6d, 0x35, 0x65, 0xb1, 0xed, + 0x27, 0x37, 0x51, 0x88, 0x10, 0x74, 0x1a, 0x8a, 0xb8, 0x72, 0xe7, 0xc8, 0x38, 0x2e, 0x2c, 0xa0, + 0x4d, 0x6d, 0x46, 0x5f, 0xc0, 0x93, 0x80, 0x07, 0x4e, 0x24, 0x53, 0x27, 0x43, 0x9f, 0x3a, 0x34, + 0x8a, 0x78, 0xe4, 0xa4, 0x2d, 0x25, 0xae, 0x14, 0x8e, 0xf2, 0xc7, 0xbb, 0xb8, 0x12, 0xf0, 0x00, + 0x67, 0x08, 0x53, 0x02, 0x70, 0xea, 0x47, 0x5f, 0xc2, 0x01, 0xbd, 0x0e, 0x59, 0x2a, 0xe4, 0x46, + 0xf2, 0xd6, 0x26, 0xc9, 0xe8, 0x86, 0x95, 0xa9, 0xae, 0x4e, 0xe1, 0x91, 0x15, 0x73, 0x5f, 0x19, + 0xcf, 0x22, 0x9e, 0x84, 0x7d, 0x12, 0x09, 0xa6, 0x9a, 0xf3, 0x9a, 0x86, 0x89, 0x7e, 0x01, 0x85, + 0x58, 0x10, 0x91, 0x3e, 0xf8, 0x7b, 0x8d, 0xe3, 0xb5, 0x8f, 0x74, 0x35, 0xe0, 0x40, 0xe2, 0x71, + 0x4a, 0xab, 0xce, 0xe0, 0xc9, 0xaa, 0xb7, 0xc5, 0x83, 0x11, 0x1b, 0x6b, 0x85, 0xe8, 0x12, 0xca, + 0x2c, 0x73, 0x3b, 0x63, 0xe9, 0xcf, 0x4a, 0xfb, 0x87, 0xdf, 0x63, 0xa7, 0x85, 0x74, 0xbc, 0xc7, + 0x56, 0x1c, 0x71, 0xf5, 0x9f, 0x06, 0x1c, 0x36, 0xe3, 0x79, 0xe0, 0x66, 0x63, 0x63, 0x75, 0xdf, + 0x0a, 0x6c, 0xd3, 0x40, 0x9e, 0x73, 0x3a, 0x83, 0x76, 0x70, 0xb6, 0x44, 0x0d, 0x78, 0x10, 0x46, + 0xd4, 0xa3, 0x23, 0x16, 0x50, 0xcf, 0xf9, 0x43, 0x42, 0x13, 0xea, 0xa8, 0x53, 0x49, 0x9f, 0xf2, + 0xc1, 0x8d, 0xf3, 0x37, 0xd2, 0xd7, 0x95, 0x87, 0xf4, 0x14, 0x20, 0x05, 0xaa, 0x72, 0xce, 0x2b, + 0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a9, 0xaf, 0xa2, 0xbe, 0x1c, 0xb4, 0x7d, 0xe3, 0xb7, 0x27, 0x63, 0x26, 0xbe, 0x49, 0x86, + 0x35, 0x97, 0x4f, 0xeb, 0xcb, 0xdf, 0x50, 0x9f, 0x32, 0xcf, 0xaf, 0x8f, 0x79, 0xfa, 0x65, 0xa4, + 0x3f, 0xa8, 0x3e, 0x27, 0x21, 0x9b, 0x9d, 0x0c, 0xb7, 0x94, 0xed, 0xe5, 0x7f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x11, 0xa3, 0x72, 0x20, 0x74, 0x0d, 0x00, 0x00, }, // uber/cadence/api/v1/history.proto []byte{ diff --git a/.gen/proto/indexer/v1/messages.pb.yarpc.go b/.gen/proto/indexer/v1/messages.pb.yarpc.go index 6402371b1d9..2cfbeedc554 100644 --- a/.gen/proto/indexer/v1/messages.pb.yarpc.go +++ b/.gen/proto/indexer/v1/messages.pb.yarpc.go @@ -39,91 +39,97 @@ var yarpcFileDescriptorClosure60256a432328b016 = [][]byte{ }, // uber/cadence/api/v1/common.proto []byte{ - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcd, 0x72, 0xdb, 0x46, - 0x12, 0x36, 0x44, 0xeb, 0xaf, 0x29, 0x4b, 0xd4, 0xc8, 0x3f, 0xb4, 0x6c, 0xd9, 0x12, 0x5d, 0x2e, - 0xcb, 0xae, 0x35, 0xb9, 0xa2, 0x76, 0xb7, 0x5c, 0xeb, 0xf5, 0xee, 0x52, 0x14, 0x24, 0xc1, 0xd2, - 0x92, 0xdc, 0x21, 0x6c, 0xad, 0x36, 0x55, 0x41, 0x0d, 0x81, 0x21, 0x3d, 0x11, 0x88, 0x61, 0x06, - 0x03, 0x5a, 0xbc, 0xa4, 0x72, 0x48, 0x2e, 0x79, 0x88, 0x1c, 0xf2, 0x1a, 0x79, 0x84, 0x1c, 0xf3, - 0x16, 0x79, 0x8a, 0x14, 0x06,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0xa0, 0x1e, - 0x6d, 0xb3, 0x80, 0x7a, 0xce, 0x97, 0x11, 0x8d, 0xa8, 0xa3, 0x4e, 0x25, 0xb9, 0xca, 0x6b, 0x97, - 0xce, 0xff, 0xc6, 0xbe, 0x5a, 0x7c, 0x48, 0x1b, 0x00, 0x09, 0x50, 0x95, 0x73, 0x46, 0x01, 0x17, - 0x95, 0x45, 0x15, 0xea, 0xbf, 0x61, 0x29, 0x71, 0xbb, 0x4a, 0x83, 0xba, 0x24, 0xd9, 0xf2, 0xc6, - 0xc4, 0x04, 0xd3, 0x2e, 0x81, 0xb3, 0x8a, 0x92, 0xa8, 0x2e, 0xfc, 0x92, 0x81, 0xfb, 0x6a, 0xb6, - 0xd1, 0xaa, 0x1f, 0x85, 0x92, 0x8a, 0x26, 0xf5, 0xa9, 0x1b, 0x67, 0xa2, 0x0b, 0xa9, 0x0e, 0x0b, - 0xa1, 0x14, 0x44, 0xd2, 0xce, 0x40, 0xb7, 0x93, 0xdd, 0x89, 0xe1, 0x27, 0x07, 0x69, 0x6a, 0x2a, - 0x1e, 0x06, 0x41, 0xdf, 0x18, 0xf0, 0x88, 0x28, 0xb0, 0xe3, 0x26, 0x68, 0x27, 0x94, 0xcc, 0x3d, - 0x1f, 0x38, 0x82, 0x76, 0xe2, 0x97, 0xa5, 0x73, 0x49, 0xfa, 0xe0, 0x5f, 0x3e, 0x61, 0x33, 0xc5, - 0xc6, 0x8a, 0x9c, 0x64, 0x75, 0x74, 0x0d, 0x3f, 0x24, 0x1f, 0x87, 0xa0, 0xef, 0x0c, 0x78, 0x7c, - 0x45, 0x06, 0xbd, 0x90, 0x54, 0x04, 0xc4, 0x77, 0x68, 0x20, 0x99, 0x1c, 0xa4, 0x42, 0x92, 0xfa, - 0xfd, 0xdb, 0x74, 0x21, 0xa6, 0xe6, 0x9b, 0x8a, 0x3e, 0x94, 0xb2, 0x45, 0xa6, 0x81, 0x10, 0x86, - 0xd5, 0x54, 0x04, 0x49, 0x87, 0x8b, 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0x34, + 0xef, 0x73, 0x9f, 0xb9, 0x73, 0x74, 0x0a, 0x65, 0x16, 0x30, 0xc1, 0x88, 0xef, 0xb0, 0x40, 0xd0, + 0x68, 0x46, 0x52, 0x95, 0xc5, 0xc6, 0xe3, 0x5a, 0xda, 0x5e, 0x6a, 0x59, 0x7b, 0xa9, 0x9d, 0xea, + 0xf6, 0x82, 0xf7, 0x34, 0xc5, 0xd2, 0x0c, 0x54, 0x87, 0x83, 0x21, 0x71, 0x27, 0x7c, 0x34, 0x72, + 0x5c, 0x4e, 0x47, 0x23, 0xe6, 0x4a, 0x99, 0x6a, 0x6f, 0x03, 0x23, 0xed, 0x6a, 0xdd, 0x78, 0xe4, + 0xb6, 0x53, 0x72, 0xcd, 0xa6, 0xc9, 0xf4, 0x66, 0xdb, 0xfc, 0xc6, 0x6d, 0x35, 0x65, 0xb1, 0xed, + 0x27, 0x37, 0x51, 0x88, 0x10, 0x74, 0x1a, 0x8a, 0xb8, 0x72, 0xe7, 0xc8, 0x38, 0x2e, 0x2c, 0xa0, + 0x4d, 0x6d, 0x46, 0x5f, 0xc0, 0x93, 0x80, 0x07, 0x4e, 0x24, 0x53, 0x27, 0x43, 0x9f, 0x3a, 0x34, + 0x8a, 0x78, 0xe4, 0xa4, 0x2d, 0x25, 0xae, 0x14, 0x8e, 0xf2, 0xc7, 0xbb, 0xb8, 0x12, 0xf0, 0x00, + 0x67, 0x08, 0x53, 0x02, 0x70, 0xea, 0x47, 0x5f, 0xc2, 0x01, 0xbd, 0x0e, 0x59, 0x2a, 0xe4, 0x46, + 0xf2, 0xd6, 0x26, 0xc9, 0xe8, 0x86, 0x95, 0xa9, 0xae, 0x4e, 0xe1, 0x91, 0x15, 0x73, 0x5f, 0x19, + 0xcf, 0x22, 0x9e, 0x84, 0x7d, 0x12, 0x09, 0xa6, 0x9a, 0xf3, 0x9a, 0x86, 0x89, 0x7e, 0x01, 0x85, + 0x58, 0x10, 0x91, 0x3e, 0xf8, 0x7b, 0x8d, 0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 0x3b, 0x03, 0xb3, 0x63, 0xb6, 0x54, + 0xd0, 0x81, 0x8d, 0x9b, 0xb6, 0x79, 0x76, 0xb5, 0xa4, 0xeb, 0x25, 0xd4, 0x37, 0xc3, 0xb1, 0x79, + 0x96, 0xae, 0xad, 0xd6, 0x6b, 0xa9, 0xf4, 0x27, 0x70, 0xb2, 0x99, 0x64, 0x7e, 0x65, 0x9b, 0xb8, + 0xdb, 0xec, 0x38, 0x66, 0xd7, 0xb6, 0xec, 0xab, 0x72, 0xee, 0xc5, 0xd7, 0x50, 0x92, 0xff, 0xd1, + 0xf9, 0x8c, 0x46, 0xd9, 0xb5, 0xb5, 0x9b, 0x56, 0xa7, 0x77, 0x61, 0xe2, 0xdb, 0xd7, 0xf6, 0x08, + 0x0e, 0x56, 0x5d, 0xed, 0x1e, 0x6e, 0x99, 0x65, 0x43, 0xde, 0xe7, 0xaa, 0xe3, 0x0c, 0x37, 0x5b, + 0x66, 0xfb, 0x4d, 0xa7, 0x9c, 0x7b, 0xf5, 0x3b, 0x78, 0xe4, 0xf2, 0xe9, 0xba, 0x7a, 0x7e, 0x55, + 0x6c, 0xa9, 0xaf, 0xa2, 0xbe, 0x1c, 0xb4, 0x7d, 0xe3, 0xb7, 0x27, 0x63, 0x26, 0xbe, 0x49, 0x86, + 0x35, 0x97, 0x4f, 0xeb, 0xcb, 0xdf, 0x50, 0x9f, 0x32, 0xcf, 0xaf, 0x8f, 0x79, 0xfa, 0x65, 0xa4, + 0x3f, 0xa8, 0x3e, 0x27, 0x21, 0x9b, 0x9d, 0x0c, 0xb7, 0x94, 0xed, 0xe5, 0x7f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x11, 0xa3, 0x72, 0x20, 0x74, 0x0d, 0x00, 0x00, }, // google/protobuf/duration.proto []byte{ diff --git a/.gen/proto/matching/v1/service.pb.yarpc.go b/.gen/proto/matching/v1/service.pb.yarpc.go index 5fd63b56993..cd1547b43d1 100644 --- a/.gen/proto/matching/v1/service.pb.yarpc.go +++ b/.gen/proto/matching/v1/service.pb.yarpc.go @@ -994,91 +994,97 @@ var yarpcFileDescriptorClosure826e827d3aabf7fc = [][]byte{ }, // uber/cadence/api/v1/common.proto []byte{ - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcd, 0x72, 0xdb, 0x46, - 0x12, 0x36, 0x44, 0xeb, 0xaf, 0x29, 0x4b, 0xd4, 0xc8, 0x3f, 0xb4, 0x6c, 0xd9, 0x12, 0x5d, 0x2e, - 0xcb, 0xae, 0x35, 0xb9, 0xa2, 0x76, 0xb7, 0x5c, 0xeb, 0xf5, 0xee, 0x52, 0x14, 0x24, 0xc1, 0xd2, - 0x92, 0xdc, 0x21, 0x6c, 0xad, 0x36, 0x55, 0x41, 0x0d, 0x81, 0x21, 0x3d, 0x11, 0x88, 0x61, 0x06, - 0x03, 0x5a, 0xbc, 0xa4, 0x72, 0x48, 0x2e, 0x79, 0x88, 0x1c, 0xf2, 0x1a, 0x79, 0x84, 0x1c, 0xf3, - 0x16, 0x79, 0x8a, 0x14, 0x06, 0x03, 0x8a, 0x54, 0x68, 0xd3, 0x87, 0x54, 0x6e, 0x98, 0xee, 0xef, - 0xeb, 0xf9, 0x7a, 0x30, 0xdd, 0x0d, 0xc0, 0x66, 0xd4, 0xa2, 0xa2, 0xe4, 0x12, 0x8f, 0x06, 0x2e, - 0x2d, 0x91, 0x1e, 0x2b, 0xf5, 0x77, 0x4a, 0x2e, 0xef, 0x76, 0x79, 0x50, 0xec, 0x09, 0x2e, 0x39, - 0x5a, 0x8b, 0x11, 0x45, 0x8d, 0x28, 0x92, 0x1e, 0x2b, 0xf6, 0x77, 0xd6, 0x1f, 0x74, 0x38, 0xef, - 0xf8, 0xb4, 0xa4, 0x20, 0xad, 0xa8, 0x5d, 0xf2, 0x22, 0x41, 0x24, 0x4b, 0x49, 0x85, 0x63, 0x58, - 0x3d, 0xe5, 0xe2, 0xbc, 0xed, 0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38, 0x81, 0xfe, 0x7d, 0xe6, - 0x85, 0x51, 0xf8, 0xc1, 0x80, 0xb9, 0x23, 0x4a, 0x3c, 0x2a, 0xd0, 0xbf, 0xae, 0x48, 0x7c, 0x32, - 0x31, 0x46, 0x02, 0xfe, 0x63, 0x45, 0xfe, 0x6c, 0x40, 0xae, 0x49, 0x89, 0x70, 0xdf, 0x55, 0xa4, - 0x14, 0xac, 0x15, 0x49, 0x1a, 0x22, 0x07, 0x96, 0x59, 0xe0, 0xd1, 0x0b, 0xea, 0x39, 0x63, 0xb2, - 0x5f, 0x4c, 0x8c, 0x7a, 0x95, 0x5e, 0xb4, 0x12, 0xee, 0x68, 0x1e, 0x37, 0xd8, 0xa8, 0x6d, 0xfd, - 0x73, 0x40, 0xbf, 0x05, 0xfd, 0x8e, 0x59, 0xb5, 0x61, 0x61, 0x9f, 0x48, 0xb2, 0xe7, 0xf3, 0x16, - 0x3a, 0x80, 0x1b, 0x34, 0x70, 0xb9, 0xc7, 0x82, 0x8e, 0x23, 0x07, 0xbd, 0xe4, 0x82, 0x2e, 0x97, - 0xb7, 0x26, 0xc6, 0x32, 0x35, 0x32, 0xbe, 0xd1, 0x78, 0x89, 0x8e, 0xac, 0x86, 0x17, 0x78, 0x66, - 0xe4, 0x02, 0x37, 0x92, 0xa2, 0xa3, 0xe2, 0x2d, 0x15, 0x21, 0xe3, 0x81, 0x15, 0xb4, 0x79, 0x0c, - 0x64, 0xdd, 0x9e, 0x9f, 0x16, 0x42, 0xfc, 0x8c, 0x9e, 0xc0, 0x4a, 0x9b, 0x12, 0x19, 0x09, 0xea, - 0xf4, 0x13, 0xa8, 0x2e, 0xb8, 0x65, 0x6d, 0xd6, 0x01, 0x0a, 0xc7, 0x70, 0xa7, 0x19, 0xf5, 0x7a, - 0x5c, 0x48, 0xea, 0x55, 0x7d, 0x46, 0x03, 0xa9, 0x3d, 0x61, 0x5c, 0xab, 0x1d, 0xee, 0x84, 0xde, - 0xb9, 0x8e, 0x3c, 0xd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 0x22, 0x95, 0x3b, 0xfa, 0x9c, 0xef, + 0x3b, 0xfd, 0x9d, 0xee, 0x3e, 0xe7, 0x30, 0x70, 0x94, 0x0c, 0x69, 0x54, 0x77, 0x89, 0x47, 0x03, + 0x97, 0xd6, 0x49, 0xc8, 0xea, 0xb3, 0x93, 0xba, 0xcb, 0xa7, 0x53, 0x1e, 0xd4, 0xc2, 0x88, 0x0b, + 0x8e, 0x0e, 0x24, 0xa2, 0xa6, 0x11, 0x35, 0x12, 0xb2, 0xda, 0xec, 0xe4, 0xf0, 0x83, 0x31, 0xe7, + 0x63, 0x9f, 0xd6, 0x15, 0x64, 0x98, 0x8c, 0xea, 0x5e, 0x12, 0x11, 0xc1, 0x32, 0x52, 0xf5, 0x35, + 0xec, 0x5f, 0xf2, 0x68, 0x32, 0xf2, 0xf9, 0x5b, 0xf3, 0x9a, 0xba, 0x89, 0x74, 0xa1, 0x67, 0x50, + 0x7c, 0xab, 0x8d, 0x0e, 0xf3, 0x2a, 0xc6, 0x91, 0x71, 0xbc, 0x8b, 0x21, 0x33, 0x59, 0x1e, 0x7a, + 0x00, 0x5b, 0x51, 0x12, 0x48, 0x5f, 0x4e, 0xf9, 0x0a, 0x51, 0x12, 0x58, 0x5e, 0xb5, 0x0a, 0xa5, + 0x2c, 0x98, 0x3d, 0x0f, 0x29, 0x42, 0x70, 0x27, 0x20, 0x53, 0xaa, 0x03, 0xa8, 0xdf, 0x12, 0xd3, + 0x74, 0x05, 0x9b, 0x31, 0x31, 0x7f, 0x27, 0xe6, 0x29, 0x6c, 0xf7, 0xc9, 0xdc, 0xe7, 0xc4, 0x93, + 0x6e, 0x8f, 0x08, 0xa2, 0xdc, 0x25, 0xac, 0x7e, 0x57, 0x3f, 0x87, 0xed, 0x36, 0x61, 0x7e, 0x12, + 0x51, 0xf4, 0x10, 0xb6, 0x22, 0x4a, 0x62, 0x1e, 0x68, 0xbe, 0x5e, 0xa1, 0x0a, 0x6c, 0x7b, 0x54, + 0x10, 0xe6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x48, 0xf9, 0xa2, 0x71, 0x89, 0x2e, 0xad, 0x16, 0x0f, + 0x38, 0xb7, 0xf4, 0x80, 0xfb, 0x69, 0xd1, 0xd1, 0xe8, 0x82, 0x46, 0x31, 0xe3, 0x81, 0x15, 0x8c, + 0xb8, 0x04, 0xb2, 0x69, 0xe8, 0x67, 0x85, 0x20, 0x7f, 0xa3, 0x8f, 0x61, 0x6f, 0x44, 0x89, 0x48, + 0x22, 0xea, 0xcc, 0x52, 0xa8, 0x2e, 0xb8, 0x7b, 0xda, 0xac, 0x03, 0x54, 0x5f, 0xc3, 0xa3, 0x41, + 0x12, 0x86, 0x3c, 0x12, 0xd4, 0x6b, 0xf9, 0x8c, 0x06, 0x42, 0x7b, 0x62, 0x59, 0xab, 0x63, 0xee, + 0xc4, 0xde, 0x44, 0x47, 0x2e, 0x8c, 0xf9, 0xc0, 0x9b, 0xa0, 0xc7, 0xb0, 0xf3, 0x7b, 0x32, 0x23, + 0xca, 0x91, 0xc6, 0xdc, 0x96, 0xeb, 0x81, 0x37, 0xa9, 0xfe, 0x29, 0x0f, 0x45, 0x4c, 0x45, 0x34, + 0xef, 0x73, 0x9f, 0xb9, 0x73, 0x74, 0x0a, 0x65, 0x16, 0x30, 0xc1, 0x88, 0xef, 0xb0, 0x40, 0xd0, + 0x68, 0x46, 0x52, 0x95, 0xc5, 0xc6, 0xe3, 0x5a, 0xda, 0x5e, 0x6a, 0x59, 0x7b, 0xa9, 0x9d, 0xea, + 0xf6, 0x82, 0xf7, 0x34, 0xc5, 0xd2, 0x0c, 0x54, 0x87, 0x83, 0x21, 0x71, 0x27, 0x7c, 0x34, 0x72, + 0x5c, 0x4e, 0x47, 0x23, 0xe6, 0x4a, 0x99, 0x6a, 0x6f, 0x03, 0x23, 0xed, 0x6a, 0xdd, 0x78, 0xe4, + 0xb6, 0x53, 0x72, 0xcd, 0xa6, 0xc9, 0xf4, 0x66, 0xdb, 0xfc, 0xc6, 0x6d, 0x35, 0x65, 0xb1, 0xed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0xe7, 0xaa, 0xe3, 0x0c, 0x37, 0x5b, + 0x66, 0xfb, 0x4d, 0xa7, 0x9c, 0x7b, 0xf5, 0x3b, 0x78, 0xe4, 0xf2, 0xe9, 0xba, 0x7a, 0x7e, 0x55, + 0x6c, 0xa9, 0xaf, 0xa2, 0xbe, 0x1c, 0xb4, 0x7d, 0xe3, 0xb7, 0x27, 0x63, 0x26, 0xbe, 0x49, 0x86, + 0x35, 0x97, 0x4f, 0xeb, 0xcb, 0xdf, 0x50, 0x9f, 0x32, 0xcf, 0xaf, 0x8f, 0x79, 0xfa, 0x65, 0xa4, + 0x3f, 0xa8, 0x3e, 0x27, 0x21, 0x9b, 0x9d, 0x0c, 0xb7, 0x94, 0xed, 0xe5, 0x7f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x11, 0xa3, 0x72, 0x20, 0x74, 0x0d, 0x00, 0x00, }, // uber/cadence/api/v1/query.proto []byte{ diff --git a/.gen/proto/shared/v1/error.pb.yarpc.go b/.gen/proto/shared/v1/error.pb.yarpc.go index 75268727834..81b10c9ff3a 100644 --- a/.gen/proto/shared/v1/error.pb.yarpc.go +++ b/.gen/proto/shared/v1/error.pb.yarpc.go @@ -41,91 +41,97 @@ var yarpcFileDescriptorClosure3688ca0fd170c8f9 = [][]byte{ }, // uber/cadence/api/v1/common.proto []byte{ - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcd, 0x72, 0xdb, 0x46, - 0x12, 0x36, 0x44, 0xeb, 0xaf, 0x29, 0x4b, 0xd4, 0xc8, 0x3f, 0xb4, 0x6c, 0xd9, 0x12, 0x5d, 0x2e, - 0xcb, 0xae, 0x35, 0xb9, 0xa2, 0x76, 0xb7, 0x5c, 0xeb, 0xf5, 0xee, 0x52, 0x14, 0x24, 0xc1, 0xd2, - 0x92, 0xdc, 0x21, 0x6c, 0xad, 0x36, 0x55, 0x41, 0x0d, 0x81, 0x21, 0x3d, 0x11,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b, 0x6b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x0c, 0xb2, - 0x04, 0xba, 0x0c, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xdd, 0x72, 0x22, 0xc7, + 0x15, 0xf6, 0xc0, 0xa2, 0x9f, 0x03, 0xbb, 0x42, 0xad, 0xfd, 0x61, 0xb5, 0x5e, 0xaf, 0x16, 0x97, + 0x63, 0x79, 0x2b, 0x86, 0x88, 0x4d, 0x52, 0xae, 0x38, 0x4e, 0xc2, 0xa2, 0x41, 0x1a, 0x2f, 0x01, + 0xd2, 0xcc, 0x4a, 0x56, 0x52, 0xe5, 0xa9, 0x66, 0xa6, 0xc1, 0x1d, 0x86, 0xe9, 0xc9, 0x4c, 0x0f, + 0x2b, 0x7c, 0x91, 0xca, 0x45, 0x72, 0x93, 0x87, 0xc8, 0x45, 0x5e, 0x23, 0x8f, 0x90, 0xcb, 0xbc, + 0x45, 0x9e, 0x22, 0xd5, 0x3d, 0x3d, 0x08, 0x14, 0xd6, 0xf8, 0x22, 0x95, 0x3b, 0xfa, 0x9c, 0xef, + 0x3b, 0xfd, 0x9d, 0xee, 0x3e, 0xe7, 0x30, 0x70, 0x94, 0x0c, 0x69, 0x54, 0x77, 0x89, 0x47, 0x03, + 0x97, 0xd6, 0x49, 0xc8, 0xea, 0xb3, 0x93, 0xba, 0xcb, 0xa7, 0x53, 0x1e, 0xd4, 0xc2, 0x88, 0x0b, + 0x8e, 0x0e, 0x24, 0xa2, 0xa6, 0x11, 0x35, 0x12, 0xb2, 0xda, 0xec, 0xe4, 0xf0, 0x83, 0x31, 0xe7, + 0x63, 0x9f, 0xd6, 0x15, 0x64, 0x98, 0x8c, 0xea, 0x5e, 0x12, 0x11, 0xc1, 0x32, 0x52, 0xf5, 0x35, + 0xec, 0x5f, 0xf2, 0x68, 0x32, 0xf2, 0xf9, 0x5b, 0xf3, 0x9a,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0, 0x9b, 0xa0, 0xc7, 0xb0, 0xf3, 0x7b, 0x32, 0x23, + 0xca, 0x91, 0xc6, 0xdc, 0x96, 0xeb, 0x81, 0x37, 0xa9, 0xfe, 0x29, 0x0f, 0x45, 0x4c, 0x45, 0x34, + 0xef, 0x73, 0x9f, 0xb9, 0x73, 0x74, 0x0a, 0x65, 0x16, 0x30, 0xc1, 0x88, 0xef, 0xb0, 0x40, 0xd0, + 0x68, 0x46, 0x52, 0x95, 0xc5, 0xc6, 0xe3, 0x5a, 0xda, 0x5e, 0x6a, 0x59, 0x7b, 0xa9, 0x9d, 0xea, + 0xf6, 0x82, 0xf7, 0x34, 0xc5, 0xd2, 0x0c, 0x54, 0x87, 0x83, 0x21, 0x71, 0x27, 0x7c, 0x34, 0x72, + 0x5c, 0x4e, 0x47, 0x23, 0xe6, 0x4a, 0x99, 0x6a, 0x6f, 0x03, 0x23, 0xed, 0x6a, 0xdd, 0x78, 0xe4, + 0xb6, 0x53, 0x72, 0xcd, 0xa6, 0xc9, 0xf4, 0x66, 0xdb, 0xfc, 0xc6, 0x6d, 0x35, 0x65, 0xb1, 0xed, + 0x27, 0x37, 0x51, 0x88, 0x10, 0x74, 0x1a, 0x8a, 0xb8, 0x72, 0xe7, 0xc8, 0x38, 0x2e, 0x2c, 0xa0, + 0x4d, 0x6d, 0x46, 0x5f, 0xc0, 0x93, 0x80, 0x07, 0x4e, 0x24, 0x53, 0x27, 0x43, 0x9f, 0x3a, 0x34, + 0x8a, 0x78, 0xe4, 0xa4, 0x2d, 0x25, 0xae, 0x14, 0x8e, 0xf2, 0xc7, 0xbb, 0xb8, 0x12, 0xf0, 0x00, + 0x67, 0x08, 0x53, 0x02, 0x70, 0xea, 0x47, 0x5f, 0xc2, 0x01, 0xbd, 0x0e, 0x59, 0x2a, 0xe4, 0x46, + 0xf2, 0xd6, 0x26, 0xc9, 0xe8, 0x86, 0x95, 0xa9, 0xae, 0x4e, 0xe1, 0x91, 0x15, 0x73, 0x5f, 0x19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0x00, 0x00, }, // google/protobuf/duration.proto []byte{ diff --git a/.gen/proto/shared/v1/history.pb.yarpc.go b/.gen/proto/shared/v1/history.pb.yarpc.go index b21ded2cea8..38dc0effb98 100644 --- a/.gen/proto/shared/v1/history.pb.yarpc.go +++ b/.gen/proto/shared/v1/history.pb.yarpc.go @@ -302,91 +302,97 @@ var yarpcFileDescriptorClosure0370c4177fcc3ee8 = [][]byte{ }, // uber/cadence/api/v1/common.proto []byte{ - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcd, 0x72, 0xdb, 0x46, - 0x12, 0x36, 0x44, 0xeb, 0xaf, 0x29, 0x4b, 0xd4, 0xc8, 0x3f, 0xb4, 0x6c, 0xd9, 0x12, 0x5d, 0x2e, - 0xcb, 0xae, 0x35, 0xb9, 0xa2, 0x76, 0xb7, 0x5c, 0xeb, 0xf5, 0xee, 0x52, 0x14, 0x24, 0xc1, 0xd2, - 0x92, 0xdc, 0x21, 0x6c, 0xad, 0x36, 0x55, 0x41, 0x0d, 0x81, 0x21, 0x3d, 0x11, 0x88, 0x61, 0x06, - 0x03, 0x5a, 0xbc, 0xa4, 0x72, 0x48, 0x2e, 0x79, 0x88, 0x1c, 0xf2, 0x1a, 0x79, 0x84, 0x1c, 0xf3, - 0x16, 0x79, 0x8a, 0x14, 0x06, 0x03, 0x8a, 0x54, 0x68, 0xd3, 0x87, 0x54, 0x6e, 0x98, 0xee, 0xef, - 0xeb, 0xf9, 0x7a, 0x30, 0xdd, 0x0d, 0xc0, 0x66, 0xd4, 0xa2, 0xa2, 0xe4, 0x12, 0x8f, 0x06, 0x2e, - 0x2d, 0x91, 0x1e, 0x2b, 0xf5, 0x77, 0x4a, 0x2e, 0xef, 0x76, 0x79, 0x50, 0xec, 0x09, 0x2e, 0x39, - 0x5a, 0x8b, 0x11, 0x45, 0x8d, 0x28, 0x92, 0x1e, 0x2b, 0xf6, 0x77, 0xd6, 0x1f, 0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, 0x91, 0xca, 0x45, 0x72, 0x93, 0x87, 0xc8, 0x45, 0x5e, 0x23, 0x8f, 0x90, 0xcb, 0xbc, + 0x45, 0x9e, 0x22, 0xd5, 0x3d, 0x3d, 0x08, 0x14, 0xd6, 0xf8, 0x22, 0x95, 0x3b, 0xfa, 0x9c, 0xef, + 0x3b, 0xfd, 0x9d, 0xee, 0x3e, 0xe7, 0x30, 0x70, 0x94, 0x0c, 0x69, 0x54, 0x77, 0x89, 0x47, 0x03, + 0x97, 0xd6, 0x49, 0xc8, 0xea, 0xb3, 0x93, 0xba, 0xcb, 0xa7, 0x53, 0x1e, 0xd4, 0xc2, 0x88, 0x0b, + 0x8e, 0x0e, 0x24, 0xa2, 0xa6, 0x11, 0x35, 0x12, 0xb2, 0xda, 0xec, 0xe4, 0xf0, 0x83, 0x31, 0xe7, + 0x63, 0x9f, 0xd6, 0x15, 0x64, 0x98, 0x8c, 0xea, 0x5e, 0x12, 0x11, 0xc1, 0x32, 0x52, 0xf5, 0x35, + 0xec, 0x5f, 0xf2, 0x68, 0x32, 0xf2, 0xf9, 0x5b, 0xf3, 0x9a, 0xba, 0x89, 0x74, 0xa1, 0x67, 0x50, + 0x7c, 0xab, 0x8d, 0x0e, 0xf3, 0x2a, 0xc6, 0x91, 0x71, 0xbc, 0x8b, 0x21, 0x33, 0x59, 0x1e, 0x7a, + 0x00, 0x5b, 0x51, 0x12, 0x48, 0x5f, 0x4e, 0xf9, 0x0a, 0x51, 0x12, 0x58, 0x5e, 0xb5, 0x0a, 0xa5, + 0x2c, 0x98, 0x3d, 0x0f, 0x29, 0x42, 0x70, 0x27, 0x20, 0x53, 0xaa, 0x03, 0xa8, 0xdf, 0x12, 0xd3, + 0x74, 0x05, 0x9b, 0x31, 0x31, 0x7f, 0x27, 0xe6, 0x29, 0x6c, 0xf7, 0xc9, 0xdc, 0xe7, 0xc4, 0x93, + 0x6e, 0x8f, 0x08, 0xa2, 0xdc, 0x25, 0xac, 0x7e, 0x57, 0x3f,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+ 0xcf, 0x87, 0xa8, 0x0d, 0x77, 0x69, 0xe0, 0x72, 0x8f, 0x05, 0x63, 0x47, 0xcc, 0xc3, 0xf4, 0x81, + 0xde, 0x6b, 0x3c, 0x5f, 0x1b, 0xcb, 0xd4, 0x48, 0xf9, 0xa2, 0x71, 0x89, 0x2e, 0xad, 0x16, 0x0f, + 0x38, 0xb7, 0xf4, 0x80, 0xfb, 0x69, 0xd1, 0xd1, 0xe8, 0x82, 0x46, 0x31, 0xe3, 0x81, 0x15, 0x8c, + 0xb8, 0x04, 0xb2, 0x69, 0xe8, 0x67, 0x85, 0x20, 0x7f, 0xa3, 0x8f, 0x61, 0x6f, 0x44, 0x89, 0x48, + 0x22, 0xea, 0xcc, 0x52, 0xa8, 0x2e, 0xb8, 0x7b, 0xda, 0xac, 0x03, 0x54, 0x5f, 0xc3, 0xa3, 0x41, + 0x12, 0x86, 0x3c, 0x12, 0xd4, 0x6b, 0xf9, 0x8c, 0x06, 0x42, 0x7b, 0x62, 0x59, 0xab, 0x63, 0xee, + 0xc4, 0xde, 0x44, 0x47, 0x2e, 0x8c, 0xf9, 0xc0, 0x9b, 0xa0, 0xc7, 0xb0, 0xf3, 0x7b, 0x32, 0x23, + 0xca, 0x91, 0xc6, 0xdc, 0x96, 0xeb, 0x81, 0x37, 0xa9, 0xfe, 0x29, 0x0f, 0x45, 0x4c, 0x45, 0x34, + 0xef, 0x73, 0x9f, 0xb9, 0x73, 0x74, 0x0a, 0x65, 0x16, 0x30, 0xc1, 0x88, 0xef, 0xb0, 0x40, 0xd0, + 0x68, 0x46, 0x52, 0x95, 0xc5, 0xc6, 0xe3, 0x5a, 0xda, 0x5e, 0x6a, 0x59, 0x7b, 0xa9, 0x9d, 0xea, + 0xf6, 0x82, 0xf7, 0x34, 0xc5, 0xd2, 0x0c, 0x54, 0x87, 0x83, 0x21, 0x71, 0x27, 0x7c, 0x34, 0x72, + 0x5c, 0x4e, 0x47, 0x23, 0xe6, 0x4a, 0x99, 0x6a, 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x46, 0xd9, 0xb5, 0xb5, 0x9b, 0x56, 0xa7, 0x77, 0x61, 0xe2, 0xdb, 0xd7, 0xf6, 0x08, + 0x0e, 0x56, 0x5d, 0xed, 0x1e, 0x6e, 0x99, 0x65, 0x43, 0xde, 0xe7, 0xaa, 0xe3, 0x0c, 0x37, 0x5b, + 0x66, 0xfb, 0x4d, 0xa7, 0x9c, 0x7b, 0xf5, 0x3b, 0x78, 0xe4, 0xf2, 0xe9, 0xba, 0x7a, 0x7e, 0x55, + 0x6c, 0xa9, 0xaf, 0xa2, 0xbe, 0x1c, 0xb4, 0x7d, 0xe3, 0xb7, 0x27, 0x63, 0x26, 0xbe, 0x49, 0x86, + 0x35, 0x97, 0x4f, 0xeb, 0xcb, 0xdf, 0x50, 0x9f, 0x32, 0xcf, 0xaf, 0x8f, 0x79, 0xfa, 0x65, 0xa4, + 0x3f, 0xa8, 0x3e, 0x27, 0x21, 0x9b, 0x9d, 0x0c, 0xb7, 0x94, 0xed, 0xe5, 0x7f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x11, 0xa3, 0x72, 0x20, 0x74, 0x0d, 0x00, 0x00, }, // uber/cadence/api/v1/tasklist.proto []byte{ diff --git a/client/frontend/interface.go b/client/frontend/interface.go index ea30f8315d3..2848db8ce65 100644 --- a/client/frontend/interface.go +++ b/client/frontend/interface.go @@ -84,4 +84,6 @@ type Client interface { TerminateWorkflowExecution(context.Context, *types.TerminateWorkflowExecutionRequest, ...yarpc.CallOption) error UpdateDomain(context.Context, *types.UpdateDomainRequest, ...yarpc.CallOption) (*types.UpdateDomainResponse, error) FailoverDomain(context.Context, *types.FailoverDomainRequest, ...yarpc.CallOption) (*types.FailoverDomainResponse, error) + ListFailoverHistory(context.Context, *types.ListFailoverHistoryRequest, ...yarpc.CallOption) (*types.ListFailoverHistoryResponse, error) + GetFailoverEvent(context.Context, *types.GetFailoverEventRequest, ...yarpc.CallOption) (*types.GetFailoverEventResponse, error) } diff --git a/client/frontend/interface_mock.go b/client/frontend/interface_mock.go index 1aa6fec0d9a..34f1798a0b4 100644 --- a/client/frontend/interface_mock.go +++ b/client/frontend/interface_mock.go @@ -221,6 +221,26 @@ func (mr *MockClientMockRecorder) GetClusterInfo(arg0 any, arg1 ...any) *gomock. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterInfo", reflect.TypeOf((*MockClient)(nil).GetClusterInfo), varargs...) } +// GetFailoverEvent mocks base method. +func (m *MockClient) GetFailoverEvent(arg0 context.Context, arg1 *types.GetFailoverEventRequest, arg2 ...yarpc.CallOption) (*types.GetFailoverEventResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetFailoverEvent", varargs...) + ret0, _ := ret[0].(*types.GetFailoverEventResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetFailoverEvent indicates an expected call of GetFailoverEvent. +func (mr *MockClientMockRecorder) GetFailoverEvent(arg0, arg1 any, arg2 ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFailoverEvent", reflect.TypeOf((*MockClient)(nil).GetFailoverEvent), varargs...) +} + // GetSearchAttributes mocks base method. func (m *MockClient) GetSearchAttributes(arg0 context.Context, arg1 ...yarpc.CallOption) (*types.GetSearchAttributesResponse, error) { m.ctrl.T.Helper() @@ -341,6 +361,26 @@ func (mr *MockClientMockRecorder) ListDomains(arg0, arg1 any, arg2 ...any) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDomains", reflect.TypeOf((*MockClient)(nil).ListDomains), varargs...) } +// ListFailoverHistory mocks base method. +func (m *MockClient) ListFailoverHistory(arg0 context.Context, arg1 *types.ListFailoverHistoryRequest, arg2 ...yarpc.CallOption) (*types.ListFailoverHistoryResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListFailoverHistory", varargs...) + ret0, _ := ret[0].(*types.ListFailoverHistoryResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListFailoverHistory indicates an expected call of ListFailoverHistory. +func (mr *MockClientMockRecorder) ListFailoverHistory(arg0, arg1 any, arg2 ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListFailoverHistory", reflect.TypeOf((*MockClient)(nil).ListFailoverHistory), varargs...) +} + // ListOpenWorkflowExecutions mocks base method. func (m *MockClient) ListOpenWorkflowExecutions(arg0 context.Context, arg1 *types.ListOpenWorkflowExecutionsRequest, arg2 ...yarpc.CallOption) (*types.ListOpenWorkflowExecutionsResponse, error) { m.ctrl.T.Helper() diff --git a/client/wrappers/errorinjectors/frontend_generated.go b/client/wrappers/errorinjectors/frontend_generated.go index 861442eb415..f87c783af7e 100644 --- a/client/wrappers/errorinjectors/frontend_generated.go +++ b/client/wrappers/errorinjectors/frontend_generated.go @@ -220,6 +220,26 @@ func (c *frontendClient) GetClusterInfo(ctx context.Context, p1 ...yarpc.CallOpt return } +func (c *frontendClient) GetFailoverEvent(ctx context.Context, gp1 *types.GetFailoverEventRequest, p1 ...yarpc.CallOption) (gp2 *types.GetFailoverEventResponse, err error) { + fakeErr := c.fakeErrFn(c.errorRate) + var forwardCall bool + if forwardCall = c.forwardCallFn(fakeErr); forwardCall { + gp2, err = c.client.GetFailoverEvent(ctx, gp1, p1...) + } + + if fakeErr != nil { + c.logger.Error(msgFrontendInjectedFakeErr, + tag.FrontendClientOperationGetFailoverEvent, + tag.Error(fakeErr), + tag.Bool(forwardCall), + tag.ClientError(err), + ) + err = fakeErr + return + } + return +} + func (c *frontendClient) GetSearchAttributes(ctx context.Context, p1 ...yarpc.CallOption) (gp1 *types.GetSearchAttributesResponse, err error) { fakeErr := c.fakeErrFn(c.errorRate) var forwardCall bool @@ -340,6 +360,26 @@ func (c *frontendClient) ListDomains(ctx context.Context, lp1 *types.ListDomains return } +func (c *frontendClient) ListFailoverHistory(ctx context.Context, lp1 *types.ListFailoverHistoryRequest, p1 ...yarpc.CallOption) (lp2 *types.ListFailoverHistoryResponse, err error) { + fakeErr := c.fakeErrFn(c.errorRate) + var forwardCall bool + if forwardCall = c.forwardCallFn(fakeErr); forwardCall { + lp2, err = c.client.ListFailoverHistory(ctx, lp1, p1...) + } + + if fakeErr != nil { + c.logger.Error(msgFrontendInjectedFakeErr, + tag.FrontendClientOperationListFailoverHistory, + tag.Error(fakeErr), + tag.Bool(forwardCall), + tag.ClientError(err), + ) + err = fakeErr + return + } + return +} + func (c *frontendClient) ListOpenWorkflowExecutions(ctx context.Context, lp1 *types.ListOpenWorkflowExecutionsRequest, p1 ...yarpc.CallOption) (lp2 *types.ListOpenWorkflowExecutionsResponse, err error) { fakeErr := c.fakeErrFn(c.errorRate) var forwardCall bool diff --git a/client/wrappers/grpc/frontend_generated.go b/client/wrappers/grpc/frontend_generated.go index 6454dc61613..356baac9c2b 100644 --- a/client/wrappers/grpc/frontend_generated.go +++ b/client/wrappers/grpc/frontend_generated.go @@ -59,6 +59,11 @@ func (g frontendClient) GetClusterInfo(ctx context.Context, p1 ...yarpc.CallOpti return proto.ToGetClusterInfoResponse(response), proto.ToError(err) } +func (g frontendClient) GetFailoverEvent(ctx context.Context, gp1 *types.GetFailoverEventRequest, p1 ...yarpc.CallOption) (gp2 *types.GetFailoverEventResponse, err error) { + response, err := g.c.GetFailoverEvent(ctx, proto.FromGetFailoverEventRequest(gp1), p1...) + return proto.ToGetFailoverEventResponse(response), proto.ToError(err) +} + func (g frontendClient) GetSearchAttributes(ctx context.Context, p1 ...yarpc.CallOption) (gp1 *types.GetSearchAttributesResponse, err error) { response, err := g.c.GetSearchAttributes(ctx, &apiv1.GetSearchAttributesRequest{}, p1...) return proto.ToGetSearchAttributesResponse(response), proto.ToError(err) @@ -89,6 +94,11 @@ func (g frontendClient) ListDomains(ctx context.Context, lp1 *types.ListDomainsR return proto.ToListDomainsResponse(response), proto.ToError(err) } +func (g frontendClient) ListFailoverHistory(ctx context.Context, lp1 *types.ListFailoverHistoryRequest, p1 ...yarpc.CallOption) (lp2 *types.ListFailoverHistoryResponse, err error) { + response, err := g.c.ListFailoverHistory(ctx, proto.FromListFailoverHistoryRequest(lp1), p1...) + return proto.ToListFailoverHistoryResponse(response), proto.ToError(err) +} + func (g frontendClient) ListOpenWorkflowExecutions(ctx context.Context, lp1 *types.ListOpenWorkflowExecutionsRequest, p1 ...yarpc.CallOption) (lp2 *types.ListOpenWorkflowExecutionsResponse, err error) { response, err := g.c.ListOpenWorkflowExecutions(ctx, proto.FromListOpenWorkflowExecutionsRequest(lp1), p1...) return proto.ToListOpenWorkflowExecutionsResponse(response), proto.ToError(err) diff --git a/client/wrappers/metered/frontend_generated.go b/client/wrappers/metered/frontend_generated.go index a5a39b63c52..56ecc8a61b4 100644 --- a/client/wrappers/metered/frontend_generated.go +++ b/client/wrappers/metered/frontend_generated.go @@ -226,6 +226,28 @@ func (c *frontendClient) GetClusterInfo(ctx context.Context, p1 ...yarpc.CallOpt return cp1, err } +func (c *frontendClient) GetFailoverEvent(ctx context.Context, gp1 *types.GetFailoverEventRequest, p1 ...yarpc.CallOption) (gp2 *types.GetFailoverEventResponse, err error) { + retryCount := getRetryCountFromContext(ctx) + + var scope metrics.Scope + if retryCount == -1 { + scope = c.metricsClient.Scope(metrics.FrontendClientGetFailoverEventScope) + } else { + scope = c.metricsClient.Scope(metrics.FrontendClientGetFailoverEventScope, metrics.IsRetryTag(retryCount > 0)) + } + + scope.IncCounter(metrics.CadenceClientRequests) + + sw := scope.StartTimer(metrics.CadenceClientLatency) + gp2, err = c.client.GetFailoverEvent(ctx, gp1, p1...) + sw.Stop() + + if err != nil { + scope.IncCounter(metrics.CadenceClientFailures) + } + return gp2, err +} + func (c *frontendClient) GetSearchAttributes(ctx context.Context, p1 ...yarpc.CallOption) (gp1 *types.GetSearchAttributesResponse, err error) { retryCount := getRetryCountFromContext(ctx) @@ -358,6 +380,28 @@ func (c *frontendClient) ListDomains(ctx context.Context, lp1 *types.ListDomains return lp2, err } +func (c *frontendClient) ListFailoverHistory(ctx context.Context, lp1 *types.ListFailoverHistoryRequest, p1 ...yarpc.CallOption) (lp2 *types.ListFailoverHistoryResponse, err error) { + retryCount := getRetryCountFromContext(ctx) + + var scope metrics.Scope + if retryCount == -1 { + scope = c.metricsClient.Scope(metrics.FrontendClientListFailoverHistoryScope) + } else { + scope = c.metricsClient.Scope(metrics.FrontendClientListFailoverHistoryScope, metrics.IsRetryTag(retryCount > 0)) + } + + scope.IncCounter(metrics.CadenceClientRequests) + + sw := scope.StartTimer(metrics.CadenceClientLatency) + lp2, err = c.client.ListFailoverHistory(ctx, lp1, p1...) + sw.Stop() + + if err != nil { + scope.IncCounter(metrics.CadenceClientFailures) + } + return lp2, err +} + func (c *frontendClient) ListOpenWorkflowExecutions(ctx context.Context, lp1 *types.ListOpenWorkflowExecutionsRequest, p1 ...yarpc.CallOption) (lp2 *types.ListOpenWorkflowExecutionsResponse, err error) { retryCount := getRetryCountFromContext(ctx) diff --git a/client/wrappers/retryable/frontend_generated.go b/client/wrappers/retryable/frontend_generated.go index 41258c521a9..08d2dbaa5ed 100644 --- a/client/wrappers/retryable/frontend_generated.go +++ b/client/wrappers/retryable/frontend_generated.go @@ -122,6 +122,17 @@ func (c *frontendClient) GetClusterInfo(ctx context.Context, p1 ...yarpc.CallOpt return resp, err } +func (c *frontendClient) GetFailoverEvent(ctx context.Context, gp1 *types.GetFailoverEventRequest, p1 ...yarpc.CallOption) (gp2 *types.GetFailoverEventResponse, err error) { + var resp *types.GetFailoverEventResponse + op := func(ctx context.Context) error { + var err error + resp, err = c.client.GetFailoverEvent(ctx, gp1, p1...) + return err + } + err = c.throttleRetry.Do(ctx, op) + return resp, err +} + func (c *frontendClient) GetSearchAttributes(ctx context.Context, p1 ...yarpc.CallOption) (gp1 *types.GetSearchAttributesResponse, err error) { var resp *types.GetSearchAttributesResponse op := func(ctx context.Context) error { @@ -188,6 +199,17 @@ func (c *frontendClient) ListDomains(ctx context.Context, lp1 *types.ListDomains return resp, err } +func (c *frontendClient) ListFailoverHistory(ctx context.Context, lp1 *types.ListFailoverHistoryRequest, p1 ...yarpc.CallOption) (lp2 *types.ListFailoverHistoryResponse, err error) { + var resp *types.ListFailoverHistoryResponse + op := func(ctx context.Context) error { + var err error + resp, err = c.client.ListFailoverHistory(ctx, lp1, p1...) + return err + } + err = c.throttleRetry.Do(ctx, op) + return resp, err +} + func (c *frontendClient) ListOpenWorkflowExecutions(ctx context.Context, lp1 *types.ListOpenWorkflowExecutionsRequest, p1 ...yarpc.CallOption) (lp2 *types.ListOpenWorkflowExecutionsResponse, err error) { var resp *types.ListOpenWorkflowExecutionsResponse op := func(ctx context.Context) error { diff --git a/client/wrappers/thrift/frontend_generated.go b/client/wrappers/thrift/frontend_generated.go index b6044441c54..f82eb004b3a 100644 --- a/client/wrappers/thrift/frontend_generated.go +++ b/client/wrappers/thrift/frontend_generated.go @@ -58,6 +58,11 @@ func (g frontendClient) GetClusterInfo(ctx context.Context, p1 ...yarpc.CallOpti return thrift.ToGetClusterInfoResponse(response), thrift.ToError(err) } +func (g frontendClient) GetFailoverEvent(ctx context.Context, gp1 *types.GetFailoverEventRequest, p1 ...yarpc.CallOption) (gp2 *types.GetFailoverEventResponse, err error) { + response, err := g.c.GetFailoverEvent(ctx, thrift.FromGetFailoverEventRequest(gp1), p1...) + return thrift.ToGetFailoverEventResponse(response), thrift.ToError(err) +} + func (g frontendClient) GetSearchAttributes(ctx context.Context, p1 ...yarpc.CallOption) (gp1 *types.GetSearchAttributesResponse, err error) { response, err := g.c.GetSearchAttributes(ctx, p1...) return thrift.ToGetSearchAttributesResponse(response), thrift.ToError(err) @@ -88,6 +93,11 @@ func (g frontendClient) ListDomains(ctx context.Context, lp1 *types.ListDomainsR return thrift.ToListDomainsResponse(response), thrift.ToError(err) } +func (g frontendClient) ListFailoverHistory(ctx context.Context, lp1 *types.ListFailoverHistoryRequest, p1 ...yarpc.CallOption) (lp2 *types.ListFailoverHistoryResponse, err error) { + response, err := g.c.ListFailoverHistory(ctx, thrift.FromListFailoverHistoryRequest(lp1), p1...) + return thrift.ToListFailoverHistoryResponse(response), thrift.ToError(err) +} + func (g frontendClient) ListOpenWorkflowExecutions(ctx context.Context, lp1 *types.ListOpenWorkflowExecutionsRequest, p1 ...yarpc.CallOption) (lp2 *types.ListOpenWorkflowExecutionsResponse, err error) { response, err := g.c.ListOpenWorkflowExecutions(ctx, thrift.FromListOpenWorkflowExecutionsRequest(lp1), p1...) return thrift.ToListOpenWorkflowExecutionsResponse(response), thrift.ToError(err) diff --git a/client/wrappers/timeout/frontend_generated.go b/client/wrappers/timeout/frontend_generated.go index 92b2827b9c2..a11530091f4 100644 --- a/client/wrappers/timeout/frontend_generated.go +++ b/client/wrappers/timeout/frontend_generated.go @@ -90,6 +90,12 @@ func (c *frontendClient) GetClusterInfo(ctx context.Context, p1 ...yarpc.CallOpt return c.client.GetClusterInfo(ctx, p1...) } +func (c *frontendClient) GetFailoverEvent(ctx context.Context, gp1 *types.GetFailoverEventRequest, p1 ...yarpc.CallOption) (gp2 *types.GetFailoverEventResponse, err error) { + ctx, cancel := createContext(ctx, c.timeout) + defer cancel() + return c.client.GetFailoverEvent(ctx, gp1, p1...) +} + func (c *frontendClient) GetSearchAttributes(ctx context.Context, p1 ...yarpc.CallOption) (gp1 *types.GetSearchAttributesResponse, err error) { ctx, cancel := createContext(ctx, c.timeout) defer cancel() @@ -126,6 +132,12 @@ func (c *frontendClient) ListDomains(ctx context.Context, lp1 *types.ListDomains return c.client.ListDomains(ctx, lp1, p1...) } +func (c *frontendClient) ListFailoverHistory(ctx context.Context, lp1 *types.ListFailoverHistoryRequest, p1 ...yarpc.CallOption) (lp2 *types.ListFailoverHistoryResponse, err error) { + ctx, cancel := createContext(ctx, c.timeout) + defer cancel() + return c.client.ListFailoverHistory(ctx, lp1, p1...) +} + func (c *frontendClient) ListOpenWorkflowExecutions(ctx context.Context, lp1 *types.ListOpenWorkflowExecutionsRequest, p1 ...yarpc.CallOption) (lp2 *types.ListOpenWorkflowExecutionsResponse, err error) { ctx, cancel := createContext(ctx, c.timeout) defer cancel() diff --git a/cmd/server/go.mod b/cmd/server/go.mod index 5d8520cb378..ce10e47b9c4 100644 --- a/cmd/server/go.mod +++ b/cmd/server/go.mod @@ -88,6 +88,11 @@ require ( github.com/pierrec/lz4/v4 v4.1.22 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect github.com/tetratelabs/wazero v1.8.2 // indirect + github.com/tidwall/gjson v1.18.0 // indirect + github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/pretty v1.2.1 // indirect + github.com/tidwall/sjson v1.2.5 // indirect + github.com/wI2L/jsondiff v0.7.0 // indirect github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect go.etcd.io/etcd/api/v3 v3.5.5 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect diff --git a/cmd/server/go.sum b/cmd/server/go.sum index d24332c4fad..aed5b861704 100644 --- a/cmd/server/go.sum +++ b/cmd/server/go.sum @@ -398,10 +398,12 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tetratelabs/wazero v1.8.2 h1:yIgLR/b2bN31bjxwXHD8a3d+BogigR952csSDdLYEv4= github.com/tetratelabs/wazero v1.8.2/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs= -github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= -github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= @@ -429,8 +431,8 @@ github.com/urfave/cli/v2 v2.27.4 h1:o1owoI+02Eb+K107p27wEX9Bb8eqIoZCfLXloLUSWJ8= github.com/urfave/cli/v2 v2.27.4/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ= github.com/valyala/fastjson v1.4.1 h1:hrltpHpIpkaxll8QltMU8c3QZ5+qIiCL8yKqPFJI/yE= github.com/valyala/fastjson v1.4.1/go.mod h1:nV6MsjxL2IMJQUoHDIrjEI7oLyeqK6aBD7EFWPsvP8o= -github.com/wI2L/jsondiff v0.6.0 h1:zrsH3FbfVa3JO9llxrcDy/XLkYPLgoMX6Mz3T2PP2AI= -github.com/wI2L/jsondiff v0.6.0/go.mod h1:D6aQ5gKgPF9g17j+E9N7aasmU1O+XvfmWm1y8UMmNpw= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0= diff --git a/common/domain/audit/diff.go b/common/domain/audit/diff.go new file mode 100644 index 00000000000..2c06494363b --- /dev/null +++ b/common/domain/audit/diff.go @@ -0,0 +1,92 @@ +// Copyright (c) 2025 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 audit + +import ( + "context" + "encoding/json" + + "github.com/wI2L/jsondiff" + + "github.com/uber/cadence/common/persistence" + "github.com/uber/cadence/common/types" +) + +// ComputeDomainDiff computes the JSON diff between old and new domain states +// Returns the diff as a JSON patch (RFC6902) in byte format +// This handles both active-passive and active-active (cluster attributes) changes +func ComputeDomainDiff( + oldDomain *persistence.GetDomainResponse, + newDomain *persistence.GetDomainResponse, +) ([]byte, error) { + // Convert to JSON-serializable format + oldJSON, err := json.Marshal(oldDomain) + if err != nil { + return nil, err + } + + newJSON, err := json.Marshal(newDomain) + if err != nil { + return nil, err + } + + // Unmarshal to interface{} for jsondiff + var oldData, newData interface{} + if err := json.Unmarshal(oldJSON, &oldData); err != nil { + return nil, err + } + if err := json.Unmarshal(newJSON, &newData); err != nil { + return nil, err + } + + // Compute diff using jsondiff + patch, err := jsondiff.Compare(oldData, newData) + if err != nil { + return nil, err + } + + // Serialize patch to JSON bytes + return json.Marshal(patch) +} + +// DetermineOperationType determines the operation type from the update request +func DetermineOperationType(request *types.UpdateDomainRequest) persistence.DomainOperationType { + // Check if this is a failover (active cluster change) + if request.ActiveClusterName != nil { + return persistence.DomainOperationTypeFailover + } + + // Check for active clusters (active-active failover) + if request.ActiveClusters != nil { + return persistence.DomainOperationTypeFailover + } + + // Otherwise it's a regular update + return persistence.DomainOperationTypeUpdate +} + +// ExtractIdentity extracts identity information from the context +// For POC, return placeholder values +// TODO: Implement proper identity extraction from context +func ExtractIdentity(ctx context.Context) (identity, identityType string) { + // Placeholder for POC + return "unknown", "system" +} diff --git a/common/domain/audit/diff_test.go b/common/domain/audit/diff_test.go new file mode 100644 index 00000000000..551e1280b61 --- /dev/null +++ b/common/domain/audit/diff_test.go @@ -0,0 +1,158 @@ +package audit + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/uber/cadence/common" + "github.com/uber/cadence/common/persistence" + "github.com/uber/cadence/common/types" +) + +func TestComputeDomainDiff_ActivePassiveFailover(t *testing.T) { + oldDomain := &persistence.GetDomainResponse{ + Info: &persistence.DomainInfo{ + ID: "test-domain-id", + Name: "test-domain", + }, + Config: &persistence.DomainConfig{ + Retention: 7, + }, + ReplicationConfig: &persistence.DomainReplicationConfig{ + ActiveClusterName: "cluster1", + }, + } + + newDomain := &persistence.GetDomainResponse{ + Info: &persistence.DomainInfo{ + ID: "test-domain-id", + Name: "test-domain", + }, + Config: &persistence.DomainConfig{ + Retention: 7, + }, + ReplicationConfig: &persistence.DomainReplicationConfig{ + ActiveClusterName: "cluster2", + }, + } + + diffBytes, err := ComputeDomainDiff(oldDomain, newDomain) + require.NoError(t, err) + assert.NotNil(t, diffBytes) + // Diff should be JSON patch format + diffStr := string(diffBytes) + assert.Contains(t, diffStr, "op") + assert.Contains(t, diffStr, "cluster2") +} + +func TestComputeDomainDiff_ClusterChange(t *testing.T) { + // Test a simple cluster list change + oldDomain := &persistence.GetDomainResponse{ + Info: &persistence.DomainInfo{ + ID: "test-domain-id", + Name: "test-domain", + }, + ReplicationConfig: &persistence.DomainReplicationConfig{ + ActiveClusterName: "cluster1", + Clusters: []*persistence.ClusterReplicationConfig{ + {ClusterName: "cluster1"}, + {ClusterName: "cluster2"}, + }, + }, + } + + newDomain := &persistence.GetDomainResponse{ + Info: &persistence.DomainInfo{ + ID: "test-domain-id", + Name: "test-domain", + }, + ReplicationConfig: &persistence.DomainReplicationConfig{ + ActiveClusterName: "cluster1", + Clusters: []*persistence.ClusterReplicationConfig{ + {ClusterName: "cluster1"}, + {ClusterName: "cluster2"}, + {ClusterName: "cluster3"}, // Added cluster3 + }, + }, + } + + diffBytes, err := ComputeDomainDiff(oldDomain, newDomain) + require.NoError(t, err) + assert.NotNil(t, diffBytes) + + // Verify the diff shows the change + var patch []map[string]interface{} + err = json.Unmarshal(diffBytes, &patch) + require.NoError(t, err) + assert.NotEmpty(t, patch) +} + +func TestComputeDomainDiff_NoChanges(t *testing.T) { + domain := &persistence.GetDomainResponse{ + Info: &persistence.DomainInfo{ + ID: "test-domain-id", + Name: "test-domain", + }, + Config: &persistence.DomainConfig{ + Retention: 7, + }, + ReplicationConfig: &persistence.DomainReplicationConfig{ + ActiveClusterName: "cluster1", + }, + } + + diffBytes, err := ComputeDomainDiff(domain, domain) + require.NoError(t, err) + // Diff should be empty array or no operations + var patch []interface{} + err = json.Unmarshal(diffBytes, &patch) + require.NoError(t, err) + assert.Empty(t, patch, "diff should be empty when domains are identical") +} + +func TestDetermineOperationType(t *testing.T) { + tests := []struct { + name string + request *types.UpdateDomainRequest + expected persistence.DomainOperationType + }{ + { + name: "failover - active cluster change", + request: &types.UpdateDomainRequest{ + Name: "test", + ActiveClusterName: common.StringPtr("cluster2"), + }, + expected: persistence.DomainOperationTypeFailover, + }, + { + name: "failover - active clusters change", + request: &types.UpdateDomainRequest{ + Name: "test", + ActiveClusters: &types.ActiveClusters{ + AttributeScopes: map[string]types.ClusterAttributeScope{ + "region": {}, + }, + }, + }, + expected: persistence.DomainOperationTypeFailover, + }, + { + name: "update - description change", + request: &types.UpdateDomainRequest{ + Name: "test", + Description: common.StringPtr("new desc"), + }, + expected: persistence.DomainOperationTypeUpdate, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result := DetermineOperationType(tt.request) + assert.Equal(t, tt.expected, result) + }) + } +} diff --git a/common/domain/audit/reconstruction.go b/common/domain/audit/reconstruction.go new file mode 100644 index 00000000000..dbea4c5e10f --- /dev/null +++ b/common/domain/audit/reconstruction.go @@ -0,0 +1,161 @@ +package audit + +import ( + "encoding/json" + "fmt" + "regexp" + + "github.com/uber/cadence/common/persistence" + "github.com/uber/cadence/common/types" +) + +var ( + // Pattern for default cluster change: /ReplicationConfig/ActiveClusterName + defaultClusterPattern = regexp.MustCompile(`^/ReplicationConfig/ActiveClusterName$`) + + // Pattern for cluster attribute change: /ReplicationConfig/ActiveClusters/attributeScopes/{scope}/clusterAttributes/{name}/activeClusterName + // Note: JSON marshaling uses lowercase field names from the proto/struct tags + clusterAttributePattern = regexp.MustCompile(`^/ReplicationConfig/ActiveClusters/attributeScopes/([^/]+)/clusterAttributes/([^/]+)/activeClusterName$`) +) + +// ReconstructFailoverEvents converts audit log entries to FailoverEvent types +func ReconstructFailoverEvents( + entries []*persistence.DomainAuditLogEntry, +) ([]*types.FailoverEvent, error) { + events := make([]*types.FailoverEvent, 0, len(entries)) + + for _, entry := range entries { + // Only process failover operations + if entry.OperationType != persistence.DomainOperationTypeFailover { + continue + } + + // Convert to Unix milliseconds + createdTimeMs := entry.CreatedTime.UnixNano() / int64(1000000) + eventID := entry.EventID + failoverType := determineFailoverType(entry) + + event := &types.FailoverEvent{ + ID: &eventID, + CreatedTime: &createdTimeMs, + FailoverType: &failoverType, + } + + events = append(events, event) + } + + return events, nil +} + +// ReconstructClusterFailovers extracts cluster failover details from a diff +func ReconstructClusterFailovers(diffBytes []byte) ([]*types.ClusterFailover, error) { + // Log the raw state_after for debugging + fmt.Printf("DEBUG: StateAfter content: %s\n", string(diffBytes)) + + // Parse JSON patch + var patch []map[string]interface{} + if err := json.Unmarshal(diffBytes, &patch); err != nil { + return nil, fmt.Errorf("failed to parse state_after as JSON: %w", err) + } + + fmt.Printf("DEBUG: Parsed %d patch operations\n", len(patch)) + + var failovers []*types.ClusterFailover + + // Iterate through patch operations + for i, op := range patch { + fmt.Printf("DEBUG: Operation %d: %+v\n", i, op) + + path, ok := op["path"].(string) + if !ok { + fmt.Printf("DEBUG: Operation %d has no 'path' field or path is not a string\n", i) + continue + } + + value, ok := op["value"].(string) + if !ok { + fmt.Printf("DEBUG: Operation %d path=%s has no 'value' field or value is not a string\n", i, path) + continue + } + + fmt.Printf("DEBUG: Checking path=%s value=%s\n", path, value) + + // Check if this is a default cluster change + if defaultClusterPattern.MatchString(path) { + fmt.Printf("DEBUG: Matched default cluster pattern!\n") + isDefault := true + failovers = append(failovers, &types.ClusterFailover{ + ToCluster: &types.ActiveClusterInfo{ + ActiveClusterName: value, + }, + IsDefaultCluster: &isDefault, + }) + continue + } + + // Check if this is a cluster attribute change + matches := clusterAttributePattern.FindStringSubmatch(path) + if len(matches) == 3 { + scope := matches[1] + name := matches[2] + isDefault := false + + fmt.Printf("DEBUG: Matched cluster attribute pattern! scope=%s name=%s\n", scope, name) + failovers = append(failovers, &types.ClusterFailover{ + ToCluster: &types.ActiveClusterInfo{ + ActiveClusterName: value, + }, + ClusterAttribute: &types.ClusterAttribute{ + Scope: scope, + Name: name, + }, + IsDefaultCluster: &isDefault, + }) + } else { + fmt.Printf("DEBUG: Path did not match any known patterns: %s\n", path) + } + } + + fmt.Printf("DEBUG: Found %d cluster failovers\n", len(failovers)) + return failovers, nil +} + +func determineFailoverType(entry *persistence.DomainAuditLogEntry) types.FailoverType { + // For POC, always return FORCE + // In production, would parse the diff or use additional metadata + return types.FailoverTypeForce +} + +// GetFailoverEventDetails fetches full details for a specific failover event +func GetFailoverEventDetails(entry *persistence.DomainAuditLogEntry) (*types.GetFailoverEventResponse, error) { + if entry == nil { + return nil, &types.BadRequestError{Message: "domain audit log entry is nil"} + } + + if len(entry.StateAfter) == 0 { + // Empty state_after - this could indicate the entry was found but has no change data + // This might happen for non-failover operations or data corruption + return nil, &types.BadRequestError{ + Message: fmt.Sprintf("state_after is empty for event %s", entry.EventID), + } + } + + failovers, err := ReconstructClusterFailovers(entry.StateAfter) + if err != nil { + return nil, &types.BadRequestError{ + Message: fmt.Sprintf("failed to reconstruct cluster failovers: %v", err), + } + } + + if len(failovers) == 0 { + // This could indicate the StateAfter doesn't contain any recognizable failover patterns + return nil, &types.BadRequestError{ + Message: fmt.Sprintf("no cluster failovers found in state_after for event %s (state_after length: %d bytes)", + entry.EventID, len(entry.StateAfter)), + } + } + + return &types.GetFailoverEventResponse{ + ClusterFailovers: failovers, + }, nil +} diff --git a/common/domain/audit/reconstruction_test.go b/common/domain/audit/reconstruction_test.go new file mode 100644 index 00000000000..c6fd3d5fb5c --- /dev/null +++ b/common/domain/audit/reconstruction_test.go @@ -0,0 +1,208 @@ +package audit + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/uber/cadence/common/persistence" + "github.com/uber/cadence/common/types" +) + +func TestReconstructFailoverEvents(t *testing.T) { + entries := []*persistence.DomainAuditLogEntry{ + { + EventID: "event-1", + CreatedTime: time.Now().Add(-1 * time.Hour), + OperationType: persistence.DomainOperationTypeFailover, + StateAfter: []byte(`[{"op":"replace","path":"/ReplicationConfig/ActiveClusterName","value":"cluster2"}]`), + }, + } + + events, err := ReconstructFailoverEvents(entries) + require.NoError(t, err) + assert.Len(t, events, 1) + assert.Equal(t, "event-1", *events[0].ID) +} + +func TestReconstructClusterFailovers_DefaultCluster(t *testing.T) { + // Test default cluster failover (active-passive) + diffBytes := []byte(`[{"op":"replace","path":"/ReplicationConfig/ActiveClusterName","value":"cluster2"}]`) + + failovers, err := ReconstructClusterFailovers(diffBytes) + require.NoError(t, err) + assert.Len(t, failovers, 1) + + failover := failovers[0] + assert.Equal(t, "cluster2", failover.ToCluster.ActiveClusterName) + assert.True(t, *failover.IsDefaultCluster) + assert.Nil(t, failover.ClusterAttribute) +} + +func TestReconstructClusterFailovers_ClusterAttributes(t *testing.T) { + // Test cluster attribute failover (active-active) + // Path format: /ReplicationConfig/ActiveClusters/region/ClusterAttributes/us-east-1/ActiveClusterName + diffBytes := []byte(`[ + { + "op":"replace", + "path":"/ReplicationConfig/ActiveClusters/region/ClusterAttributes/us-east-1/ActiveClusterName", + "value":"cluster2" + }, + { + "op":"replace", + "path":"/ReplicationConfig/ActiveClusters/city/ClusterAttributes/seattle/ActiveClusterName", + "value":"cluster3" + } + ]`) + + failovers, err := ReconstructClusterFailovers(diffBytes) + require.NoError(t, err) + assert.Len(t, failovers, 2) + + // First failover: region/us-east-1 + assert.Equal(t, "cluster2", failovers[0].ToCluster.ActiveClusterName) + assert.False(t, *failovers[0].IsDefaultCluster) + assert.NotNil(t, failovers[0].ClusterAttribute) + assert.Equal(t, "region", failovers[0].ClusterAttribute.Scope) + assert.Equal(t, "us-east-1", failovers[0].ClusterAttribute.Name) + + // Second failover: city/seattle + assert.Equal(t, "cluster3", failovers[1].ToCluster.ActiveClusterName) + assert.False(t, *failovers[1].IsDefaultCluster) + assert.NotNil(t, failovers[1].ClusterAttribute) + assert.Equal(t, "city", failovers[1].ClusterAttribute.Scope) + assert.Equal(t, "seattle", failovers[1].ClusterAttribute.Name) +} + +func TestReconstructClusterFailovers_MixedFailover(t *testing.T) { + // Test both default and cluster attribute failovers in same event + diffBytes := []byte(`[ + { + "op":"replace", + "path":"/ReplicationConfig/ActiveClusterName", + "value":"cluster2" + }, + { + "op":"replace", + "path":"/ReplicationConfig/ActiveClusters/region/ClusterAttributes/us-east-1/ActiveClusterName", + "value":"cluster3" + } + ]`) + + failovers, err := ReconstructClusterFailovers(diffBytes) + require.NoError(t, err) + assert.Len(t, failovers, 2) + + // Find default cluster failover + var defaultFailover *types.ClusterFailover + var attrFailover *types.ClusterFailover + for _, f := range failovers { + if f.IsDefaultCluster != nil && *f.IsDefaultCluster { + defaultFailover = f + } else { + attrFailover = f + } + } + + require.NotNil(t, defaultFailover) + require.NotNil(t, attrFailover) + + assert.Equal(t, "cluster2", defaultFailover.ToCluster.ActiveClusterName) + assert.Equal(t, "cluster3", attrFailover.ToCluster.ActiveClusterName) + assert.Equal(t, "region", attrFailover.ClusterAttribute.Scope) +} + +func TestReconstructClusterFailovers_InvalidJSON(t *testing.T) { + // Test invalid JSON input + diffBytes := []byte(`invalid json`) + + failovers, err := ReconstructClusterFailovers(diffBytes) + require.Error(t, err) + assert.Nil(t, failovers) +} + +func TestReconstructClusterFailovers_EmptyInput(t *testing.T) { + // Test empty patch + diffBytes := []byte(`[]`) + + failovers, err := ReconstructClusterFailovers(diffBytes) + require.NoError(t, err) + assert.Len(t, failovers, 0) +} + +func TestReconstructFailoverEvents_FiltersNonFailovers(t *testing.T) { + // Test that non-failover operations are filtered out + entries := []*persistence.DomainAuditLogEntry{ + { + EventID: "event-1", + CreatedTime: time.Now().Add(-2 * time.Hour), + OperationType: persistence.DomainOperationTypeCreate, + StateAfter: []byte(`[{"op":"add","path":"/Name","value":"test-domain"}]`), + }, + { + EventID: "event-2", + CreatedTime: time.Now().Add(-1 * time.Hour), + OperationType: persistence.DomainOperationTypeFailover, + StateAfter: []byte(`[{"op":"replace","path":"/ReplicationConfig/ActiveClusterName","value":"cluster2"}]`), + }, + { + EventID: "event-3", + CreatedTime: time.Now(), + OperationType: persistence.DomainOperationTypeUpdate, + StateAfter: []byte(`[{"op":"replace","path":"/Description","value":"updated"}]`), + }, + } + + events, err := ReconstructFailoverEvents(entries) + require.NoError(t, err) + assert.Len(t, events, 1) + assert.Equal(t, "event-2", *events[0].ID) + assert.Equal(t, types.FailoverTypeForce.Ptr(), events[0].FailoverType) +} + +func TestReconstructFailoverEvents_EmptyInput(t *testing.T) { + // Test empty input + events, err := ReconstructFailoverEvents(nil) + require.NoError(t, err) + assert.Len(t, events, 0) + + events, err = ReconstructFailoverEvents([]*persistence.DomainAuditLogEntry{}) + require.NoError(t, err) + assert.Len(t, events, 0) +} + +func TestGetFailoverEventDetails_ValidInput(t *testing.T) { + entry := &persistence.DomainAuditLogEntry{ + EventID: "event-1", + CreatedTime: time.Now(), + OperationType: persistence.DomainOperationTypeFailover, + StateAfter: []byte(`[ + { + "op":"replace", + "path":"/ReplicationConfig/ActiveClusterName", + "value":"cluster2" + } + ]`), + } + + response, err := GetFailoverEventDetails(entry) + require.NoError(t, err) + require.NotNil(t, response) + assert.Len(t, response.ClusterFailovers, 1) + assert.Equal(t, "cluster2", response.ClusterFailovers[0].ToCluster.ActiveClusterName) +} + +func TestGetFailoverEventDetails_InvalidJSON(t *testing.T) { + entry := &persistence.DomainAuditLogEntry{ + EventID: "event-1", + CreatedTime: time.Now(), + OperationType: persistence.DomainOperationTypeFailover, + StateAfter: []byte(`invalid json`), + } + + response, err := GetFailoverEventDetails(entry) + require.Error(t, err) + assert.Nil(t, response) +} diff --git a/common/domain/handler.go b/common/domain/handler.go index 3e5219b7b1e..f1c5ded3810 100644 --- a/common/domain/handler.go +++ b/common/domain/handler.go @@ -37,6 +37,7 @@ import ( "github.com/uber/cadence/common/clock" "github.com/uber/cadence/common/cluster" "github.com/uber/cadence/common/constants" + "github.com/uber/cadence/common/domain/audit" "github.com/uber/cadence/common/dynamicconfig/dynamicproperties" "github.com/uber/cadence/common/log" "github.com/uber/cadence/common/log/tag" @@ -427,6 +428,19 @@ func (d *handlerImpl) UpdateDomain( return nil, err } + // Capture old domain state for audit logging - MUST be a deep copy + // because we will modify the fields below and don't want to affect oldDomainResp + // Use JSON marshal/unmarshal for deep copy + oldDomainResp := &persistence.GetDomainResponse{} + oldDomainJSON, err := json.Marshal(getResponse) + if err == nil { + _ = json.Unmarshal(oldDomainJSON, oldDomainResp) + } + // If deep copy fails, fall back to shallow copy (still better than nothing for audit) + if oldDomainResp.Info == nil { + oldDomainResp = getResponse + } + info := getResponse.Info config := getResponse.Config replicationConfig := getResponse.ReplicationConfig @@ -672,6 +686,12 @@ func (d *handlerImpl) UpdateDomain( if err != nil { return nil, err } + + // Write audit log (best-effort, don't fail update if this fails) + if err := d.writeAuditLog(ctx, oldDomainResp, info, updateRequest); err != nil { + d.logger.Error("Failed to write domain audit log", tag.Error(err)) + // Don't fail the update + } } if isGlobalDomain { @@ -1875,6 +1895,71 @@ func NewFailoverEvent( return res } +func (d *handlerImpl) writeAuditLog( + ctx context.Context, + oldDomain *persistence.GetDomainResponse, + newDomainInfo *persistence.DomainInfo, + request *types.UpdateDomainRequest, +) error { + // Get the full new domain state + newDomainResp, err := d.domainManager.GetDomain(ctx, &persistence.GetDomainRequest{ + ID: newDomainInfo.ID, + }) + if err != nil { + return err + } + + // DEBUG: Log old and new ActiveClusterName + oldActiveCluster := "nil" + newActiveCluster := "nil" + if oldDomain != nil && oldDomain.ReplicationConfig != nil { + oldActiveCluster = oldDomain.ReplicationConfig.ActiveClusterName + } + if newDomainResp != nil && newDomainResp.ReplicationConfig != nil { + newActiveCluster = newDomainResp.ReplicationConfig.ActiveClusterName + } + d.logger.Info("Computing domain diff for audit log", + tag.Value(oldActiveCluster), + tag.Value(newActiveCluster)) + + // Compute diff + diffBytes, err := audit.ComputeDomainDiff(oldDomain, newDomainResp) + if err != nil { + return err + } + + d.logger.Info("Domain diff computed", + tag.Value(len(diffBytes)), + tag.Value(string(diffBytes))) + + // Extract identity + identity, identityType := audit.ExtractIdentity(ctx) + + // Determine operation type + opType := audit.DetermineOperationType(request) + + // Create audit log entry + now := time.Now() + entry := &persistence.DomainAuditLogEntry{ + DomainID: newDomainInfo.ID, + EventID: uuid.New(), + CreatedTime: now, + LastUpdatedTime: now, + OperationType: opType, + StateBefore: []byte("{}"), + StateBeforeEncoding: "json", + StateAfter: diffBytes, + StateAfterEncoding: "json-patch", + Identity: identity, + IdentityType: identityType, + } + + // Write to persistence + return d.domainManager.WriteDomainAuditLog(ctx, &persistence.WriteDomainAuditLogRequest{ + Entries: []*persistence.DomainAuditLogEntry{entry}, + }) +} + func (d *handlerImpl) buildActiveActiveClusterScopesFromUpdateRequest(updateRequest *types.UpdateDomainRequest, config *persistence.DomainReplicationConfig, domainName string) (out *types.ActiveClusters, isChanged bool) { var existing *types.ActiveClusters if config != nil && config.ActiveClusters != nil { diff --git a/common/log/tag/values.go b/common/log/tag/values.go index ffa4395f847..7c299d22d27 100644 --- a/common/log/tag/values.go +++ b/common/log/tag/values.go @@ -389,6 +389,8 @@ var ( FrontendClientOperationGetClusterInfo = clientOperation("frontend-get-cluster-info") FrontendClientOperationListTaskListPartitions = clientOperation("frontend-list-task-list-partitions") FrontendClientOperationGetTaskListsByDomain = clientOperation("frontend-get-task-list-for-domain") + FrontendClientOperationListFailoverHistory = clientOperation("frontend-list-failover-history") + FrontendClientOperationGetFailoverEvent = clientOperation("frontend-get-failover-event") HistoryClientOperationStartWorkflowExecution = clientOperation("history-start-wf-execution") HistoryClientOperationDescribeHistoryHost = clientOperation("history-describe-history-host") diff --git a/common/metrics/defs.go b/common/metrics/defs.go index 11da0c184b8..fc32b85f295 100644 --- a/common/metrics/defs.go +++ b/common/metrics/defs.go @@ -255,6 +255,12 @@ const ( PersistenceListDomainsScope // PersistenceGetMetadataScope tracks DeleteDomainByName calls made by service to persistence layer PersistenceGetMetadataScope + // PersistenceWriteDomainAuditLogScope tracks WriteDomainAuditLog calls made by service to persistence layer + PersistenceWriteDomainAuditLogScope + // PersistenceReadDomainAuditLogScope tracks ReadDomainAuditLog calls made by service to persistence layer + PersistenceReadDomainAuditLogScope + // PersistenceGetDomainAuditLogEntryScope tracks GetDomainAuditLogEntry calls made by service to persistence layer + PersistenceGetDomainAuditLogEntryScope // PersistenceRecordWorkflowExecutionStartedScope tracks RecordWorkflowExecutionStarted calls made by service to persistence layer PersistenceRecordWorkflowExecutionStartedScope // PersistenceRecordWorkflowExecutionClosedScope tracks RecordWorkflowExecutionClosed calls made by service to persistence layer @@ -552,6 +558,10 @@ const ( FrontendClientListTaskListPartitionsScope // FrontendClientGetTaskListsByDomainScope tracks RPC calls to frontend service FrontendClientGetTaskListsByDomainScope + // FrontendClientListFailoverHistoryScope tracks RPC calls to frontend service + FrontendClientListFailoverHistoryScope + // FrontendClientGetFailoverEventScope tracks RPC calls to frontend service + FrontendClientGetFailoverEventScope // AdminClientAddSearchAttributeScope tracks RPC calls to admin service AdminClientAddSearchAttributeScope @@ -632,6 +642,10 @@ const ( DCRedirectionDeprecateDomainScope // DCRedirectionFailoverDomainScope tracks RPC calls for dc redirection DCRedirectionFailoverDomainScope + // DCRedirectionListFailoverHistoryScope tracks RPC calls for dc redirection + DCRedirectionListFailoverHistoryScope + // DCRedirectionGetFailoverEventScope tracks RPC calls for dc redirection + DCRedirectionGetFailoverEventScope // DCRedirectionDescribeDomainScope tracks RPC calls for dc redirection DCRedirectionDescribeDomainScope // DCRedirectionDescribeTaskListScope tracks RPC calls for dc redirection @@ -1055,6 +1069,10 @@ const ( FrontendDeprecateDomainScope // FrontendFailoverDomainScope is the metric scope for frontend.FailoverDomain FrontendFailoverDomainScope + // FrontendListFailoverHistoryScope is the metric scope for frontend.ListFailoverHistory + FrontendListFailoverHistoryScope + // FrontendGetFailoverEventScope is the metric scope for frontend.GetFailoverEvent + FrontendGetFailoverEventScope // FrontendQueryWorkflowScope is the metric scope for frontend.QueryWorkflow FrontendQueryWorkflowScope // FrontendDescribeWorkflowExecutionScope is the metric scope for frontend.DescribeWorkflowExecution @@ -1536,6 +1554,9 @@ var ScopeDefs = map[ServiceIdx]map[ScopeIdx]scopeDefinition{ PersistenceDeleteDomainByNameScope: {operation: "DeleteDomainByName"}, PersistenceListDomainsScope: {operation: "ListDomain"}, PersistenceGetMetadataScope: {operation: "GetMetadata"}, + PersistenceWriteDomainAuditLogScope: {operation: "WriteDomainAuditLog"}, + PersistenceReadDomainAuditLogScope: {operation: "ReadDomainAuditLog"}, + PersistenceGetDomainAuditLogEntryScope: {operation: "GetDomainAuditLogEntry"}, PersistenceRecordWorkflowExecutionStartedScope: {operation: "RecordWorkflowExecutionStarted"}, PersistenceRecordWorkflowExecutionClosedScope: {operation: "RecordWorkflowExecutionClosed"}, PersistenceRecordWorkflowExecutionUninitializedScope: {operation: "RecordWorkflowExecutionUninitialized"}, @@ -1695,6 +1716,8 @@ var ScopeDefs = map[ServiceIdx]map[ScopeIdx]scopeDefinition{ FrontendClientGetClusterInfoScope: {operation: "FrontendClientGetClusterInfo", tags: map[string]string{CadenceRoleTagName: FrontendClientRoleTagValue}}, FrontendClientListTaskListPartitionsScope: {operation: "FrontendClientListTaskListPartitions", tags: map[string]string{CadenceRoleTagName: FrontendClientRoleTagValue}}, FrontendClientGetTaskListsByDomainScope: {operation: "FrontendClientGetTaskListsByDomain", tags: map[string]string{CadenceRoleTagName: FrontendClientRoleTagValue}}, + FrontendClientListFailoverHistoryScope: {operation: "FrontendClientListFailoverHistory", tags: map[string]string{CadenceRoleTagName: FrontendClientRoleTagValue}}, + FrontendClientGetFailoverEventScope: {operation: "FrontendClientGetFailoverEvent", tags: map[string]string{CadenceRoleTagName: FrontendClientRoleTagValue}}, FrontendClientRestartWorkflowExecutionScope: {operation: "FrontendClientRestartWorkflowExecution", tags: map[string]string{CadenceRoleTagName: FrontendClientRoleTagValue}}, AdminClientGetReplicationTasksScope: {operation: "AdminClientGetReplicationTasks", tags: map[string]string{CadenceRoleTagName: AdminClientRoleTagValue}}, @@ -1737,6 +1760,8 @@ var ScopeDefs = map[ServiceIdx]map[ScopeIdx]scopeDefinition{ DCRedirectionDeleteDomainScope: {operation: "DCRedirectionDeleteDomain", tags: map[string]string{CadenceRoleTagName: DCRedirectionRoleTagValue}}, DCRedirectionDeprecateDomainScope: {operation: "DCRedirectionDeprecateDomain", tags: map[string]string{CadenceRoleTagName: DCRedirectionRoleTagValue}}, DCRedirectionFailoverDomainScope: {operation: "DCRedirectionFailoverDomain", tags: map[string]string{CadenceRoleTagName: DCRedirectionRoleTagValue}}, + DCRedirectionListFailoverHistoryScope: {operation: "DCRedirectionListFailoverHistory", tags: map[string]string{CadenceRoleTagName: DCRedirectionRoleTagValue}}, + DCRedirectionGetFailoverEventScope: {operation: "DCRedirectionGetFailoverEvent", tags: map[string]string{CadenceRoleTagName: DCRedirectionRoleTagValue}}, DCRedirectionDescribeDomainScope: {operation: "DCRedirectionDescribeDomain", tags: map[string]string{CadenceRoleTagName: DCRedirectionRoleTagValue}}, DCRedirectionDescribeTaskListScope: {operation: "DCRedirectionDescribeTaskList", tags: map[string]string{CadenceRoleTagName: DCRedirectionRoleTagValue}}, DCRedirectionDescribeWorkflowExecutionScope: {operation: "DCRedirectionDescribeWorkflowExecution", tags: map[string]string{CadenceRoleTagName: DCRedirectionRoleTagValue}}, @@ -1943,6 +1968,8 @@ var ScopeDefs = map[ServiceIdx]map[ScopeIdx]scopeDefinition{ FrontendDeleteDomainScope: {operation: "DeleteDomain"}, FrontendDeprecateDomainScope: {operation: "DeprecateDomain"}, FrontendFailoverDomainScope: {operation: "FailoverDomain"}, + FrontendListFailoverHistoryScope: {operation: "ListFailoverHistory"}, + FrontendGetFailoverEventScope: {operation: "GetFailoverEvent"}, FrontendQueryWorkflowScope: {operation: "QueryWorkflow"}, FrontendDescribeWorkflowExecutionScope: {operation: "DescribeWorkflowExecution"}, FrontendDiagnoseWorkflowExecutionScope: {operation: "DiagnoseWorkflowExecution"}, diff --git a/common/mocks/MetadataManager.go b/common/mocks/MetadataManager.go index fa02cd4419a..233c47d2d45 100644 --- a/common/mocks/MetadataManager.go +++ b/common/mocks/MetadataManager.go @@ -187,3 +187,63 @@ func (_m *MetadataManager) UpdateDomain(ctx context.Context, request *persistenc return r0 } + +// ReadDomainAuditLog provides a mock function with given fields: ctx, request +func (_m *MetadataManager) ReadDomainAuditLog(ctx context.Context, request *persistence.ReadDomainAuditLogRequest) (*persistence.ReadDomainAuditLogResponse, error) { + ret := _m.Called(ctx, request) + + var r0 *persistence.ReadDomainAuditLogResponse + if rf, ok := ret.Get(0).(func(context.Context, *persistence.ReadDomainAuditLogRequest) *persistence.ReadDomainAuditLogResponse); ok { + r0 = rf(ctx, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*persistence.ReadDomainAuditLogResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *persistence.ReadDomainAuditLogRequest) error); ok { + r1 = rf(ctx, request) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetDomainAuditLogEntry provides a mock function with given fields: ctx, request +func (_m *MetadataManager) GetDomainAuditLogEntry(ctx context.Context, request *persistence.GetDomainAuditLogEntryRequest) (*persistence.GetDomainAuditLogEntryResponse, error) { + ret := _m.Called(ctx, request) + + var r0 *persistence.GetDomainAuditLogEntryResponse + if rf, ok := ret.Get(0).(func(context.Context, *persistence.GetDomainAuditLogEntryRequest) *persistence.GetDomainAuditLogEntryResponse); ok { + r0 = rf(ctx, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*persistence.GetDomainAuditLogEntryResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *persistence.GetDomainAuditLogEntryRequest) error); ok { + r1 = rf(ctx, request) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// WriteDomainAuditLog provides a mock function with given fields: ctx, request +func (_m *MetadataManager) WriteDomainAuditLog(ctx context.Context, request *persistence.WriteDomainAuditLogRequest) error { + ret := _m.Called(ctx, request) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *persistence.WriteDomainAuditLogRequest) error); ok { + r0 = rf(ctx, request) + } else { + r0 = ret.Error(0) + } + + return r0 +} diff --git a/common/persistence/data_manager_interfaces.go b/common/persistence/data_manager_interfaces.go index 8b5583b4a52..7511088beec 100644 --- a/common/persistence/data_manager_interfaces.go +++ b/common/persistence/data_manager_interfaces.go @@ -76,6 +76,16 @@ const ( DomainStatusDeleted ) +// DomainOperationType constants +const ( + DomainOperationTypeUnknown DomainOperationType = iota + DomainOperationTypeCreate + DomainOperationTypeUpdate + DomainOperationTypeFailover + DomainOperationTypeDelete + DomainOperationTypeDeprecate +) + const ( // EventStoreVersion is already deprecated, this is used for forward // compatibility (so that rollback is possible). @@ -1244,6 +1254,57 @@ type ( NotificationVersion int64 } + // DomainOperationType represents the type of operation performed on a domain + DomainOperationType int + + // DomainAuditLogEntry represents a single audit log entry for domain changes + DomainAuditLogEntry struct { + DomainID string + EventID string + CreatedTime time.Time + LastUpdatedTime time.Time + OperationType DomainOperationType + StateBefore []byte + StateBeforeEncoding string + StateAfter []byte + StateAfterEncoding string + Identity string + IdentityType string + Comment string + } + + // WriteDomainAuditLogRequest is used to write domain audit log entries + WriteDomainAuditLogRequest struct { + Entries []*DomainAuditLogEntry + } + + // ReadDomainAuditLogRequest is used to read domain audit log entries + ReadDomainAuditLogRequest struct { + DomainID string + PageSize int + NextPageToken []byte + MinCreatedTime *time.Time + MaxCreatedTime *time.Time + } + + // ReadDomainAuditLogResponse is the response for ReadDomainAuditLog + ReadDomainAuditLogResponse struct { + Entries []*DomainAuditLogEntry + NextPageToken []byte + } + + // GetDomainAuditLogEntryRequest for fetching a specific entry + GetDomainAuditLogEntryRequest struct { + DomainID string + EventID string + CreatedTime time.Time + } + + // GetDomainAuditLogEntryResponse returns a single entry with all details + GetDomainAuditLogEntryResponse struct { + Entry *DomainAuditLogEntry + } + // MutableStateStats is the size stats for MutableState MutableStateStats struct { // Total size of mutable state @@ -1611,6 +1672,9 @@ type ( DeleteDomainByName(ctx context.Context, request *DeleteDomainByNameRequest) error ListDomains(ctx context.Context, request *ListDomainsRequest) (*ListDomainsResponse, error) GetMetadata(ctx context.Context) (*GetMetadataResponse, error) + WriteDomainAuditLog(ctx context.Context, request *WriteDomainAuditLogRequest) error + ReadDomainAuditLog(ctx context.Context, request *ReadDomainAuditLogRequest) (*ReadDomainAuditLogResponse, error) + GetDomainAuditLogEntry(ctx context.Context, request *GetDomainAuditLogEntryRequest) (*GetDomainAuditLogEntryResponse, error) } // QueueManager is used to manage queue store diff --git a/common/persistence/data_manager_interfaces_mock.go b/common/persistence/data_manager_interfaces_mock.go index a44b1af9735..1affee296f7 100644 --- a/common/persistence/data_manager_interfaces_mock.go +++ b/common/persistence/data_manager_interfaces_mock.go @@ -1256,6 +1256,21 @@ func (mr *MockDomainManagerMockRecorder) GetDomain(ctx, request any) *gomock.Cal return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDomain", reflect.TypeOf((*MockDomainManager)(nil).GetDomain), ctx, request) } +// GetDomainAuditLogEntry mocks base method. +func (m *MockDomainManager) GetDomainAuditLogEntry(ctx context.Context, request *GetDomainAuditLogEntryRequest) (*GetDomainAuditLogEntryResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetDomainAuditLogEntry", ctx, request) + ret0, _ := ret[0].(*GetDomainAuditLogEntryResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetDomainAuditLogEntry indicates an expected call of GetDomainAuditLogEntry. +func (mr *MockDomainManagerMockRecorder) GetDomainAuditLogEntry(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDomainAuditLogEntry", reflect.TypeOf((*MockDomainManager)(nil).GetDomainAuditLogEntry), ctx, request) +} + // GetMetadata mocks base method. func (m *MockDomainManager) GetMetadata(ctx context.Context) (*GetMetadataResponse, error) { m.ctrl.T.Helper() @@ -1300,6 +1315,21 @@ func (mr *MockDomainManagerMockRecorder) ListDomains(ctx, request any) *gomock.C return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDomains", reflect.TypeOf((*MockDomainManager)(nil).ListDomains), ctx, request) } +// ReadDomainAuditLog mocks base method. +func (m *MockDomainManager) ReadDomainAuditLog(ctx context.Context, request *ReadDomainAuditLogRequest) (*ReadDomainAuditLogResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ReadDomainAuditLog", ctx, request) + ret0, _ := ret[0].(*ReadDomainAuditLogResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ReadDomainAuditLog indicates an expected call of ReadDomainAuditLog. +func (mr *MockDomainManagerMockRecorder) ReadDomainAuditLog(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadDomainAuditLog", reflect.TypeOf((*MockDomainManager)(nil).ReadDomainAuditLog), ctx, request) +} + // UpdateDomain mocks base method. func (m *MockDomainManager) UpdateDomain(ctx context.Context, request *UpdateDomainRequest) error { m.ctrl.T.Helper() @@ -1314,6 +1344,20 @@ func (mr *MockDomainManagerMockRecorder) UpdateDomain(ctx, request any) *gomock. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateDomain", reflect.TypeOf((*MockDomainManager)(nil).UpdateDomain), ctx, request) } +// WriteDomainAuditLog mocks base method. +func (m *MockDomainManager) WriteDomainAuditLog(ctx context.Context, request *WriteDomainAuditLogRequest) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "WriteDomainAuditLog", ctx, request) + ret0, _ := ret[0].(error) + return ret0 +} + +// WriteDomainAuditLog indicates an expected call of WriteDomainAuditLog. +func (mr *MockDomainManagerMockRecorder) WriteDomainAuditLog(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteDomainAuditLog", reflect.TypeOf((*MockDomainManager)(nil).WriteDomainAuditLog), ctx, request) +} + // MockQueueManager is a mock of QueueManager interface. type MockQueueManager struct { ctrl *gomock.Controller diff --git a/common/persistence/data_store_interfaces.go b/common/persistence/data_store_interfaces.go index d2d61fc3f4d..cd239d7c0a2 100644 --- a/common/persistence/data_store_interfaces.go +++ b/common/persistence/data_store_interfaces.go @@ -92,6 +92,9 @@ type ( DeleteDomainByName(ctx context.Context, request *DeleteDomainByNameRequest) error ListDomains(ctx context.Context, request *ListDomainsRequest) (*InternalListDomainsResponse, error) GetMetadata(ctx context.Context) (*GetMetadataResponse, error) + WriteDomainAuditLog(ctx context.Context, request *WriteDomainAuditLogRequest) error + ReadDomainAuditLog(ctx context.Context, request *ReadDomainAuditLogRequest) (*ReadDomainAuditLogResponse, error) + GetDomainAuditLogEntry(ctx context.Context, request *GetDomainAuditLogEntryRequest) (*GetDomainAuditLogEntryResponse, error) } // ExecutionStore is used to manage workflow executions for Persistence layer diff --git a/common/persistence/data_store_interfaces_mock.go b/common/persistence/data_store_interfaces_mock.go index 944dddc4379..a44313d66dc 100644 --- a/common/persistence/data_store_interfaces_mock.go +++ b/common/persistence/data_store_interfaces_mock.go @@ -573,6 +573,21 @@ func (mr *MockDomainStoreMockRecorder) GetDomain(ctx, request any) *gomock.Call return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDomain", reflect.TypeOf((*MockDomainStore)(nil).GetDomain), ctx, request) } +// GetDomainAuditLogEntry mocks base method. +func (m *MockDomainStore) GetDomainAuditLogEntry(ctx context.Context, request *GetDomainAuditLogEntryRequest) (*GetDomainAuditLogEntryResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetDomainAuditLogEntry", ctx, request) + ret0, _ := ret[0].(*GetDomainAuditLogEntryResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetDomainAuditLogEntry indicates an expected call of GetDomainAuditLogEntry. +func (mr *MockDomainStoreMockRecorder) GetDomainAuditLogEntry(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDomainAuditLogEntry", reflect.TypeOf((*MockDomainStore)(nil).GetDomainAuditLogEntry), ctx, request) +} + // GetMetadata mocks base method. func (m *MockDomainStore) GetMetadata(ctx context.Context) (*GetMetadataResponse, error) { m.ctrl.T.Helper() @@ -617,6 +632,21 @@ func (mr *MockDomainStoreMockRecorder) ListDomains(ctx, request any) *gomock.Cal return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDomains", reflect.TypeOf((*MockDomainStore)(nil).ListDomains), ctx, request) } +// ReadDomainAuditLog mocks base method. +func (m *MockDomainStore) ReadDomainAuditLog(ctx context.Context, request *ReadDomainAuditLogRequest) (*ReadDomainAuditLogResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ReadDomainAuditLog", ctx, request) + ret0, _ := ret[0].(*ReadDomainAuditLogResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ReadDomainAuditLog indicates an expected call of ReadDomainAuditLog. +func (mr *MockDomainStoreMockRecorder) ReadDomainAuditLog(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadDomainAuditLog", reflect.TypeOf((*MockDomainStore)(nil).ReadDomainAuditLog), ctx, request) +} + // UpdateDomain mocks base method. func (m *MockDomainStore) UpdateDomain(ctx context.Context, request *InternalUpdateDomainRequest) error { m.ctrl.T.Helper() @@ -631,6 +661,20 @@ func (mr *MockDomainStoreMockRecorder) UpdateDomain(ctx, request any) *gomock.Ca return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateDomain", reflect.TypeOf((*MockDomainStore)(nil).UpdateDomain), ctx, request) } +// WriteDomainAuditLog mocks base method. +func (m *MockDomainStore) WriteDomainAuditLog(ctx context.Context, request *WriteDomainAuditLogRequest) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "WriteDomainAuditLog", ctx, request) + ret0, _ := ret[0].(error) + return ret0 +} + +// WriteDomainAuditLog indicates an expected call of WriteDomainAuditLog. +func (mr *MockDomainStoreMockRecorder) WriteDomainAuditLog(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteDomainAuditLog", reflect.TypeOf((*MockDomainStore)(nil).WriteDomainAuditLog), ctx, request) +} + // MockTaskStore is a mock of TaskStore interface. type MockTaskStore struct { ctrl *gomock.Controller diff --git a/common/persistence/domain_audit_types_test.go b/common/persistence/domain_audit_types_test.go new file mode 100644 index 00000000000..72c3011b259 --- /dev/null +++ b/common/persistence/domain_audit_types_test.go @@ -0,0 +1,42 @@ +package persistence + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +func TestDomainAuditLogEntry_Serialization(t *testing.T) { + entry := &DomainAuditLogEntry{ + DomainID: "test-domain-id", + EventID: "test-event-id", + CreatedTime: time.Now(), + OperationType: DomainOperationTypeUpdate, + StateBefore: []byte(`{"field":"old"}`), + StateAfter: []byte(`{"field":"new"}`), + } + + assert.Equal(t, "test-domain-id", entry.DomainID) + assert.Equal(t, "test-event-id", entry.EventID) + assert.NotNil(t, entry.CreatedTime) +} + +func TestDomainOperationType_Constants(t *testing.T) { + // Verify all operation type constants are properly defined + assert.Equal(t, DomainOperationType(0), DomainOperationTypeUnknown) + assert.Equal(t, DomainOperationType(1), DomainOperationTypeCreate) + assert.Equal(t, DomainOperationType(2), DomainOperationTypeUpdate) + assert.Equal(t, DomainOperationType(3), DomainOperationTypeFailover) + assert.Equal(t, DomainOperationType(4), DomainOperationTypeDelete) + assert.Equal(t, DomainOperationType(5), DomainOperationTypeDeprecate) + + // Verify constants can be assigned to struct field + entry := &DomainAuditLogEntry{ + DomainID: "test", + EventID: "test", + CreatedTime: time.Now(), + OperationType: DomainOperationTypeCreate, + } + assert.Equal(t, DomainOperationTypeCreate, entry.OperationType) +} diff --git a/common/persistence/domain_manager.go b/common/persistence/domain_manager.go index 09f0bfdff07..e2b8ee29438 100644 --- a/common/persistence/domain_manager.go +++ b/common/persistence/domain_manager.go @@ -315,6 +315,27 @@ func (m *domainManagerImpl) GetMetadata( return m.persistence.GetMetadata(ctx) } +func (m *domainManagerImpl) WriteDomainAuditLog( + ctx context.Context, + request *WriteDomainAuditLogRequest, +) error { + return m.persistence.WriteDomainAuditLog(ctx, request) +} + +func (m *domainManagerImpl) ReadDomainAuditLog( + ctx context.Context, + request *ReadDomainAuditLogRequest, +) (*ReadDomainAuditLogResponse, error) { + return m.persistence.ReadDomainAuditLog(ctx, request) +} + +func (m *domainManagerImpl) GetDomainAuditLogEntry( + ctx context.Context, + request *GetDomainAuditLogEntryRequest, +) (*GetDomainAuditLogEntryResponse, error) { + return m.persistence.GetDomainAuditLogEntry(ctx, request) +} + func (m *domainManagerImpl) Close() { m.persistence.Close() } diff --git a/common/persistence/nosql/nosql_domain_store.go b/common/persistence/nosql/nosql_domain_store.go index 37751cbc852..869de13f72b 100644 --- a/common/persistence/nosql/nosql_domain_store.go +++ b/common/persistence/nosql/nosql_domain_store.go @@ -257,3 +257,104 @@ func (m *nosqlDomainStore) GetMetadata( } return &persistence.GetMetadataResponse{NotificationVersion: notificationVersion}, nil } + +func (m *nosqlDomainStore) WriteDomainAuditLog( + ctx context.Context, + request *persistence.WriteDomainAuditLogRequest, +) error { + rows := make([]*nosqlplugin.DomainAuditLogRow, len(request.Entries)) + for i, entry := range request.Entries { + rows[i] = &nosqlplugin.DomainAuditLogRow{ + DomainID: entry.DomainID, + EventID: entry.EventID, + CreatedTime: entry.CreatedTime, + LastUpdatedTime: entry.LastUpdatedTime, + OperationType: int(entry.OperationType), + StateBefore: entry.StateBefore, + StateBeforeEncoding: entry.StateBeforeEncoding, + StateAfter: entry.StateAfter, + StateAfterEncoding: entry.StateAfterEncoding, + Identity: entry.Identity, + IdentityType: entry.IdentityType, + Comment: entry.Comment, + } + } + + err := m.db.InsertDomainAuditLog(ctx, rows) + if err != nil { + return convertCommonErrors(m.db, "WriteDomainAuditLog", err) + } + + return nil +} + +func (m *nosqlDomainStore) ReadDomainAuditLog( + ctx context.Context, + request *persistence.ReadDomainAuditLogRequest, +) (*persistence.ReadDomainAuditLogResponse, error) { + pluginRequest := &nosqlplugin.DomainAuditLogRequest{ + DomainID: request.DomainID, + PageSize: request.PageSize, + NextPageToken: request.NextPageToken, + MinCreatedTime: request.MinCreatedTime, + MaxCreatedTime: request.MaxCreatedTime, + } + + rows, nextPageToken, err := m.db.SelectDomainAuditLog(ctx, pluginRequest) + if err != nil { + return nil, convertCommonErrors(m.db, "ReadDomainAuditLog", err) + } + + entries := make([]*persistence.DomainAuditLogEntry, len(rows)) + for i, row := range rows { + entries[i] = &persistence.DomainAuditLogEntry{ + DomainID: row.DomainID, + EventID: row.EventID, + CreatedTime: row.CreatedTime, + LastUpdatedTime: row.LastUpdatedTime, + OperationType: persistence.DomainOperationType(row.OperationType), + StateBefore: row.StateBefore, + StateBeforeEncoding: row.StateBeforeEncoding, + StateAfter: row.StateAfter, + StateAfterEncoding: row.StateAfterEncoding, + Identity: row.Identity, + IdentityType: row.IdentityType, + Comment: row.Comment, + } + } + + return &persistence.ReadDomainAuditLogResponse{ + Entries: entries, + NextPageToken: nextPageToken, + }, nil +} + +// GetDomainAuditLogEntry retrieves a single audit log entry by its key +func (m *nosqlDomainStore) GetDomainAuditLogEntry( + ctx context.Context, + request *persistence.GetDomainAuditLogEntryRequest, +) (*persistence.GetDomainAuditLogEntryResponse, error) { + row, err := m.db.GetDomainAuditLogEntry(ctx, request.DomainID, request.EventID, request.CreatedTime) + if err != nil { + return nil, convertCommonErrors(m.db, "GetDomainAuditLogEntry", err) + } + + entry := &persistence.DomainAuditLogEntry{ + DomainID: row.DomainID, + EventID: row.EventID, + CreatedTime: row.CreatedTime, + LastUpdatedTime: row.LastUpdatedTime, + OperationType: persistence.DomainOperationType(row.OperationType), + StateBefore: row.StateBefore, + StateBeforeEncoding: row.StateBeforeEncoding, + StateAfter: row.StateAfter, + StateAfterEncoding: row.StateAfterEncoding, + Identity: row.Identity, + IdentityType: row.IdentityType, + Comment: row.Comment, + } + + return &persistence.GetDomainAuditLogEntryResponse{ + Entry: entry, + }, nil +} diff --git a/common/persistence/nosql/nosqlplugin/cassandra/domain.go b/common/persistence/nosql/nosqlplugin/cassandra/domain.go index ee97f8f31bf..41cf6ed34d2 100644 --- a/common/persistence/nosql/nosqlplugin/cassandra/domain.go +++ b/common/persistence/nosql/nosqlplugin/cassandra/domain.go @@ -539,3 +539,149 @@ func getActiveClustersFields(row *nosqlplugin.DomainRow) ([]byte, string) { } return d, e } + +// InsertDomainAuditLog inserts domain audit log entries +func (db *CDB) InsertDomainAuditLog( + ctx context.Context, + rows []*nosqlplugin.DomainAuditLogRow, +) error { + if len(rows) == 0 { + return nil + } + + batch := db.session.NewBatch(gocql.LoggedBatch).WithContext(ctx) + for _, row := range rows { + batch.Query(templateInsertDomainAuditLogQuery, + row.DomainID, + row.EventID, + row.CreatedTime, + row.LastUpdatedTime, + row.OperationType, + row.StateBefore, + row.StateBeforeEncoding, + row.StateAfter, + row.StateAfterEncoding, + row.Identity, + row.IdentityType, + row.Comment, + ) + } + + return db.session.ExecuteBatch(batch) +} + +// SelectDomainAuditLog selects domain audit log entries with pagination +func (db *CDB) SelectDomainAuditLog( + ctx context.Context, + request *nosqlplugin.DomainAuditLogRequest, +) ([]*nosqlplugin.DomainAuditLogRow, []byte, error) { + query := db.session.Query(templateSelectDomainAuditLogQuery, request.DomainID).WithContext(ctx) + + iter := query.PageSize(request.PageSize).PageState(request.NextPageToken).Iter() + if iter == nil { + return nil, nil, &types.InternalServiceError{ + Message: "SelectDomainAuditLog operation failed. Not able to create query iterator.", + } + } + + var rows []*nosqlplugin.DomainAuditLogRow + row := &nosqlplugin.DomainAuditLogRow{} + for iter.Scan( + &row.DomainID, + &row.EventID, + &row.CreatedTime, + &row.LastUpdatedTime, + &row.OperationType, + &row.StateBefore, + &row.StateBeforeEncoding, + &row.StateAfter, + &row.StateAfterEncoding, + &row.Identity, + &row.IdentityType, + &row.Comment, + ) { + // Apply time range filtering in memory if specified + if request.MinCreatedTime != nil && row.CreatedTime.Before(*request.MinCreatedTime) { + row = &nosqlplugin.DomainAuditLogRow{} + continue + } + if request.MaxCreatedTime != nil && row.CreatedTime.After(*request.MaxCreatedTime) { + row = &nosqlplugin.DomainAuditLogRow{} + continue + } + + rows = append(rows, row) + row = &nosqlplugin.DomainAuditLogRow{} + } + + nextPageToken := iter.PageState() + if err := iter.Close(); err != nil { + return nil, nil, err + } + + // Return nil instead of empty slice when there are no more pages + if len(nextPageToken) == 0 { + nextPageToken = nil + } + + return rows, nextPageToken, nil +} + +// GetDomainAuditLogEntry retrieves a specific domain audit log entry by its composite key +func (db *CDB) GetDomainAuditLogEntry( + ctx context.Context, + domainID string, + eventID string, + createdTime time.Time, +) (*nosqlplugin.DomainAuditLogRow, error) { + row := &nosqlplugin.DomainAuditLogRow{} + + db.logger.Debug("Querying domain audit log entry", + tag.Value(domainID), + tag.Value(eventID), + tag.Timestamp(createdTime), + tag.Value(createdTime.UnixNano())) + + err := db.session.Query(templateGetDomainAuditLogEntryQuery, + domainID, + createdTime, + eventID, + ).WithContext(ctx).Scan( + &row.DomainID, + &row.EventID, + &row.CreatedTime, + &row.LastUpdatedTime, + &row.OperationType, + &row.StateBefore, + &row.StateBeforeEncoding, + &row.StateAfter, + &row.StateAfterEncoding, + &row.Identity, + &row.IdentityType, + &row.Comment, + ) + + if err != nil { + if db.client.IsNotFoundError(err) { + db.logger.Debug("Domain audit log entry not found", + tag.Value(domainID), + tag.Value(eventID), + tag.Timestamp(createdTime)) + return nil, &types.EntityNotExistsError{ + Message: "domain audit log entry not found", + } + } + db.logger.Error("Error querying domain audit log entry", + tag.Error(err), + tag.Value(domainID), + tag.Value(eventID)) + return nil, err + } + + db.logger.Debug("Successfully retrieved audit log entry", + tag.Value(domainID), + tag.Value(eventID), + tag.Value(len(row.StateAfter))) + + return row, nil +} diff --git a/common/persistence/nosql/nosqlplugin/cassandra/domain_audit_test.go b/common/persistence/nosql/nosqlplugin/cassandra/domain_audit_test.go new file mode 100644 index 00000000000..68815b6ea0c --- /dev/null +++ b/common/persistence/nosql/nosqlplugin/cassandra/domain_audit_test.go @@ -0,0 +1,118 @@ +// Copyright (c) 2020 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 cassandra + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/uber/cadence/common/persistence/nosql/nosqlplugin" +) + +func TestInsertDomainAuditLog(t *testing.T) { + // This test requires a Cassandra test cluster + // For POC, we can skip if no test cluster available + t.Skip("Requires Cassandra test cluster - tested via integration tests") + + db := createTestDB(t) + defer db.Close() + + entry := &nosqlplugin.DomainAuditLogRow{ + DomainID: "test-domain-123", + EventID: "event-456", + CreatedTime: time.Now(), + LastUpdatedTime: time.Now(), + OperationType: 1, // DomainOperationTypeUpdate + StateBefore: []byte(`{}`), + StateBeforeEncoding: "json", + StateAfter: []byte(`[{"op":"replace","path":"/name","value":"new"}]`), + StateAfterEncoding: "json-patch", + Identity: "user@example.com", + IdentityType: "user", + } + + rows := []*nosqlplugin.DomainAuditLogRow{entry} + + err := db.InsertDomainAuditLog(context.Background(), rows) + require.NoError(t, err) +} + +func TestSelectDomainAuditLog(t *testing.T) { + t.Skip("Requires Cassandra test cluster - tested via integration tests") + + db := createTestDB(t) + defer db.Close() + + // First write some entries + ctx := context.Background() + domainID := "test-domain-read-123" + + entries := []*nosqlplugin.DomainAuditLogRow{ + { + DomainID: domainID, + EventID: "event-1", + CreatedTime: time.Now().Add(-2 * time.Hour), + LastUpdatedTime: time.Now().Add(-2 * time.Hour), + OperationType: 1, // DomainOperationTypeUpdate + StateBefore: []byte(`{}`), + StateBeforeEncoding: "json", + StateAfter: []byte(`{}`), + StateAfterEncoding: "json-patch", + }, + { + DomainID: domainID, + EventID: "event-2", + CreatedTime: time.Now().Add(-1 * time.Hour), + LastUpdatedTime: time.Now().Add(-1 * time.Hour), + OperationType: 2, // DomainOperationTypeFailover + StateBefore: []byte(`{}`), + StateBeforeEncoding: "json", + StateAfter: []byte(`{}`), + StateAfterEncoding: "json-patch", + }, + } + + err := db.InsertDomainAuditLog(ctx, entries) + require.NoError(t, err) + + // Now read them back + rows, nextPageToken, err := db.SelectDomainAuditLog(ctx, &nosqlplugin.DomainAuditLogRequest{ + DomainID: domainID, + PageSize: 10, + }) + require.NoError(t, err) + assert.Len(t, rows, 2) + // Should be in descending order (newest first) + assert.Equal(t, "event-2", rows[0].EventID) + assert.Equal(t, "event-1", rows[1].EventID) + assert.Nil(t, nextPageToken) +} + +func createTestDB(t *testing.T) *CDB { + // This would need actual Cassandra connection for real tests + // For now, this is a placeholder + t.Skip("Test DB creation not implemented - requires Cassandra instance") + return nil +} diff --git a/common/persistence/nosql/nosqlplugin/cassandra/domain_cql.go b/common/persistence/nosql/nosqlplugin/cassandra/domain_cql.go index cb51a3ecc1e..2364164e9fd 100644 --- a/common/persistence/nosql/nosqlplugin/cassandra/domain_cql.go +++ b/common/persistence/nosql/nosqlplugin/cassandra/domain_cql.go @@ -143,4 +143,22 @@ const ( `notification_version ` + `FROM domains_by_name_v2 ` + `WHERE domains_partition = ? ` + + templateInsertDomainAuditLogQuery = `INSERT INTO domain_audit_log (` + + `domain_id, event_id, created_time, last_updated_time, ` + + `operation_type, state_before, state_before_encoding, ` + + `state_after, state_after_encoding, identity, identity_type, comment) ` + + `VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)` + + templateSelectDomainAuditLogQuery = `SELECT domain_id, event_id, created_time, last_updated_time, ` + + `operation_type, state_before, state_before_encoding, ` + + `state_after, state_after_encoding, identity, identity_type, comment ` + + `FROM domain_audit_log ` + + `WHERE domain_id = ?` + + templateGetDomainAuditLogEntryQuery = `SELECT domain_id, event_id, created_time, last_updated_time, ` + + `operation_type, state_before, state_before_encoding, ` + + `state_after, state_after_encoding, identity, identity_type, comment ` + + `FROM domain_audit_log ` + + `WHERE domain_id = ? AND created_time = ? AND event_id = ?` ) diff --git a/common/persistence/nosql/nosqlplugin/dynamodb/domain.go b/common/persistence/nosql/nosqlplugin/dynamodb/domain.go index e1386fbc818..9cf06099c0f 100644 --- a/common/persistence/nosql/nosqlplugin/dynamodb/domain.go +++ b/common/persistence/nosql/nosqlplugin/dynamodb/domain.go @@ -22,6 +22,7 @@ package dynamodb import ( "context" + "time" "github.com/uber/cadence/common/persistence/nosql/nosqlplugin" ) @@ -75,3 +76,29 @@ func (db *ddb) SelectDomainMetadata( ) (int64, error) { panic("TODO") } + +// InsertDomainAuditLog inserts domain audit log entries +func (db *ddb) InsertDomainAuditLog( + ctx context.Context, + rows []*nosqlplugin.DomainAuditLogRow, +) error { + panic("TODO") +} + +// SelectDomainAuditLog selects domain audit log entries with pagination +func (db *ddb) SelectDomainAuditLog( + ctx context.Context, + request *nosqlplugin.DomainAuditLogRequest, +) ([]*nosqlplugin.DomainAuditLogRow, []byte, error) { + panic("TODO") +} + +// GetDomainAuditLogEntry retrieves a specific domain audit log entry by its composite key +func (db *ddb) GetDomainAuditLogEntry( + ctx context.Context, + domainID string, + eventID string, + createdTime time.Time, +) (*nosqlplugin.DomainAuditLogRow, error) { + panic("TODO") +} diff --git a/common/persistence/nosql/nosqlplugin/interfaces.go b/common/persistence/nosql/nosqlplugin/interfaces.go index a0b5364cb93..b05e7bd5875 100644 --- a/common/persistence/nosql/nosqlplugin/interfaces.go +++ b/common/persistence/nosql/nosqlplugin/interfaces.go @@ -186,6 +186,12 @@ type ( DeleteDomain(ctx context.Context, domainID *string, domainName *string) error // right now domain metadata is just an integer as notification version SelectDomainMetadata(ctx context.Context) (int64, error) + // Insert domain audit log entries + InsertDomainAuditLog(ctx context.Context, rows []*DomainAuditLogRow) error + // Select domain audit log entries with pagination + SelectDomainAuditLog(ctx context.Context, request *DomainAuditLogRequest) ([]*DomainAuditLogRow, []byte, error) + // Get a specific domain audit log entry by its composite key + GetDomainAuditLogEntry(ctx context.Context, domainID string, eventID string, createdTime time.Time) (*DomainAuditLogRow, error) } /** diff --git a/common/persistence/nosql/nosqlplugin/interfaces_mock.go b/common/persistence/nosql/nosqlplugin/interfaces_mock.go index 85b6d1246c3..bbc44e6c8d9 100644 --- a/common/persistence/nosql/nosqlplugin/interfaces_mock.go +++ b/common/persistence/nosql/nosqlplugin/interfaces_mock.go @@ -373,6 +373,21 @@ func (mr *MockDBMockRecorder) DeleteWorkflowExecution(ctx, shardID, domainID, wo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteWorkflowExecution", reflect.TypeOf((*MockDB)(nil).DeleteWorkflowExecution), ctx, shardID, domainID, workflowID, runID) } +// GetDomainAuditLogEntry mocks base method. +func (m *MockDB) GetDomainAuditLogEntry(ctx context.Context, domainID, eventID string, createdTime time.Time) (*DomainAuditLogRow, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetDomainAuditLogEntry", ctx, domainID, eventID, createdTime) + ret0, _ := ret[0].(*DomainAuditLogRow) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetDomainAuditLogEntry indicates an expected call of GetDomainAuditLogEntry. +func (mr *MockDBMockRecorder) GetDomainAuditLogEntry(ctx, domainID, eventID, createdTime any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDomainAuditLogEntry", reflect.TypeOf((*MockDB)(nil).GetDomainAuditLogEntry), ctx, domainID, eventID, createdTime) +} + // GetQueueSize mocks base method. func (m *MockDB) GetQueueSize(ctx context.Context, queueType persistence.QueueType) (int64, error) { m.ctrl.T.Helper() @@ -431,6 +446,20 @@ func (mr *MockDBMockRecorder) InsertDomain(ctx, row any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertDomain", reflect.TypeOf((*MockDB)(nil).InsertDomain), ctx, row) } +// InsertDomainAuditLog mocks base method. +func (m *MockDB) InsertDomainAuditLog(ctx context.Context, rows []*DomainAuditLogRow) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "InsertDomainAuditLog", ctx, rows) + ret0, _ := ret[0].(error) + return ret0 +} + +// InsertDomainAuditLog indicates an expected call of InsertDomainAuditLog. +func (mr *MockDBMockRecorder) InsertDomainAuditLog(ctx, rows any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertDomainAuditLog", reflect.TypeOf((*MockDB)(nil).InsertDomainAuditLog), ctx, rows) +} + // InsertIntoHistoryTreeAndNode mocks base method. func (m *MockDB) InsertIntoHistoryTreeAndNode(ctx context.Context, treeRow *HistoryTreeRow, nodeRow *HistoryNodeRow) error { m.ctrl.T.Helper() @@ -851,6 +880,22 @@ func (mr *MockDBMockRecorder) SelectDomain(ctx, domainID, domainName any) *gomoc return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectDomain", reflect.TypeOf((*MockDB)(nil).SelectDomain), ctx, domainID, domainName) } +// SelectDomainAuditLog mocks base method. +func (m *MockDB) SelectDomainAuditLog(ctx context.Context, request *DomainAuditLogRequest) ([]*DomainAuditLogRow, []byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SelectDomainAuditLog", ctx, request) + ret0, _ := ret[0].([]*DomainAuditLogRow) + ret1, _ := ret[1].([]byte) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// SelectDomainAuditLog indicates an expected call of SelectDomainAuditLog. +func (mr *MockDBMockRecorder) SelectDomainAuditLog(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectDomainAuditLog", reflect.TypeOf((*MockDB)(nil).SelectDomainAuditLog), ctx, request) +} + // SelectDomainMetadata mocks base method. func (m *MockDB) SelectDomainMetadata(ctx context.Context) (int64, error) { m.ctrl.T.Helper() @@ -1488,6 +1533,21 @@ func (mr *MocktableCRUDMockRecorder) DeleteWorkflowExecution(ctx, shardID, domai return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteWorkflowExecution", reflect.TypeOf((*MocktableCRUD)(nil).DeleteWorkflowExecution), ctx, shardID, domainID, workflowID, runID) } +// GetDomainAuditLogEntry mocks base method. +func (m *MocktableCRUD) GetDomainAuditLogEntry(ctx context.Context, domainID, eventID string, createdTime time.Time) (*DomainAuditLogRow, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetDomainAuditLogEntry", ctx, domainID, eventID, createdTime) + ret0, _ := ret[0].(*DomainAuditLogRow) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetDomainAuditLogEntry indicates an expected call of GetDomainAuditLogEntry. +func (mr *MocktableCRUDMockRecorder) GetDomainAuditLogEntry(ctx, domainID, eventID, createdTime any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDomainAuditLogEntry", reflect.TypeOf((*MocktableCRUD)(nil).GetDomainAuditLogEntry), ctx, domainID, eventID, createdTime) +} + // GetQueueSize mocks base method. func (m *MocktableCRUD) GetQueueSize(ctx context.Context, queueType persistence.QueueType) (int64, error) { m.ctrl.T.Helper() @@ -1546,6 +1606,20 @@ func (mr *MocktableCRUDMockRecorder) InsertDomain(ctx, row any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertDomain", reflect.TypeOf((*MocktableCRUD)(nil).InsertDomain), ctx, row) } +// InsertDomainAuditLog mocks base method. +func (m *MocktableCRUD) InsertDomainAuditLog(ctx context.Context, rows []*DomainAuditLogRow) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "InsertDomainAuditLog", ctx, rows) + ret0, _ := ret[0].(error) + return ret0 +} + +// InsertDomainAuditLog indicates an expected call of InsertDomainAuditLog. +func (mr *MocktableCRUDMockRecorder) InsertDomainAuditLog(ctx, rows any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertDomainAuditLog", reflect.TypeOf((*MocktableCRUD)(nil).InsertDomainAuditLog), ctx, rows) +} + // InsertIntoHistoryTreeAndNode mocks base method. func (m *MocktableCRUD) InsertIntoHistoryTreeAndNode(ctx context.Context, treeRow *HistoryTreeRow, nodeRow *HistoryNodeRow) error { m.ctrl.T.Helper() @@ -1896,6 +1970,22 @@ func (mr *MocktableCRUDMockRecorder) SelectDomain(ctx, domainID, domainName any) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectDomain", reflect.TypeOf((*MocktableCRUD)(nil).SelectDomain), ctx, domainID, domainName) } +// SelectDomainAuditLog mocks base method. +func (m *MocktableCRUD) SelectDomainAuditLog(ctx context.Context, request *DomainAuditLogRequest) ([]*DomainAuditLogRow, []byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SelectDomainAuditLog", ctx, request) + ret0, _ := ret[0].([]*DomainAuditLogRow) + ret1, _ := ret[1].([]byte) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// SelectDomainAuditLog indicates an expected call of SelectDomainAuditLog. +func (mr *MocktableCRUDMockRecorder) SelectDomainAuditLog(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectDomainAuditLog", reflect.TypeOf((*MocktableCRUD)(nil).SelectDomainAuditLog), ctx, request) +} + // SelectDomainMetadata mocks base method. func (m *MocktableCRUD) SelectDomainMetadata(ctx context.Context) (int64, error) { m.ctrl.T.Helper() @@ -2699,6 +2789,21 @@ func (mr *MockDomainCRUDMockRecorder) DeleteDomain(ctx, domainID, domainName any return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDomain", reflect.TypeOf((*MockDomainCRUD)(nil).DeleteDomain), ctx, domainID, domainName) } +// GetDomainAuditLogEntry mocks base method. +func (m *MockDomainCRUD) GetDomainAuditLogEntry(ctx context.Context, domainID, eventID string, createdTime time.Time) (*DomainAuditLogRow, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetDomainAuditLogEntry", ctx, domainID, eventID, createdTime) + ret0, _ := ret[0].(*DomainAuditLogRow) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetDomainAuditLogEntry indicates an expected call of GetDomainAuditLogEntry. +func (mr *MockDomainCRUDMockRecorder) GetDomainAuditLogEntry(ctx, domainID, eventID, createdTime any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDomainAuditLogEntry", reflect.TypeOf((*MockDomainCRUD)(nil).GetDomainAuditLogEntry), ctx, domainID, eventID, createdTime) +} + // InsertDomain mocks base method. func (m *MockDomainCRUD) InsertDomain(ctx context.Context, row *DomainRow) error { m.ctrl.T.Helper() @@ -2713,6 +2818,20 @@ func (mr *MockDomainCRUDMockRecorder) InsertDomain(ctx, row any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertDomain", reflect.TypeOf((*MockDomainCRUD)(nil).InsertDomain), ctx, row) } +// InsertDomainAuditLog mocks base method. +func (m *MockDomainCRUD) InsertDomainAuditLog(ctx context.Context, rows []*DomainAuditLogRow) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "InsertDomainAuditLog", ctx, rows) + ret0, _ := ret[0].(error) + return ret0 +} + +// InsertDomainAuditLog indicates an expected call of InsertDomainAuditLog. +func (mr *MockDomainCRUDMockRecorder) InsertDomainAuditLog(ctx, rows any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertDomainAuditLog", reflect.TypeOf((*MockDomainCRUD)(nil).InsertDomainAuditLog), ctx, rows) +} + // SelectAllDomains mocks base method. func (m *MockDomainCRUD) SelectAllDomains(ctx context.Context, pageSize int, pageToken []byte) ([]*DomainRow, []byte, error) { m.ctrl.T.Helper() @@ -2744,6 +2863,22 @@ func (mr *MockDomainCRUDMockRecorder) SelectDomain(ctx, domainID, domainName any return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectDomain", reflect.TypeOf((*MockDomainCRUD)(nil).SelectDomain), ctx, domainID, domainName) } +// SelectDomainAuditLog mocks base method. +func (m *MockDomainCRUD) SelectDomainAuditLog(ctx context.Context, request *DomainAuditLogRequest) ([]*DomainAuditLogRow, []byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SelectDomainAuditLog", ctx, request) + ret0, _ := ret[0].([]*DomainAuditLogRow) + ret1, _ := ret[1].([]byte) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// SelectDomainAuditLog indicates an expected call of SelectDomainAuditLog. +func (mr *MockDomainCRUDMockRecorder) SelectDomainAuditLog(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectDomainAuditLog", reflect.TypeOf((*MockDomainCRUD)(nil).SelectDomainAuditLog), ctx, request) +} + // SelectDomainMetadata mocks base method. func (m *MockDomainCRUD) SelectDomainMetadata(ctx context.Context) (int64, error) { m.ctrl.T.Helper() diff --git a/common/persistence/nosql/nosqlplugin/mongodb/domain.go b/common/persistence/nosql/nosqlplugin/mongodb/domain.go index 9668dd22d21..f49fc4130be 100644 --- a/common/persistence/nosql/nosqlplugin/mongodb/domain.go +++ b/common/persistence/nosql/nosqlplugin/mongodb/domain.go @@ -22,6 +22,7 @@ package mongodb import ( "context" + "time" "github.com/uber/cadence/common/persistence/nosql/nosqlplugin" ) @@ -75,3 +76,29 @@ func (db *mdb) SelectDomainMetadata( ) (int64, error) { panic("TODO") } + +// InsertDomainAuditLog inserts domain audit log entries +func (db *mdb) InsertDomainAuditLog( + ctx context.Context, + rows []*nosqlplugin.DomainAuditLogRow, +) error { + panic("TODO") +} + +// SelectDomainAuditLog selects domain audit log entries with pagination +func (db *mdb) SelectDomainAuditLog( + ctx context.Context, + request *nosqlplugin.DomainAuditLogRequest, +) ([]*nosqlplugin.DomainAuditLogRow, []byte, error) { + panic("TODO") +} + +// GetDomainAuditLogEntry retrieves a specific domain audit log entry by its composite key +func (db *mdb) GetDomainAuditLogEntry( + ctx context.Context, + domainID string, + eventID string, + createdTime time.Time, +) (*nosqlplugin.DomainAuditLogRow, error) { + panic("TODO") +} diff --git a/common/persistence/nosql/nosqlplugin/types.go b/common/persistence/nosql/nosqlplugin/types.go index b47be3d2ba8..2321dc4f94f 100644 --- a/common/persistence/nosql/nosqlplugin/types.go +++ b/common/persistence/nosql/nosqlplugin/types.go @@ -251,6 +251,31 @@ type ( CurrentTimeStamp time.Time } + // DomainAuditLogRow defines the row struct for domain audit log entries + DomainAuditLogRow struct { + DomainID string + EventID string + CreatedTime time.Time + LastUpdatedTime time.Time + OperationType int + StateBefore []byte + StateBeforeEncoding string + StateAfter []byte + StateAfterEncoding string + Identity string + IdentityType string + Comment string + } + + // DomainAuditLogRequest is a request struct for SelectDomainAuditLog + DomainAuditLogRequest struct { + DomainID string + PageSize int + NextPageToken []byte + MinCreatedTime *time.Time + MaxCreatedTime *time.Time + } + // SelectMessagesBetweenRequest is a request struct for SelectMessagesBetween SelectMessagesBetweenRequest struct { QueueType persistence.QueueType diff --git a/common/persistence/persistence-tests/metadataPersistenceV2Test.go b/common/persistence/persistence-tests/metadataPersistenceV2Test.go index 61d648ac9f8..1fe103e2848 100644 --- a/common/persistence/persistence-tests/metadataPersistenceV2Test.go +++ b/common/persistence/persistence-tests/metadataPersistenceV2Test.go @@ -1360,6 +1360,409 @@ ListLoop: } } +// TestDomainAuditLogWrite test +func (m *MetadataPersistenceSuiteV2) TestDomainAuditLogWrite() { + ctx, cancel := context.WithTimeout(context.Background(), testContextTimeout) + defer cancel() + + // Create a test domain first + domainID := uuid.New() + domainName := "audit-log-write-test-domain" + _, err := m.CreateDomain( + ctx, + &p.DomainInfo{ + ID: domainID, + Name: domainName, + Status: p.DomainStatusRegistered, + }, + &p.DomainConfig{Retention: 1}, + &p.DomainReplicationConfig{}, + false, + 0, + 0, + 0, + ) + m.NoError(err) + + // Create audit log entries + now := time.Now() + entries := []*p.DomainAuditLogEntry{ + { + DomainID: domainID, + EventID: uuid.New(), + CreatedTime: now, + LastUpdatedTime: now, + OperationType: 1, + StateBefore: []byte(`{"status":"registered"}`), + StateBeforeEncoding: "json", + StateAfter: []byte(`{"status":"deprecated"}`), + StateAfterEncoding: "json", + Identity: "test-user", + IdentityType: "user", + Comment: "Test deprecation", + }, + { + DomainID: domainID, + EventID: uuid.New(), + CreatedTime: now.Add(time.Second), + LastUpdatedTime: now.Add(time.Second), + OperationType: 2, + StateBefore: []byte(`{"activeCluster":"cluster1"}`), + StateBeforeEncoding: "json", + StateAfter: []byte(`{"activeCluster":"cluster2"}`), + StateAfterEncoding: "json", + Identity: "test-admin", + IdentityType: "admin", + Comment: "Test failover", + }, + } + + // Write audit log entries + err = m.DomainManager.WriteDomainAuditLog(ctx, &p.WriteDomainAuditLogRequest{ + Entries: entries, + }) + m.NoError(err) + + // Read back the entries + resp, err := m.DomainManager.ReadDomainAuditLog(ctx, &p.ReadDomainAuditLogRequest{ + DomainID: domainID, + PageSize: 10, + }) + m.NoError(err) + m.NotNil(resp) + m.Equal(2, len(resp.Entries)) + + // Verify entries are sorted by created_time DESC + m.True(resp.Entries[0].CreatedTime.After(resp.Entries[1].CreatedTime) || + resp.Entries[0].CreatedTime.Equal(resp.Entries[1].CreatedTime)) + + // Verify first entry (most recent) + m.Equal(domainID, resp.Entries[0].DomainID) + m.Equal(2, resp.Entries[0].OperationType) + m.Equal([]byte(`{"activeCluster":"cluster2"}`), resp.Entries[0].StateAfter) + m.Equal("json", resp.Entries[0].StateAfterEncoding) + m.Equal("test-admin", resp.Entries[0].Identity) + m.Equal("admin", resp.Entries[0].IdentityType) + m.Equal("Test failover", resp.Entries[0].Comment) +} + +// TestDomainAuditLogReadPagination test +func (m *MetadataPersistenceSuiteV2) TestDomainAuditLogReadPagination() { + ctx, cancel := context.WithTimeout(context.Background(), testContextTimeout) + defer cancel() + + // Create a test domain + domainID := uuid.New() + domainName := "audit-log-pagination-test-domain" + _, err := m.CreateDomain( + ctx, + &p.DomainInfo{ + ID: domainID, + Name: domainName, + Status: p.DomainStatusRegistered, + }, + &p.DomainConfig{Retention: 1}, + &p.DomainReplicationConfig{}, + false, + 0, + 0, + 0, + ) + m.NoError(err) + + // Create 5 audit log entries with different timestamps + now := time.Now() + entries := make([]*p.DomainAuditLogEntry, 5) + for i := 0; i < 5; i++ { + entries[i] = &p.DomainAuditLogEntry{ + DomainID: domainID, + EventID: uuid.New(), + CreatedTime: now.Add(time.Duration(i) * time.Second), + LastUpdatedTime: now.Add(time.Duration(i) * time.Second), + OperationType: p.DomainOperationType(i + 1), + StateBefore: []byte(fmt.Sprintf(`{"version":%d}`, i)), + StateBeforeEncoding: "json", + StateAfter: []byte(fmt.Sprintf(`{"version":%d}`, i+1)), + StateAfterEncoding: "json", + Identity: fmt.Sprintf("user-%d", i), + IdentityType: "user", + Comment: fmt.Sprintf("Update %d", i), + } + } + + // Write all entries + err = m.DomainManager.WriteDomainAuditLog(ctx, &p.WriteDomainAuditLogRequest{ + Entries: entries, + }) + m.NoError(err) + + // Read first page (2 entries) + resp1, err := m.DomainManager.ReadDomainAuditLog(ctx, &p.ReadDomainAuditLogRequest{ + DomainID: domainID, + PageSize: 2, + }) + m.NoError(err) + m.NotNil(resp1) + m.Equal(2, len(resp1.Entries)) + m.NotNil(resp1.NextPageToken) + + // Read second page (2 entries) + resp2, err := m.DomainManager.ReadDomainAuditLog(ctx, &p.ReadDomainAuditLogRequest{ + DomainID: domainID, + PageSize: 2, + NextPageToken: resp1.NextPageToken, + }) + m.NoError(err) + m.NotNil(resp2) + m.Equal(2, len(resp2.Entries)) + m.NotNil(resp2.NextPageToken) + + // Read third page (1 entry) + resp3, err := m.DomainManager.ReadDomainAuditLog(ctx, &p.ReadDomainAuditLogRequest{ + DomainID: domainID, + PageSize: 2, + NextPageToken: resp2.NextPageToken, + }) + m.NoError(err) + m.NotNil(resp3) + m.Equal(1, len(resp3.Entries)) + m.Nil(resp3.NextPageToken) // Last page should have no next token + + // Verify all entries are unique + allEventIDs := make(map[string]bool) + for _, entry := range resp1.Entries { + allEventIDs[entry.EventID] = true + } + for _, entry := range resp2.Entries { + allEventIDs[entry.EventID] = true + } + for _, entry := range resp3.Entries { + allEventIDs[entry.EventID] = true + } + m.Equal(5, len(allEventIDs)) +} + +// TestDomainAuditLogReadTimeRange test +func (m *MetadataPersistenceSuiteV2) TestDomainAuditLogReadTimeRange() { + ctx, cancel := context.WithTimeout(context.Background(), testContextTimeout) + defer cancel() + + // Create a test domain + domainID := uuid.New() + domainName := "audit-log-timerange-test-domain" + _, err := m.CreateDomain( + ctx, + &p.DomainInfo{ + ID: domainID, + Name: domainName, + Status: p.DomainStatusRegistered, + }, + &p.DomainConfig{Retention: 1}, + &p.DomainReplicationConfig{}, + false, + 0, + 0, + 0, + ) + m.NoError(err) + + // Create entries with specific timestamps + baseTime := time.Now().Add(-10 * time.Hour) + entries := []*p.DomainAuditLogEntry{ + { + DomainID: domainID, + EventID: uuid.New(), + CreatedTime: baseTime, + LastUpdatedTime: baseTime, + OperationType: 1, + StateBefore: []byte(`{}`), + StateBeforeEncoding: "json", + StateAfter: []byte(`{"v":1}`), + StateAfterEncoding: "json", + Identity: "user-1", + IdentityType: "user", + Comment: "Entry 1 - 10 hours ago", + }, + { + DomainID: domainID, + EventID: uuid.New(), + CreatedTime: baseTime.Add(5 * time.Hour), + LastUpdatedTime: baseTime.Add(5 * time.Hour), + OperationType: 2, + StateBefore: []byte(`{"v":1}`), + StateBeforeEncoding: "json", + StateAfter: []byte(`{"v":2}`), + StateAfterEncoding: "json", + Identity: "user-2", + IdentityType: "user", + Comment: "Entry 2 - 5 hours ago", + }, + { + DomainID: domainID, + EventID: uuid.New(), + CreatedTime: baseTime.Add(8 * time.Hour), + LastUpdatedTime: baseTime.Add(8 * time.Hour), + OperationType: 3, + StateBefore: []byte(`{"v":2}`), + StateBeforeEncoding: "json", + StateAfter: []byte(`{"v":3}`), + StateAfterEncoding: "json", + Identity: "user-3", + IdentityType: "user", + Comment: "Entry 3 - 2 hours ago", + }, + } + + // Write all entries + err = m.DomainManager.WriteDomainAuditLog(ctx, &p.WriteDomainAuditLogRequest{ + Entries: entries, + }) + m.NoError(err) + + // Test 1: Read entries from 6 hours ago to now (should get entries 2 and 3) + minTime := baseTime.Add(4 * time.Hour) + resp1, err := m.DomainManager.ReadDomainAuditLog(ctx, &p.ReadDomainAuditLogRequest{ + DomainID: domainID, + PageSize: 10, + MinCreatedTime: &minTime, + }) + m.NoError(err) + m.NotNil(resp1) + m.Equal(2, len(resp1.Entries)) + // Verify we got the right entries (sorted DESC by created_time) + m.Equal(3, resp1.Entries[0].OperationType) // Entry 3 (most recent) + m.Equal(2, resp1.Entries[1].OperationType) // Entry 2 + + // Test 2: Read entries from start to 6 hours ago (should get entry 1) + maxTime := baseTime.Add(4 * time.Hour) + resp2, err := m.DomainManager.ReadDomainAuditLog(ctx, &p.ReadDomainAuditLogRequest{ + DomainID: domainID, + PageSize: 10, + MaxCreatedTime: &maxTime, + }) + m.NoError(err) + m.NotNil(resp2) + m.Equal(1, len(resp2.Entries)) + m.Equal(1, resp2.Entries[0].OperationType) // Entry 1 + + // Test 3: Read entries in a specific range (should get entry 2 only) + rangeMin := baseTime.Add(4 * time.Hour) + rangeMax := baseTime.Add(6 * time.Hour) + resp3, err := m.DomainManager.ReadDomainAuditLog(ctx, &p.ReadDomainAuditLogRequest{ + DomainID: domainID, + PageSize: 10, + MinCreatedTime: &rangeMin, + MaxCreatedTime: &rangeMax, + }) + m.NoError(err) + m.NotNil(resp3) + m.Equal(1, len(resp3.Entries)) + m.Equal(2, resp3.Entries[0].OperationType) // Entry 2 +} + +// TestDomainAuditLogMultipleDomains test +func (m *MetadataPersistenceSuiteV2) TestDomainAuditLogMultipleDomains() { + ctx, cancel := context.WithTimeout(context.Background(), testContextTimeout) + defer cancel() + + // Create two test domains + domain1ID := uuid.New() + domain2ID := uuid.New() + + _, err := m.CreateDomain( + ctx, + &p.DomainInfo{ + ID: domain1ID, + Name: "audit-log-multi-domain-1", + Status: p.DomainStatusRegistered, + }, + &p.DomainConfig{Retention: 1}, + &p.DomainReplicationConfig{}, + false, + 0, + 0, + 0, + ) + m.NoError(err) + + _, err = m.CreateDomain( + ctx, + &p.DomainInfo{ + ID: domain2ID, + Name: "audit-log-multi-domain-2", + Status: p.DomainStatusRegistered, + }, + &p.DomainConfig{Retention: 1}, + &p.DomainReplicationConfig{}, + false, + 0, + 0, + 0, + ) + m.NoError(err) + + // Create entries for both domains + now := time.Now() + entries := []*p.DomainAuditLogEntry{ + { + DomainID: domain1ID, + EventID: uuid.New(), + CreatedTime: now, + LastUpdatedTime: now, + OperationType: 1, + StateBefore: []byte(`{}`), + StateBeforeEncoding: "json", + StateAfter: []byte(`{"domain":"1"}`), + StateAfterEncoding: "json", + Identity: "user-1", + IdentityType: "user", + Comment: "Domain 1 entry", + }, + { + DomainID: domain2ID, + EventID: uuid.New(), + CreatedTime: now, + LastUpdatedTime: now, + OperationType: 2, + StateBefore: []byte(`{}`), + StateBeforeEncoding: "json", + StateAfter: []byte(`{"domain":"2"}`), + StateAfterEncoding: "json", + Identity: "user-2", + IdentityType: "user", + Comment: "Domain 2 entry", + }, + } + + // Write both entries + err = m.DomainManager.WriteDomainAuditLog(ctx, &p.WriteDomainAuditLogRequest{ + Entries: entries, + }) + m.NoError(err) + + // Read entries for domain 1 + resp1, err := m.DomainManager.ReadDomainAuditLog(ctx, &p.ReadDomainAuditLogRequest{ + DomainID: domain1ID, + PageSize: 10, + }) + m.NoError(err) + m.NotNil(resp1) + m.Equal(1, len(resp1.Entries)) + m.Equal(domain1ID, resp1.Entries[0].DomainID) + m.Equal("Domain 1 entry", resp1.Entries[0].Comment) + + // Read entries for domain 2 + resp2, err := m.DomainManager.ReadDomainAuditLog(ctx, &p.ReadDomainAuditLogRequest{ + DomainID: domain2ID, + PageSize: 10, + }) + m.NoError(err) + m.NotNil(resp2) + m.Equal(1, len(resp2.Entries)) + m.Equal(domain2ID, resp2.Entries[0].DomainID) + m.Equal("Domain 2 entry", resp2.Entries[0].Comment) +} + // CreateDomain helper method func (m *MetadataPersistenceSuiteV2) CreateDomain( ctx context.Context, diff --git a/common/persistence/sql/sql_domain_store.go b/common/persistence/sql/sql_domain_store.go index fe614fbfc89..d985df0babf 100644 --- a/common/persistence/sql/sql_domain_store.go +++ b/common/persistence/sql/sql_domain_store.go @@ -475,3 +475,30 @@ func (m *sqlDomainStore) ListDomains( return resp, nil } + +func (m *sqlDomainStore) WriteDomainAuditLog( + ctx context.Context, + request *persistence.WriteDomainAuditLogRequest, +) error { + return &types.InternalServiceError{ + Message: "domain audit log is not supported in SQL persistence", + } +} + +func (m *sqlDomainStore) ReadDomainAuditLog( + ctx context.Context, + request *persistence.ReadDomainAuditLogRequest, +) (*persistence.ReadDomainAuditLogResponse, error) { + return nil, &types.InternalServiceError{ + Message: "domain audit log is not supported in SQL persistence", + } +} + +func (m *sqlDomainStore) GetDomainAuditLogEntry( + ctx context.Context, + request *persistence.GetDomainAuditLogEntryRequest, +) (*persistence.GetDomainAuditLogEntryResponse, error) { + return nil, &types.InternalServiceError{ + Message: "domain audit log is not supported in SQL persistence", + } +} diff --git a/common/persistence/wrappers/errorinjectors/domain_generated.go b/common/persistence/wrappers/errorinjectors/domain_generated.go index f228e88746c..917325e1513 100644 --- a/common/persistence/wrappers/errorinjectors/domain_generated.go +++ b/common/persistence/wrappers/errorinjectors/domain_generated.go @@ -96,6 +96,21 @@ func (c *injectorDomainManager) GetDomain(ctx context.Context, request *persiste return } +func (c *injectorDomainManager) GetDomainAuditLogEntry(ctx context.Context, request *persistence.GetDomainAuditLogEntryRequest) (gp1 *persistence.GetDomainAuditLogEntryResponse, err error) { + fakeErr := generateFakeError(c.errorRate) + var forwardCall bool + if forwardCall = shouldForwardCallToPersistence(fakeErr); forwardCall { + gp1, err = c.wrapped.GetDomainAuditLogEntry(ctx, request) + } + + if fakeErr != nil { + logErr(c.logger, "DomainManager.GetDomainAuditLogEntry", fakeErr, forwardCall, err) + err = fakeErr + return + } + return +} + func (c *injectorDomainManager) GetMetadata(ctx context.Context) (gp1 *persistence.GetMetadataResponse, err error) { fakeErr := generateFakeError(c.errorRate) var forwardCall bool @@ -130,6 +145,21 @@ func (c *injectorDomainManager) ListDomains(ctx context.Context, request *persis return } +func (c *injectorDomainManager) ReadDomainAuditLog(ctx context.Context, request *persistence.ReadDomainAuditLogRequest) (rp1 *persistence.ReadDomainAuditLogResponse, err error) { + fakeErr := generateFakeError(c.errorRate) + var forwardCall bool + if forwardCall = shouldForwardCallToPersistence(fakeErr); forwardCall { + rp1, err = c.wrapped.ReadDomainAuditLog(ctx, request) + } + + if fakeErr != nil { + logErr(c.logger, "DomainManager.ReadDomainAuditLog", fakeErr, forwardCall, err) + err = fakeErr + return + } + return +} + func (c *injectorDomainManager) UpdateDomain(ctx context.Context, request *persistence.UpdateDomainRequest) (err error) { fakeErr := generateFakeError(c.errorRate) var forwardCall bool @@ -144,3 +174,18 @@ func (c *injectorDomainManager) UpdateDomain(ctx context.Context, request *persi } return } + +func (c *injectorDomainManager) WriteDomainAuditLog(ctx context.Context, request *persistence.WriteDomainAuditLogRequest) (err error) { + fakeErr := generateFakeError(c.errorRate) + var forwardCall bool + if forwardCall = shouldForwardCallToPersistence(fakeErr); forwardCall { + err = c.wrapped.WriteDomainAuditLog(ctx, request) + } + + if fakeErr != nil { + logErr(c.logger, "DomainManager.WriteDomainAuditLog", fakeErr, forwardCall, err) + err = fakeErr + return + } + return +} diff --git a/common/persistence/wrappers/metered/domain_generated.go b/common/persistence/wrappers/metered/domain_generated.go index 879b3b0b543..b9a765900bb 100644 --- a/common/persistence/wrappers/metered/domain_generated.go +++ b/common/persistence/wrappers/metered/domain_generated.go @@ -85,6 +85,17 @@ func (c *meteredDomainManager) GetDomain(ctx context.Context, request *persisten return } +func (c *meteredDomainManager) GetDomainAuditLogEntry(ctx context.Context, request *persistence.GetDomainAuditLogEntryRequest) (gp1 *persistence.GetDomainAuditLogEntryResponse, err error) { + op := func() error { + gp1, err = c.wrapped.GetDomainAuditLogEntry(ctx, request) + c.emptyMetric("DomainManager.GetDomainAuditLogEntry", request, gp1, err) + return err + } + + err = c.call(metrics.PersistenceGetDomainAuditLogEntryScope, op, getCustomMetricTags(request)...) + return +} + func (c *meteredDomainManager) GetMetadata(ctx context.Context) (gp1 *persistence.GetMetadataResponse, err error) { op := func() error { gp1, err = c.wrapped.GetMetadata(ctx) @@ -110,6 +121,17 @@ func (c *meteredDomainManager) ListDomains(ctx context.Context, request *persist return } +func (c *meteredDomainManager) ReadDomainAuditLog(ctx context.Context, request *persistence.ReadDomainAuditLogRequest) (rp1 *persistence.ReadDomainAuditLogResponse, err error) { + op := func() error { + rp1, err = c.wrapped.ReadDomainAuditLog(ctx, request) + c.emptyMetric("DomainManager.ReadDomainAuditLog", request, rp1, err) + return err + } + + err = c.call(metrics.PersistenceReadDomainAuditLogScope, op, getCustomMetricTags(request)...) + return +} + func (c *meteredDomainManager) UpdateDomain(ctx context.Context, request *persistence.UpdateDomainRequest) (err error) { op := func() error { err = c.wrapped.UpdateDomain(ctx, request) @@ -120,3 +142,14 @@ func (c *meteredDomainManager) UpdateDomain(ctx context.Context, request *persis err = c.call(metrics.PersistenceUpdateDomainScope, op, getCustomMetricTags(request)...) return } + +func (c *meteredDomainManager) WriteDomainAuditLog(ctx context.Context, request *persistence.WriteDomainAuditLogRequest) (err error) { + op := func() error { + err = c.wrapped.WriteDomainAuditLog(ctx, request) + c.emptyMetric("DomainManager.WriteDomainAuditLog", request, err, err) + return err + } + + err = c.call(metrics.PersistenceWriteDomainAuditLogScope, op, getCustomMetricTags(request)...) + return +} diff --git a/common/persistence/wrappers/ratelimited/domain_generated.go b/common/persistence/wrappers/ratelimited/domain_generated.go index 5e5f539e146..28fafd40375 100644 --- a/common/persistence/wrappers/ratelimited/domain_generated.go +++ b/common/persistence/wrappers/ratelimited/domain_generated.go @@ -65,6 +65,14 @@ func (c *ratelimitedDomainManager) GetDomain(ctx context.Context, request *persi return c.wrapped.GetDomain(ctx, request) } +func (c *ratelimitedDomainManager) GetDomainAuditLogEntry(ctx context.Context, request *persistence.GetDomainAuditLogEntryRequest) (gp1 *persistence.GetDomainAuditLogEntryResponse, err error) { + if ok := c.rateLimiter.Allow(); !ok { + err = ErrPersistenceLimitExceeded + return + } + return c.wrapped.GetDomainAuditLogEntry(ctx, request) +} + func (c *ratelimitedDomainManager) GetMetadata(ctx context.Context) (gp1 *persistence.GetMetadataResponse, err error) { if ok := c.rateLimiter.Allow(); !ok { err = ErrPersistenceLimitExceeded @@ -85,6 +93,14 @@ func (c *ratelimitedDomainManager) ListDomains(ctx context.Context, request *per return c.wrapped.ListDomains(ctx, request) } +func (c *ratelimitedDomainManager) ReadDomainAuditLog(ctx context.Context, request *persistence.ReadDomainAuditLogRequest) (rp1 *persistence.ReadDomainAuditLogResponse, err error) { + if ok := c.rateLimiter.Allow(); !ok { + err = ErrPersistenceLimitExceeded + return + } + return c.wrapped.ReadDomainAuditLog(ctx, request) +} + func (c *ratelimitedDomainManager) UpdateDomain(ctx context.Context, request *persistence.UpdateDomainRequest) (err error) { if ok := c.rateLimiter.Allow(); !ok { err = ErrPersistenceLimitExceeded @@ -92,3 +108,11 @@ func (c *ratelimitedDomainManager) UpdateDomain(ctx context.Context, request *pe } return c.wrapped.UpdateDomain(ctx, request) } + +func (c *ratelimitedDomainManager) WriteDomainAuditLog(ctx context.Context, request *persistence.WriteDomainAuditLogRequest) (err error) { + if ok := c.rateLimiter.Allow(); !ok { + err = ErrPersistenceLimitExceeded + return + } + return c.wrapped.WriteDomainAuditLog(ctx, request) +} diff --git a/common/types/mapper/proto/api.go b/common/types/mapper/proto/api.go index 5ab461b5804..4872d260406 100644 --- a/common/types/mapper/proto/api.go +++ b/common/types/mapper/proto/api.go @@ -21,6 +21,8 @@ package proto import ( + "time" + apiv1 "github.com/uber/cadence-idl/go/proto/api/v1" "github.com/uber/cadence/common" @@ -6603,3 +6605,318 @@ func ToActiveClusterSelectionPolicy(p *apiv1.ActiveClusterSelectionPolicy) *type ClusterAttribute: ToClusterAttribute(p.ClusterAttribute), } } + +// FromPaginationOptions converts internal PaginationOptions to proto +func FromPaginationOptions(t *types.PaginationOptions) *apiv1.PaginationOptions { + if t == nil { + return nil + } + return &apiv1.PaginationOptions{ + PageSize: *t.PageSize, + NextPageToken: t.NextPageToken, + } +} + +// ToPaginationOptions converts proto PaginationOptions to internal +func ToPaginationOptions(t *apiv1.PaginationOptions) *types.PaginationOptions { + if t == nil { + return nil + } + return &types.PaginationOptions{ + PageSize: &t.PageSize, + NextPageToken: t.NextPageToken, + } +} + +// FromFailoverType converts internal FailoverType to proto +func FromFailoverType(t *types.FailoverType) apiv1.FailoverType { + if t == nil { + return apiv1.FailoverType_FAILOVER_TYPE_INVALID + } + switch *t { + case types.FailoverTypeForce: + return apiv1.FailoverType_FAILOVER_TYPE_FORCE + case types.FailoverTypeGraceful: + return apiv1.FailoverType_FAILOVER_TYPE_GRACEFUL + } + panic("unexpected enum value") +} + +// ToFailoverType converts proto FailoverType to internal +func ToFailoverType(t apiv1.FailoverType) *types.FailoverType { + switch t { + case apiv1.FailoverType_FAILOVER_TYPE_INVALID: + return nil + case apiv1.FailoverType_FAILOVER_TYPE_FORCE: + return types.FailoverTypeForce.Ptr() + case apiv1.FailoverType_FAILOVER_TYPE_GRACEFUL: + return types.FailoverTypeGraceful.Ptr() + } + panic("unexpected enum value") +} + +// FromFailoverEvent converts internal FailoverEvent to proto +func FromFailoverEvent(t *types.FailoverEvent) *apiv1.FailoverEvent { + if t == nil { + return nil + } + createdTimeNanos := *t.CreatedTime * int64(time.Millisecond) + return &apiv1.FailoverEvent{ + Id: *t.ID, + CreatedTime: unixNanoToTime(&createdTimeNanos), + FailoverType: FromFailoverType(t.FailoverType), + } +} + +// ToFailoverEvent converts proto FailoverEvent to internal +func ToFailoverEvent(t *apiv1.FailoverEvent) *types.FailoverEvent { + if t == nil { + return nil + } + id := t.Id + createdTimeNanos := timeToUnixNano(t.CreatedTime) + createdTimeMs := *createdTimeNanos / int64(time.Millisecond) + return &types.FailoverEvent{ + ID: &id, + CreatedTime: &createdTimeMs, + FailoverType: ToFailoverType(t.FailoverType), + } +} + +// FromClusterFailover converts internal ClusterFailover to proto +func FromClusterFailover(t *types.ClusterFailover) *apiv1.ClusterFailover { + if t == nil { + return nil + } + return &apiv1.ClusterFailover{ + FromCluster: FromActiveClusterInfo(t.FromCluster), + ToCluster: FromActiveClusterInfo(t.ToCluster), + ClusterAttribute: FromClusterAttribute(t.ClusterAttribute), + IsDefaultCluster: *t.IsDefaultCluster, + } +} + +// ToClusterFailover converts proto ClusterFailover to internal +func ToClusterFailover(t *apiv1.ClusterFailover) *types.ClusterFailover { + if t == nil { + return nil + } + isDefault := t.IsDefaultCluster + return &types.ClusterFailover{ + FromCluster: ToActiveClusterInfo(t.FromCluster), + ToCluster: ToActiveClusterInfo(t.ToCluster), + ClusterAttribute: ToClusterAttribute(t.ClusterAttribute), + IsDefaultCluster: &isDefault, + } +} + +// FromListFailoverHistoryRequestFilters converts internal type to proto +func FromListFailoverHistoryRequestFilters(t *types.ListFailoverHistoryRequestFilters) *apiv1.ListFailoverHistoryRequestFilters { + if t == nil { + return nil + } + return &apiv1.ListFailoverHistoryRequestFilters{ + DomainId: *t.DomainID, + Attributes: FromClusterAttributeArray(t.Attributes), + DefaultActiveCluster: *t.DefaultActiveCluster, + } +} + +// ToListFailoverHistoryRequestFilters converts proto type to internal +func ToListFailoverHistoryRequestFilters(t *apiv1.ListFailoverHistoryRequestFilters) *types.ListFailoverHistoryRequestFilters { + if t == nil { + return nil + } + domainID := t.DomainId + defaultActive := t.DefaultActiveCluster + return &types.ListFailoverHistoryRequestFilters{ + DomainID: &domainID, + Attributes: ToClusterAttributeArray(t.Attributes), + DefaultActiveCluster: &defaultActive, + } +} + +// FromListFailoverHistoryRequest converts internal request to proto +func FromListFailoverHistoryRequest(t *types.ListFailoverHistoryRequest) *apiv1.ListFailoverHistoryRequest { + if t == nil { + return nil + } + return &apiv1.ListFailoverHistoryRequest{ + Filters: FromListFailoverHistoryRequestFilters(t.Filters), + Pagination: FromPaginationOptions(t.Pagination), + } +} + +// ToListFailoverHistoryRequest converts proto request to internal +func ToListFailoverHistoryRequest(t *apiv1.ListFailoverHistoryRequest) *types.ListFailoverHistoryRequest { + if t == nil { + return nil + } + return &types.ListFailoverHistoryRequest{ + Filters: ToListFailoverHistoryRequestFilters(t.Filters), + Pagination: ToPaginationOptions(t.Pagination), + } +} + +// FromListFailoverHistoryResponse converts internal response to proto +func FromListFailoverHistoryResponse(t *types.ListFailoverHistoryResponse) *apiv1.ListFailoverHistoryResponse { + if t == nil { + return nil + } + return &apiv1.ListFailoverHistoryResponse{ + FailoverEvents: FromFailoverEventArray(t.FailoverEvents), + NextPageToken: t.NextPageToken, + } +} + +// ToListFailoverHistoryResponse converts proto response to internal +func ToListFailoverHistoryResponse(t *apiv1.ListFailoverHistoryResponse) *types.ListFailoverHistoryResponse { + if t == nil { + return nil + } + return &types.ListFailoverHistoryResponse{ + FailoverEvents: ToFailoverEventArray(t.FailoverEvents), + NextPageToken: t.NextPageToken, + } +} + +// FromGetFailoverEventRequest converts internal request to proto +func FromGetFailoverEventRequest(t *types.GetFailoverEventRequest) *apiv1.GetFailoverEventRequest { + if t == nil { + return nil + } + createdTimeNanos := *t.CreatedTime * int64(time.Millisecond) + return &apiv1.GetFailoverEventRequest{ + DomainId: *t.DomainID, + FailoverEventId: *t.FailoverEventID, + CreatedTime: unixNanoToTime(&createdTimeNanos), + } +} + +// ToGetFailoverEventRequest converts proto request to internal +func ToGetFailoverEventRequest(t *apiv1.GetFailoverEventRequest) *types.GetFailoverEventRequest { + if t == nil { + return nil + } + domainID := t.DomainId + eventID := t.FailoverEventId + createdTimeNanos := timeToUnixNano(t.CreatedTime) + createdTimeMs := *createdTimeNanos / int64(time.Millisecond) + return &types.GetFailoverEventRequest{ + DomainID: &domainID, + FailoverEventID: &eventID, + CreatedTime: &createdTimeMs, + } +} + +// FromGetFailoverEventResponse converts internal response to proto +func FromGetFailoverEventResponse(t *types.GetFailoverEventResponse) *apiv1.GetFailoverEventResponse { + if t == nil { + return nil + } + return &apiv1.GetFailoverEventResponse{ + ClusterFailovers: FromClusterFailoverArray(t.ClusterFailovers), + } +} + +// ToGetFailoverEventResponse converts proto response to internal +func ToGetFailoverEventResponse(t *apiv1.GetFailoverEventResponse) *types.GetFailoverEventResponse { + if t == nil { + return nil + } + return &types.GetFailoverEventResponse{ + ClusterFailovers: ToClusterFailoverArray(t.ClusterFailovers), + } +} + +// FromFailoverEventArray converts internal array to proto +func FromFailoverEventArray(t []*types.FailoverEvent) []*apiv1.FailoverEvent { + if t == nil { + return nil + } + v := make([]*apiv1.FailoverEvent, len(t)) + for i := range t { + v[i] = FromFailoverEvent(t[i]) + } + return v +} + +// ToFailoverEventArray converts proto array to internal +func ToFailoverEventArray(t []*apiv1.FailoverEvent) []*types.FailoverEvent { + if t == nil { + return nil + } + v := make([]*types.FailoverEvent, len(t)) + for i := range t { + v[i] = ToFailoverEvent(t[i]) + } + return v +} + +// FromClusterFailoverArray converts internal array to proto +func FromClusterFailoverArray(t []*types.ClusterFailover) []*apiv1.ClusterFailover { + if t == nil { + return nil + } + v := make([]*apiv1.ClusterFailover, len(t)) + for i := range t { + v[i] = FromClusterFailover(t[i]) + } + return v +} + +// ToClusterFailoverArray converts proto array to internal +func ToClusterFailoverArray(t []*apiv1.ClusterFailover) []*types.ClusterFailover { + if t == nil { + return nil + } + v := make([]*types.ClusterFailover, len(t)) + for i := range t { + v[i] = ToClusterFailover(t[i]) + } + return v +} + +// FromActiveClusterInfo converts internal ActiveClusterInfo to proto +func FromActiveClusterInfo(t *types.ActiveClusterInfo) *apiv1.ActiveClusterInfo { + if t == nil { + return nil + } + return &apiv1.ActiveClusterInfo{ + ActiveClusterName: t.ActiveClusterName, + } +} + +// ToActiveClusterInfo converts proto ActiveClusterInfo to internal +func ToActiveClusterInfo(t *apiv1.ActiveClusterInfo) *types.ActiveClusterInfo { + if t == nil { + return nil + } + return &types.ActiveClusterInfo{ + ActiveClusterName: t.ActiveClusterName, + } +} + +// FromClusterAttributeArray converts internal array to proto +func FromClusterAttributeArray(t []*types.ClusterAttribute) []*apiv1.ClusterAttribute { + if t == nil { + return nil + } + v := make([]*apiv1.ClusterAttribute, len(t)) + for i := range t { + v[i] = FromClusterAttribute(t[i]) + } + return v +} + +// ToClusterAttributeArray converts proto array to internal +func ToClusterAttributeArray(t []*apiv1.ClusterAttribute) []*types.ClusterAttribute { + if t == nil { + return nil + } + v := make([]*types.ClusterAttribute, len(t)) + for i := range t { + v[i] = ToClusterAttribute(t[i]) + } + return v +} diff --git a/common/types/mapper/thrift/shared.go b/common/types/mapper/thrift/shared.go index 0d04b0c9902..a3eadec44ee 100644 --- a/common/types/mapper/thrift/shared.go +++ b/common/types/mapper/thrift/shared.go @@ -8710,3 +8710,307 @@ func ToCronOverlapPolicy(t *shared.CronOverlapPolicy) *types.CronOverlapPolicy { } panic("unexpected enum value") } + +// FromPaginationOptions converts internal PaginationOptions type to thrift +func FromPaginationOptions(t *types.PaginationOptions) *shared.PaginationOptions { + if t == nil { + return nil + } + return &shared.PaginationOptions{ + PageSize: t.PageSize, + NextPageToken: t.NextPageToken, + } +} + +// ToPaginationOptions converts thrift PaginationOptions type to internal +func ToPaginationOptions(t *shared.PaginationOptions) *types.PaginationOptions { + if t == nil { + return nil + } + return &types.PaginationOptions{ + PageSize: t.PageSize, + NextPageToken: t.NextPageToken, + } +} + +// FromFailoverType converts internal FailoverType to thrift +func FromFailoverType(t *types.FailoverType) *shared.FailoverType { + if t == nil { + return nil + } + switch *t { + case types.FailoverTypeForce: + return shared.FailoverTypeForce.Ptr() + case types.FailoverTypeGraceful: + return shared.FailoverTypeGraceful.Ptr() + } + panic("unexpected enum value") +} + +// ToFailoverType converts thrift FailoverType to internal +func ToFailoverType(t *shared.FailoverType) *types.FailoverType { + if t == nil { + return nil + } + switch *t { + case shared.FailoverTypeForce: + return types.FailoverTypeForce.Ptr() + case shared.FailoverTypeGraceful: + return types.FailoverTypeGraceful.Ptr() + } + panic("unexpected enum value") +} + +// FromFailoverEvent converts internal FailoverEvent to thrift +func FromFailoverEvent(t *types.FailoverEvent) *shared.FailoverEvent { + if t == nil { + return nil + } + return &shared.FailoverEvent{ + ID: t.ID, + CreatedTime: t.CreatedTime, + FailoverType: FromFailoverType(t.FailoverType), + } +} + +// ToFailoverEvent converts thrift FailoverEvent to internal +func ToFailoverEvent(t *shared.FailoverEvent) *types.FailoverEvent { + if t == nil { + return nil + } + return &types.FailoverEvent{ + ID: t.ID, + CreatedTime: t.CreatedTime, + FailoverType: ToFailoverType(t.FailoverType), + } +} + +// FromClusterFailover converts internal ClusterFailover to thrift +func FromClusterFailover(t *types.ClusterFailover) *shared.ClusterFailover { + if t == nil { + return nil + } + return &shared.ClusterFailover{ + FromCluster: FromActiveClusterInfo(t.FromCluster), + ToCluster: FromActiveClusterInfo(t.ToCluster), + ClusterAttribute: FromClusterAttribute(t.ClusterAttribute), + IsDefaultCluster: t.IsDefaultCluster, + } +} + +// ToClusterFailover converts thrift ClusterFailover to internal +func ToClusterFailover(t *shared.ClusterFailover) *types.ClusterFailover { + if t == nil { + return nil + } + return &types.ClusterFailover{ + FromCluster: ToActiveClusterInfo(t.FromCluster), + ToCluster: ToActiveClusterInfo(t.ToCluster), + ClusterAttribute: ToClusterAttribute(t.ClusterAttribute), + IsDefaultCluster: t.IsDefaultCluster, + } +} + +// FromListFailoverHistoryRequestFilters converts internal type to thrift +func FromListFailoverHistoryRequestFilters(t *types.ListFailoverHistoryRequestFilters) *shared.ListFailoverHistoryRequestFilters { + if t == nil { + return nil + } + return &shared.ListFailoverHistoryRequestFilters{ + DomainID: t.DomainID, + Attributes: FromClusterAttributeArray(t.Attributes), + DefaultActiveCluster: t.DefaultActiveCluster, + } +} + +// ToListFailoverHistoryRequestFilters converts thrift type to internal +func ToListFailoverHistoryRequestFilters(t *shared.ListFailoverHistoryRequestFilters) *types.ListFailoverHistoryRequestFilters { + if t == nil { + return nil + } + return &types.ListFailoverHistoryRequestFilters{ + DomainID: t.DomainID, + Attributes: ToClusterAttributeArray(t.Attributes), + DefaultActiveCluster: t.DefaultActiveCluster, + } +} + +// FromListFailoverHistoryRequest converts internal ListFailoverHistoryRequest type to thrift +func FromListFailoverHistoryRequest(t *types.ListFailoverHistoryRequest) *shared.ListFailoverHistoryRequest { + if t == nil { + return nil + } + return &shared.ListFailoverHistoryRequest{ + Filters: FromListFailoverHistoryRequestFilters(t.Filters), + Pagination: FromPaginationOptions(t.Pagination), + } +} + +// ToListFailoverHistoryRequest converts thrift ListFailoverHistoryRequest type to internal +func ToListFailoverHistoryRequest(t *shared.ListFailoverHistoryRequest) *types.ListFailoverHistoryRequest { + if t == nil { + return nil + } + return &types.ListFailoverHistoryRequest{ + Filters: ToListFailoverHistoryRequestFilters(t.Filters), + Pagination: ToPaginationOptions(t.Pagination), + } +} + +// FromListFailoverHistoryResponse converts internal ListFailoverHistoryResponse type to thrift +func FromListFailoverHistoryResponse(t *types.ListFailoverHistoryResponse) *shared.ListFailoverHistoryResponse { + if t == nil { + return nil + } + return &shared.ListFailoverHistoryResponse{ + FailoverEvents: FromFailoverEventArray(t.FailoverEvents), + NextPageToken: t.NextPageToken, + } +} + +// ToListFailoverHistoryResponse converts thrift ListFailoverHistoryResponse type to internal +func ToListFailoverHistoryResponse(t *shared.ListFailoverHistoryResponse) *types.ListFailoverHistoryResponse { + if t == nil { + return nil + } + return &types.ListFailoverHistoryResponse{ + FailoverEvents: ToFailoverEventArray(t.FailoverEvents), + NextPageToken: t.NextPageToken, + } +} + +// FromGetFailoverEventRequest converts internal GetFailoverEventRequest type to thrift +func FromGetFailoverEventRequest(t *types.GetFailoverEventRequest) *shared.GetFailoverEventRequest { + if t == nil { + return nil + } + return &shared.GetFailoverEventRequest{ + DomainID: t.DomainID, + FailoverEventID: t.FailoverEventID, + CreatedTime: t.CreatedTime, + } +} + +// ToGetFailoverEventRequest converts thrift GetFailoverEventRequest type to internal +func ToGetFailoverEventRequest(t *shared.GetFailoverEventRequest) *types.GetFailoverEventRequest { + if t == nil { + return nil + } + return &types.GetFailoverEventRequest{ + DomainID: t.DomainID, + FailoverEventID: t.FailoverEventID, + CreatedTime: t.CreatedTime, + } +} + +// FromGetFailoverEventResponse converts internal GetFailoverEventResponse type to thrift +func FromGetFailoverEventResponse(t *types.GetFailoverEventResponse) *shared.GetFailoverEventResponse { + if t == nil { + return nil + } + return &shared.GetFailoverEventResponse{ + ClusterFailovers: FromClusterFailoverArray(t.ClusterFailovers), + } +} + +// ToGetFailoverEventResponse converts thrift GetFailoverEventResponse type to internal +func ToGetFailoverEventResponse(t *shared.GetFailoverEventResponse) *types.GetFailoverEventResponse { + if t == nil { + return nil + } + return &types.GetFailoverEventResponse{ + ClusterFailovers: ToClusterFailoverArray(t.ClusterFailovers), + } +} + +// FromFailoverEventArray converts internal FailoverEvent array to thrift +func FromFailoverEventArray(t []*types.FailoverEvent) []*shared.FailoverEvent { + if t == nil { + return nil + } + v := make([]*shared.FailoverEvent, len(t)) + for i := range t { + v[i] = FromFailoverEvent(t[i]) + } + return v +} + +// ToFailoverEventArray converts thrift FailoverEvent array to internal +func ToFailoverEventArray(t []*shared.FailoverEvent) []*types.FailoverEvent { + if t == nil { + return nil + } + v := make([]*types.FailoverEvent, len(t)) + for i := range t { + v[i] = ToFailoverEvent(t[i]) + } + return v +} + +// FromClusterFailoverArray converts internal ClusterFailover array to thrift +func FromClusterFailoverArray(t []*types.ClusterFailover) []*shared.ClusterFailover { + if t == nil { + return nil + } + v := make([]*shared.ClusterFailover, len(t)) + for i := range t { + v[i] = FromClusterFailover(t[i]) + } + return v +} + +// ToClusterFailoverArray converts thrift ClusterFailover array to internal +func ToClusterFailoverArray(t []*shared.ClusterFailover) []*types.ClusterFailover { + if t == nil { + return nil + } + v := make([]*types.ClusterFailover, len(t)) + for i := range t { + v[i] = ToClusterFailover(t[i]) + } + return v +} + +// FromActiveClusterInfo converts internal ActiveClusterInfo to thrift +func FromActiveClusterInfo(t *types.ActiveClusterInfo) *shared.ActiveClusterInfo { + if t == nil { + return nil + } + return &shared.ActiveClusterInfo{ + ActiveClusterName: &t.ActiveClusterName, + } +} + +// ToActiveClusterInfo converts thrift ActiveClusterInfo to internal +func ToActiveClusterInfo(t *shared.ActiveClusterInfo) *types.ActiveClusterInfo { + if t == nil { + return nil + } + return &types.ActiveClusterInfo{ + ActiveClusterName: t.GetActiveClusterName(), + } +} + +// FromClusterAttributeArray converts internal ClusterAttribute array to thrift +func FromClusterAttributeArray(t []*types.ClusterAttribute) []*shared.ClusterAttribute { + if t == nil { + return nil + } + v := make([]*shared.ClusterAttribute, len(t)) + for i := range t { + v[i] = FromClusterAttribute(t[i]) + } + return v +} + +// ToClusterAttributeArray converts thrift ClusterAttribute array to internal +func ToClusterAttributeArray(t []*shared.ClusterAttribute) []*types.ClusterAttribute { + if t == nil { + return nil + } + v := make([]*types.ClusterAttribute, len(t)) + for i := range t { + v[i] = ToClusterAttribute(t[i]) + } + return v +} diff --git a/common/types/shared.go b/common/types/shared.go index bc59944e1ba..222db2c3c70 100644 --- a/common/types/shared.go +++ b/common/types/shared.go @@ -9374,6 +9374,97 @@ type AutoConfigHint struct { PollerWaitTimeInMs int64 `json:"pollerWaitTimeInMs"` } +// PaginationOptions provides common options for paginated RPCs +type PaginationOptions struct { + PageSize *int32 `json:"pageSize,omitempty"` + NextPageToken []byte `json:"nextPageToken,omitempty"` +} + +// ListFailoverHistoryRequest is used to request failover history for a domain +type ListFailoverHistoryRequest struct { + Filters *ListFailoverHistoryRequestFilters `json:"filters,omitempty"` + Pagination *PaginationOptions `json:"pagination,omitempty"` +} + +// GetDomain extracts the domain from filters for cluster redirection +func (r *ListFailoverHistoryRequest) GetDomain() string { + if r.Filters != nil && r.Filters.DomainID != nil { + return *r.Filters.DomainID + } + return "" +} + +// ListFailoverHistoryRequestFilters specifies filters for failover history requests +type ListFailoverHistoryRequestFilters struct { + DomainID *string `json:"domainID,omitempty"` + Attributes []*ClusterAttribute `json:"attributes,omitempty"` + DefaultActiveCluster *bool `json:"defaultActiveCluster,omitempty"` +} + +// ListFailoverHistoryResponse contains failover history events +type ListFailoverHistoryResponse struct { + FailoverEvents []*FailoverEvent `json:"failoverEvents,omitempty"` + NextPageToken []byte `json:"nextPageToken,omitempty"` +} + +// FailoverEvent represents a single failover event +type FailoverEvent struct { + ID *string `json:"id,omitempty"` + CreatedTime *int64 `json:"createdTime,omitempty"` + FailoverType *FailoverType `json:"failoverType,omitempty"` +} + +// FailoverType describes how a failover operation will be performed +type FailoverType int32 + +const ( + FailoverTypeForce FailoverType = iota + FailoverTypeGraceful +) + +func (v FailoverType) String() string { + switch v { + case FailoverTypeForce: + return "FORCE" + case FailoverTypeGraceful: + return "GRACEFUL" + } + return "UNKNOWN" +} + +// Ptr is a helper function for getting pointer to FailoverType +func (v FailoverType) Ptr() *FailoverType { + return &v +} + +// GetFailoverEventRequest is used to get details of a specific failover event +type GetFailoverEventRequest struct { + DomainID *string `json:"domainID,omitempty"` + FailoverEventID *string `json:"failoverEventID,omitempty"` + CreatedTime *int64 `json:"createdTime,omitempty"` +} + +// GetDomain extracts the domain ID for cluster redirection +func (r *GetFailoverEventRequest) GetDomain() string { + if r.DomainID != nil { + return *r.DomainID + } + return "" +} + +// GetFailoverEventResponse contains cluster failover details +type GetFailoverEventResponse struct { + ClusterFailovers []*ClusterFailover `json:"clusterFailovers,omitempty"` +} + +// ClusterFailover represents a single cluster failover operation +type ClusterFailover struct { + FromCluster *ActiveClusterInfo `json:"fromCluster,omitempty"` + ToCluster *ActiveClusterInfo `json:"toCluster,omitempty"` + ClusterAttribute *ClusterAttribute `json:"clusterAttribute,omitempty"` + IsDefaultCluster *bool `json:"isDefaultCluster,omitempty"` +} + type CronOverlapPolicy int32 const ( diff --git a/go.mod b/go.mod index 0af497ce328..2dd012ef4fb 100644 --- a/go.mod +++ b/go.mod @@ -75,6 +75,7 @@ require ( github.com/ncruces/go-sqlite3 v0.22.0 github.com/opensearch-project/opensearch-go/v4 v4.1.0 github.com/robfig/cron/v3 v3.0.1 + github.com/wI2L/jsondiff v0.7.0 go.uber.org/mock v0.5.0 ) @@ -84,6 +85,10 @@ require ( github.com/robfig/cron v1.2.0 // indirect github.com/rogpeppe/go-internal v1.6.1 // indirect github.com/tetratelabs/wazero v1.8.2 // indirect + github.com/tidwall/gjson v1.18.0 // indirect + github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/pretty v1.2.1 // indirect + github.com/tidwall/sjson v1.2.5 // indirect github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect github.com/yosida95/uritemplate/v3 v3.0.2 // indirect ) @@ -167,3 +172,5 @@ replace github.com/apache/thrift => github.com/apache/thrift v0.0.0-201612212036 // DO NOT USE as it misses mysql/config store fix retract v1.2.3 + +replace github.com/uber/cadence-idl => ./idls diff --git a/go.sum b/go.sum index 019266b4186..b5d20d5e7e3 100644 --- a/go.sum +++ b/go.sum @@ -426,11 +426,13 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tetratelabs/wazero v1.8.2 h1:yIgLR/b2bN31bjxwXHD8a3d+BogigR952csSDdLYEv4= github.com/tetratelabs/wazero v1.8.2/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs= -github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= -github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= @@ -442,9 +444,6 @@ github.com/uber-go/mapdecode v1.0.0/go.mod h1:b5nP15FwXTgpjTjeA9A2uTHXV5UJCl4arw github.com/uber-go/tally v3.3.12+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU= github.com/uber-go/tally v3.3.15+incompatible h1:9hLSgNBP28CjIaDmAuRTq9qV+UZY+9PcvAkXO4nNMwg= github.com/uber-go/tally v3.3.15+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU= -github.com/uber/cadence-idl v0.0.0-20211111101836-d6b70b60eb8c/go.mod h1:oyUK7GCNCRHCCyWyzifSzXpVrRYVBbAMHAzF5dXiKws= -github.com/uber/cadence-idl v0.0.0-20251002070144-16af6755557f h1:fNoE3zYdIA4VzvjPQ201b9PQ+DijsnyBfnpVu07nFEI= -github.com/uber/cadence-idl v0.0.0-20251002070144-16af6755557f/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 h1:MxZXOiR2JuoANZ3J6DE/U0kSFv/eJ/GfSYVCjK7dyaw= @@ -458,8 +457,8 @@ github.com/urfave/cli/v2 v2.27.4 h1:o1owoI+02Eb+K107p27wEX9Bb8eqIoZCfLXloLUSWJ8= github.com/urfave/cli/v2 v2.27.4/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ= github.com/valyala/fastjson v1.4.1 h1:hrltpHpIpkaxll8QltMU8c3QZ5+qIiCL8yKqPFJI/yE= github.com/valyala/fastjson v1.4.1/go.mod h1:nV6MsjxL2IMJQUoHDIrjEI7oLyeqK6aBD7EFWPsvP8o= -github.com/wI2L/jsondiff v0.6.0 h1:zrsH3FbfVa3JO9llxrcDy/XLkYPLgoMX6Mz3T2PP2AI= -github.com/wI2L/jsondiff v0.6.0/go.mod h1:D6aQ5gKgPF9g17j+E9N7aasmU1O+XvfmWm1y8UMmNpw= +github.com/wI2L/jsondiff v0.7.0 h1:1lH1G37GhBPqCfp/lrs91rf/2j3DktX6qYAKZkLuCQQ= +github.com/wI2L/jsondiff v0.7.0/go.mod h1:KAEIojdQq66oJiHhDyQez2x+sRit0vIzC9KeK0yizxM= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= diff --git a/idls b/idls index 16af6755557..9bb5bc9f781 160000 --- a/idls +++ b/idls @@ -1 +1 @@ -Subproject commit 16af6755557f3750296213473a03013dc475e8e2 +Subproject commit 9bb5bc9f78165d050833b10172fba9acee0c5892 diff --git a/schema/cassandra/cadence/schema.cql b/schema/cassandra/cadence/schema.cql index ae894964ed9..98348f36f00 100644 --- a/schema/cassandra/cadence/schema.cql +++ b/schema/cassandra/cadence/schema.cql @@ -537,3 +537,23 @@ CREATE TABLE cluster_config ( encoding text, PRIMARY KEY (row_type, version) ) WITH CLUSTERING ORDER BY (version DESC); + +-- Domain audit log table for tracking domain update and failover history +CREATE TABLE domain_audit_log ( + domain_id uuid, + event_id uuid, + state_before blob, + state_before_encoding text, + state_after blob, + state_after_encoding text, + operation_type int, + created_time timestamp, + last_updated_time timestamp, + identity text, + identity_type text, + comment text, + PRIMARY KEY ((domain_id), created_time, event_id) +) WITH CLUSTERING ORDER BY (created_time DESC, event_id ASC) + AND COMPACTION = { + 'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy' + }; diff --git a/schema/cassandra/cadence/versioned/v0.44/domain_audit_log.cql b/schema/cassandra/cadence/versioned/v0.44/domain_audit_log.cql new file mode 100644 index 00000000000..42da10721ad --- /dev/null +++ b/schema/cassandra/cadence/versioned/v0.44/domain_audit_log.cql @@ -0,0 +1,26 @@ +CREATE TABLE domain_audit_log ( + domain_id uuid, + event_id uuid, -- event_id is the unique identifier for this change to the domain + + state_before blob, -- state_before only stores the original values for all fields changing as part of this request + state_before_encoding text, -- the encoding type used for state_before + + state_after blob, -- state_after stores the new values for all fields changed as part of this request + state_after_encoding text, -- the encoding type used for state_after + + operation_type int, -- operation_type stores the type of operation that was performed. It is deserialized as an enum and can be used to customize the serialization/deserialization strategy. + + created_time timestamp, + last_updated_time timestamp, + + identity text, -- the unique identifier of the user that made the change + -- identity_type delineates between service and user accounts + identity_type text, -- identity_type can be used to delineate between service, user, or other identities + + comment text, -- comment can be used when manual updates or creates are performed on the database as an audit trail + + PRIMARY KEY ((domain_id), created_time, event_id) +) WITH CLUSTERING ORDER BY (created_time DESC, event_id ASC) + AND COMPACTION = { + 'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy' + }; diff --git a/schema/cassandra/cadence/versioned/v0.44/manifest.json b/schema/cassandra/cadence/versioned/v0.44/manifest.json new file mode 100644 index 00000000000..84e4174cce9 --- /dev/null +++ b/schema/cassandra/cadence/versioned/v0.44/manifest.json @@ -0,0 +1,8 @@ +{ + "CurrVersion": "0.44", + "MinCompatibleVersion": "0.44", + "Description": "Adding domain_audit_log table to track domain update and failover history", + "SchemaUpdateCqlFiles": [ + "domain_audit_log.cql" + ] +} diff --git a/service/frontend/api/domain_handlers.go b/service/frontend/api/domain_handlers.go index 60818dc7e9c..a15ae2d5d43 100644 --- a/service/frontend/api/domain_handlers.go +++ b/service/frontend/api/domain_handlers.go @@ -25,8 +25,11 @@ package api import ( "context" "fmt" + "time" + "github.com/uber/cadence/common/domain/audit" "github.com/uber/cadence/common/log/tag" + "github.com/uber/cadence/common/persistence" "github.com/uber/cadence/common/types" "github.com/uber/cadence/service/frontend/validate" ) @@ -218,3 +221,113 @@ func (wh *WorkflowHandler) FailoverDomain(ctx context.Context, failoverRequest * logger.Info("Failover domain operation succeeded.") return failoverResp, nil } + +// ListFailoverHistory returns the failover history for a domain +func (wh *WorkflowHandler) ListFailoverHistory( + ctx context.Context, + request *types.ListFailoverHistoryRequest, +) (*types.ListFailoverHistoryResponse, error) { + if wh.isShuttingDown() { + return nil, validate.ErrShuttingDown + } + + // Extract domain ID from filters + if request.Filters == nil || request.Filters.DomainID == nil || *request.Filters.DomainID == "" { + return nil, &types.BadRequestError{Message: "domain_id is required in filters"} + } + + domainID := *request.Filters.DomainID + + // Set default page size + pageSize := 5 + if request.Pagination != nil && request.Pagination.PageSize != nil && *request.Pagination.PageSize > 0 { + pageSize = int(*request.Pagination.PageSize) + } + + var nextPageToken []byte + if request.Pagination != nil { + nextPageToken = request.Pagination.NextPageToken + } + + // Read from audit log + readResp, err := wh.GetDomainManager().ReadDomainAuditLog(ctx, &persistence.ReadDomainAuditLogRequest{ + DomainID: domainID, + PageSize: pageSize, + NextPageToken: nextPageToken, + }) + if err != nil { + return nil, err + } + + // Reconstruct failover events + events, err := audit.ReconstructFailoverEvents(readResp.Entries) + if err != nil { + return nil, err + } + + return &types.ListFailoverHistoryResponse{ + FailoverEvents: events, + NextPageToken: readResp.NextPageToken, + }, nil +} + +// GetFailoverEvent retrieves detailed information about a specific failover event +func (wh *WorkflowHandler) GetFailoverEvent( + ctx context.Context, + request *types.GetFailoverEventRequest, +) (*types.GetFailoverEventResponse, error) { + if wh.isShuttingDown() { + return nil, validate.ErrShuttingDown + } + + // Validate request + if request.DomainID == nil || *request.DomainID == "" || + request.FailoverEventID == nil || *request.FailoverEventID == "" || + request.CreatedTime == nil { + return nil, &types.BadRequestError{ + Message: "domain_id, failover_event_id, and created_time are required", + } + } + + logger := wh.GetLogger() + logger.Debug("GetFailoverEvent request received", + tag.WorkflowDomainID(*request.DomainID), + tag.Value(*request.FailoverEventID), + tag.Value(*request.CreatedTime)) + + // Convert Unix timestamp to time.Time + createdTime := time.Unix(0, *request.CreatedTime*int64(time.Millisecond)) + logger.Debug("Converted timestamp for query", + tag.Timestamp(createdTime), + tag.Value(createdTime.UnixNano())) + + // Get specific audit log entry + entryResp, err := wh.GetDomainManager().GetDomainAuditLogEntry(ctx, &persistence.GetDomainAuditLogEntryRequest{ + DomainID: *request.DomainID, + EventID: *request.FailoverEventID, + CreatedTime: createdTime, + }) + if err != nil { + logger.Error("Failed to get domain audit log entry", + tag.Error(err), + tag.WorkflowDomainID(*request.DomainID), + tag.Value(*request.FailoverEventID)) + return nil, err + } + + if entryResp == nil || entryResp.Entry == nil { + logger.Warn("GetDomainAuditLogEntry returned nil entry", + tag.WorkflowDomainID(*request.DomainID), + tag.Value(*request.FailoverEventID)) + return &types.GetFailoverEventResponse{}, nil + } + + logger.Debug("Retrieved audit log entry", + tag.WorkflowDomainID(entryResp.Entry.DomainID), + tag.Value(entryResp.Entry.EventID), + tag.Timestamp(entryResp.Entry.CreatedTime), + tag.Value(len(entryResp.Entry.StateAfter))) + + // Reconstruct cluster failovers from the entry + return audit.GetFailoverEventDetails(entryResp.Entry) +} diff --git a/service/frontend/api/domain_handlers_test.go b/service/frontend/api/domain_handlers_test.go index a375a7f58a4..439da75b786 100644 --- a/service/frontend/api/domain_handlers_test.go +++ b/service/frontend/api/domain_handlers_test.go @@ -26,11 +26,13 @@ import ( "context" "errors" "testing" + "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "go.uber.org/mock/gomock" + "github.com/uber/cadence/common" "github.com/uber/cadence/common/persistence" "github.com/uber/cadence/common/types" ) @@ -417,3 +419,320 @@ func TestDeleteDomain(t *testing.T) { }) } } + +func TestListFailoverHistory(t *testing.T) { + domainID := "test-domain-id" + testCases := []struct { + name string + req *types.ListFailoverHistoryRequest + setupMocks func(*mockDeps) + expectError bool + expectedError string + verifyResp func(t *testing.T, resp *types.ListFailoverHistoryResponse) + }{ + { + name: "success with default page size", + req: &types.ListFailoverHistoryRequest{ + Filters: &types.ListFailoverHistoryRequestFilters{ + DomainID: &domainID, + }, + }, + setupMocks: func(deps *mockDeps) { + deps.mockMetadataMgr.On("ReadDomainAuditLog", mock.Anything, &persistence.ReadDomainAuditLogRequest{ + DomainID: domainID, + PageSize: 5, + NextPageToken: nil, + }).Return(&persistence.ReadDomainAuditLogResponse{ + Entries: []*persistence.DomainAuditLogEntry{}, + NextPageToken: nil, + }, nil) + }, + expectError: false, + verifyResp: func(t *testing.T, resp *types.ListFailoverHistoryResponse) { + assert.NotNil(t, resp) + assert.Empty(t, resp.FailoverEvents) + assert.Nil(t, resp.NextPageToken) + }, + }, + { + name: "success with custom page size", + req: &types.ListFailoverHistoryRequest{ + Filters: &types.ListFailoverHistoryRequestFilters{ + DomainID: &domainID, + }, + Pagination: &types.PaginationOptions{ + PageSize: common.Int32Ptr(10), + }, + }, + setupMocks: func(deps *mockDeps) { + deps.mockMetadataMgr.On("ReadDomainAuditLog", mock.Anything, &persistence.ReadDomainAuditLogRequest{ + DomainID: domainID, + PageSize: 10, + NextPageToken: nil, + }).Return(&persistence.ReadDomainAuditLogResponse{ + Entries: []*persistence.DomainAuditLogEntry{}, + NextPageToken: nil, + }, nil) + }, + expectError: false, + verifyResp: func(t *testing.T, resp *types.ListFailoverHistoryResponse) { + assert.NotNil(t, resp) + assert.Empty(t, resp.FailoverEvents) + }, + }, + { + name: "success with pagination token", + req: &types.ListFailoverHistoryRequest{ + Filters: &types.ListFailoverHistoryRequestFilters{ + DomainID: &domainID, + }, + Pagination: &types.PaginationOptions{ + PageSize: common.Int32Ptr(5), + NextPageToken: []byte("token123"), + }, + }, + setupMocks: func(deps *mockDeps) { + deps.mockMetadataMgr.On("ReadDomainAuditLog", mock.Anything, &persistence.ReadDomainAuditLogRequest{ + DomainID: domainID, + PageSize: 5, + NextPageToken: []byte("token123"), + }).Return(&persistence.ReadDomainAuditLogResponse{ + Entries: []*persistence.DomainAuditLogEntry{}, + NextPageToken: []byte("token456"), + }, nil) + }, + expectError: false, + verifyResp: func(t *testing.T, resp *types.ListFailoverHistoryResponse) { + assert.NotNil(t, resp) + assert.Equal(t, []byte("token456"), resp.NextPageToken) + }, + }, + { + name: "missing domain_id in filters", + req: &types.ListFailoverHistoryRequest{ + Filters: nil, + }, + setupMocks: func(deps *mockDeps) {}, + expectError: true, + expectedError: "domain_id is required in filters", + }, + { + name: "empty domain_id in filters", + req: &types.ListFailoverHistoryRequest{ + Filters: &types.ListFailoverHistoryRequestFilters{ + DomainID: common.StringPtr(""), + }, + }, + setupMocks: func(deps *mockDeps) {}, + expectError: true, + expectedError: "domain_id is required in filters", + }, + { + name: "persistence error", + req: &types.ListFailoverHistoryRequest{ + Filters: &types.ListFailoverHistoryRequestFilters{ + DomainID: &domainID, + }, + }, + setupMocks: func(deps *mockDeps) { + deps.mockMetadataMgr.On("ReadDomainAuditLog", mock.Anything, mock.Anything). + Return(nil, errors.New("persistence error")) + }, + expectError: true, + expectedError: "persistence error", + }, + { + name: "shutting down", + req: &types.ListFailoverHistoryRequest{ + Filters: &types.ListFailoverHistoryRequestFilters{ + DomainID: &domainID, + }, + }, + setupMocks: func(deps *mockDeps) {}, + expectError: true, + expectedError: "Shutting down", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + wh, deps := setupMocksForWorkflowHandler(t) + + if tc.name == "shutting down" { + wh.Stop() + } else { + tc.setupMocks(deps) + } + + resp, err := wh.ListFailoverHistory(context.Background(), tc.req) + + if tc.expectError { + assert.Error(t, err) + assert.ErrorContains(t, err, tc.expectedError) + } else { + assert.NoError(t, err) + if tc.verifyResp != nil { + tc.verifyResp(t, resp) + } + } + }) + } +} + +func TestGetFailoverEvent(t *testing.T) { + domainID := "test-domain-id" + eventID := "test-event-id" + createdTime := time.Now().UTC() + createdTimeMs := createdTime.UnixNano() / int64(time.Millisecond) + + validStateAfter := []byte(`[ + { + "op": "replace", + "path": "/ReplicationConfig/ActiveClusterName", + "value": "cluster2" + } + ]`) + + testCases := []struct { + name string + req *types.GetFailoverEventRequest + setupMocks func(*mockDeps) + expectError bool + expectedError string + verifyResp func(t *testing.T, resp *types.GetFailoverEventResponse) + }{ + { + name: "success", + req: &types.GetFailoverEventRequest{ + DomainID: &domainID, + FailoverEventID: &eventID, + CreatedTime: &createdTimeMs, + }, + setupMocks: func(deps *mockDeps) { + deps.mockMetadataMgr.On("GetDomainAuditLogEntry", mock.Anything, &persistence.GetDomainAuditLogEntryRequest{ + DomainID: domainID, + EventID: eventID, + CreatedTime: createdTime, + }).Return(&persistence.GetDomainAuditLogEntryResponse{ + Entry: &persistence.DomainAuditLogEntry{ + DomainID: domainID, + EventID: eventID, + CreatedTime: createdTime, + StateAfter: validStateAfter, + }, + }, nil) + }, + expectError: false, + verifyResp: func(t *testing.T, resp *types.GetFailoverEventResponse) { + assert.NotNil(t, resp) + assert.NotNil(t, resp.ClusterFailovers) + }, + }, + { + name: "missing domain_id", + req: &types.GetFailoverEventRequest{ + DomainID: common.StringPtr(""), + FailoverEventID: &eventID, + CreatedTime: &createdTimeMs, + }, + setupMocks: func(deps *mockDeps) {}, + expectError: true, + expectedError: "domain_id, failover_event_id, and created_time are required", + }, + { + name: "missing failover_event_id", + req: &types.GetFailoverEventRequest{ + DomainID: &domainID, + FailoverEventID: common.StringPtr(""), + CreatedTime: &createdTimeMs, + }, + setupMocks: func(deps *mockDeps) {}, + expectError: true, + expectedError: "domain_id, failover_event_id, and created_time are required", + }, + { + name: "missing created_time", + req: &types.GetFailoverEventRequest{ + DomainID: &domainID, + FailoverEventID: &eventID, + CreatedTime: nil, + }, + setupMocks: func(deps *mockDeps) {}, + expectError: true, + expectedError: "domain_id, failover_event_id, and created_time are required", + }, + { + name: "persistence error", + req: &types.GetFailoverEventRequest{ + DomainID: &domainID, + FailoverEventID: &eventID, + CreatedTime: &createdTimeMs, + }, + setupMocks: func(deps *mockDeps) { + deps.mockMetadataMgr.On("GetDomainAuditLogEntry", mock.Anything, mock.Anything). + Return(nil, errors.New("persistence error")) + }, + expectError: true, + expectedError: "persistence error", + }, + { + name: "invalid state_after JSON", + req: &types.GetFailoverEventRequest{ + DomainID: &domainID, + FailoverEventID: &eventID, + CreatedTime: &createdTimeMs, + }, + setupMocks: func(deps *mockDeps) { + deps.mockMetadataMgr.On("GetDomainAuditLogEntry", mock.Anything, &persistence.GetDomainAuditLogEntryRequest{ + DomainID: domainID, + EventID: eventID, + CreatedTime: createdTime, + }).Return(&persistence.GetDomainAuditLogEntryResponse{ + Entry: &persistence.DomainAuditLogEntry{ + DomainID: domainID, + EventID: eventID, + CreatedTime: createdTime, + StateAfter: []byte("invalid json"), + }, + }, nil) + }, + expectError: true, + expectedError: "invalid character", + }, + { + name: "shutting down", + req: &types.GetFailoverEventRequest{ + DomainID: &domainID, + FailoverEventID: &eventID, + CreatedTime: &createdTimeMs, + }, + setupMocks: func(deps *mockDeps) {}, + expectError: true, + expectedError: "Shutting down", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + wh, deps := setupMocksForWorkflowHandler(t) + + if tc.name == "shutting down" { + wh.Stop() + } else { + tc.setupMocks(deps) + } + + resp, err := wh.GetFailoverEvent(context.Background(), tc.req) + + if tc.expectError { + assert.Error(t, err) + assert.ErrorContains(t, err, tc.expectedError) + } else { + assert.NoError(t, err) + if tc.verifyResp != nil { + tc.verifyResp(t, resp) + } + } + }) + } +} diff --git a/service/frontend/api/domain_handlers_timestamp_test.go b/service/frontend/api/domain_handlers_timestamp_test.go new file mode 100644 index 00000000000..1ab17af69fd --- /dev/null +++ b/service/frontend/api/domain_handlers_timestamp_test.go @@ -0,0 +1,66 @@ +package api + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +// TestTimestampConversion verifies that the timestamp conversion logic +// used in GetFailoverEvent maintains precision correctly +func TestTimestampConversion(t *testing.T) { + // Simulate a timestamp stored in Cassandra (millisecond precision) + originalTime := time.Date(2025, 10, 22, 18, 29, 23, 874000000, time.UTC) + + // Step 1: Convert to milliseconds (as done in ListFailoverHistory) + createdTimeMs := originalTime.UnixNano() / int64(time.Millisecond) + t.Logf("Original time: %v", originalTime) + t.Logf("Original nanos: %d", originalTime.UnixNano()) + t.Logf("Converted to ms: %d", createdTimeMs) + + // Step 2: Convert back to time.Time (as done in GetFailoverEvent handler) + reconstructedTime := time.Unix(0, createdTimeMs*int64(time.Millisecond)) + t.Logf("Reconstructed time: %v", reconstructedTime) + t.Logf("Reconstructed nanos: %d", reconstructedTime.UnixNano()) + + // Verify they are equal + assert.Equal(t, originalTime.UnixNano(), reconstructedTime.UnixNano(), + "Timestamps should be equal after round-trip conversion") + assert.True(t, originalTime.Equal(reconstructedTime), + "time.Time values should be equal") + + // Test with the exact timestamp from the issue + // "2025-10-22T18:29:23.874Z" + issueTime, err := time.Parse(time.RFC3339, "2025-10-22T18:29:23.874Z") + assert.NoError(t, err) + t.Logf("Issue timestamp: %v (nanos: %d)", issueTime, issueTime.UnixNano()) + + // Convert to ms and back + issueMs := issueTime.UnixNano() / int64(time.Millisecond) + issueReconstructed := time.Unix(0, issueMs*int64(time.Millisecond)) + t.Logf("Issue reconstructed: %v (nanos: %d)", issueReconstructed, issueReconstructed.UnixNano()) + + assert.True(t, issueTime.Equal(issueReconstructed), + "Issue timestamp should survive round-trip") +} + +// TestTimestampMillisecondPrecision verifies that timestamps maintain only millisecond precision +func TestTimestampMillisecondPrecision(t *testing.T) { + // Create a time with sub-millisecond precision + timeWithNanos := time.Date(2025, 10, 22, 18, 29, 23, 874123456, time.UTC) + + // Convert to ms and back (simulating Cassandra storage) + ms := timeWithNanos.UnixNano() / int64(time.Millisecond) + timeFromMs := time.Unix(0, ms*int64(time.Millisecond)) + + t.Logf("Original: %v (nanos: %d)", timeWithNanos, timeWithNanos.UnixNano()) + t.Logf("After ms conversion: %v (nanos: %d)", timeFromMs, timeFromMs.UnixNano()) + + // The millisecond portion should be preserved + assert.Equal(t, int64(874), ms%1000, "Milliseconds should be 874") + + // Sub-millisecond precision should be lost + assert.Equal(t, int64(0), timeFromMs.Nanosecond()%1000000, + "Sub-millisecond precision should be lost") +} diff --git a/service/frontend/api/interface.go b/service/frontend/api/interface.go index 202b7d43229..c6011453103 100644 --- a/service/frontend/api/interface.go +++ b/service/frontend/api/interface.go @@ -85,5 +85,7 @@ type ( TerminateWorkflowExecution(context.Context, *types.TerminateWorkflowExecutionRequest) error UpdateDomain(context.Context, *types.UpdateDomainRequest) (*types.UpdateDomainResponse, error) FailoverDomain(context.Context, *types.FailoverDomainRequest) (*types.FailoverDomainResponse, error) + ListFailoverHistory(context.Context, *types.ListFailoverHistoryRequest) (*types.ListFailoverHistoryResponse, error) + GetFailoverEvent(context.Context, *types.GetFailoverEventRequest) (*types.GetFailoverEventResponse, error) } ) diff --git a/service/frontend/api/interface_mock.go b/service/frontend/api/interface_mock.go index 213656a5aa6..cdfe4ae53d7 100644 --- a/service/frontend/api/interface_mock.go +++ b/service/frontend/api/interface_mock.go @@ -175,6 +175,21 @@ func (mr *MockHandlerMockRecorder) GetClusterInfo(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterInfo", reflect.TypeOf((*MockHandler)(nil).GetClusterInfo), arg0) } +// GetFailoverEvent mocks base method. +func (m *MockHandler) GetFailoverEvent(arg0 context.Context, arg1 *types.GetFailoverEventRequest) (*types.GetFailoverEventResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetFailoverEvent", arg0, arg1) + ret0, _ := ret[0].(*types.GetFailoverEventResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetFailoverEvent indicates an expected call of GetFailoverEvent. +func (mr *MockHandlerMockRecorder) GetFailoverEvent(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFailoverEvent", reflect.TypeOf((*MockHandler)(nil).GetFailoverEvent), arg0, arg1) +} + // GetSearchAttributes mocks base method. func (m *MockHandler) GetSearchAttributes(arg0 context.Context) (*types.GetSearchAttributesResponse, error) { m.ctrl.T.Helper() @@ -280,6 +295,21 @@ func (mr *MockHandlerMockRecorder) ListDomains(arg0, arg1 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDomains", reflect.TypeOf((*MockHandler)(nil).ListDomains), arg0, arg1) } +// ListFailoverHistory mocks base method. +func (m *MockHandler) ListFailoverHistory(arg0 context.Context, arg1 *types.ListFailoverHistoryRequest) (*types.ListFailoverHistoryResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListFailoverHistory", arg0, arg1) + ret0, _ := ret[0].(*types.ListFailoverHistoryResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListFailoverHistory indicates an expected call of ListFailoverHistory. +func (mr *MockHandlerMockRecorder) ListFailoverHistory(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListFailoverHistory", reflect.TypeOf((*MockHandler)(nil).ListFailoverHistory), arg0, arg1) +} + // ListOpenWorkflowExecutions mocks base method. func (m *MockHandler) ListOpenWorkflowExecutions(arg0 context.Context, arg1 *types.ListOpenWorkflowExecutionsRequest) (*types.ListOpenWorkflowExecutionsResponse, error) { m.ctrl.T.Helper() diff --git a/service/frontend/templates/clusterredirection.tmpl b/service/frontend/templates/clusterredirection.tmpl index 4b3cba423c8..f815cc2c25d 100644 --- a/service/frontend/templates/clusterredirection.tmpl +++ b/service/frontend/templates/clusterredirection.tmpl @@ -12,7 +12,7 @@ import ( frontendcfg "github.com/uber/cadence/service/frontend/config" ) -{{$nonForwardingAPIs := list "Health" "DeprecateDomain" "DeleteDomain" "DescribeDomain" "FailoverDomain" "ListDomains" "RegisterDomain" "UpdateDomain" "GetSearchAttributes" "GetClusterInfo" "DiagnoseWorkflowExecution"}} +{{$nonForwardingAPIs := list "Health" "DeprecateDomain" "DeleteDomain" "DescribeDomain" "FailoverDomain" "ListDomains" "RegisterDomain" "UpdateDomain" "GetSearchAttributes" "GetClusterInfo" "DiagnoseWorkflowExecution" "ListFailoverHistory" "GetFailoverEvent"}} {{$domainIDAPIs := list "RecordActivityTaskHeartbeat" "RespondActivityTaskCanceled" "RespondActivityTaskCompleted" "RespondActivityTaskFailed" "RespondDecisionTaskCompleted" "RespondDecisionTaskFailed" "RespondQueryTaskCompleted"}} {{$startWFAPIs := list "StartWorkflowExecution" "StartWorkflowExecutionAsync" "SignalWithStartWorkflowExecution" "SignalWithStartWorkflowExecutionAsync"}} {{$nonstartWFAPIs := list "DescribeWorkflowExecutionRequest" "GetWorkflowExecutionHistory" "QueryWorkflowRequest" "RequestCancelWorkflowExecution" "ResetWorkflowExecution" "RestartWorkflowExecution" "SignalWorkflowExecution" "TerminateWorkflowExecution" }} diff --git a/service/frontend/templates/ratelimited.tmpl b/service/frontend/templates/ratelimited.tmpl index a61c63af1d4..7f6d9df3dd4 100644 --- a/service/frontend/templates/ratelimited.tmpl +++ b/service/frontend/templates/ratelimited.tmpl @@ -59,6 +59,8 @@ import ( {{$ratelimitTypeMap = set $ratelimitTypeMap "ListDomains" "ratelimitTypeNoop"}} {{$ratelimitTypeMap = set $ratelimitTypeMap "RegisterDomain" "ratelimitTypeNoop"}} {{$ratelimitTypeMap = set $ratelimitTypeMap "UpdateDomain" "ratelimitTypeNoop"}} +{{$ratelimitTypeMap = set $ratelimitTypeMap "ListFailoverHistory" "ratelimitTypeNoop"}} +{{$ratelimitTypeMap = set $ratelimitTypeMap "GetFailoverEvent" "ratelimitTypeNoop"}} {{$domainIDAPIs := list "RecordActivityTaskHeartbeat" "RespondActivityTaskCanceled" "RespondActivityTaskCompleted" "RespondActivityTaskFailed" "RespondDecisionTaskCompleted" "RespondDecisionTaskFailed" "RespondQueryTaskCompleted"}} {{$queryTaskTokenAPIs := list "RespondQueryTaskCompleted"}} diff --git a/service/frontend/wrappers/accesscontrolled/api_generated.go b/service/frontend/wrappers/accesscontrolled/api_generated.go index dd0f416d192..edd0e344a4b 100644 --- a/service/frontend/wrappers/accesscontrolled/api_generated.go +++ b/service/frontend/wrappers/accesscontrolled/api_generated.go @@ -171,6 +171,10 @@ func (a *apiHandler) GetClusterInfo(ctx context.Context) (cp1 *types.ClusterInfo return a.handler.GetClusterInfo(ctx) } +func (a *apiHandler) GetFailoverEvent(ctx context.Context, gp1 *types.GetFailoverEventRequest) (gp2 *types.GetFailoverEventResponse, err error) { + return a.handler.GetFailoverEvent(ctx, gp1) +} + func (a *apiHandler) GetSearchAttributes(ctx context.Context) (gp1 *types.GetSearchAttributesResponse, err error) { return a.handler.GetSearchAttributes(ctx) } @@ -255,6 +259,10 @@ func (a *apiHandler) ListDomains(ctx context.Context, lp1 *types.ListDomainsRequ return a.handler.ListDomains(ctx, lp1) } +func (a *apiHandler) ListFailoverHistory(ctx context.Context, lp1 *types.ListFailoverHistoryRequest) (lp2 *types.ListFailoverHistoryResponse, err error) { + return a.handler.ListFailoverHistory(ctx, lp1) +} + func (a *apiHandler) ListOpenWorkflowExecutions(ctx context.Context, lp1 *types.ListOpenWorkflowExecutionsRequest) (lp2 *types.ListOpenWorkflowExecutionsResponse, err error) { scope := a.getMetricsScopeWithDomain(metrics.FrontendListOpenWorkflowExecutionsScope, lp1.GetDomain()) attr := &authorization.Attributes{ diff --git a/service/frontend/wrappers/clusterredirection/api_generated.go b/service/frontend/wrappers/clusterredirection/api_generated.go index 7bda97ea918..98c781f6556 100644 --- a/service/frontend/wrappers/clusterredirection/api_generated.go +++ b/service/frontend/wrappers/clusterredirection/api_generated.go @@ -207,6 +207,10 @@ func (handler *clusterRedirectionHandler) GetClusterInfo(ctx context.Context) (c return handler.frontendHandler.GetClusterInfo(ctx) } +func (handler *clusterRedirectionHandler) GetFailoverEvent(ctx context.Context, gp1 *types.GetFailoverEventRequest) (gp2 *types.GetFailoverEventResponse, err error) { + return handler.frontendHandler.GetFailoverEvent(ctx, gp1) +} + func (handler *clusterRedirectionHandler) GetSearchAttributes(ctx context.Context) (gp1 *types.GetSearchAttributesResponse, err error) { return handler.frontendHandler.GetSearchAttributes(ctx) } @@ -382,6 +386,10 @@ func (handler *clusterRedirectionHandler) ListDomains(ctx context.Context, lp1 * return handler.frontendHandler.ListDomains(ctx, lp1) } +func (handler *clusterRedirectionHandler) ListFailoverHistory(ctx context.Context, lp1 *types.ListFailoverHistoryRequest) (lp2 *types.ListFailoverHistoryResponse, err error) { + return handler.frontendHandler.ListFailoverHistory(ctx, lp1) +} + func (handler *clusterRedirectionHandler) ListOpenWorkflowExecutions(ctx context.Context, lp1 *types.ListOpenWorkflowExecutionsRequest) (lp2 *types.ListOpenWorkflowExecutionsResponse, err error) { var ( apiName = "ListOpenWorkflowExecutions" diff --git a/service/frontend/wrappers/grpc/api_generated.go b/service/frontend/wrappers/grpc/api_generated.go index 0632c747024..9ad1fd7517c 100644 --- a/service/frontend/wrappers/grpc/api_generated.go +++ b/service/frontend/wrappers/grpc/api_generated.go @@ -66,6 +66,11 @@ func (g APIHandler) GetClusterInfo(ctx context.Context, request *apiv1.GetCluste return proto.FromGetClusterInfoResponse(response), proto.FromError(err) } +func (g APIHandler) GetFailoverEvent(ctx context.Context, request *apiv1.GetFailoverEventRequest) (*apiv1.GetFailoverEventResponse, error) { + response, err := g.h.GetFailoverEvent(ctx, proto.ToGetFailoverEventRequest(request)) + return proto.FromGetFailoverEventResponse(response), proto.FromError(err) +} + func (g APIHandler) GetSearchAttributes(ctx context.Context, request *apiv1.GetSearchAttributesRequest) (*apiv1.GetSearchAttributesResponse, error) { response, err := g.h.GetSearchAttributes(ctx) return proto.FromGetSearchAttributesResponse(response), proto.FromError(err) @@ -96,6 +101,11 @@ func (g APIHandler) ListDomains(ctx context.Context, request *apiv1.ListDomainsR return proto.FromListDomainsResponse(response), proto.FromError(err) } +func (g APIHandler) ListFailoverHistory(ctx context.Context, request *apiv1.ListFailoverHistoryRequest) (*apiv1.ListFailoverHistoryResponse, error) { + response, err := g.h.ListFailoverHistory(ctx, proto.ToListFailoverHistoryRequest(request)) + return proto.FromListFailoverHistoryResponse(response), proto.FromError(err) +} + func (g APIHandler) ListOpenWorkflowExecutions(ctx context.Context, request *apiv1.ListOpenWorkflowExecutionsRequest) (*apiv1.ListOpenWorkflowExecutionsResponse, error) { response, err := g.h.ListOpenWorkflowExecutions(ctx, proto.ToListOpenWorkflowExecutionsRequest(request)) return proto.FromListOpenWorkflowExecutionsResponse(response), proto.FromError(err) diff --git a/service/frontend/wrappers/metered/api_generated.go b/service/frontend/wrappers/metered/api_generated.go index 95faf76683c..6b086b5c423 100644 --- a/service/frontend/wrappers/metered/api_generated.go +++ b/service/frontend/wrappers/metered/api_generated.go @@ -179,6 +179,22 @@ func (h *apiHandler) GetClusterInfo(ctx context.Context) (cp1 *types.ClusterInfo } return cp1, err } +func (h *apiHandler) GetFailoverEvent(ctx context.Context, gp1 *types.GetFailoverEventRequest) (gp2 *types.GetFailoverEventResponse, err error) { + defer func() { log.CapturePanic(recover(), h.logger, &err) }() + tags := []tag.Tag{tag.WorkflowHandlerName("GetFailoverEvent")} + tags = append(tags, toGetFailoverEventRequestTags(gp1)...) + scope := h.metricsClient.Scope(metrics.FrontendGetFailoverEventScope).Tagged(append(metrics.GetContextTags(ctx), metrics.DomainTag(gp1.GetDomain()))...) + scope.IncCounter(metrics.CadenceRequests) + sw := scope.StartTimer(metrics.CadenceLatency) + defer sw.Stop() + logger := h.logger.WithTags(tags...) + + gp2, err = h.handler.GetFailoverEvent(ctx, gp1) + if err != nil { + return nil, h.handleErr(err, scope, logger) + } + return gp2, err +} func (h *apiHandler) GetSearchAttributes(ctx context.Context) (gp1 *types.GetSearchAttributesResponse, err error) { defer func() { log.CapturePanic(recover(), h.logger, &err) }() tags := []tag.Tag{tag.WorkflowHandlerName("GetSearchAttributes")} @@ -276,6 +292,22 @@ func (h *apiHandler) ListDomains(ctx context.Context, lp1 *types.ListDomainsRequ } return lp2, err } +func (h *apiHandler) ListFailoverHistory(ctx context.Context, lp1 *types.ListFailoverHistoryRequest) (lp2 *types.ListFailoverHistoryResponse, err error) { + defer func() { log.CapturePanic(recover(), h.logger, &err) }() + tags := []tag.Tag{tag.WorkflowHandlerName("ListFailoverHistory")} + tags = append(tags, toListFailoverHistoryRequestTags(lp1)...) + scope := h.metricsClient.Scope(metrics.FrontendListFailoverHistoryScope).Tagged(append(metrics.GetContextTags(ctx), metrics.DomainTag(lp1.GetDomain()))...) + scope.IncCounter(metrics.CadenceRequests) + sw := scope.StartTimer(metrics.CadenceLatency) + defer sw.Stop() + logger := h.logger.WithTags(tags...) + + lp2, err = h.handler.ListFailoverHistory(ctx, lp1) + if err != nil { + return nil, h.handleErr(err, scope, logger) + } + return lp2, err +} func (h *apiHandler) ListOpenWorkflowExecutions(ctx context.Context, lp1 *types.ListOpenWorkflowExecutionsRequest) (lp2 *types.ListOpenWorkflowExecutionsResponse, err error) { defer func() { log.CapturePanic(recover(), h.logger, &err) }() tags := []tag.Tag{tag.WorkflowHandlerName("ListOpenWorkflowExecutions")} diff --git a/service/frontend/wrappers/metered/metered.go b/service/frontend/wrappers/metered/metered.go index c9e5f7c2c2f..b1729a2ce13 100644 --- a/service/frontend/wrappers/metered/metered.go +++ b/service/frontend/wrappers/metered/metered.go @@ -361,3 +361,23 @@ func toFailoverDomainRequestTags(req *types.FailoverDomainRequest) []tag.Tag { tag.WorkflowDomainName(req.GetDomain()), } } + +func toListFailoverHistoryRequestTags(req *types.ListFailoverHistoryRequest) []tag.Tag { + var domainID string + if req.Filters != nil && req.Filters.DomainID != nil { + domainID = *req.Filters.DomainID + } + return []tag.Tag{ + tag.WorkflowDomainID(domainID), + } +} + +func toGetFailoverEventRequestTags(req *types.GetFailoverEventRequest) []tag.Tag { + var domainID string + if req.DomainID != nil { + domainID = *req.DomainID + } + return []tag.Tag{ + tag.WorkflowDomainID(domainID), + } +} diff --git a/service/frontend/wrappers/ratelimited/api_generated.go b/service/frontend/wrappers/ratelimited/api_generated.go index 0c92f1071f7..6117a2095e6 100644 --- a/service/frontend/wrappers/ratelimited/api_generated.go +++ b/service/frontend/wrappers/ratelimited/api_generated.go @@ -142,6 +142,10 @@ func (h *apiHandler) GetClusterInfo(ctx context.Context) (cp1 *types.ClusterInfo return h.wrapped.GetClusterInfo(ctx) } +func (h *apiHandler) GetFailoverEvent(ctx context.Context, gp1 *types.GetFailoverEventRequest) (gp2 *types.GetFailoverEventResponse, err error) { + return h.wrapped.GetFailoverEvent(ctx, gp1) +} + func (h *apiHandler) GetSearchAttributes(ctx context.Context) (gp1 *types.GetSearchAttributesResponse, err error) { return h.wrapped.GetSearchAttributes(ctx) } @@ -218,6 +222,10 @@ func (h *apiHandler) ListDomains(ctx context.Context, lp1 *types.ListDomainsRequ return h.wrapped.ListDomains(ctx, lp1) } +func (h *apiHandler) ListFailoverHistory(ctx context.Context, lp1 *types.ListFailoverHistoryRequest) (lp2 *types.ListFailoverHistoryResponse, err error) { + return h.wrapped.ListFailoverHistory(ctx, lp1) +} + func (h *apiHandler) ListOpenWorkflowExecutions(ctx context.Context, lp1 *types.ListOpenWorkflowExecutionsRequest) (lp2 *types.ListOpenWorkflowExecutionsResponse, err error) { if lp1 == nil { err = validate.ErrRequestNotSet diff --git a/service/frontend/wrappers/thrift/api_generated.go b/service/frontend/wrappers/thrift/api_generated.go index 1cb36ed28e1..ff3d5c2b34c 100644 --- a/service/frontend/wrappers/thrift/api_generated.go +++ b/service/frontend/wrappers/thrift/api_generated.go @@ -56,6 +56,11 @@ func (g APIHandler) GetClusterInfo(ctx context.Context) (cp1 *shared.ClusterInfo return thrift.FromGetClusterInfoResponse(response), thrift.FromError(err) } +func (g APIHandler) GetFailoverEvent(ctx context.Context, GetRequest *shared.GetFailoverEventRequest) (gp1 *shared.GetFailoverEventResponse, err error) { + response, err := g.h.GetFailoverEvent(ctx, thrift.ToGetFailoverEventRequest(GetRequest)) + return thrift.FromGetFailoverEventResponse(response), thrift.FromError(err) +} + func (g APIHandler) GetSearchAttributes(ctx context.Context) (gp1 *shared.GetSearchAttributesResponse, err error) { response, err := g.h.GetSearchAttributes(ctx) return thrift.FromGetSearchAttributesResponse(response), thrift.FromError(err) @@ -86,6 +91,11 @@ func (g APIHandler) ListDomains(ctx context.Context, ListRequest *shared.ListDom return thrift.FromListDomainsResponse(response), thrift.FromError(err) } +func (g APIHandler) ListFailoverHistory(ctx context.Context, ListRequest *shared.ListFailoverHistoryRequest) (lp1 *shared.ListFailoverHistoryResponse, err error) { + response, err := g.h.ListFailoverHistory(ctx, thrift.ToListFailoverHistoryRequest(ListRequest)) + return thrift.FromListFailoverHistoryResponse(response), thrift.FromError(err) +} + func (g APIHandler) ListOpenWorkflowExecutions(ctx context.Context, ListRequest *shared.ListOpenWorkflowExecutionsRequest) (lp1 *shared.ListOpenWorkflowExecutionsResponse, err error) { response, err := g.h.ListOpenWorkflowExecutions(ctx, thrift.ToListOpenWorkflowExecutionsRequest(ListRequest)) return thrift.FromListOpenWorkflowExecutionsResponse(response), thrift.FromError(err) diff --git a/service/frontend/wrappers/versioncheck/api_generated.go b/service/frontend/wrappers/versioncheck/api_generated.go index 8a0aa40eaf8..a25404ea1bc 100644 --- a/service/frontend/wrappers/versioncheck/api_generated.go +++ b/service/frontend/wrappers/versioncheck/api_generated.go @@ -101,6 +101,14 @@ func (h *versionCheckHandler) GetClusterInfo(ctx context.Context) (cp1 *types.Cl return h.frontendHandler.GetClusterInfo(ctx) } +func (h *versionCheckHandler) GetFailoverEvent(ctx context.Context, gp1 *types.GetFailoverEventRequest) (gp2 *types.GetFailoverEventResponse, err error) { + err = h.versionChecker.ClientSupported(ctx, h.config.EnableClientVersionCheck()) + if err != nil { + return + } + return h.frontendHandler.GetFailoverEvent(ctx, gp1) +} + func (h *versionCheckHandler) GetSearchAttributes(ctx context.Context) (gp1 *types.GetSearchAttributesResponse, err error) { err = h.versionChecker.ClientSupported(ctx, h.config.EnableClientVersionCheck()) if err != nil { @@ -149,6 +157,14 @@ func (h *versionCheckHandler) ListDomains(ctx context.Context, lp1 *types.ListDo return h.frontendHandler.ListDomains(ctx, lp1) } +func (h *versionCheckHandler) ListFailoverHistory(ctx context.Context, lp1 *types.ListFailoverHistoryRequest) (lp2 *types.ListFailoverHistoryResponse, err error) { + err = h.versionChecker.ClientSupported(ctx, h.config.EnableClientVersionCheck()) + if err != nil { + return + } + return h.frontendHandler.ListFailoverHistory(ctx, lp1) +} + func (h *versionCheckHandler) ListOpenWorkflowExecutions(ctx context.Context, lp1 *types.ListOpenWorkflowExecutionsRequest) (lp2 *types.ListOpenWorkflowExecutionsResponse, err error) { err = h.versionChecker.ClientSupported(ctx, h.config.EnableClientVersionCheck()) if err != nil { diff --git a/tools/common/schema/updatetask_test.go b/tools/common/schema/updatetask_test.go index 3ae91243f8c..e72b1612781 100644 --- a/tools/common/schema/updatetask_test.go +++ b/tools/common/schema/updatetask_test.go @@ -116,7 +116,7 @@ func (s *UpdateTaskTestSuite) TestReadSchemaDirFromEmbeddings() { s.NoError(err) ans, err := readSchemaDir(fsys, "0.30", "") s.NoError(err) - s.Equal([]string{"v0.31", "v0.32", "v0.33", "v0.34", "v0.35", "v0.36", "v0.37", "v0.38", "v0.39", "v0.40", "v0.41", "v0.42", "v0.43"}, ans) + s.Equal([]string{"v0.31", "v0.32", "v0.33", "v0.34", "v0.35", "v0.36", "v0.37", "v0.38", "v0.39", "v0.40", "v0.41", "v0.42", "v0.43", "v0.44"}, ans) fsys, err = fs.Sub(cassandra.SchemaFS, "visibility/versioned") s.NoError(err)