// Code generated by thriftrw v1.25.0. DO NOT EDIT.
// @generated

package cadence

import (
	errors "errors"
	fmt "fmt"
	strings "strings"

	multierr "go.uber.org/multierr"
	thriftreflect "go.uber.org/thriftrw/thriftreflect"
	wire "go.uber.org/thriftrw/wire"
	zapcore "go.uber.org/zap/zapcore"

	shared "go.uber.org/cadence/.gen/go/shared"
)

// ThriftModule represents the IDL file used to generate this package.
var ThriftModule = &thriftreflect.ThriftModule{
	Name:     "cadence",
	Package:  "go.uber.org/cadence/.gen/go/cadence",
	FilePath: "cadence.thrift",
	SHA1:     "a0c3c0c106c1d7399612863e5da37eed3c561f4b",
	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  * 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"

// WorkflowService_CountWorkflowExecutions_Args represents the arguments for the WorkflowService.CountWorkflowExecutions function.
//
// The arguments for CountWorkflowExecutions are sent and received over the wire as this struct.
type WorkflowService_CountWorkflowExecutions_Args struct {
	CountRequest *shared.CountWorkflowExecutionsRequest `json:"countRequest,omitempty"`
}

// ToWire translates a WorkflowService_CountWorkflowExecutions_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_CountWorkflowExecutions_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.CountRequest != nil {
		w, err = v.CountRequest.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 _CountWorkflowExecutionsRequest_Read(w wire.Value) (*shared.CountWorkflowExecutionsRequest, error) {
	var v shared.CountWorkflowExecutionsRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_CountWorkflowExecutions_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_CountWorkflowExecutions_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_CountWorkflowExecutions_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_CountWorkflowExecutions_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.CountRequest, err = _CountWorkflowExecutionsRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_CountWorkflowExecutions_Args
// struct.
func (v *WorkflowService_CountWorkflowExecutions_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.CountRequest != nil {
		fields[i] = fmt.Sprintf("CountRequest: %v", v.CountRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_CountWorkflowExecutions_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_CountWorkflowExecutions_Args match the
// provided WorkflowService_CountWorkflowExecutions_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_CountWorkflowExecutions_Args) Equals(rhs *WorkflowService_CountWorkflowExecutions_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.CountRequest == nil && rhs.CountRequest == nil) || (v.CountRequest != nil && rhs.CountRequest != nil && v.CountRequest.Equals(rhs.CountRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_CountWorkflowExecutions_Args.
func (v *WorkflowService_CountWorkflowExecutions_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.CountRequest != nil {
		err = multierr.Append(err, enc.AddObject("countRequest", v.CountRequest))
	}
	return err
}

// GetCountRequest returns the value of CountRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_CountWorkflowExecutions_Args) GetCountRequest() (o *shared.CountWorkflowExecutionsRequest) {
	if v != nil && v.CountRequest != nil {
		return v.CountRequest
	}

	return
}

// IsSetCountRequest returns true if CountRequest is not nil.
func (v *WorkflowService_CountWorkflowExecutions_Args) IsSetCountRequest() bool {
	return v != nil && v.CountRequest != 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 "CountWorkflowExecutions" for this struct.
func (v *WorkflowService_CountWorkflowExecutions_Args) MethodName() string {
	return "CountWorkflowExecutions"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_CountWorkflowExecutions_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_CountWorkflowExecutions_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.CountWorkflowExecutions
// function.
var WorkflowService_CountWorkflowExecutions_Helper = struct {
	// Args accepts the parameters of CountWorkflowExecutions in-order and returns
	// the arguments struct for the function.
	Args func(
		countRequest *shared.CountWorkflowExecutionsRequest,
	) *WorkflowService_CountWorkflowExecutions_Args

	// IsException returns true if the given error can be thrown
	// by CountWorkflowExecutions.
	//
	// An error can be thrown by CountWorkflowExecutions 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 CountWorkflowExecutions
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// CountWorkflowExecutions into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by CountWorkflowExecutions
	//
	//   value, err := CountWorkflowExecutions(args)
	//   result, err := WorkflowService_CountWorkflowExecutions_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from CountWorkflowExecutions: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.CountWorkflowExecutionsResponse, error) (*WorkflowService_CountWorkflowExecutions_Result, error)

	// UnwrapResponse takes the result struct for CountWorkflowExecutions
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if CountWorkflowExecutions threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_CountWorkflowExecutions_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_CountWorkflowExecutions_Result) (*shared.CountWorkflowExecutionsResponse, error)
}{}

func init() {
	WorkflowService_CountWorkflowExecutions_Helper.Args = func(
		countRequest *shared.CountWorkflowExecutionsRequest,
	) *WorkflowService_CountWorkflowExecutions_Args {
		return &WorkflowService_CountWorkflowExecutions_Args{
			CountRequest: countRequest,
		}
	}

	WorkflowService_CountWorkflowExecutions_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:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_CountWorkflowExecutions_Helper.WrapResponse = func(success *shared.CountWorkflowExecutionsResponse, err error) (*WorkflowService_CountWorkflowExecutions_Result, error) {
		if err == nil {
			return &WorkflowService_CountWorkflowExecutions_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_CountWorkflowExecutions_Result.BadRequestError")
			}
			return &WorkflowService_CountWorkflowExecutions_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_CountWorkflowExecutions_Result.EntityNotExistError")
			}
			return &WorkflowService_CountWorkflowExecutions_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_CountWorkflowExecutions_Result.ServiceBusyError")
			}
			return &WorkflowService_CountWorkflowExecutions_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_CountWorkflowExecutions_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_CountWorkflowExecutions_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_CountWorkflowExecutions_Result.AccessDeniedError")
			}
			return &WorkflowService_CountWorkflowExecutions_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_CountWorkflowExecutions_Helper.UnwrapResponse = func(result *WorkflowService_CountWorkflowExecutions_Result) (success *shared.CountWorkflowExecutionsResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.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_CountWorkflowExecutions_Result represents the result of a WorkflowService.CountWorkflowExecutions function call.
//
// The result of a CountWorkflowExecutions 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_CountWorkflowExecutions_Result struct {
	// Value returned by CountWorkflowExecutions after a successful execution.
	Success                        *shared.CountWorkflowExecutionsResponse `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_CountWorkflowExecutions_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_CountWorkflowExecutions_Result) ToWire() (wire.Value, error) {
	var (
		fields [6]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: 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_CountWorkflowExecutions_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _CountWorkflowExecutionsResponse_Read(w wire.Value) (*shared.CountWorkflowExecutionsResponse, error) {
	var v shared.CountWorkflowExecutionsResponse
	err := v.FromWire(w)
	return &v, err
}

func _BadRequestError_Read(w wire.Value) (*shared.BadRequestError, error) {
	var v shared.BadRequestError
	err := v.FromWire(w)
	return &v, err
}

func _EntityNotExistsError_Read(w wire.Value) (*shared.EntityNotExistsError, error) {
	var v shared.EntityNotExistsError
	err := v.FromWire(w)
	return &v, err
}

func _ServiceBusyError_Read(w wire.Value) (*shared.ServiceBusyError, error) {
	var v shared.ServiceBusyError
	err := v.FromWire(w)
	return &v, err
}

func _ClientVersionNotSupportedError_Read(w wire.Value) (*shared.ClientVersionNotSupportedError, error) {
	var v shared.ClientVersionNotSupportedError
	err := v.FromWire(w)
	return &v, err
}

func _AccessDeniedError_Read(w wire.Value) (*shared.AccessDeniedError, error) {
	var v shared.AccessDeniedError
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_CountWorkflowExecutions_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_CountWorkflowExecutions_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_CountWorkflowExecutions_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_CountWorkflowExecutions_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 = _CountWorkflowExecutionsResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.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.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_CountWorkflowExecutions_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_CountWorkflowExecutions_Result
// struct.
func (v *WorkflowService_CountWorkflowExecutions_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [6]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.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_CountWorkflowExecutions_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_CountWorkflowExecutions_Result match the
// provided WorkflowService_CountWorkflowExecutions_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_CountWorkflowExecutions_Result) Equals(rhs *WorkflowService_CountWorkflowExecutions_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.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_CountWorkflowExecutions_Result.
func (v *WorkflowService_CountWorkflowExecutions_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.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_CountWorkflowExecutions_Result) GetSuccess() (o *shared.CountWorkflowExecutionsResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_CountWorkflowExecutions_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_CountWorkflowExecutions_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_CountWorkflowExecutions_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_CountWorkflowExecutions_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_CountWorkflowExecutions_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_CountWorkflowExecutions_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_CountWorkflowExecutions_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_CountWorkflowExecutions_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_CountWorkflowExecutions_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_CountWorkflowExecutions_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_CountWorkflowExecutions_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 "CountWorkflowExecutions" for this struct.
func (v *WorkflowService_CountWorkflowExecutions_Result) MethodName() string {
	return "CountWorkflowExecutions"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_CountWorkflowExecutions_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_DeleteDomain_Args represents the arguments for the WorkflowService.DeleteDomain function.
//
// The arguments for DeleteDomain are sent and received over the wire as this struct.
type WorkflowService_DeleteDomain_Args struct {
	DeleteRequest *shared.DeleteDomainRequest `json:"deleteRequest,omitempty"`
}

// ToWire translates a WorkflowService_DeleteDomain_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_DeleteDomain_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.DeleteRequest != nil {
		w, err = v.DeleteRequest.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 _DeleteDomainRequest_Read(w wire.Value) (*shared.DeleteDomainRequest, error) {
	var v shared.DeleteDomainRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_DeleteDomain_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_DeleteDomain_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_DeleteDomain_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_DeleteDomain_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.DeleteRequest, err = _DeleteDomainRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_DeleteDomain_Args
// struct.
func (v *WorkflowService_DeleteDomain_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.DeleteRequest != nil {
		fields[i] = fmt.Sprintf("DeleteRequest: %v", v.DeleteRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_DeleteDomain_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_DeleteDomain_Args match the
// provided WorkflowService_DeleteDomain_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_DeleteDomain_Args) Equals(rhs *WorkflowService_DeleteDomain_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.DeleteRequest == nil && rhs.DeleteRequest == nil) || (v.DeleteRequest != nil && rhs.DeleteRequest != nil && v.DeleteRequest.Equals(rhs.DeleteRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_DeleteDomain_Args.
func (v *WorkflowService_DeleteDomain_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.DeleteRequest != nil {
		err = multierr.Append(err, enc.AddObject("deleteRequest", v.DeleteRequest))
	}
	return err
}

// GetDeleteRequest returns the value of DeleteRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_DeleteDomain_Args) GetDeleteRequest() (o *shared.DeleteDomainRequest) {
	if v != nil && v.DeleteRequest != nil {
		return v.DeleteRequest
	}

	return
}

// IsSetDeleteRequest returns true if DeleteRequest is not nil.
func (v *WorkflowService_DeleteDomain_Args) IsSetDeleteRequest() bool {
	return v != nil && v.DeleteRequest != 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 "DeleteDomain" for this struct.
func (v *WorkflowService_DeleteDomain_Args) MethodName() string {
	return "DeleteDomain"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_DeleteDomain_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_DeleteDomain_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.DeleteDomain
// function.
var WorkflowService_DeleteDomain_Helper = struct {
	// Args accepts the parameters of DeleteDomain in-order and returns
	// the arguments struct for the function.
	Args func(
		deleteRequest *shared.DeleteDomainRequest,
	) *WorkflowService_DeleteDomain_Args

	// IsException returns true if the given error can be thrown
	// by DeleteDomain.
	//
	// An error can be thrown by DeleteDomain 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 DeleteDomain
	// given the error returned by it. The provided error may
	// be nil if DeleteDomain did not fail.
	//
	// This allows mapping errors returned by DeleteDomain into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// DeleteDomain
	//
	//   err := DeleteDomain(args)
	//   result, err := WorkflowService_DeleteDomain_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from DeleteDomain: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*WorkflowService_DeleteDomain_Result, error)

	// UnwrapResponse takes the result struct for DeleteDomain
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if DeleteDomain threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := WorkflowService_DeleteDomain_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_DeleteDomain_Result) error
}{}

func init() {
	WorkflowService_DeleteDomain_Helper.Args = func(
		deleteRequest *shared.DeleteDomainRequest,
	) *WorkflowService_DeleteDomain_Args {
		return &WorkflowService_DeleteDomain_Args{
			DeleteRequest: deleteRequest,
		}
	}

	WorkflowService_DeleteDomain_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_DeleteDomain_Helper.WrapResponse = func(err error) (*WorkflowService_DeleteDomain_Result, error) {
		if err == nil {
			return &WorkflowService_DeleteDomain_Result{}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_DeleteDomain_Result.BadRequestError")
			}
			return &WorkflowService_DeleteDomain_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_DeleteDomain_Result.ServiceBusyError")
			}
			return &WorkflowService_DeleteDomain_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_DeleteDomain_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_DeleteDomain_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_DeleteDomain_Result.AccessDeniedError")
			}
			return &WorkflowService_DeleteDomain_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_DeleteDomain_Helper.UnwrapResponse = func(result *WorkflowService_DeleteDomain_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			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
		}
		return
	}

}

// WorkflowService_DeleteDomain_Result represents the result of a WorkflowService.DeleteDomain function call.
//
// The result of a DeleteDomain execution is sent and received over the wire as this struct.
type WorkflowService_DeleteDomain_Result struct {
	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_DeleteDomain_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_DeleteDomain_Result) ToWire() (wire.Value, error) {
	var (
		fields [4]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.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_DeleteDomain_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a WorkflowService_DeleteDomain_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_DeleteDomain_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_DeleteDomain_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_DeleteDomain_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 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.BadRequestError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("WorkflowService_DeleteDomain_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_DeleteDomain_Result
// struct.
func (v *WorkflowService_DeleteDomain_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [4]string
	i := 0
	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++
	}
	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_DeleteDomain_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_DeleteDomain_Result match the
// provided WorkflowService_DeleteDomain_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_DeleteDomain_Result) Equals(rhs *WorkflowService_DeleteDomain_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.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_DeleteDomain_Result.
func (v *WorkflowService_DeleteDomain_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.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
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_DeleteDomain_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_DeleteDomain_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_DeleteDomain_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_DeleteDomain_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_DeleteDomain_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_DeleteDomain_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_DeleteDomain_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_DeleteDomain_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 "DeleteDomain" for this struct.
func (v *WorkflowService_DeleteDomain_Result) MethodName() string {
	return "DeleteDomain"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_DeleteDomain_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_DeprecateDomain_Args represents the arguments for the WorkflowService.DeprecateDomain function.
//
// The arguments for DeprecateDomain are sent and received over the wire as this struct.
type WorkflowService_DeprecateDomain_Args struct {
	DeprecateRequest *shared.DeprecateDomainRequest `json:"deprecateRequest,omitempty"`
}

// ToWire translates a WorkflowService_DeprecateDomain_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_DeprecateDomain_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.DeprecateRequest != nil {
		w, err = v.DeprecateRequest.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 _DeprecateDomainRequest_Read(w wire.Value) (*shared.DeprecateDomainRequest, error) {
	var v shared.DeprecateDomainRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_DeprecateDomain_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_DeprecateDomain_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_DeprecateDomain_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_DeprecateDomain_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.DeprecateRequest, err = _DeprecateDomainRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_DeprecateDomain_Args
// struct.
func (v *WorkflowService_DeprecateDomain_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.DeprecateRequest != nil {
		fields[i] = fmt.Sprintf("DeprecateRequest: %v", v.DeprecateRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_DeprecateDomain_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_DeprecateDomain_Args match the
// provided WorkflowService_DeprecateDomain_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_DeprecateDomain_Args) Equals(rhs *WorkflowService_DeprecateDomain_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.DeprecateRequest == nil && rhs.DeprecateRequest == nil) || (v.DeprecateRequest != nil && rhs.DeprecateRequest != nil && v.DeprecateRequest.Equals(rhs.DeprecateRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_DeprecateDomain_Args.
func (v *WorkflowService_DeprecateDomain_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.DeprecateRequest != nil {
		err = multierr.Append(err, enc.AddObject("deprecateRequest", v.DeprecateRequest))
	}
	return err
}

// GetDeprecateRequest returns the value of DeprecateRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_DeprecateDomain_Args) GetDeprecateRequest() (o *shared.DeprecateDomainRequest) {
	if v != nil && v.DeprecateRequest != nil {
		return v.DeprecateRequest
	}

	return
}

// IsSetDeprecateRequest returns true if DeprecateRequest is not nil.
func (v *WorkflowService_DeprecateDomain_Args) IsSetDeprecateRequest() bool {
	return v != nil && v.DeprecateRequest != 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 "DeprecateDomain" for this struct.
func (v *WorkflowService_DeprecateDomain_Args) MethodName() string {
	return "DeprecateDomain"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_DeprecateDomain_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_DeprecateDomain_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.DeprecateDomain
// function.
var WorkflowService_DeprecateDomain_Helper = struct {
	// Args accepts the parameters of DeprecateDomain in-order and returns
	// the arguments struct for the function.
	Args func(
		deprecateRequest *shared.DeprecateDomainRequest,
	) *WorkflowService_DeprecateDomain_Args

	// IsException returns true if the given error can be thrown
	// by DeprecateDomain.
	//
	// An error can be thrown by DeprecateDomain 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 DeprecateDomain
	// given the error returned by it. The provided error may
	// be nil if DeprecateDomain did not fail.
	//
	// This allows mapping errors returned by DeprecateDomain into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// DeprecateDomain
	//
	//   err := DeprecateDomain(args)
	//   result, err := WorkflowService_DeprecateDomain_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from DeprecateDomain: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*WorkflowService_DeprecateDomain_Result, error)

	// UnwrapResponse takes the result struct for DeprecateDomain
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if DeprecateDomain threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := WorkflowService_DeprecateDomain_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_DeprecateDomain_Result) error
}{}

func init() {
	WorkflowService_DeprecateDomain_Helper.Args = func(
		deprecateRequest *shared.DeprecateDomainRequest,
	) *WorkflowService_DeprecateDomain_Args {
		return &WorkflowService_DeprecateDomain_Args{
			DeprecateRequest: deprecateRequest,
		}
	}

	WorkflowService_DeprecateDomain_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_DeprecateDomain_Helper.WrapResponse = func(err error) (*WorkflowService_DeprecateDomain_Result, error) {
		if err == nil {
			return &WorkflowService_DeprecateDomain_Result{}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_DeprecateDomain_Result.BadRequestError")
			}
			return &WorkflowService_DeprecateDomain_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_DeprecateDomain_Result.EntityNotExistError")
			}
			return &WorkflowService_DeprecateDomain_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_DeprecateDomain_Result.ServiceBusyError")
			}
			return &WorkflowService_DeprecateDomain_Result{ServiceBusyError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_DeprecateDomain_Result.DomainNotActiveError")
			}
			return &WorkflowService_DeprecateDomain_Result{DomainNotActiveError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_DeprecateDomain_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_DeprecateDomain_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_DeprecateDomain_Result.AccessDeniedError")
			}
			return &WorkflowService_DeprecateDomain_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_DeprecateDomain_Helper.UnwrapResponse = func(result *WorkflowService_DeprecateDomain_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.ClientVersionNotSupportedError != nil {
			err = result.ClientVersionNotSupportedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// WorkflowService_DeprecateDomain_Result represents the result of a WorkflowService.DeprecateDomain function call.
//
// The result of a DeprecateDomain execution is sent and received over the wire as this struct.
type WorkflowService_DeprecateDomain_Result struct {
	BadRequestError                *shared.BadRequestError                `json:"badRequestError,omitempty"`
	EntityNotExistError            *shared.EntityNotExistsError           `json:"entityNotExistError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError               `json:"serviceBusyError,omitempty"`
	DomainNotActiveError           *shared.DomainNotActiveError           `json:"domainNotActiveError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"`
	AccessDeniedError              *shared.AccessDeniedError              `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_DeprecateDomain_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_DeprecateDomain_Result) ToWire() (wire.Value, error) {
	var (
		fields [6]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_DeprecateDomain_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DomainNotActiveError_Read(w wire.Value) (*shared.DomainNotActiveError, error) {
	var v shared.DomainNotActiveError
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_DeprecateDomain_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_DeprecateDomain_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_DeprecateDomain_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_DeprecateDomain_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("WorkflowService_DeprecateDomain_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_DeprecateDomain_Result
// struct.
func (v *WorkflowService_DeprecateDomain_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [6]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.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_DeprecateDomain_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_DeprecateDomain_Result match the
// provided WorkflowService_DeprecateDomain_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_DeprecateDomain_Result) Equals(rhs *WorkflowService_DeprecateDomain_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.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_DeprecateDomain_Result.
func (v *WorkflowService_DeprecateDomain_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.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
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_DeprecateDomain_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_DeprecateDomain_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_DeprecateDomain_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_DeprecateDomain_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_DeprecateDomain_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_DeprecateDomain_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_DeprecateDomain_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_DeprecateDomain_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_DeprecateDomain_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_DeprecateDomain_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_DeprecateDomain_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_DeprecateDomain_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 "DeprecateDomain" for this struct.
func (v *WorkflowService_DeprecateDomain_Result) MethodName() string {
	return "DeprecateDomain"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_DeprecateDomain_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_DescribeDomain_Args represents the arguments for the WorkflowService.DescribeDomain function.
//
// The arguments for DescribeDomain are sent and received over the wire as this struct.
type WorkflowService_DescribeDomain_Args struct {
	DescribeRequest *shared.DescribeDomainRequest `json:"describeRequest,omitempty"`
}

// ToWire translates a WorkflowService_DescribeDomain_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_DescribeDomain_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.DescribeRequest != nil {
		w, err = v.DescribeRequest.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 _DescribeDomainRequest_Read(w wire.Value) (*shared.DescribeDomainRequest, error) {
	var v shared.DescribeDomainRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_DescribeDomain_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_DescribeDomain_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_DescribeDomain_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_DescribeDomain_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.DescribeRequest, err = _DescribeDomainRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_DescribeDomain_Args
// struct.
func (v *WorkflowService_DescribeDomain_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.DescribeRequest != nil {
		fields[i] = fmt.Sprintf("DescribeRequest: %v", v.DescribeRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_DescribeDomain_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_DescribeDomain_Args match the
// provided WorkflowService_DescribeDomain_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_DescribeDomain_Args) Equals(rhs *WorkflowService_DescribeDomain_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.DescribeRequest == nil && rhs.DescribeRequest == nil) || (v.DescribeRequest != nil && rhs.DescribeRequest != nil && v.DescribeRequest.Equals(rhs.DescribeRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_DescribeDomain_Args.
func (v *WorkflowService_DescribeDomain_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.DescribeRequest != nil {
		err = multierr.Append(err, enc.AddObject("describeRequest", v.DescribeRequest))
	}
	return err
}

// GetDescribeRequest returns the value of DescribeRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_DescribeDomain_Args) GetDescribeRequest() (o *shared.DescribeDomainRequest) {
	if v != nil && v.DescribeRequest != nil {
		return v.DescribeRequest
	}

	return
}

// IsSetDescribeRequest returns true if DescribeRequest is not nil.
func (v *WorkflowService_DescribeDomain_Args) IsSetDescribeRequest() bool {
	return v != nil && v.DescribeRequest != 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 "DescribeDomain" for this struct.
func (v *WorkflowService_DescribeDomain_Args) MethodName() string {
	return "DescribeDomain"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_DescribeDomain_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_DescribeDomain_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.DescribeDomain
// function.
var WorkflowService_DescribeDomain_Helper = struct {
	// Args accepts the parameters of DescribeDomain in-order and returns
	// the arguments struct for the function.
	Args func(
		describeRequest *shared.DescribeDomainRequest,
	) *WorkflowService_DescribeDomain_Args

	// IsException returns true if the given error can be thrown
	// by DescribeDomain.
	//
	// An error can be thrown by DescribeDomain 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 DescribeDomain
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// DescribeDomain into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by DescribeDomain
	//
	//   value, err := DescribeDomain(args)
	//   result, err := WorkflowService_DescribeDomain_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from DescribeDomain: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.DescribeDomainResponse, error) (*WorkflowService_DescribeDomain_Result, error)

	// UnwrapResponse takes the result struct for DescribeDomain
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if DescribeDomain threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_DescribeDomain_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_DescribeDomain_Result) (*shared.DescribeDomainResponse, error)
}{}

func init() {
	WorkflowService_DescribeDomain_Helper.Args = func(
		describeRequest *shared.DescribeDomainRequest,
	) *WorkflowService_DescribeDomain_Args {
		return &WorkflowService_DescribeDomain_Args{
			DescribeRequest: describeRequest,
		}
	}

	WorkflowService_DescribeDomain_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:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_DescribeDomain_Helper.WrapResponse = func(success *shared.DescribeDomainResponse, err error) (*WorkflowService_DescribeDomain_Result, error) {
		if err == nil {
			return &WorkflowService_DescribeDomain_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_DescribeDomain_Result.BadRequestError")
			}
			return &WorkflowService_DescribeDomain_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_DescribeDomain_Result.EntityNotExistError")
			}
			return &WorkflowService_DescribeDomain_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_DescribeDomain_Result.ServiceBusyError")
			}
			return &WorkflowService_DescribeDomain_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_DescribeDomain_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_DescribeDomain_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_DescribeDomain_Result.AccessDeniedError")
			}
			return &WorkflowService_DescribeDomain_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_DescribeDomain_Helper.UnwrapResponse = func(result *WorkflowService_DescribeDomain_Result) (success *shared.DescribeDomainResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.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_DescribeDomain_Result represents the result of a WorkflowService.DescribeDomain function call.
//
// The result of a DescribeDomain 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_DescribeDomain_Result struct {
	// Value returned by DescribeDomain after a successful execution.
	Success                        *shared.DescribeDomainResponse         `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_DescribeDomain_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_DescribeDomain_Result) ToWire() (wire.Value, error) {
	var (
		fields [6]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: 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_DescribeDomain_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DescribeDomainResponse_Read(w wire.Value) (*shared.DescribeDomainResponse, error) {
	var v shared.DescribeDomainResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_DescribeDomain_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_DescribeDomain_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_DescribeDomain_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_DescribeDomain_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 = _DescribeDomainResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.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.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_DescribeDomain_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_DescribeDomain_Result
// struct.
func (v *WorkflowService_DescribeDomain_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [6]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.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_DescribeDomain_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_DescribeDomain_Result match the
// provided WorkflowService_DescribeDomain_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_DescribeDomain_Result) Equals(rhs *WorkflowService_DescribeDomain_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.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_DescribeDomain_Result.
func (v *WorkflowService_DescribeDomain_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.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_DescribeDomain_Result) GetSuccess() (o *shared.DescribeDomainResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_DescribeDomain_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_DescribeDomain_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_DescribeDomain_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_DescribeDomain_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_DescribeDomain_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_DescribeDomain_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_DescribeDomain_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_DescribeDomain_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_DescribeDomain_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_DescribeDomain_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_DescribeDomain_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 "DescribeDomain" for this struct.
func (v *WorkflowService_DescribeDomain_Result) MethodName() string {
	return "DescribeDomain"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_DescribeDomain_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_DescribeTaskList_Args represents the arguments for the WorkflowService.DescribeTaskList function.
//
// The arguments for DescribeTaskList are sent and received over the wire as this struct.
type WorkflowService_DescribeTaskList_Args struct {
	Request *shared.DescribeTaskListRequest `json:"request,omitempty"`
}

// ToWire translates a WorkflowService_DescribeTaskList_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_DescribeTaskList_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 _DescribeTaskListRequest_Read(w wire.Value) (*shared.DescribeTaskListRequest, error) {
	var v shared.DescribeTaskListRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_DescribeTaskList_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_DescribeTaskList_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_DescribeTaskList_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_DescribeTaskList_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 = _DescribeTaskListRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_DescribeTaskList_Args
// struct.
func (v *WorkflowService_DescribeTaskList_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("WorkflowService_DescribeTaskList_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_DescribeTaskList_Args match the
// provided WorkflowService_DescribeTaskList_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_DescribeTaskList_Args) Equals(rhs *WorkflowService_DescribeTaskList_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_DescribeTaskList_Args.
func (v *WorkflowService_DescribeTaskList_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_DescribeTaskList_Args) GetRequest() (o *shared.DescribeTaskListRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *WorkflowService_DescribeTaskList_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 "DescribeTaskList" for this struct.
func (v *WorkflowService_DescribeTaskList_Args) MethodName() string {
	return "DescribeTaskList"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_DescribeTaskList_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_DescribeTaskList_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.DescribeTaskList
// function.
var WorkflowService_DescribeTaskList_Helper = struct {
	// Args accepts the parameters of DescribeTaskList in-order and returns
	// the arguments struct for the function.
	Args func(
		request *shared.DescribeTaskListRequest,
	) *WorkflowService_DescribeTaskList_Args

	// IsException returns true if the given error can be thrown
	// by DescribeTaskList.
	//
	// An error can be thrown by DescribeTaskList 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 DescribeTaskList
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// DescribeTaskList into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by DescribeTaskList
	//
	//   value, err := DescribeTaskList(args)
	//   result, err := WorkflowService_DescribeTaskList_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from DescribeTaskList: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.DescribeTaskListResponse, error) (*WorkflowService_DescribeTaskList_Result, error)

	// UnwrapResponse takes the result struct for DescribeTaskList
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if DescribeTaskList threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_DescribeTaskList_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_DescribeTaskList_Result) (*shared.DescribeTaskListResponse, error)
}{}

func init() {
	WorkflowService_DescribeTaskList_Helper.Args = func(
		request *shared.DescribeTaskListRequest,
	) *WorkflowService_DescribeTaskList_Args {
		return &WorkflowService_DescribeTaskList_Args{
			Request: request,
		}
	}

	WorkflowService_DescribeTaskList_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_DescribeTaskList_Helper.WrapResponse = func(success *shared.DescribeTaskListResponse, err error) (*WorkflowService_DescribeTaskList_Result, error) {
		if err == nil {
			return &WorkflowService_DescribeTaskList_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_DescribeTaskList_Result.BadRequestError")
			}
			return &WorkflowService_DescribeTaskList_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_DescribeTaskList_Result.EntityNotExistError")
			}
			return &WorkflowService_DescribeTaskList_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_DescribeTaskList_Result.LimitExceededError")
			}
			return &WorkflowService_DescribeTaskList_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_DescribeTaskList_Result.ServiceBusyError")
			}
			return &WorkflowService_DescribeTaskList_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_DescribeTaskList_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_DescribeTaskList_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_DescribeTaskList_Result.AccessDeniedError")
			}
			return &WorkflowService_DescribeTaskList_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_DescribeTaskList_Helper.UnwrapResponse = func(result *WorkflowService_DescribeTaskList_Result) (success *shared.DescribeTaskListResponse, 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_DescribeTaskList_Result represents the result of a WorkflowService.DescribeTaskList function call.
//
// The result of a DescribeTaskList 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_DescribeTaskList_Result struct {
	// Value returned by DescribeTaskList after a successful execution.
	Success                        *shared.DescribeTaskListResponse       `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_DescribeTaskList_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_DescribeTaskList_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: 3, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_DescribeTaskList_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DescribeTaskListResponse_Read(w wire.Value) (*shared.DescribeTaskListResponse, error) {
	var v shared.DescribeTaskListResponse
	err := v.FromWire(w)
	return &v, err
}

func _LimitExceededError_Read(w wire.Value) (*shared.LimitExceededError, error) {
	var v shared.LimitExceededError
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_DescribeTaskList_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_DescribeTaskList_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_DescribeTaskList_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_DescribeTaskList_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 = _DescribeTaskListResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			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_DescribeTaskList_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_DescribeTaskList_Result
// struct.
func (v *WorkflowService_DescribeTaskList_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	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_DescribeTaskList_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_DescribeTaskList_Result match the
// provided WorkflowService_DescribeTaskList_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_DescribeTaskList_Result) Equals(rhs *WorkflowService_DescribeTaskList_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_DescribeTaskList_Result.
func (v *WorkflowService_DescribeTaskList_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_DescribeTaskList_Result) GetSuccess() (o *shared.DescribeTaskListResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_DescribeTaskList_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_DescribeTaskList_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_DescribeTaskList_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_DescribeTaskList_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_DescribeTaskList_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_DescribeTaskList_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_DescribeTaskList_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_DescribeTaskList_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_DescribeTaskList_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_DescribeTaskList_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_DescribeTaskList_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_DescribeTaskList_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_DescribeTaskList_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 "DescribeTaskList" for this struct.
func (v *WorkflowService_DescribeTaskList_Result) MethodName() string {
	return "DescribeTaskList"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_DescribeTaskList_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_DescribeWorkflowExecution_Args represents the arguments for the WorkflowService.DescribeWorkflowExecution function.
//
// The arguments for DescribeWorkflowExecution are sent and received over the wire as this struct.
type WorkflowService_DescribeWorkflowExecution_Args struct {
	DescribeRequest *shared.DescribeWorkflowExecutionRequest `json:"describeRequest,omitempty"`
}

// ToWire translates a WorkflowService_DescribeWorkflowExecution_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_DescribeWorkflowExecution_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.DescribeRequest != nil {
		w, err = v.DescribeRequest.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 _DescribeWorkflowExecutionRequest_Read(w wire.Value) (*shared.DescribeWorkflowExecutionRequest, error) {
	var v shared.DescribeWorkflowExecutionRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_DescribeWorkflowExecution_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_DescribeWorkflowExecution_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_DescribeWorkflowExecution_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_DescribeWorkflowExecution_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.DescribeRequest, err = _DescribeWorkflowExecutionRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_DescribeWorkflowExecution_Args
// struct.
func (v *WorkflowService_DescribeWorkflowExecution_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.DescribeRequest != nil {
		fields[i] = fmt.Sprintf("DescribeRequest: %v", v.DescribeRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_DescribeWorkflowExecution_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_DescribeWorkflowExecution_Args match the
// provided WorkflowService_DescribeWorkflowExecution_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_DescribeWorkflowExecution_Args) Equals(rhs *WorkflowService_DescribeWorkflowExecution_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.DescribeRequest == nil && rhs.DescribeRequest == nil) || (v.DescribeRequest != nil && rhs.DescribeRequest != nil && v.DescribeRequest.Equals(rhs.DescribeRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_DescribeWorkflowExecution_Args.
func (v *WorkflowService_DescribeWorkflowExecution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.DescribeRequest != nil {
		err = multierr.Append(err, enc.AddObject("describeRequest", v.DescribeRequest))
	}
	return err
}

// GetDescribeRequest returns the value of DescribeRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_DescribeWorkflowExecution_Args) GetDescribeRequest() (o *shared.DescribeWorkflowExecutionRequest) {
	if v != nil && v.DescribeRequest != nil {
		return v.DescribeRequest
	}

	return
}

// IsSetDescribeRequest returns true if DescribeRequest is not nil.
func (v *WorkflowService_DescribeWorkflowExecution_Args) IsSetDescribeRequest() bool {
	return v != nil && v.DescribeRequest != 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 "DescribeWorkflowExecution" for this struct.
func (v *WorkflowService_DescribeWorkflowExecution_Args) MethodName() string {
	return "DescribeWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_DescribeWorkflowExecution_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_DescribeWorkflowExecution_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.DescribeWorkflowExecution
// function.
var WorkflowService_DescribeWorkflowExecution_Helper = struct {
	// Args accepts the parameters of DescribeWorkflowExecution in-order and returns
	// the arguments struct for the function.
	Args func(
		describeRequest *shared.DescribeWorkflowExecutionRequest,
	) *WorkflowService_DescribeWorkflowExecution_Args

	// IsException returns true if the given error can be thrown
	// by DescribeWorkflowExecution.
	//
	// An error can be thrown by DescribeWorkflowExecution 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 DescribeWorkflowExecution
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// DescribeWorkflowExecution into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by DescribeWorkflowExecution
	//
	//   value, err := DescribeWorkflowExecution(args)
	//   result, err := WorkflowService_DescribeWorkflowExecution_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from DescribeWorkflowExecution: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.DescribeWorkflowExecutionResponse, error) (*WorkflowService_DescribeWorkflowExecution_Result, error)

	// UnwrapResponse takes the result struct for DescribeWorkflowExecution
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if DescribeWorkflowExecution threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_DescribeWorkflowExecution_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_DescribeWorkflowExecution_Result) (*shared.DescribeWorkflowExecutionResponse, error)
}{}

func init() {
	WorkflowService_DescribeWorkflowExecution_Helper.Args = func(
		describeRequest *shared.DescribeWorkflowExecutionRequest,
	) *WorkflowService_DescribeWorkflowExecution_Args {
		return &WorkflowService_DescribeWorkflowExecution_Args{
			DescribeRequest: describeRequest,
		}
	}

	WorkflowService_DescribeWorkflowExecution_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_DescribeWorkflowExecution_Helper.WrapResponse = func(success *shared.DescribeWorkflowExecutionResponse, err error) (*WorkflowService_DescribeWorkflowExecution_Result, error) {
		if err == nil {
			return &WorkflowService_DescribeWorkflowExecution_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_DescribeWorkflowExecution_Result.BadRequestError")
			}
			return &WorkflowService_DescribeWorkflowExecution_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_DescribeWorkflowExecution_Result.EntityNotExistError")
			}
			return &WorkflowService_DescribeWorkflowExecution_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_DescribeWorkflowExecution_Result.LimitExceededError")
			}
			return &WorkflowService_DescribeWorkflowExecution_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_DescribeWorkflowExecution_Result.ServiceBusyError")
			}
			return &WorkflowService_DescribeWorkflowExecution_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_DescribeWorkflowExecution_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_DescribeWorkflowExecution_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_DescribeWorkflowExecution_Result.AccessDeniedError")
			}
			return &WorkflowService_DescribeWorkflowExecution_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_DescribeWorkflowExecution_Helper.UnwrapResponse = func(result *WorkflowService_DescribeWorkflowExecution_Result) (success *shared.DescribeWorkflowExecutionResponse, 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_DescribeWorkflowExecution_Result represents the result of a WorkflowService.DescribeWorkflowExecution function call.
//
// The result of a DescribeWorkflowExecution 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_DescribeWorkflowExecution_Result struct {
	// Value returned by DescribeWorkflowExecution after a successful execution.
	Success                        *shared.DescribeWorkflowExecutionResponse `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_DescribeWorkflowExecution_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_DescribeWorkflowExecution_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: 3, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_DescribeWorkflowExecution_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DescribeWorkflowExecutionResponse_Read(w wire.Value) (*shared.DescribeWorkflowExecutionResponse, error) {
	var v shared.DescribeWorkflowExecutionResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_DescribeWorkflowExecution_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_DescribeWorkflowExecution_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_DescribeWorkflowExecution_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_DescribeWorkflowExecution_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 = _DescribeWorkflowExecutionResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			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_DescribeWorkflowExecution_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_DescribeWorkflowExecution_Result
// struct.
func (v *WorkflowService_DescribeWorkflowExecution_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	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_DescribeWorkflowExecution_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_DescribeWorkflowExecution_Result match the
// provided WorkflowService_DescribeWorkflowExecution_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_DescribeWorkflowExecution_Result) Equals(rhs *WorkflowService_DescribeWorkflowExecution_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_DescribeWorkflowExecution_Result.
func (v *WorkflowService_DescribeWorkflowExecution_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_DescribeWorkflowExecution_Result) GetSuccess() (o *shared.DescribeWorkflowExecutionResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_DescribeWorkflowExecution_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_DescribeWorkflowExecution_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_DescribeWorkflowExecution_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_DescribeWorkflowExecution_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_DescribeWorkflowExecution_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_DescribeWorkflowExecution_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_DescribeWorkflowExecution_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_DescribeWorkflowExecution_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_DescribeWorkflowExecution_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_DescribeWorkflowExecution_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_DescribeWorkflowExecution_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_DescribeWorkflowExecution_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_DescribeWorkflowExecution_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 "DescribeWorkflowExecution" for this struct.
func (v *WorkflowService_DescribeWorkflowExecution_Result) MethodName() string {
	return "DescribeWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_DescribeWorkflowExecution_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_DiagnoseWorkflowExecution_Args represents the arguments for the WorkflowService.DiagnoseWorkflowExecution function.
//
// The arguments for DiagnoseWorkflowExecution are sent and received over the wire as this struct.
type WorkflowService_DiagnoseWorkflowExecution_Args struct {
	DiagnoseRequest *shared.DiagnoseWorkflowExecutionRequest `json:"diagnoseRequest,omitempty"`
}

// ToWire translates a WorkflowService_DiagnoseWorkflowExecution_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_DiagnoseWorkflowExecution_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.DiagnoseRequest != nil {
		w, err = v.DiagnoseRequest.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 _DiagnoseWorkflowExecutionRequest_Read(w wire.Value) (*shared.DiagnoseWorkflowExecutionRequest, error) {
	var v shared.DiagnoseWorkflowExecutionRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_DiagnoseWorkflowExecution_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_DiagnoseWorkflowExecution_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_DiagnoseWorkflowExecution_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_DiagnoseWorkflowExecution_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.DiagnoseRequest, err = _DiagnoseWorkflowExecutionRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_DiagnoseWorkflowExecution_Args
// struct.
func (v *WorkflowService_DiagnoseWorkflowExecution_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.DiagnoseRequest != nil {
		fields[i] = fmt.Sprintf("DiagnoseRequest: %v", v.DiagnoseRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_DiagnoseWorkflowExecution_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_DiagnoseWorkflowExecution_Args match the
// provided WorkflowService_DiagnoseWorkflowExecution_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_DiagnoseWorkflowExecution_Args) Equals(rhs *WorkflowService_DiagnoseWorkflowExecution_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.DiagnoseRequest == nil && rhs.DiagnoseRequest == nil) || (v.DiagnoseRequest != nil && rhs.DiagnoseRequest != nil && v.DiagnoseRequest.Equals(rhs.DiagnoseRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_DiagnoseWorkflowExecution_Args.
func (v *WorkflowService_DiagnoseWorkflowExecution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.DiagnoseRequest != nil {
		err = multierr.Append(err, enc.AddObject("diagnoseRequest", v.DiagnoseRequest))
	}
	return err
}

// GetDiagnoseRequest returns the value of DiagnoseRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_DiagnoseWorkflowExecution_Args) GetDiagnoseRequest() (o *shared.DiagnoseWorkflowExecutionRequest) {
	if v != nil && v.DiagnoseRequest != nil {
		return v.DiagnoseRequest
	}

	return
}

// IsSetDiagnoseRequest returns true if DiagnoseRequest is not nil.
func (v *WorkflowService_DiagnoseWorkflowExecution_Args) IsSetDiagnoseRequest() bool {
	return v != nil && v.DiagnoseRequest != 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 "DiagnoseWorkflowExecution" for this struct.
func (v *WorkflowService_DiagnoseWorkflowExecution_Args) MethodName() string {
	return "DiagnoseWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_DiagnoseWorkflowExecution_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_DiagnoseWorkflowExecution_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.DiagnoseWorkflowExecution
// function.
var WorkflowService_DiagnoseWorkflowExecution_Helper = struct {
	// Args accepts the parameters of DiagnoseWorkflowExecution in-order and returns
	// the arguments struct for the function.
	Args func(
		diagnoseRequest *shared.DiagnoseWorkflowExecutionRequest,
	) *WorkflowService_DiagnoseWorkflowExecution_Args

	// IsException returns true if the given error can be thrown
	// by DiagnoseWorkflowExecution.
	//
	// An error can be thrown by DiagnoseWorkflowExecution 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 DiagnoseWorkflowExecution
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// DiagnoseWorkflowExecution into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by DiagnoseWorkflowExecution
	//
	//   value, err := DiagnoseWorkflowExecution(args)
	//   result, err := WorkflowService_DiagnoseWorkflowExecution_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from DiagnoseWorkflowExecution: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.DiagnoseWorkflowExecutionResponse, error) (*WorkflowService_DiagnoseWorkflowExecution_Result, error)

	// UnwrapResponse takes the result struct for DiagnoseWorkflowExecution
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if DiagnoseWorkflowExecution threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_DiagnoseWorkflowExecution_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_DiagnoseWorkflowExecution_Result) (*shared.DiagnoseWorkflowExecutionResponse, error)
}{}

func init() {
	WorkflowService_DiagnoseWorkflowExecution_Helper.Args = func(
		diagnoseRequest *shared.DiagnoseWorkflowExecutionRequest,
	) *WorkflowService_DiagnoseWorkflowExecution_Args {
		return &WorkflowService_DiagnoseWorkflowExecution_Args{
			DiagnoseRequest: diagnoseRequest,
		}
	}

	WorkflowService_DiagnoseWorkflowExecution_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.DomainNotActiveError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_DiagnoseWorkflowExecution_Helper.WrapResponse = func(success *shared.DiagnoseWorkflowExecutionResponse, err error) (*WorkflowService_DiagnoseWorkflowExecution_Result, error) {
		if err == nil {
			return &WorkflowService_DiagnoseWorkflowExecution_Result{Success: success}, nil
		}

		switch e := err.(type) {
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_DiagnoseWorkflowExecution_Result.DomainNotActiveError")
			}
			return &WorkflowService_DiagnoseWorkflowExecution_Result{DomainNotActiveError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_DiagnoseWorkflowExecution_Result.ServiceBusyError")
			}
			return &WorkflowService_DiagnoseWorkflowExecution_Result{ServiceBusyError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_DiagnoseWorkflowExecution_Result.EntityNotExistError")
			}
			return &WorkflowService_DiagnoseWorkflowExecution_Result{EntityNotExistError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_DiagnoseWorkflowExecution_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_DiagnoseWorkflowExecution_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_DiagnoseWorkflowExecution_Result.AccessDeniedError")
			}
			return &WorkflowService_DiagnoseWorkflowExecution_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_DiagnoseWorkflowExecution_Helper.UnwrapResponse = func(result *WorkflowService_DiagnoseWorkflowExecution_Result) (success *shared.DiagnoseWorkflowExecutionResponse, err error) {
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			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_DiagnoseWorkflowExecution_Result represents the result of a WorkflowService.DiagnoseWorkflowExecution function call.
//
// The result of a DiagnoseWorkflowExecution 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_DiagnoseWorkflowExecution_Result struct {
	// Value returned by DiagnoseWorkflowExecution after a successful execution.
	Success                        *shared.DiagnoseWorkflowExecutionResponse `json:"success,omitempty"`
	DomainNotActiveError           *shared.DomainNotActiveError              `json:"domainNotActiveError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError                  `json:"serviceBusyError,omitempty"`
	EntityNotExistError            *shared.EntityNotExistsError              `json:"entityNotExistError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError    `json:"clientVersionNotSupportedError,omitempty"`
	AccessDeniedError              *shared.AccessDeniedError                 `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_DiagnoseWorkflowExecution_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_DiagnoseWorkflowExecution_Result) ToWire() (wire.Value, error) {
	var (
		fields [6]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.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.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 {
			return w, err
		}
		fields[i] = wire.Field{ID: 2, 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.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_DiagnoseWorkflowExecution_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DiagnoseWorkflowExecutionResponse_Read(w wire.Value) (*shared.DiagnoseWorkflowExecutionResponse, error) {
	var v shared.DiagnoseWorkflowExecutionResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_DiagnoseWorkflowExecution_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_DiagnoseWorkflowExecution_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_DiagnoseWorkflowExecution_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_DiagnoseWorkflowExecution_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 = _DiagnoseWorkflowExecutionResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_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.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			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.DomainNotActiveError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_DiagnoseWorkflowExecution_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_DiagnoseWorkflowExecution_Result
// struct.
func (v *WorkflowService_DiagnoseWorkflowExecution_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [6]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_DiagnoseWorkflowExecution_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_DiagnoseWorkflowExecution_Result match the
// provided WorkflowService_DiagnoseWorkflowExecution_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_DiagnoseWorkflowExecution_Result) Equals(rhs *WorkflowService_DiagnoseWorkflowExecution_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.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) {
		return false
	}
	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_DiagnoseWorkflowExecution_Result.
func (v *WorkflowService_DiagnoseWorkflowExecution_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.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.ClientVersionNotSupportedError != nil {
		err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError))
	}
	if v.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_DiagnoseWorkflowExecution_Result) GetSuccess() (o *shared.DiagnoseWorkflowExecutionResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_DiagnoseWorkflowExecution_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_DiagnoseWorkflowExecution_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_DiagnoseWorkflowExecution_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_DiagnoseWorkflowExecution_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_DiagnoseWorkflowExecution_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_DiagnoseWorkflowExecution_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_DiagnoseWorkflowExecution_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_DiagnoseWorkflowExecution_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_DiagnoseWorkflowExecution_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_DiagnoseWorkflowExecution_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_DiagnoseWorkflowExecution_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 "DiagnoseWorkflowExecution" for this struct.
func (v *WorkflowService_DiagnoseWorkflowExecution_Result) MethodName() string {
	return "DiagnoseWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_DiagnoseWorkflowExecution_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_GetClusterInfo_Args represents the arguments for the WorkflowService.GetClusterInfo function.
//
// The arguments for GetClusterInfo are sent and received over the wire as this struct.
type WorkflowService_GetClusterInfo_Args struct {
}

// ToWire translates a WorkflowService_GetClusterInfo_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_GetClusterInfo_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_GetClusterInfo_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_GetClusterInfo_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_GetClusterInfo_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_GetClusterInfo_Args) FromWire(w wire.Value) error {

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_GetClusterInfo_Args
// struct.
func (v *WorkflowService_GetClusterInfo_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [0]string
	i := 0

	return fmt.Sprintf("WorkflowService_GetClusterInfo_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_GetClusterInfo_Args match the
// provided WorkflowService_GetClusterInfo_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_GetClusterInfo_Args) Equals(rhs *WorkflowService_GetClusterInfo_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_GetClusterInfo_Args.
func (v *WorkflowService_GetClusterInfo_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 "GetClusterInfo" for this struct.
func (v *WorkflowService_GetClusterInfo_Args) MethodName() string {
	return "GetClusterInfo"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_GetClusterInfo_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_GetClusterInfo_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.GetClusterInfo
// function.
var WorkflowService_GetClusterInfo_Helper = struct {
	// Args accepts the parameters of GetClusterInfo in-order and returns
	// the arguments struct for the function.
	Args func() *WorkflowService_GetClusterInfo_Args

	// IsException returns true if the given error can be thrown
	// by GetClusterInfo.
	//
	// An error can be thrown by GetClusterInfo 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 GetClusterInfo
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// GetClusterInfo into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by GetClusterInfo
	//
	//   value, err := GetClusterInfo(args)
	//   result, err := WorkflowService_GetClusterInfo_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from GetClusterInfo: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.ClusterInfo, error) (*WorkflowService_GetClusterInfo_Result, error)

	// UnwrapResponse takes the result struct for GetClusterInfo
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if GetClusterInfo threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_GetClusterInfo_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_GetClusterInfo_Result) (*shared.ClusterInfo, error)
}{}

func init() {
	WorkflowService_GetClusterInfo_Helper.Args = func() *WorkflowService_GetClusterInfo_Args {
		return &WorkflowService_GetClusterInfo_Args{}
	}

	WorkflowService_GetClusterInfo_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.InternalServiceError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_GetClusterInfo_Helper.WrapResponse = func(success *shared.ClusterInfo, err error) (*WorkflowService_GetClusterInfo_Result, error) {
		if err == nil {
			return &WorkflowService_GetClusterInfo_Result{Success: success}, nil
		}

		switch e := err.(type) {
		case *shared.InternalServiceError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetClusterInfo_Result.InternalServiceError")
			}
			return &WorkflowService_GetClusterInfo_Result{InternalServiceError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetClusterInfo_Result.ServiceBusyError")
			}
			return &WorkflowService_GetClusterInfo_Result{ServiceBusyError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_GetClusterInfo_Result.AccessDeniedError")
			}
			return &WorkflowService_GetClusterInfo_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_GetClusterInfo_Helper.UnwrapResponse = func(result *WorkflowService_GetClusterInfo_Result) (success *shared.ClusterInfo, err error) {
		if result.InternalServiceError != nil {
			err = result.InternalServiceError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			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_GetClusterInfo_Result represents the result of a WorkflowService.GetClusterInfo function call.
//
// The result of a GetClusterInfo 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_GetClusterInfo_Result struct {
	// Value returned by GetClusterInfo after a successful execution.
	Success              *shared.ClusterInfo          `json:"success,omitempty"`
	InternalServiceError *shared.InternalServiceError `json:"internalServiceError,omitempty"`
	ServiceBusyError     *shared.ServiceBusyError     `json:"serviceBusyError,omitempty"`
	AccessDeniedError    *shared.AccessDeniedError    `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_GetClusterInfo_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_GetClusterInfo_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.InternalServiceError != nil {
		w, err = v.InternalServiceError.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 {
			return w, err
		}
		fields[i] = wire.Field{ID: 2, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_GetClusterInfo_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _ClusterInfo_Read(w wire.Value) (*shared.ClusterInfo, error) {
	var v shared.ClusterInfo
	err := v.FromWire(w)
	return &v, err
}

func _InternalServiceError_Read(w wire.Value) (*shared.InternalServiceError, error) {
	var v shared.InternalServiceError
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_GetClusterInfo_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_GetClusterInfo_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_GetClusterInfo_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_GetClusterInfo_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 = _ClusterInfo_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.InternalServiceError, err = _InternalServiceError_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.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.Success != nil {
		count++
	}
	if v.InternalServiceError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_GetClusterInfo_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_GetClusterInfo_Result
// struct.
func (v *WorkflowService_GetClusterInfo_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [4]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.InternalServiceError != nil {
		fields[i] = fmt.Sprintf("InternalServiceError: %v", v.InternalServiceError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_GetClusterInfo_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_GetClusterInfo_Result match the
// provided WorkflowService_GetClusterInfo_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_GetClusterInfo_Result) Equals(rhs *WorkflowService_GetClusterInfo_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.InternalServiceError == nil && rhs.InternalServiceError == nil) || (v.InternalServiceError != nil && rhs.InternalServiceError != nil && v.InternalServiceError.Equals(rhs.InternalServiceError))) {
		return false
	}
	if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		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_GetClusterInfo_Result.
func (v *WorkflowService_GetClusterInfo_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.InternalServiceError != nil {
		err = multierr.Append(err, enc.AddObject("internalServiceError", v.InternalServiceError))
	}
	if v.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	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_GetClusterInfo_Result) GetSuccess() (o *shared.ClusterInfo) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_GetClusterInfo_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetInternalServiceError returns the value of InternalServiceError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_GetClusterInfo_Result) GetInternalServiceError() (o *shared.InternalServiceError) {
	if v != nil && v.InternalServiceError != nil {
		return v.InternalServiceError
	}

	return
}

// IsSetInternalServiceError returns true if InternalServiceError is not nil.
func (v *WorkflowService_GetClusterInfo_Result) IsSetInternalServiceError() bool {
	return v != nil && v.InternalServiceError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_GetClusterInfo_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_GetClusterInfo_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_GetClusterInfo_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_GetClusterInfo_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 "GetClusterInfo" for this struct.
func (v *WorkflowService_GetClusterInfo_Result) MethodName() string {
	return "GetClusterInfo"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_GetClusterInfo_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
}

// String returns a readable string representation of a WorkflowService_GetSearchAttributes_Args
// struct.
func (v *WorkflowService_GetSearchAttributes_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	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
}

// String returns a readable string representation of a WorkflowService_GetSearchAttributes_Result
// struct.
func (v *WorkflowService_GetSearchAttributes_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	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
}

// String returns a readable string representation of a WorkflowService_GetTaskListsByDomain_Args
// struct.
func (v *WorkflowService_GetTaskListsByDomain_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	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
}

// String returns a readable string representation of a WorkflowService_GetTaskListsByDomain_Result
// struct.
func (v *WorkflowService_GetTaskListsByDomain_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	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_GetTaskListsByDomain_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_GetWorkflowExecutionHistory_Args represents the arguments for the WorkflowService.GetWorkflowExecutionHistory 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"`
}

// 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.
//
// 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_GetWorkflowExecutionHistory_Args) ToWire() (wire.Value, error) {
	var (
		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
}

func _GetWorkflowExecutionHistoryRequest_Read(w wire.Value) (*shared.GetWorkflowExecutionHistoryRequest, error) {
	var v shared.GetWorkflowExecutionHistoryRequest
	err := v.FromWire(w)
	return &v, err
}

// 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_GetWorkflowExecutionHistory_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_GetWorkflowExecutionHistory_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
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.GetRequest, err = _GetWorkflowExecutionHistoryRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_GetWorkflowExecutionHistory_Args
// struct.
func (v *WorkflowService_GetWorkflowExecutionHistory_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.GetRequest != nil {
		fields[i] = fmt.Sprintf("GetRequest: %v", v.GetRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_GetWorkflowExecutionHistory_Args{%v}", strings.Join(fields[:i], ", "))
}

// 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_GetWorkflowExecutionHistory_Args) Equals(rhs *WorkflowService_GetWorkflowExecutionHistory_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_GetWorkflowExecutionHistory_Args.
func (v *WorkflowService_GetWorkflowExecutionHistory_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_GetWorkflowExecutionHistory_Args) GetGetRequest() (o *shared.GetWorkflowExecutionHistoryRequest) {
	if v != nil && v.GetRequest != nil {
		return v.GetRequest
	}

	return
}

// 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 "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_GetWorkflowExecutionHistory_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
// function.
var WorkflowService_GetWorkflowExecutionHistory_Helper = struct {
	// Args accepts the parameters of GetWorkflowExecutionHistory in-order and returns
	// the arguments struct for the function.
	Args func(
		getRequest *shared.GetWorkflowExecutionHistoryRequest,
	) *WorkflowService_GetWorkflowExecutionHistory_Args

	// IsException returns true if the given error can be thrown
	// by GetWorkflowExecutionHistory.
	//
	// 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 GetWorkflowExecutionHistory
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// GetWorkflowExecutionHistory into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by GetWorkflowExecutionHistory
	//
	//   value, err := GetWorkflowExecutionHistory(args)
	//   result, err := WorkflowService_GetWorkflowExecutionHistory_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from GetWorkflowExecutionHistory: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.GetWorkflowExecutionHistoryResponse, error) (*WorkflowService_GetWorkflowExecutionHistory_Result, error)

	// UnwrapResponse takes the result struct for GetWorkflowExecutionHistory
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if GetWorkflowExecutionHistory threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_GetWorkflowExecutionHistory_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_GetWorkflowExecutionHistory_Result) (*shared.GetWorkflowExecutionHistoryResponse, error)
}{}

func init() {
	WorkflowService_GetWorkflowExecutionHistory_Helper.Args = func(
		getRequest *shared.GetWorkflowExecutionHistoryRequest,
	) *WorkflowService_GetWorkflowExecutionHistory_Args {
		return &WorkflowService_GetWorkflowExecutionHistory_Args{
			GetRequest: getRequest,
		}
	}

	WorkflowService_GetWorkflowExecutionHistory_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:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_GetWorkflowExecutionHistory_Helper.WrapResponse = func(success *shared.GetWorkflowExecutionHistoryResponse, err error) (*WorkflowService_GetWorkflowExecutionHistory_Result, error) {
		if err == 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_GetWorkflowExecutionHistory_Result.BadRequestError")
			}
			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_GetWorkflowExecutionHistory_Result.EntityNotExistError")
			}
			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_GetWorkflowExecutionHistory_Result.ServiceBusyError")
			}
			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_GetWorkflowExecutionHistory_Result.ClientVersionNotSupportedError")
			}
			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_GetWorkflowExecutionHistory_Result.AccessDeniedError")
			}
			return &WorkflowService_GetWorkflowExecutionHistory_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_GetWorkflowExecutionHistory_Helper.UnwrapResponse = func(result *WorkflowService_GetWorkflowExecutionHistory_Result) (success *shared.GetWorkflowExecutionHistoryResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.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_GetWorkflowExecutionHistory_Result represents the result of a WorkflowService.GetWorkflowExecutionHistory function call.
//
// 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_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_GetWorkflowExecutionHistory_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_GetWorkflowExecutionHistory_Result) ToWire() (wire.Value, error) {
	var (
		fields [6]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: 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_GetWorkflowExecutionHistory_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
	err := v.FromWire(w)
	return &v, err
}

// 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_GetWorkflowExecutionHistory_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_GetWorkflowExecutionHistory_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
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 = _GetWorkflowExecutionHistoryResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.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.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		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_GetWorkflowExecutionHistory_Result
// struct.
func (v *WorkflowService_GetWorkflowExecutionHistory_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [6]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.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_GetWorkflowExecutionHistory_Result{%v}", strings.Join(fields[:i], ", "))
}

// 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_GetWorkflowExecutionHistory_Result) Equals(rhs *WorkflowService_GetWorkflowExecutionHistory_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.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_GetWorkflowExecutionHistory_Result.
func (v *WorkflowService_GetWorkflowExecutionHistory_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.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_GetWorkflowExecutionHistory_Result) GetSuccess() (o *shared.GetWorkflowExecutionHistoryResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
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_GetWorkflowExecutionHistory_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_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_GetWorkflowExecutionHistory_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_GetWorkflowExecutionHistory_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) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
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_GetWorkflowExecutionHistory_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_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_GetWorkflowExecutionHistory_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_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 "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_GetWorkflowExecutionHistory_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_ListArchivedWorkflowExecutions_Args represents the arguments for the WorkflowService.ListArchivedWorkflowExecutions 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"`
}

// 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.
//
// 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_ListArchivedWorkflowExecutions_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.ListRequest != nil {
		w, err = v.ListRequest.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 _ListArchivedWorkflowExecutionsRequest_Read(w wire.Value) (*shared.ListArchivedWorkflowExecutionsRequest, error) {
	var v shared.ListArchivedWorkflowExecutionsRequest
	err := v.FromWire(w)
	return &v, err
}

// 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_ListArchivedWorkflowExecutions_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ListArchivedWorkflowExecutions_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
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.ListRequest, err = _ListArchivedWorkflowExecutionsRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_ListArchivedWorkflowExecutions_Args
// struct.
func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.ListRequest != nil {
		fields[i] = fmt.Sprintf("ListRequest: %v", v.ListRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_ListArchivedWorkflowExecutions_Args{%v}", strings.Join(fields[:i], ", "))
}

// 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_ListArchivedWorkflowExecutions_Args) Equals(rhs *WorkflowService_ListArchivedWorkflowExecutions_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.ListRequest == nil && rhs.ListRequest == nil) || (v.ListRequest != nil && rhs.ListRequest != nil && v.ListRequest.Equals(rhs.ListRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_ListArchivedWorkflowExecutions_Args.
func (v *WorkflowService_ListArchivedWorkflowExecutions_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.ListRequest != nil {
		err = multierr.Append(err, enc.AddObject("listRequest", v.ListRequest))
	}
	return err
}

// 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) {
	if v != nil && v.ListRequest != nil {
		return v.ListRequest
	}

	return
}

// 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 "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_ListArchivedWorkflowExecutions_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
// function.
var WorkflowService_ListArchivedWorkflowExecutions_Helper = struct {
	// Args accepts the parameters of ListArchivedWorkflowExecutions in-order and returns
	// the arguments struct for the function.
	Args func(
		listRequest *shared.ListArchivedWorkflowExecutionsRequest,
	) *WorkflowService_ListArchivedWorkflowExecutions_Args

	// IsException returns true if the given error can be thrown
	// by ListArchivedWorkflowExecutions.
	//
	// 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 ListArchivedWorkflowExecutions
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// ListArchivedWorkflowExecutions into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by ListArchivedWorkflowExecutions
	//
	//   value, err := ListArchivedWorkflowExecutions(args)
	//   result, err := WorkflowService_ListArchivedWorkflowExecutions_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from ListArchivedWorkflowExecutions: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.ListArchivedWorkflowExecutionsResponse, error) (*WorkflowService_ListArchivedWorkflowExecutions_Result, error)

	// UnwrapResponse takes the result struct for ListArchivedWorkflowExecutions
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if ListArchivedWorkflowExecutions threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_ListArchivedWorkflowExecutions_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_ListArchivedWorkflowExecutions_Result) (*shared.ListArchivedWorkflowExecutionsResponse, error)
}{}

func init() {
	WorkflowService_ListArchivedWorkflowExecutions_Helper.Args = func(
		listRequest *shared.ListArchivedWorkflowExecutionsRequest,
	) *WorkflowService_ListArchivedWorkflowExecutions_Args {
		return &WorkflowService_ListArchivedWorkflowExecutions_Args{
			ListRequest: listRequest,
		}
	}

	WorkflowService_ListArchivedWorkflowExecutions_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:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_ListArchivedWorkflowExecutions_Helper.WrapResponse = func(success *shared.ListArchivedWorkflowExecutionsResponse, err error) (*WorkflowService_ListArchivedWorkflowExecutions_Result, error) {
		if err == 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_ListArchivedWorkflowExecutions_Result.BadRequestError")
			}
			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_ListArchivedWorkflowExecutions_Result.EntityNotExistError")
			}
			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_ListArchivedWorkflowExecutions_Result.ServiceBusyError")
			}
			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_ListArchivedWorkflowExecutions_Result.ClientVersionNotSupportedError")
			}
			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_ListArchivedWorkflowExecutions_Result.AccessDeniedError")
			}
			return &WorkflowService_ListArchivedWorkflowExecutions_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_ListArchivedWorkflowExecutions_Helper.UnwrapResponse = func(result *WorkflowService_ListArchivedWorkflowExecutions_Result) (success *shared.ListArchivedWorkflowExecutionsResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.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_ListArchivedWorkflowExecutions_Result represents the result of a WorkflowService.ListArchivedWorkflowExecutions function call.
//
// 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_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_ListArchivedWorkflowExecutions_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_ListArchivedWorkflowExecutions_Result) ToWire() (wire.Value, error) {
	var (
		fields [6]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: 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_ListArchivedWorkflowExecutions_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
	err := v.FromWire(w)
	return &v, err
}

// 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_ListArchivedWorkflowExecutions_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ListArchivedWorkflowExecutions_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
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 = _ListArchivedWorkflowExecutionsResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.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.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		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_ListArchivedWorkflowExecutions_Result
// struct.
func (v *WorkflowService_ListArchivedWorkflowExecutions_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [6]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.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_ListArchivedWorkflowExecutions_Result{%v}", strings.Join(fields[:i], ", "))
}

// 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_ListArchivedWorkflowExecutions_Result) Equals(rhs *WorkflowService_ListArchivedWorkflowExecutions_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.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_ListArchivedWorkflowExecutions_Result.
func (v *WorkflowService_ListArchivedWorkflowExecutions_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.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_ListArchivedWorkflowExecutions_Result) GetSuccess() (o *shared.ListArchivedWorkflowExecutionsResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
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_ListArchivedWorkflowExecutions_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_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_ListArchivedWorkflowExecutions_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_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_ListArchivedWorkflowExecutions_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_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_ListArchivedWorkflowExecutions_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_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_ListArchivedWorkflowExecutions_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_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 "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_ListArchivedWorkflowExecutions_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_ListClosedWorkflowExecutions_Args represents the arguments for the WorkflowService.ListClosedWorkflowExecutions 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"`
}

// 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.
//
// 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_ListClosedWorkflowExecutions_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.ListRequest != nil {
		w, err = v.ListRequest.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 _ListClosedWorkflowExecutionsRequest_Read(w wire.Value) (*shared.ListClosedWorkflowExecutionsRequest, error) {
	var v shared.ListClosedWorkflowExecutionsRequest
	err := v.FromWire(w)
	return &v, err
}

// 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_ListClosedWorkflowExecutions_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ListClosedWorkflowExecutions_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
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 = _ListClosedWorkflowExecutionsRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_ListClosedWorkflowExecutions_Args
// struct.
func (v *WorkflowService_ListClosedWorkflowExecutions_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.ListRequest != nil {
		fields[i] = fmt.Sprintf("ListRequest: %v", v.ListRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_ListClosedWorkflowExecutions_Args{%v}", strings.Join(fields[:i], ", "))
}

// 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_ListClosedWorkflowExecutions_Args) Equals(rhs *WorkflowService_ListClosedWorkflowExecutions_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.ListRequest == nil && rhs.ListRequest == nil) || (v.ListRequest != nil && rhs.ListRequest != nil && v.ListRequest.Equals(rhs.ListRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_ListClosedWorkflowExecutions_Args.
func (v *WorkflowService_ListClosedWorkflowExecutions_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.ListRequest != nil {
		err = multierr.Append(err, enc.AddObject("listRequest", v.ListRequest))
	}
	return err
}

// 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) {
	if v != nil && v.ListRequest != nil {
		return v.ListRequest
	}

	return
}

// IsSetListRequest returns true if ListRequest is not nil.
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 "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_ListClosedWorkflowExecutions_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
// function.
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.ListClosedWorkflowExecutionsRequest,
	) *WorkflowService_ListClosedWorkflowExecutions_Args

	// IsException returns true if the given error can be thrown
	// by ListClosedWorkflowExecutions.
	//
	// 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 ListClosedWorkflowExecutions
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// ListClosedWorkflowExecutions into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by ListClosedWorkflowExecutions
	//
	//   value, err := ListClosedWorkflowExecutions(args)
	//   result, err := WorkflowService_ListClosedWorkflowExecutions_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from ListClosedWorkflowExecutions: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.ListClosedWorkflowExecutionsResponse, error) (*WorkflowService_ListClosedWorkflowExecutions_Result, error)

	// UnwrapResponse takes the result struct for ListClosedWorkflowExecutions
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if ListClosedWorkflowExecutions threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_ListClosedWorkflowExecutions_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_ListClosedWorkflowExecutions_Result) (*shared.ListClosedWorkflowExecutionsResponse, error)
}{}

func init() {
	WorkflowService_ListClosedWorkflowExecutions_Helper.Args = func(
		listRequest *shared.ListClosedWorkflowExecutionsRequest,
	) *WorkflowService_ListClosedWorkflowExecutions_Args {
		return &WorkflowService_ListClosedWorkflowExecutions_Args{
			ListRequest: listRequest,
		}
	}

	WorkflowService_ListClosedWorkflowExecutions_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:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_ListClosedWorkflowExecutions_Helper.WrapResponse = func(success *shared.ListClosedWorkflowExecutionsResponse, err error) (*WorkflowService_ListClosedWorkflowExecutions_Result, error) {
		if err == 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_ListClosedWorkflowExecutions_Result.BadRequestError")
			}
			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_ListClosedWorkflowExecutions_Result.EntityNotExistError")
			}
			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_ListClosedWorkflowExecutions_Result.ServiceBusyError")
			}
			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_ListClosedWorkflowExecutions_Result.ClientVersionNotSupportedError")
			}
			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_ListClosedWorkflowExecutions_Result.AccessDeniedError")
			}
			return &WorkflowService_ListClosedWorkflowExecutions_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_ListClosedWorkflowExecutions_Helper.UnwrapResponse = func(result *WorkflowService_ListClosedWorkflowExecutions_Result) (success *shared.ListClosedWorkflowExecutionsResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.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_ListClosedWorkflowExecutions_Result represents the result of a WorkflowService.ListClosedWorkflowExecutions function call.
//
// 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_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_ListClosedWorkflowExecutions_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_ListClosedWorkflowExecutions_Result) ToWire() (wire.Value, error) {
	var (
		fields [6]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: 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_ListClosedWorkflowExecutions_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
	err := v.FromWire(w)
	return &v, err
}

// 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_ListClosedWorkflowExecutions_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ListClosedWorkflowExecutions_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
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 = _ListClosedWorkflowExecutionsResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.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.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		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_ListClosedWorkflowExecutions_Result
// struct.
func (v *WorkflowService_ListClosedWorkflowExecutions_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [6]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.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_ListClosedWorkflowExecutions_Result{%v}", strings.Join(fields[:i], ", "))
}

// 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_ListClosedWorkflowExecutions_Result) Equals(rhs *WorkflowService_ListClosedWorkflowExecutions_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.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_ListClosedWorkflowExecutions_Result.
func (v *WorkflowService_ListClosedWorkflowExecutions_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.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_ListClosedWorkflowExecutions_Result) GetSuccess() (o *shared.ListClosedWorkflowExecutionsResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
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_ListClosedWorkflowExecutions_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_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_ListClosedWorkflowExecutions_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_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_ListClosedWorkflowExecutions_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_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_ListClosedWorkflowExecutions_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_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_ListClosedWorkflowExecutions_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_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 "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_ListClosedWorkflowExecutions_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_ListDomains_Args represents the arguments for the WorkflowService.ListDomains 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"`
}

// 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.
//
// 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_ListDomains_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.ListRequest != nil {
		w, err = v.ListRequest.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 _ListDomainsRequest_Read(w wire.Value) (*shared.ListDomainsRequest, error) {
	var v shared.ListDomainsRequest
	err := v.FromWire(w)
	return &v, err
}

// 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_ListDomains_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ListDomains_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
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 = _ListDomainsRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_ListDomains_Args
// struct.
func (v *WorkflowService_ListDomains_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.ListRequest != nil {
		fields[i] = fmt.Sprintf("ListRequest: %v", v.ListRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_ListDomains_Args{%v}", strings.Join(fields[:i], ", "))
}

// 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_ListDomains_Args) Equals(rhs *WorkflowService_ListDomains_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.ListRequest == nil && rhs.ListRequest == nil) || (v.ListRequest != nil && rhs.ListRequest != nil && v.ListRequest.Equals(rhs.ListRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_ListDomains_Args.
func (v *WorkflowService_ListDomains_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.ListRequest != nil {
		err = multierr.Append(err, enc.AddObject("listRequest", v.ListRequest))
	}
	return err
}

// 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) {
	if v != nil && v.ListRequest != nil {
		return v.ListRequest
	}

	return
}

// IsSetListRequest returns true if ListRequest is not nil.
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 "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_ListDomains_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
// function.
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.ListDomainsRequest,
	) *WorkflowService_ListDomains_Args

	// IsException returns true if the given error can be thrown
	// by ListDomains.
	//
	// 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 ListDomains
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// ListDomains into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by ListDomains
	//
	//   value, err := ListDomains(args)
	//   result, err := WorkflowService_ListDomains_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from ListDomains: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.ListDomainsResponse, error) (*WorkflowService_ListDomains_Result, error)

	// UnwrapResponse takes the result struct for ListDomains
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if ListDomains threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_ListDomains_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_ListDomains_Result) (*shared.ListDomainsResponse, error)
}{}

func init() {
	WorkflowService_ListDomains_Helper.Args = func(
		listRequest *shared.ListDomainsRequest,
	) *WorkflowService_ListDomains_Args {
		return &WorkflowService_ListDomains_Args{
			ListRequest: listRequest,
		}
	}

	WorkflowService_ListDomains_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:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_ListDomains_Helper.WrapResponse = func(success *shared.ListDomainsResponse, err error) (*WorkflowService_ListDomains_Result, error) {
		if err == 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_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 &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_ListDomains_Result.ServiceBusyError")
			}
			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_ListDomains_Result.ClientVersionNotSupportedError")
			}
			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_ListDomains_Result.AccessDeniedError")
			}
			return &WorkflowService_ListDomains_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_ListDomains_Helper.UnwrapResponse = func(result *WorkflowService_ListDomains_Result) (success *shared.ListDomainsResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.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_ListDomains_Result represents the result of a WorkflowService.ListDomains function call.
//
// 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_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_ListDomains_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_ListDomains_Result) ToWire() (wire.Value, error) {
	var (
		fields [6]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: 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_ListDomains_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
	err := v.FromWire(w)
	return &v, err
}

// 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_ListDomains_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ListDomains_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
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 = _ListDomainsResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.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.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		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_ListDomains_Result
// struct.
func (v *WorkflowService_ListDomains_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [6]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.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_ListDomains_Result{%v}", strings.Join(fields[:i], ", "))
}

// 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_ListDomains_Result) Equals(rhs *WorkflowService_ListDomains_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.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_ListDomains_Result.
func (v *WorkflowService_ListDomains_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.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_ListDomains_Result) GetSuccess() (o *shared.ListDomainsResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
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_ListDomains_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_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_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) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
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_ListDomains_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_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_ListDomains_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_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 "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_ListDomains_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_ListOpenWorkflowExecutions_Args represents the arguments for the WorkflowService.ListOpenWorkflowExecutions function.
//
// The arguments for ListOpenWorkflowExecutions are sent and received over the wire as this struct.
type WorkflowService_ListOpenWorkflowExecutions_Args struct {
	ListRequest *shared.ListOpenWorkflowExecutionsRequest `json:"listRequest,omitempty"`
}

// ToWire translates a WorkflowService_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.ListRequest != nil {
		w, err = v.ListRequest.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 _ListOpenWorkflowExecutionsRequest_Read(w wire.Value) (*shared.ListOpenWorkflowExecutionsRequest, error) {
	var v shared.ListOpenWorkflowExecutionsRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ListOpenWorkflowExecutions_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_ListOpenWorkflowExecutions_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 = _ListOpenWorkflowExecutionsRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_ListOpenWorkflowExecutions_Args
// struct.
func (v *WorkflowService_ListOpenWorkflowExecutions_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.ListRequest != nil {
		fields[i] = fmt.Sprintf("ListRequest: %v", v.ListRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_ListOpenWorkflowExecutions_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_ListOpenWorkflowExecutions_Args match the
// provided WorkflowService_ListOpenWorkflowExecutions_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_ListOpenWorkflowExecutions_Args) Equals(rhs *WorkflowService_ListOpenWorkflowExecutions_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.ListRequest == nil && rhs.ListRequest == nil) || (v.ListRequest != nil && rhs.ListRequest != nil && v.ListRequest.Equals(rhs.ListRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_ListOpenWorkflowExecutions_Args.
func (v *WorkflowService_ListOpenWorkflowExecutions_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.ListRequest != nil {
		err = multierr.Append(err, enc.AddObject("listRequest", v.ListRequest))
	}
	return err
}

// GetListRequest returns the value of ListRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_ListOpenWorkflowExecutions_Args) GetListRequest() (o *shared.ListOpenWorkflowExecutionsRequest) {
	if v != nil && v.ListRequest != nil {
		return v.ListRequest
	}

	return
}

// IsSetListRequest returns true if ListRequest is not nil.
func (v *WorkflowService_ListOpenWorkflowExecutions_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 "ListOpenWorkflowExecutions" for this struct.
func (v *WorkflowService_ListOpenWorkflowExecutions_Args) MethodName() string {
	return "ListOpenWorkflowExecutions"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_ListOpenWorkflowExecutions_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_ListOpenWorkflowExecutions_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.ListOpenWorkflowExecutions
// function.
var WorkflowService_ListOpenWorkflowExecutions_Helper = struct {
	// Args accepts the parameters of ListOpenWorkflowExecutions in-order and returns
	// the arguments struct for the function.
	Args func(
		listRequest *shared.ListOpenWorkflowExecutionsRequest,
	) *WorkflowService_ListOpenWorkflowExecutions_Args

	// IsException returns true if the given error can be thrown
	// by ListOpenWorkflowExecutions.
	//
	// An error can be thrown by ListOpenWorkflowExecutions 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 ListOpenWorkflowExecutions
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// ListOpenWorkflowExecutions into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by ListOpenWorkflowExecutions
	//
	//   value, err := ListOpenWorkflowExecutions(args)
	//   result, err := WorkflowService_ListOpenWorkflowExecutions_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from ListOpenWorkflowExecutions: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.ListOpenWorkflowExecutionsResponse, error) (*WorkflowService_ListOpenWorkflowExecutions_Result, error)

	// UnwrapResponse takes the result struct for ListOpenWorkflowExecutions
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if ListOpenWorkflowExecutions threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_ListOpenWorkflowExecutions_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_ListOpenWorkflowExecutions_Result) (*shared.ListOpenWorkflowExecutionsResponse, error)
}{}

func init() {
	WorkflowService_ListOpenWorkflowExecutions_Helper.Args = func(
		listRequest *shared.ListOpenWorkflowExecutionsRequest,
	) *WorkflowService_ListOpenWorkflowExecutions_Args {
		return &WorkflowService_ListOpenWorkflowExecutions_Args{
			ListRequest: listRequest,
		}
	}

	WorkflowService_ListOpenWorkflowExecutions_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.LimitExceededError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_ListOpenWorkflowExecutions_Helper.WrapResponse = func(success *shared.ListOpenWorkflowExecutionsResponse, err error) (*WorkflowService_ListOpenWorkflowExecutions_Result, error) {
		if err == nil {
			return &WorkflowService_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_Result.BadRequestError")
			}
			return &WorkflowService_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_Result.EntityNotExistError")
			}
			return &WorkflowService_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_Result.ServiceBusyError")
			}
			return &WorkflowService_ListOpenWorkflowExecutions_Result{ServiceBusyError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListOpenWorkflowExecutions_Result.LimitExceededError")
			}
			return &WorkflowService_ListOpenWorkflowExecutions_Result{LimitExceededError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListOpenWorkflowExecutions_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_Result.AccessDeniedError")
			}
			return &WorkflowService_ListOpenWorkflowExecutions_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_ListOpenWorkflowExecutions_Helper.UnwrapResponse = func(result *WorkflowService_ListOpenWorkflowExecutions_Result) (success *shared.ListOpenWorkflowExecutionsResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.LimitExceededError != nil {
			err = result.LimitExceededError
			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_ListOpenWorkflowExecutions_Result represents the result of a WorkflowService.ListOpenWorkflowExecutions function call.
//
// The result of a ListOpenWorkflowExecutions 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_ListOpenWorkflowExecutions_Result struct {
	// Value returned by ListOpenWorkflowExecutions after a successful execution.
	Success                        *shared.ListOpenWorkflowExecutionsResponse `json:"success,omitempty"`
	BadRequestError                *shared.BadRequestError                    `json:"badRequestError,omitempty"`
	EntityNotExistError            *shared.EntityNotExistsError               `json:"entityNotExistError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError                   `json:"serviceBusyError,omitempty"`
	LimitExceededError             *shared.LimitExceededError                 `json:"limitExceededError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError     `json:"clientVersionNotSupportedError,omitempty"`
	AccessDeniedError              *shared.AccessDeniedError                  `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_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: 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.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_ListOpenWorkflowExecutions_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _ListOpenWorkflowExecutionsResponse_Read(w wire.Value) (*shared.ListOpenWorkflowExecutionsResponse, error) {
	var v shared.ListOpenWorkflowExecutionsResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ListOpenWorkflowExecutions_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_ListOpenWorkflowExecutions_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 = _ListOpenWorkflowExecutionsResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			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.ServiceBusyError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_ListOpenWorkflowExecutions_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_ListOpenWorkflowExecutions_Result
// struct.
func (v *WorkflowService_ListOpenWorkflowExecutions_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	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.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_ListOpenWorkflowExecutions_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_ListOpenWorkflowExecutions_Result match the
// provided WorkflowService_ListOpenWorkflowExecutions_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_ListOpenWorkflowExecutions_Result) Equals(rhs *WorkflowService_ListOpenWorkflowExecutions_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.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) {
		return false
	}
	if !((v.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_ListOpenWorkflowExecutions_Result.
func (v *WorkflowService_ListOpenWorkflowExecutions_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.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.ClientVersionNotSupportedError != nil {
		err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError))
	}
	if v.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_ListOpenWorkflowExecutions_Result) GetSuccess() (o *shared.ListOpenWorkflowExecutionsResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_Result) IsSetLimitExceededError() bool {
	return v != nil && v.LimitExceededError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_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_ListOpenWorkflowExecutions_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 "ListOpenWorkflowExecutions" for this struct.
func (v *WorkflowService_ListOpenWorkflowExecutions_Result) MethodName() string {
	return "ListOpenWorkflowExecutions"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_ListOpenWorkflowExecutions_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_ListTaskListPartitions_Args represents the arguments for the WorkflowService.ListTaskListPartitions function.
//
// The arguments for ListTaskListPartitions are sent and received over the wire as this struct.
type WorkflowService_ListTaskListPartitions_Args struct {
	Request *shared.ListTaskListPartitionsRequest `json:"request,omitempty"`
}

// ToWire translates a WorkflowService_ListTaskListPartitions_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_ListTaskListPartitions_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 _ListTaskListPartitionsRequest_Read(w wire.Value) (*shared.ListTaskListPartitionsRequest, error) {
	var v shared.ListTaskListPartitionsRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_ListTaskListPartitions_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_ListTaskListPartitions_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ListTaskListPartitions_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_ListTaskListPartitions_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 = _ListTaskListPartitionsRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_ListTaskListPartitions_Args
// struct.
func (v *WorkflowService_ListTaskListPartitions_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("WorkflowService_ListTaskListPartitions_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_ListTaskListPartitions_Args match the
// provided WorkflowService_ListTaskListPartitions_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_ListTaskListPartitions_Args) Equals(rhs *WorkflowService_ListTaskListPartitions_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_ListTaskListPartitions_Args.
func (v *WorkflowService_ListTaskListPartitions_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_ListTaskListPartitions_Args) GetRequest() (o *shared.ListTaskListPartitionsRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *WorkflowService_ListTaskListPartitions_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 "ListTaskListPartitions" for this struct.
func (v *WorkflowService_ListTaskListPartitions_Args) MethodName() string {
	return "ListTaskListPartitions"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_ListTaskListPartitions_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_ListTaskListPartitions_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.ListTaskListPartitions
// function.
var WorkflowService_ListTaskListPartitions_Helper = struct {
	// Args accepts the parameters of ListTaskListPartitions in-order and returns
	// the arguments struct for the function.
	Args func(
		request *shared.ListTaskListPartitionsRequest,
	) *WorkflowService_ListTaskListPartitions_Args

	// IsException returns true if the given error can be thrown
	// by ListTaskListPartitions.
	//
	// An error can be thrown by ListTaskListPartitions 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 ListTaskListPartitions
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// ListTaskListPartitions into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by ListTaskListPartitions
	//
	//   value, err := ListTaskListPartitions(args)
	//   result, err := WorkflowService_ListTaskListPartitions_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from ListTaskListPartitions: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.ListTaskListPartitionsResponse, error) (*WorkflowService_ListTaskListPartitions_Result, error)

	// UnwrapResponse takes the result struct for ListTaskListPartitions
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if ListTaskListPartitions threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_ListTaskListPartitions_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_ListTaskListPartitions_Result) (*shared.ListTaskListPartitionsResponse, error)
}{}

func init() {
	WorkflowService_ListTaskListPartitions_Helper.Args = func(
		request *shared.ListTaskListPartitionsRequest,
	) *WorkflowService_ListTaskListPartitions_Args {
		return &WorkflowService_ListTaskListPartitions_Args{
			Request: request,
		}
	}

	WorkflowService_ListTaskListPartitions_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.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_ListTaskListPartitions_Helper.WrapResponse = func(success *shared.ListTaskListPartitionsResponse, err error) (*WorkflowService_ListTaskListPartitions_Result, error) {
		if err == nil {
			return &WorkflowService_ListTaskListPartitions_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_ListTaskListPartitions_Result.BadRequestError")
			}
			return &WorkflowService_ListTaskListPartitions_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_ListTaskListPartitions_Result.EntityNotExistError")
			}
			return &WorkflowService_ListTaskListPartitions_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_ListTaskListPartitions_Result.LimitExceededError")
			}
			return &WorkflowService_ListTaskListPartitions_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_ListTaskListPartitions_Result.ServiceBusyError")
			}
			return &WorkflowService_ListTaskListPartitions_Result{ServiceBusyError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ListTaskListPartitions_Result.AccessDeniedError")
			}
			return &WorkflowService_ListTaskListPartitions_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_ListTaskListPartitions_Helper.UnwrapResponse = func(result *WorkflowService_ListTaskListPartitions_Result) (success *shared.ListTaskListPartitionsResponse, 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.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// WorkflowService_ListTaskListPartitions_Result represents the result of a WorkflowService.ListTaskListPartitions function call.
//
// The result of a ListTaskListPartitions 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_ListTaskListPartitions_Result struct {
	// Value returned by ListTaskListPartitions after a successful execution.
	Success             *shared.ListTaskListPartitionsResponse `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"`
	AccessDeniedError   *shared.AccessDeniedError              `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_ListTaskListPartitions_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_ListTaskListPartitions_Result) ToWire() (wire.Value, error) {
	var (
		fields [6]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: 3, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.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_ListTaskListPartitions_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _ListTaskListPartitionsResponse_Read(w wire.Value) (*shared.ListTaskListPartitionsResponse, error) {
	var v shared.ListTaskListPartitionsResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_ListTaskListPartitions_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_ListTaskListPartitions_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ListTaskListPartitions_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_ListTaskListPartitions_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 = _ListTaskListPartitionsResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_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.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_ListTaskListPartitions_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_ListTaskListPartitions_Result
// struct.
func (v *WorkflowService_ListTaskListPartitions_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [6]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.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_ListTaskListPartitions_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_ListTaskListPartitions_Result match the
// provided WorkflowService_ListTaskListPartitions_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_ListTaskListPartitions_Result) Equals(rhs *WorkflowService_ListTaskListPartitions_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.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_ListTaskListPartitions_Result.
func (v *WorkflowService_ListTaskListPartitions_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.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_ListTaskListPartitions_Result) GetSuccess() (o *shared.ListTaskListPartitionsResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_ListTaskListPartitions_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_ListTaskListPartitions_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_ListTaskListPartitions_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_ListTaskListPartitions_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_ListTaskListPartitions_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_ListTaskListPartitions_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_ListTaskListPartitions_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_ListTaskListPartitions_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_ListTaskListPartitions_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_ListTaskListPartitions_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_ListTaskListPartitions_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 "ListTaskListPartitions" for this struct.
func (v *WorkflowService_ListTaskListPartitions_Result) MethodName() string {
	return "ListTaskListPartitions"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_ListTaskListPartitions_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_ListWorkflowExecutions_Args represents the arguments for the WorkflowService.ListWorkflowExecutions function.
//
// The arguments for ListWorkflowExecutions are sent and received over the wire as this struct.
type WorkflowService_ListWorkflowExecutions_Args struct {
	ListRequest *shared.ListWorkflowExecutionsRequest `json:"listRequest,omitempty"`
}

// ToWire translates a WorkflowService_ListWorkflowExecutions_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_ListWorkflowExecutions_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.ListRequest != nil {
		w, err = v.ListRequest.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 _ListWorkflowExecutionsRequest_Read(w wire.Value) (*shared.ListWorkflowExecutionsRequest, error) {
	var v shared.ListWorkflowExecutionsRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_ListWorkflowExecutions_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_ListWorkflowExecutions_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ListWorkflowExecutions_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_ListWorkflowExecutions_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 = _ListWorkflowExecutionsRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_ListWorkflowExecutions_Args
// struct.
func (v *WorkflowService_ListWorkflowExecutions_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.ListRequest != nil {
		fields[i] = fmt.Sprintf("ListRequest: %v", v.ListRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_ListWorkflowExecutions_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_ListWorkflowExecutions_Args match the
// provided WorkflowService_ListWorkflowExecutions_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_ListWorkflowExecutions_Args) Equals(rhs *WorkflowService_ListWorkflowExecutions_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.ListRequest == nil && rhs.ListRequest == nil) || (v.ListRequest != nil && rhs.ListRequest != nil && v.ListRequest.Equals(rhs.ListRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_ListWorkflowExecutions_Args.
func (v *WorkflowService_ListWorkflowExecutions_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.ListRequest != nil {
		err = multierr.Append(err, enc.AddObject("listRequest", v.ListRequest))
	}
	return err
}

// GetListRequest returns the value of ListRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_ListWorkflowExecutions_Args) GetListRequest() (o *shared.ListWorkflowExecutionsRequest) {
	if v != nil && v.ListRequest != nil {
		return v.ListRequest
	}

	return
}

// IsSetListRequest returns true if ListRequest is not nil.
func (v *WorkflowService_ListWorkflowExecutions_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 "ListWorkflowExecutions" for this struct.
func (v *WorkflowService_ListWorkflowExecutions_Args) MethodName() string {
	return "ListWorkflowExecutions"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_ListWorkflowExecutions_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_ListWorkflowExecutions_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.ListWorkflowExecutions
// function.
var WorkflowService_ListWorkflowExecutions_Helper = struct {
	// Args accepts the parameters of ListWorkflowExecutions in-order and returns
	// the arguments struct for the function.
	Args func(
		listRequest *shared.ListWorkflowExecutionsRequest,
	) *WorkflowService_ListWorkflowExecutions_Args

	// IsException returns true if the given error can be thrown
	// by ListWorkflowExecutions.
	//
	// An error can be thrown by ListWorkflowExecutions 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 ListWorkflowExecutions
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// ListWorkflowExecutions into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by ListWorkflowExecutions
	//
	//   value, err := ListWorkflowExecutions(args)
	//   result, err := WorkflowService_ListWorkflowExecutions_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from ListWorkflowExecutions: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.ListWorkflowExecutionsResponse, error) (*WorkflowService_ListWorkflowExecutions_Result, error)

	// UnwrapResponse takes the result struct for ListWorkflowExecutions
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if ListWorkflowExecutions threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_ListWorkflowExecutions_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_ListWorkflowExecutions_Result) (*shared.ListWorkflowExecutionsResponse, error)
}{}

func init() {
	WorkflowService_ListWorkflowExecutions_Helper.Args = func(
		listRequest *shared.ListWorkflowExecutionsRequest,
	) *WorkflowService_ListWorkflowExecutions_Args {
		return &WorkflowService_ListWorkflowExecutions_Args{
			ListRequest: listRequest,
		}
	}

	WorkflowService_ListWorkflowExecutions_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:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_ListWorkflowExecutions_Helper.WrapResponse = func(success *shared.ListWorkflowExecutionsResponse, err error) (*WorkflowService_ListWorkflowExecutions_Result, error) {
		if err == nil {
			return &WorkflowService_ListWorkflowExecutions_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_ListWorkflowExecutions_Result.BadRequestError")
			}
			return &WorkflowService_ListWorkflowExecutions_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_ListWorkflowExecutions_Result.EntityNotExistError")
			}
			return &WorkflowService_ListWorkflowExecutions_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_ListWorkflowExecutions_Result.ServiceBusyError")
			}
			return &WorkflowService_ListWorkflowExecutions_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_ListWorkflowExecutions_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_ListWorkflowExecutions_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_ListWorkflowExecutions_Result.AccessDeniedError")
			}
			return &WorkflowService_ListWorkflowExecutions_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_ListWorkflowExecutions_Helper.UnwrapResponse = func(result *WorkflowService_ListWorkflowExecutions_Result) (success *shared.ListWorkflowExecutionsResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.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_ListWorkflowExecutions_Result represents the result of a WorkflowService.ListWorkflowExecutions function call.
//
// The result of a ListWorkflowExecutions 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_ListWorkflowExecutions_Result struct {
	// Value returned by ListWorkflowExecutions after a successful execution.
	Success                        *shared.ListWorkflowExecutionsResponse `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_ListWorkflowExecutions_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_ListWorkflowExecutions_Result) ToWire() (wire.Value, error) {
	var (
		fields [6]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: 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_ListWorkflowExecutions_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _ListWorkflowExecutionsResponse_Read(w wire.Value) (*shared.ListWorkflowExecutionsResponse, error) {
	var v shared.ListWorkflowExecutionsResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_ListWorkflowExecutions_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_ListWorkflowExecutions_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ListWorkflowExecutions_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_ListWorkflowExecutions_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 = _ListWorkflowExecutionsResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.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.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_ListWorkflowExecutions_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_ListWorkflowExecutions_Result
// struct.
func (v *WorkflowService_ListWorkflowExecutions_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [6]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.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_ListWorkflowExecutions_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_ListWorkflowExecutions_Result match the
// provided WorkflowService_ListWorkflowExecutions_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_ListWorkflowExecutions_Result) Equals(rhs *WorkflowService_ListWorkflowExecutions_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.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_ListWorkflowExecutions_Result.
func (v *WorkflowService_ListWorkflowExecutions_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.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_ListWorkflowExecutions_Result) GetSuccess() (o *shared.ListWorkflowExecutionsResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_ListWorkflowExecutions_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_ListWorkflowExecutions_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_ListWorkflowExecutions_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_ListWorkflowExecutions_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_ListWorkflowExecutions_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_ListWorkflowExecutions_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_ListWorkflowExecutions_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_ListWorkflowExecutions_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_ListWorkflowExecutions_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_ListWorkflowExecutions_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_ListWorkflowExecutions_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 "ListWorkflowExecutions" for this struct.
func (v *WorkflowService_ListWorkflowExecutions_Result) MethodName() string {
	return "ListWorkflowExecutions"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_ListWorkflowExecutions_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_PollForActivityTask_Args represents the arguments for the WorkflowService.PollForActivityTask function.
//
// The arguments for PollForActivityTask are sent and received over the wire as this struct.
type WorkflowService_PollForActivityTask_Args struct {
	PollRequest *shared.PollForActivityTaskRequest `json:"pollRequest,omitempty"`
}

// ToWire translates a WorkflowService_PollForActivityTask_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_PollForActivityTask_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.PollRequest != nil {
		w, err = v.PollRequest.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 _PollForActivityTaskRequest_Read(w wire.Value) (*shared.PollForActivityTaskRequest, error) {
	var v shared.PollForActivityTaskRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_PollForActivityTask_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_PollForActivityTask_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_PollForActivityTask_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_PollForActivityTask_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.PollRequest, err = _PollForActivityTaskRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_PollForActivityTask_Args
// struct.
func (v *WorkflowService_PollForActivityTask_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.PollRequest != nil {
		fields[i] = fmt.Sprintf("PollRequest: %v", v.PollRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_PollForActivityTask_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_PollForActivityTask_Args match the
// provided WorkflowService_PollForActivityTask_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_PollForActivityTask_Args) Equals(rhs *WorkflowService_PollForActivityTask_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.PollRequest == nil && rhs.PollRequest == nil) || (v.PollRequest != nil && rhs.PollRequest != nil && v.PollRequest.Equals(rhs.PollRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_PollForActivityTask_Args.
func (v *WorkflowService_PollForActivityTask_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.PollRequest != nil {
		err = multierr.Append(err, enc.AddObject("pollRequest", v.PollRequest))
	}
	return err
}

// GetPollRequest returns the value of PollRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_PollForActivityTask_Args) GetPollRequest() (o *shared.PollForActivityTaskRequest) {
	if v != nil && v.PollRequest != nil {
		return v.PollRequest
	}

	return
}

// IsSetPollRequest returns true if PollRequest is not nil.
func (v *WorkflowService_PollForActivityTask_Args) IsSetPollRequest() bool {
	return v != nil && v.PollRequest != 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 "PollForActivityTask" for this struct.
func (v *WorkflowService_PollForActivityTask_Args) MethodName() string {
	return "PollForActivityTask"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_PollForActivityTask_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_PollForActivityTask_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.PollForActivityTask
// function.
var WorkflowService_PollForActivityTask_Helper = struct {
	// Args accepts the parameters of PollForActivityTask in-order and returns
	// the arguments struct for the function.
	Args func(
		pollRequest *shared.PollForActivityTaskRequest,
	) *WorkflowService_PollForActivityTask_Args

	// IsException returns true if the given error can be thrown
	// by PollForActivityTask.
	//
	// An error can be thrown by PollForActivityTask 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 PollForActivityTask
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// PollForActivityTask into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by PollForActivityTask
	//
	//   value, err := PollForActivityTask(args)
	//   result, err := WorkflowService_PollForActivityTask_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from PollForActivityTask: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.PollForActivityTaskResponse, error) (*WorkflowService_PollForActivityTask_Result, error)

	// UnwrapResponse takes the result struct for PollForActivityTask
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if PollForActivityTask threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_PollForActivityTask_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_PollForActivityTask_Result) (*shared.PollForActivityTaskResponse, error)
}{}

func init() {
	WorkflowService_PollForActivityTask_Helper.Args = func(
		pollRequest *shared.PollForActivityTaskRequest,
	) *WorkflowService_PollForActivityTask_Args {
		return &WorkflowService_PollForActivityTask_Args{
			PollRequest: pollRequest,
		}
	}

	WorkflowService_PollForActivityTask_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_PollForActivityTask_Helper.WrapResponse = func(success *shared.PollForActivityTaskResponse, err error) (*WorkflowService_PollForActivityTask_Result, error) {
		if err == nil {
			return &WorkflowService_PollForActivityTask_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_PollForActivityTask_Result.BadRequestError")
			}
			return &WorkflowService_PollForActivityTask_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_PollForActivityTask_Result.ServiceBusyError")
			}
			return &WorkflowService_PollForActivityTask_Result{ServiceBusyError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_PollForActivityTask_Result.LimitExceededError")
			}
			return &WorkflowService_PollForActivityTask_Result{LimitExceededError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_PollForActivityTask_Result.EntityNotExistError")
			}
			return &WorkflowService_PollForActivityTask_Result{EntityNotExistError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_PollForActivityTask_Result.DomainNotActiveError")
			}
			return &WorkflowService_PollForActivityTask_Result{DomainNotActiveError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_PollForActivityTask_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_PollForActivityTask_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_PollForActivityTask_Result.AccessDeniedError")
			}
			return &WorkflowService_PollForActivityTask_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_PollForActivityTask_Helper.UnwrapResponse = func(result *WorkflowService_PollForActivityTask_Result) (success *shared.PollForActivityTaskResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.LimitExceededError != nil {
			err = result.LimitExceededError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			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_PollForActivityTask_Result represents the result of a WorkflowService.PollForActivityTask function call.
//
// The result of a PollForActivityTask 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_PollForActivityTask_Result struct {
	// Value returned by PollForActivityTask after a successful execution.
	Success                        *shared.PollForActivityTaskResponse    `json:"success,omitempty"`
	BadRequestError                *shared.BadRequestError                `json:"badRequestError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError               `json:"serviceBusyError,omitempty"`
	LimitExceededError             *shared.LimitExceededError             `json:"limitExceededError,omitempty"`
	EntityNotExistError            *shared.EntityNotExistsError           `json:"entityNotExistError,omitempty"`
	DomainNotActiveError           *shared.DomainNotActiveError           `json:"domainNotActiveError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"`
	AccessDeniedError              *shared.AccessDeniedError              `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_PollForActivityTask_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_PollForActivityTask_Result) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_PollForActivityTask_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _PollForActivityTaskResponse_Read(w wire.Value) (*shared.PollForActivityTaskResponse, error) {
	var v shared.PollForActivityTaskResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_PollForActivityTask_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_PollForActivityTask_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_PollForActivityTask_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_PollForActivityTask_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 = _PollForActivityTaskResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.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.ServiceBusyError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_PollForActivityTask_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_PollForActivityTask_Result
// struct.
func (v *WorkflowService_PollForActivityTask_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		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_PollForActivityTask_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_PollForActivityTask_Result match the
// provided WorkflowService_PollForActivityTask_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_PollForActivityTask_Result) Equals(rhs *WorkflowService_PollForActivityTask_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.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		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_PollForActivityTask_Result.
func (v *WorkflowService_PollForActivityTask_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))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	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_PollForActivityTask_Result) GetSuccess() (o *shared.PollForActivityTaskResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_PollForActivityTask_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_PollForActivityTask_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_PollForActivityTask_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_PollForActivityTask_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_PollForActivityTask_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_PollForActivityTask_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_PollForActivityTask_Result) IsSetLimitExceededError() bool {
	return v != nil && v.LimitExceededError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_PollForActivityTask_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_PollForActivityTask_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_PollForActivityTask_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_PollForActivityTask_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_PollForActivityTask_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_PollForActivityTask_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_PollForActivityTask_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_PollForActivityTask_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 "PollForActivityTask" for this struct.
func (v *WorkflowService_PollForActivityTask_Result) MethodName() string {
	return "PollForActivityTask"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_PollForActivityTask_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_PollForDecisionTask_Args represents the arguments for the WorkflowService.PollForDecisionTask function.
//
// The arguments for PollForDecisionTask are sent and received over the wire as this struct.
type WorkflowService_PollForDecisionTask_Args struct {
	PollRequest *shared.PollForDecisionTaskRequest `json:"pollRequest,omitempty"`
}

// ToWire translates a WorkflowService_PollForDecisionTask_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_PollForDecisionTask_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.PollRequest != nil {
		w, err = v.PollRequest.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 _PollForDecisionTaskRequest_Read(w wire.Value) (*shared.PollForDecisionTaskRequest, error) {
	var v shared.PollForDecisionTaskRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_PollForDecisionTask_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_PollForDecisionTask_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_PollForDecisionTask_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_PollForDecisionTask_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.PollRequest, err = _PollForDecisionTaskRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_PollForDecisionTask_Args
// struct.
func (v *WorkflowService_PollForDecisionTask_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.PollRequest != nil {
		fields[i] = fmt.Sprintf("PollRequest: %v", v.PollRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_PollForDecisionTask_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_PollForDecisionTask_Args match the
// provided WorkflowService_PollForDecisionTask_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_PollForDecisionTask_Args) Equals(rhs *WorkflowService_PollForDecisionTask_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.PollRequest == nil && rhs.PollRequest == nil) || (v.PollRequest != nil && rhs.PollRequest != nil && v.PollRequest.Equals(rhs.PollRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_PollForDecisionTask_Args.
func (v *WorkflowService_PollForDecisionTask_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.PollRequest != nil {
		err = multierr.Append(err, enc.AddObject("pollRequest", v.PollRequest))
	}
	return err
}

// GetPollRequest returns the value of PollRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_PollForDecisionTask_Args) GetPollRequest() (o *shared.PollForDecisionTaskRequest) {
	if v != nil && v.PollRequest != nil {
		return v.PollRequest
	}

	return
}

// IsSetPollRequest returns true if PollRequest is not nil.
func (v *WorkflowService_PollForDecisionTask_Args) IsSetPollRequest() bool {
	return v != nil && v.PollRequest != 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 "PollForDecisionTask" for this struct.
func (v *WorkflowService_PollForDecisionTask_Args) MethodName() string {
	return "PollForDecisionTask"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_PollForDecisionTask_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_PollForDecisionTask_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.PollForDecisionTask
// function.
var WorkflowService_PollForDecisionTask_Helper = struct {
	// Args accepts the parameters of PollForDecisionTask in-order and returns
	// the arguments struct for the function.
	Args func(
		pollRequest *shared.PollForDecisionTaskRequest,
	) *WorkflowService_PollForDecisionTask_Args

	// IsException returns true if the given error can be thrown
	// by PollForDecisionTask.
	//
	// An error can be thrown by PollForDecisionTask 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 PollForDecisionTask
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// PollForDecisionTask into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by PollForDecisionTask
	//
	//   value, err := PollForDecisionTask(args)
	//   result, err := WorkflowService_PollForDecisionTask_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from PollForDecisionTask: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.PollForDecisionTaskResponse, error) (*WorkflowService_PollForDecisionTask_Result, error)

	// UnwrapResponse takes the result struct for PollForDecisionTask
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if PollForDecisionTask threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_PollForDecisionTask_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_PollForDecisionTask_Result) (*shared.PollForDecisionTaskResponse, error)
}{}

func init() {
	WorkflowService_PollForDecisionTask_Helper.Args = func(
		pollRequest *shared.PollForDecisionTaskRequest,
	) *WorkflowService_PollForDecisionTask_Args {
		return &WorkflowService_PollForDecisionTask_Args{
			PollRequest: pollRequest,
		}
	}

	WorkflowService_PollForDecisionTask_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_PollForDecisionTask_Helper.WrapResponse = func(success *shared.PollForDecisionTaskResponse, err error) (*WorkflowService_PollForDecisionTask_Result, error) {
		if err == nil {
			return &WorkflowService_PollForDecisionTask_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_PollForDecisionTask_Result.BadRequestError")
			}
			return &WorkflowService_PollForDecisionTask_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_PollForDecisionTask_Result.ServiceBusyError")
			}
			return &WorkflowService_PollForDecisionTask_Result{ServiceBusyError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_PollForDecisionTask_Result.LimitExceededError")
			}
			return &WorkflowService_PollForDecisionTask_Result{LimitExceededError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_PollForDecisionTask_Result.EntityNotExistError")
			}
			return &WorkflowService_PollForDecisionTask_Result{EntityNotExistError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_PollForDecisionTask_Result.DomainNotActiveError")
			}
			return &WorkflowService_PollForDecisionTask_Result{DomainNotActiveError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_PollForDecisionTask_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_PollForDecisionTask_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_PollForDecisionTask_Result.AccessDeniedError")
			}
			return &WorkflowService_PollForDecisionTask_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_PollForDecisionTask_Helper.UnwrapResponse = func(result *WorkflowService_PollForDecisionTask_Result) (success *shared.PollForDecisionTaskResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.LimitExceededError != nil {
			err = result.LimitExceededError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			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_PollForDecisionTask_Result represents the result of a WorkflowService.PollForDecisionTask function call.
//
// The result of a PollForDecisionTask 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_PollForDecisionTask_Result struct {
	// Value returned by PollForDecisionTask after a successful execution.
	Success                        *shared.PollForDecisionTaskResponse    `json:"success,omitempty"`
	BadRequestError                *shared.BadRequestError                `json:"badRequestError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError               `json:"serviceBusyError,omitempty"`
	LimitExceededError             *shared.LimitExceededError             `json:"limitExceededError,omitempty"`
	EntityNotExistError            *shared.EntityNotExistsError           `json:"entityNotExistError,omitempty"`
	DomainNotActiveError           *shared.DomainNotActiveError           `json:"domainNotActiveError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"`
	AccessDeniedError              *shared.AccessDeniedError              `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_PollForDecisionTask_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_PollForDecisionTask_Result) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_PollForDecisionTask_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _PollForDecisionTaskResponse_Read(w wire.Value) (*shared.PollForDecisionTaskResponse, error) {
	var v shared.PollForDecisionTaskResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_PollForDecisionTask_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_PollForDecisionTask_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_PollForDecisionTask_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_PollForDecisionTask_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 = _PollForDecisionTaskResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.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.ServiceBusyError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_PollForDecisionTask_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_PollForDecisionTask_Result
// struct.
func (v *WorkflowService_PollForDecisionTask_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		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_PollForDecisionTask_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_PollForDecisionTask_Result match the
// provided WorkflowService_PollForDecisionTask_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_PollForDecisionTask_Result) Equals(rhs *WorkflowService_PollForDecisionTask_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.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		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_PollForDecisionTask_Result.
func (v *WorkflowService_PollForDecisionTask_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))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	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_PollForDecisionTask_Result) GetSuccess() (o *shared.PollForDecisionTaskResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_PollForDecisionTask_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_PollForDecisionTask_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_PollForDecisionTask_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_PollForDecisionTask_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_PollForDecisionTask_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_PollForDecisionTask_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_PollForDecisionTask_Result) IsSetLimitExceededError() bool {
	return v != nil && v.LimitExceededError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_PollForDecisionTask_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_PollForDecisionTask_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_PollForDecisionTask_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_PollForDecisionTask_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_PollForDecisionTask_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_PollForDecisionTask_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_PollForDecisionTask_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_PollForDecisionTask_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 "PollForDecisionTask" for this struct.
func (v *WorkflowService_PollForDecisionTask_Result) MethodName() string {
	return "PollForDecisionTask"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_PollForDecisionTask_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_QueryWorkflow_Args represents the arguments for the WorkflowService.QueryWorkflow function.
//
// The arguments for QueryWorkflow are sent and received over the wire as this struct.
type WorkflowService_QueryWorkflow_Args struct {
	QueryRequest *shared.QueryWorkflowRequest `json:"queryRequest,omitempty"`
}

// ToWire translates a WorkflowService_QueryWorkflow_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_QueryWorkflow_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.QueryRequest != nil {
		w, err = v.QueryRequest.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 _QueryWorkflowRequest_Read(w wire.Value) (*shared.QueryWorkflowRequest, error) {
	var v shared.QueryWorkflowRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_QueryWorkflow_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_QueryWorkflow_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_QueryWorkflow_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_QueryWorkflow_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.QueryRequest, err = _QueryWorkflowRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_QueryWorkflow_Args
// struct.
func (v *WorkflowService_QueryWorkflow_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.QueryRequest != nil {
		fields[i] = fmt.Sprintf("QueryRequest: %v", v.QueryRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_QueryWorkflow_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_QueryWorkflow_Args match the
// provided WorkflowService_QueryWorkflow_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_QueryWorkflow_Args) Equals(rhs *WorkflowService_QueryWorkflow_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.QueryRequest == nil && rhs.QueryRequest == nil) || (v.QueryRequest != nil && rhs.QueryRequest != nil && v.QueryRequest.Equals(rhs.QueryRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_QueryWorkflow_Args.
func (v *WorkflowService_QueryWorkflow_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.QueryRequest != nil {
		err = multierr.Append(err, enc.AddObject("queryRequest", v.QueryRequest))
	}
	return err
}

// GetQueryRequest returns the value of QueryRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_QueryWorkflow_Args) GetQueryRequest() (o *shared.QueryWorkflowRequest) {
	if v != nil && v.QueryRequest != nil {
		return v.QueryRequest
	}

	return
}

// IsSetQueryRequest returns true if QueryRequest is not nil.
func (v *WorkflowService_QueryWorkflow_Args) IsSetQueryRequest() bool {
	return v != nil && v.QueryRequest != 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 "QueryWorkflow" for this struct.
func (v *WorkflowService_QueryWorkflow_Args) MethodName() string {
	return "QueryWorkflow"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_QueryWorkflow_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_QueryWorkflow_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.QueryWorkflow
// function.
var WorkflowService_QueryWorkflow_Helper = struct {
	// Args accepts the parameters of QueryWorkflow in-order and returns
	// the arguments struct for the function.
	Args func(
		queryRequest *shared.QueryWorkflowRequest,
	) *WorkflowService_QueryWorkflow_Args

	// IsException returns true if the given error can be thrown
	// by QueryWorkflow.
	//
	// An error can be thrown by QueryWorkflow 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 QueryWorkflow
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// QueryWorkflow into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by QueryWorkflow
	//
	//   value, err := QueryWorkflow(args)
	//   result, err := WorkflowService_QueryWorkflow_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from QueryWorkflow: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.QueryWorkflowResponse, error) (*WorkflowService_QueryWorkflow_Result, error)

	// UnwrapResponse takes the result struct for QueryWorkflow
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if QueryWorkflow threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_QueryWorkflow_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_QueryWorkflow_Result) (*shared.QueryWorkflowResponse, error)
}{}

func init() {
	WorkflowService_QueryWorkflow_Helper.Args = func(
		queryRequest *shared.QueryWorkflowRequest,
	) *WorkflowService_QueryWorkflow_Args {
		return &WorkflowService_QueryWorkflow_Args{
			QueryRequest: queryRequest,
		}
	}

	WorkflowService_QueryWorkflow_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.QueryFailedError:
			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_QueryWorkflow_Helper.WrapResponse = func(success *shared.QueryWorkflowResponse, err error) (*WorkflowService_QueryWorkflow_Result, error) {
		if err == nil {
			return &WorkflowService_QueryWorkflow_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_QueryWorkflow_Result.BadRequestError")
			}
			return &WorkflowService_QueryWorkflow_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_QueryWorkflow_Result.EntityNotExistError")
			}
			return &WorkflowService_QueryWorkflow_Result{EntityNotExistError: e}, nil
		case *shared.QueryFailedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_QueryWorkflow_Result.QueryFailedError")
			}
			return &WorkflowService_QueryWorkflow_Result{QueryFailedError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_QueryWorkflow_Result.LimitExceededError")
			}
			return &WorkflowService_QueryWorkflow_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_QueryWorkflow_Result.ServiceBusyError")
			}
			return &WorkflowService_QueryWorkflow_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_QueryWorkflow_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_QueryWorkflow_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_QueryWorkflow_Result.AccessDeniedError")
			}
			return &WorkflowService_QueryWorkflow_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_QueryWorkflow_Helper.UnwrapResponse = func(result *WorkflowService_QueryWorkflow_Result) (success *shared.QueryWorkflowResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.QueryFailedError != nil {
			err = result.QueryFailedError
			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_QueryWorkflow_Result represents the result of a WorkflowService.QueryWorkflow function call.
//
// The result of a QueryWorkflow 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_QueryWorkflow_Result struct {
	// Value returned by QueryWorkflow after a successful execution.
	Success                        *shared.QueryWorkflowResponse          `json:"success,omitempty"`
	BadRequestError                *shared.BadRequestError                `json:"badRequestError,omitempty"`
	EntityNotExistError            *shared.EntityNotExistsError           `json:"entityNotExistError,omitempty"`
	QueryFailedError               *shared.QueryFailedError               `json:"queryFailedError,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_QueryWorkflow_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_QueryWorkflow_Result) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.QueryFailedError != nil {
		w, err = v.QueryFailedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_QueryWorkflow_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _QueryWorkflowResponse_Read(w wire.Value) (*shared.QueryWorkflowResponse, error) {
	var v shared.QueryWorkflowResponse
	err := v.FromWire(w)
	return &v, err
}

func _QueryFailedError_Read(w wire.Value) (*shared.QueryFailedError, error) {
	var v shared.QueryFailedError
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_QueryWorkflow_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_QueryWorkflow_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_QueryWorkflow_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_QueryWorkflow_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 = _QueryWorkflowResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.QueryFailedError, err = _QueryFailedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.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.QueryFailedError != 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_QueryWorkflow_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_QueryWorkflow_Result
// struct.
func (v *WorkflowService_QueryWorkflow_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.QueryFailedError != nil {
		fields[i] = fmt.Sprintf("QueryFailedError: %v", v.QueryFailedError)
		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_QueryWorkflow_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_QueryWorkflow_Result match the
// provided WorkflowService_QueryWorkflow_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_QueryWorkflow_Result) Equals(rhs *WorkflowService_QueryWorkflow_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.QueryFailedError == nil && rhs.QueryFailedError == nil) || (v.QueryFailedError != nil && rhs.QueryFailedError != nil && v.QueryFailedError.Equals(rhs.QueryFailedError))) {
		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_QueryWorkflow_Result.
func (v *WorkflowService_QueryWorkflow_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.QueryFailedError != nil {
		err = multierr.Append(err, enc.AddObject("queryFailedError", v.QueryFailedError))
	}
	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_QueryWorkflow_Result) GetSuccess() (o *shared.QueryWorkflowResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_QueryWorkflow_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_QueryWorkflow_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_QueryWorkflow_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_QueryWorkflow_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_QueryWorkflow_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetQueryFailedError returns the value of QueryFailedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_QueryWorkflow_Result) GetQueryFailedError() (o *shared.QueryFailedError) {
	if v != nil && v.QueryFailedError != nil {
		return v.QueryFailedError
	}

	return
}

// IsSetQueryFailedError returns true if QueryFailedError is not nil.
func (v *WorkflowService_QueryWorkflow_Result) IsSetQueryFailedError() bool {
	return v != nil && v.QueryFailedError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_QueryWorkflow_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_QueryWorkflow_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_QueryWorkflow_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_QueryWorkflow_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_QueryWorkflow_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_QueryWorkflow_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_QueryWorkflow_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_QueryWorkflow_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 "QueryWorkflow" for this struct.
func (v *WorkflowService_QueryWorkflow_Result) MethodName() string {
	return "QueryWorkflow"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_QueryWorkflow_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_RecordActivityTaskHeartbeat_Args represents the arguments for the WorkflowService.RecordActivityTaskHeartbeat function.
//
// The arguments for RecordActivityTaskHeartbeat are sent and received over the wire as this struct.
type WorkflowService_RecordActivityTaskHeartbeat_Args struct {
	HeartbeatRequest *shared.RecordActivityTaskHeartbeatRequest `json:"heartbeatRequest,omitempty"`
}

// ToWire translates a WorkflowService_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.HeartbeatRequest != nil {
		w, err = v.HeartbeatRequest.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 _RecordActivityTaskHeartbeatRequest_Read(w wire.Value) (*shared.RecordActivityTaskHeartbeatRequest, error) {
	var v shared.RecordActivityTaskHeartbeatRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RecordActivityTaskHeartbeat_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RecordActivityTaskHeartbeat_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.HeartbeatRequest, err = _RecordActivityTaskHeartbeatRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RecordActivityTaskHeartbeat_Args
// struct.
func (v *WorkflowService_RecordActivityTaskHeartbeat_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.HeartbeatRequest != nil {
		fields[i] = fmt.Sprintf("HeartbeatRequest: %v", v.HeartbeatRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_RecordActivityTaskHeartbeat_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RecordActivityTaskHeartbeat_Args match the
// provided WorkflowService_RecordActivityTaskHeartbeat_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_RecordActivityTaskHeartbeat_Args) Equals(rhs *WorkflowService_RecordActivityTaskHeartbeat_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.HeartbeatRequest == nil && rhs.HeartbeatRequest == nil) || (v.HeartbeatRequest != nil && rhs.HeartbeatRequest != nil && v.HeartbeatRequest.Equals(rhs.HeartbeatRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_RecordActivityTaskHeartbeat_Args.
func (v *WorkflowService_RecordActivityTaskHeartbeat_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.HeartbeatRequest != nil {
		err = multierr.Append(err, enc.AddObject("heartbeatRequest", v.HeartbeatRequest))
	}
	return err
}

// GetHeartbeatRequest returns the value of HeartbeatRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RecordActivityTaskHeartbeat_Args) GetHeartbeatRequest() (o *shared.RecordActivityTaskHeartbeatRequest) {
	if v != nil && v.HeartbeatRequest != nil {
		return v.HeartbeatRequest
	}

	return
}

// IsSetHeartbeatRequest returns true if HeartbeatRequest is not nil.
func (v *WorkflowService_RecordActivityTaskHeartbeat_Args) IsSetHeartbeatRequest() bool {
	return v != nil && v.HeartbeatRequest != 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 "RecordActivityTaskHeartbeat" for this struct.
func (v *WorkflowService_RecordActivityTaskHeartbeat_Args) MethodName() string {
	return "RecordActivityTaskHeartbeat"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_RecordActivityTaskHeartbeat_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_RecordActivityTaskHeartbeat_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.RecordActivityTaskHeartbeat
// function.
var WorkflowService_RecordActivityTaskHeartbeat_Helper = struct {
	// Args accepts the parameters of RecordActivityTaskHeartbeat in-order and returns
	// the arguments struct for the function.
	Args func(
		heartbeatRequest *shared.RecordActivityTaskHeartbeatRequest,
	) *WorkflowService_RecordActivityTaskHeartbeat_Args

	// IsException returns true if the given error can be thrown
	// by RecordActivityTaskHeartbeat.
	//
	// An error can be thrown by RecordActivityTaskHeartbeat 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 RecordActivityTaskHeartbeat
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// RecordActivityTaskHeartbeat into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by RecordActivityTaskHeartbeat
	//
	//   value, err := RecordActivityTaskHeartbeat(args)
	//   result, err := WorkflowService_RecordActivityTaskHeartbeat_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RecordActivityTaskHeartbeat: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.RecordActivityTaskHeartbeatResponse, error) (*WorkflowService_RecordActivityTaskHeartbeat_Result, error)

	// UnwrapResponse takes the result struct for RecordActivityTaskHeartbeat
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if RecordActivityTaskHeartbeat threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_RecordActivityTaskHeartbeat_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_RecordActivityTaskHeartbeat_Result) (*shared.RecordActivityTaskHeartbeatResponse, error)
}{}

func init() {
	WorkflowService_RecordActivityTaskHeartbeat_Helper.Args = func(
		heartbeatRequest *shared.RecordActivityTaskHeartbeatRequest,
	) *WorkflowService_RecordActivityTaskHeartbeat_Args {
		return &WorkflowService_RecordActivityTaskHeartbeat_Args{
			HeartbeatRequest: heartbeatRequest,
		}
	}

	WorkflowService_RecordActivityTaskHeartbeat_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.WorkflowExecutionAlreadyCompletedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_RecordActivityTaskHeartbeat_Helper.WrapResponse = func(success *shared.RecordActivityTaskHeartbeatResponse, err error) (*WorkflowService_RecordActivityTaskHeartbeat_Result, error) {
		if err == nil {
			return &WorkflowService_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_Result.BadRequestError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_Result.EntityNotExistError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeat_Result{EntityNotExistError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RecordActivityTaskHeartbeat_Result.DomainNotActiveError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeat_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RecordActivityTaskHeartbeat_Result.LimitExceededError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_Result.ServiceBusyError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeat_Result{ClientVersionNotSupportedError: e}, nil
		case *shared.WorkflowExecutionAlreadyCompletedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RecordActivityTaskHeartbeat_Result.WorkflowExecutionAlreadyCompletedError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeat_Result{WorkflowExecutionAlreadyCompletedError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RecordActivityTaskHeartbeat_Result.AccessDeniedError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeat_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_RecordActivityTaskHeartbeat_Helper.UnwrapResponse = func(result *WorkflowService_RecordActivityTaskHeartbeat_Result) (success *shared.RecordActivityTaskHeartbeatResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			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.WorkflowExecutionAlreadyCompletedError != nil {
			err = result.WorkflowExecutionAlreadyCompletedError
			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_RecordActivityTaskHeartbeat_Result represents the result of a WorkflowService.RecordActivityTaskHeartbeat function call.
//
// The result of a RecordActivityTaskHeartbeat 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_RecordActivityTaskHeartbeat_Result struct {
	// Value returned by RecordActivityTaskHeartbeat after a successful execution.
	Success                                *shared.RecordActivityTaskHeartbeatResponse    `json:"success,omitempty"`
	BadRequestError                        *shared.BadRequestError                        `json:"badRequestError,omitempty"`
	EntityNotExistError                    *shared.EntityNotExistsError                   `json:"entityNotExistError,omitempty"`
	DomainNotActiveError                   *shared.DomainNotActiveError                   `json:"domainNotActiveError,omitempty"`
	LimitExceededError                     *shared.LimitExceededError                     `json:"limitExceededError,omitempty"`
	ServiceBusyError                       *shared.ServiceBusyError                       `json:"serviceBusyError,omitempty"`
	ClientVersionNotSupportedError         *shared.ClientVersionNotSupportedError         `json:"clientVersionNotSupportedError,omitempty"`
	WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"`
	AccessDeniedError                      *shared.AccessDeniedError                      `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_Result) ToWire() (wire.Value, error) {
	var (
		fields [9]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: 3, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_RecordActivityTaskHeartbeat_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _RecordActivityTaskHeartbeatResponse_Read(w wire.Value) (*shared.RecordActivityTaskHeartbeatResponse, error) {
	var v shared.RecordActivityTaskHeartbeatResponse
	err := v.FromWire(w)
	return &v, err
}

func _WorkflowExecutionAlreadyCompletedError_Read(w wire.Value) (*shared.WorkflowExecutionAlreadyCompletedError, error) {
	var v shared.WorkflowExecutionAlreadyCompletedError
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RecordActivityTaskHeartbeat_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RecordActivityTaskHeartbeat_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 = _RecordActivityTaskHeartbeatResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			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.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_RecordActivityTaskHeartbeat_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RecordActivityTaskHeartbeat_Result
// struct.
func (v *WorkflowService_RecordActivityTaskHeartbeat_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [9]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.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_RecordActivityTaskHeartbeat_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RecordActivityTaskHeartbeat_Result match the
// provided WorkflowService_RecordActivityTaskHeartbeat_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_RecordActivityTaskHeartbeat_Result) Equals(rhs *WorkflowService_RecordActivityTaskHeartbeat_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.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.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.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) {
		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_RecordActivityTaskHeartbeat_Result.
func (v *WorkflowService_RecordActivityTaskHeartbeat_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.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError))
	}
	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_RecordActivityTaskHeartbeat_Result) GetSuccess() (o *shared.RecordActivityTaskHeartbeatResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RecordActivityTaskHeartbeat_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_RecordActivityTaskHeartbeat_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RecordActivityTaskHeartbeat_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) {
	if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil {
		return v.WorkflowExecutionAlreadyCompletedError
	}

	return
}

// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil.
func (v *WorkflowService_RecordActivityTaskHeartbeat_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool {
	return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RecordActivityTaskHeartbeat_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_RecordActivityTaskHeartbeat_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 "RecordActivityTaskHeartbeat" for this struct.
func (v *WorkflowService_RecordActivityTaskHeartbeat_Result) MethodName() string {
	return "RecordActivityTaskHeartbeat"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_RecordActivityTaskHeartbeat_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_RecordActivityTaskHeartbeatByID_Args represents the arguments for the WorkflowService.RecordActivityTaskHeartbeatByID function.
//
// The arguments for RecordActivityTaskHeartbeatByID are sent and received over the wire as this struct.
type WorkflowService_RecordActivityTaskHeartbeatByID_Args struct {
	HeartbeatRequest *shared.RecordActivityTaskHeartbeatByIDRequest `json:"heartbeatRequest,omitempty"`
}

// ToWire translates a WorkflowService_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.HeartbeatRequest != nil {
		w, err = v.HeartbeatRequest.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 _RecordActivityTaskHeartbeatByIDRequest_Read(w wire.Value) (*shared.RecordActivityTaskHeartbeatByIDRequest, error) {
	var v shared.RecordActivityTaskHeartbeatByIDRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RecordActivityTaskHeartbeatByID_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_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.HeartbeatRequest, err = _RecordActivityTaskHeartbeatByIDRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RecordActivityTaskHeartbeatByID_Args
// struct.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.HeartbeatRequest != nil {
		fields[i] = fmt.Sprintf("HeartbeatRequest: %v", v.HeartbeatRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_RecordActivityTaskHeartbeatByID_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RecordActivityTaskHeartbeatByID_Args match the
// provided WorkflowService_RecordActivityTaskHeartbeatByID_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_Args) Equals(rhs *WorkflowService_RecordActivityTaskHeartbeatByID_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.HeartbeatRequest == nil && rhs.HeartbeatRequest == nil) || (v.HeartbeatRequest != nil && rhs.HeartbeatRequest != nil && v.HeartbeatRequest.Equals(rhs.HeartbeatRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_RecordActivityTaskHeartbeatByID_Args.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.HeartbeatRequest != nil {
		err = multierr.Append(err, enc.AddObject("heartbeatRequest", v.HeartbeatRequest))
	}
	return err
}

// GetHeartbeatRequest returns the value of HeartbeatRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_Args) GetHeartbeatRequest() (o *shared.RecordActivityTaskHeartbeatByIDRequest) {
	if v != nil && v.HeartbeatRequest != nil {
		return v.HeartbeatRequest
	}

	return
}

// IsSetHeartbeatRequest returns true if HeartbeatRequest is not nil.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_Args) IsSetHeartbeatRequest() bool {
	return v != nil && v.HeartbeatRequest != 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 "RecordActivityTaskHeartbeatByID" for this struct.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_Args) MethodName() string {
	return "RecordActivityTaskHeartbeatByID"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_RecordActivityTaskHeartbeatByID_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.RecordActivityTaskHeartbeatByID
// function.
var WorkflowService_RecordActivityTaskHeartbeatByID_Helper = struct {
	// Args accepts the parameters of RecordActivityTaskHeartbeatByID in-order and returns
	// the arguments struct for the function.
	Args func(
		heartbeatRequest *shared.RecordActivityTaskHeartbeatByIDRequest,
	) *WorkflowService_RecordActivityTaskHeartbeatByID_Args

	// IsException returns true if the given error can be thrown
	// by RecordActivityTaskHeartbeatByID.
	//
	// An error can be thrown by RecordActivityTaskHeartbeatByID 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 RecordActivityTaskHeartbeatByID
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// RecordActivityTaskHeartbeatByID into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by RecordActivityTaskHeartbeatByID
	//
	//   value, err := RecordActivityTaskHeartbeatByID(args)
	//   result, err := WorkflowService_RecordActivityTaskHeartbeatByID_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RecordActivityTaskHeartbeatByID: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.RecordActivityTaskHeartbeatResponse, error) (*WorkflowService_RecordActivityTaskHeartbeatByID_Result, error)

	// UnwrapResponse takes the result struct for RecordActivityTaskHeartbeatByID
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if RecordActivityTaskHeartbeatByID threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_RecordActivityTaskHeartbeatByID_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_RecordActivityTaskHeartbeatByID_Result) (*shared.RecordActivityTaskHeartbeatResponse, error)
}{}

func init() {
	WorkflowService_RecordActivityTaskHeartbeatByID_Helper.Args = func(
		heartbeatRequest *shared.RecordActivityTaskHeartbeatByIDRequest,
	) *WorkflowService_RecordActivityTaskHeartbeatByID_Args {
		return &WorkflowService_RecordActivityTaskHeartbeatByID_Args{
			HeartbeatRequest: heartbeatRequest,
		}
	}

	WorkflowService_RecordActivityTaskHeartbeatByID_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.WorkflowExecutionAlreadyCompletedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_RecordActivityTaskHeartbeatByID_Helper.WrapResponse = func(success *shared.RecordActivityTaskHeartbeatResponse, err error) (*WorkflowService_RecordActivityTaskHeartbeatByID_Result, error) {
		if err == nil {
			return &WorkflowService_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_Result.BadRequestError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_Result.EntityNotExistError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeatByID_Result{EntityNotExistError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RecordActivityTaskHeartbeatByID_Result.DomainNotActiveError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeatByID_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RecordActivityTaskHeartbeatByID_Result.LimitExceededError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_Result.ServiceBusyError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeatByID_Result{ClientVersionNotSupportedError: e}, nil
		case *shared.WorkflowExecutionAlreadyCompletedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RecordActivityTaskHeartbeatByID_Result.WorkflowExecutionAlreadyCompletedError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeatByID_Result{WorkflowExecutionAlreadyCompletedError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RecordActivityTaskHeartbeatByID_Result.AccessDeniedError")
			}
			return &WorkflowService_RecordActivityTaskHeartbeatByID_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_RecordActivityTaskHeartbeatByID_Helper.UnwrapResponse = func(result *WorkflowService_RecordActivityTaskHeartbeatByID_Result) (success *shared.RecordActivityTaskHeartbeatResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			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.WorkflowExecutionAlreadyCompletedError != nil {
			err = result.WorkflowExecutionAlreadyCompletedError
			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_RecordActivityTaskHeartbeatByID_Result represents the result of a WorkflowService.RecordActivityTaskHeartbeatByID function call.
//
// The result of a RecordActivityTaskHeartbeatByID 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_RecordActivityTaskHeartbeatByID_Result struct {
	// Value returned by RecordActivityTaskHeartbeatByID after a successful execution.
	Success                                *shared.RecordActivityTaskHeartbeatResponse    `json:"success,omitempty"`
	BadRequestError                        *shared.BadRequestError                        `json:"badRequestError,omitempty"`
	EntityNotExistError                    *shared.EntityNotExistsError                   `json:"entityNotExistError,omitempty"`
	DomainNotActiveError                   *shared.DomainNotActiveError                   `json:"domainNotActiveError,omitempty"`
	LimitExceededError                     *shared.LimitExceededError                     `json:"limitExceededError,omitempty"`
	ServiceBusyError                       *shared.ServiceBusyError                       `json:"serviceBusyError,omitempty"`
	ClientVersionNotSupportedError         *shared.ClientVersionNotSupportedError         `json:"clientVersionNotSupportedError,omitempty"`
	WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"`
	AccessDeniedError                      *shared.AccessDeniedError                      `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_Result) ToWire() (wire.Value, error) {
	var (
		fields [9]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: 3, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_RecordActivityTaskHeartbeatByID_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a WorkflowService_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RecordActivityTaskHeartbeatByID_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_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 = _RecordActivityTaskHeartbeatResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			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.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_RecordActivityTaskHeartbeatByID_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RecordActivityTaskHeartbeatByID_Result
// struct.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [9]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.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_RecordActivityTaskHeartbeatByID_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RecordActivityTaskHeartbeatByID_Result match the
// provided WorkflowService_RecordActivityTaskHeartbeatByID_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_Result) Equals(rhs *WorkflowService_RecordActivityTaskHeartbeatByID_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.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.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.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) {
		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_RecordActivityTaskHeartbeatByID_Result.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_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.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError))
	}
	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_RecordActivityTaskHeartbeatByID_Result) GetSuccess() (o *shared.RecordActivityTaskHeartbeatResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) {
	if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil {
		return v.WorkflowExecutionAlreadyCompletedError
	}

	return
}

// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool {
	return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_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_RecordActivityTaskHeartbeatByID_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 "RecordActivityTaskHeartbeatByID" for this struct.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_Result) MethodName() string {
	return "RecordActivityTaskHeartbeatByID"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_RecordActivityTaskHeartbeatByID_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_RefreshWorkflowTasks_Args represents the arguments for the WorkflowService.RefreshWorkflowTasks function.
//
// The arguments for RefreshWorkflowTasks are sent and received over the wire as this struct.
type WorkflowService_RefreshWorkflowTasks_Args struct {
	Request *shared.RefreshWorkflowTasksRequest `json:"request,omitempty"`
}

// ToWire translates a WorkflowService_RefreshWorkflowTasks_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_RefreshWorkflowTasks_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 _RefreshWorkflowTasksRequest_Read(w wire.Value) (*shared.RefreshWorkflowTasksRequest, error) {
	var v shared.RefreshWorkflowTasksRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RefreshWorkflowTasks_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_RefreshWorkflowTasks_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RefreshWorkflowTasks_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RefreshWorkflowTasks_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 = _RefreshWorkflowTasksRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RefreshWorkflowTasks_Args
// struct.
func (v *WorkflowService_RefreshWorkflowTasks_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Request != nil {
		fields[i] = fmt.Sprintf("Request: %v", v.Request)
		i++
	}

	return fmt.Sprintf("WorkflowService_RefreshWorkflowTasks_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RefreshWorkflowTasks_Args match the
// provided WorkflowService_RefreshWorkflowTasks_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_RefreshWorkflowTasks_Args) Equals(rhs *WorkflowService_RefreshWorkflowTasks_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_RefreshWorkflowTasks_Args.
func (v *WorkflowService_RefreshWorkflowTasks_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_RefreshWorkflowTasks_Args) GetRequest() (o *shared.RefreshWorkflowTasksRequest) {
	if v != nil && v.Request != nil {
		return v.Request
	}

	return
}

// IsSetRequest returns true if Request is not nil.
func (v *WorkflowService_RefreshWorkflowTasks_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 "RefreshWorkflowTasks" for this struct.
func (v *WorkflowService_RefreshWorkflowTasks_Args) MethodName() string {
	return "RefreshWorkflowTasks"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_RefreshWorkflowTasks_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_RefreshWorkflowTasks_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.RefreshWorkflowTasks
// function.
var WorkflowService_RefreshWorkflowTasks_Helper = struct {
	// Args accepts the parameters of RefreshWorkflowTasks in-order and returns
	// the arguments struct for the function.
	Args func(
		request *shared.RefreshWorkflowTasksRequest,
	) *WorkflowService_RefreshWorkflowTasks_Args

	// IsException returns true if the given error can be thrown
	// by RefreshWorkflowTasks.
	//
	// An error can be thrown by RefreshWorkflowTasks 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 RefreshWorkflowTasks
	// given the error returned by it. The provided error may
	// be nil if RefreshWorkflowTasks did not fail.
	//
	// This allows mapping errors returned by RefreshWorkflowTasks into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// RefreshWorkflowTasks
	//
	//   err := RefreshWorkflowTasks(args)
	//   result, err := WorkflowService_RefreshWorkflowTasks_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RefreshWorkflowTasks: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*WorkflowService_RefreshWorkflowTasks_Result, error)

	// UnwrapResponse takes the result struct for RefreshWorkflowTasks
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if RefreshWorkflowTasks threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := WorkflowService_RefreshWorkflowTasks_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_RefreshWorkflowTasks_Result) error
}{}

func init() {
	WorkflowService_RefreshWorkflowTasks_Helper.Args = func(
		request *shared.RefreshWorkflowTasksRequest,
	) *WorkflowService_RefreshWorkflowTasks_Args {
		return &WorkflowService_RefreshWorkflowTasks_Args{
			Request: request,
		}
	}

	WorkflowService_RefreshWorkflowTasks_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_RefreshWorkflowTasks_Helper.WrapResponse = func(err error) (*WorkflowService_RefreshWorkflowTasks_Result, error) {
		if err == nil {
			return &WorkflowService_RefreshWorkflowTasks_Result{}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RefreshWorkflowTasks_Result.BadRequestError")
			}
			return &WorkflowService_RefreshWorkflowTasks_Result{BadRequestError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RefreshWorkflowTasks_Result.DomainNotActiveError")
			}
			return &WorkflowService_RefreshWorkflowTasks_Result{DomainNotActiveError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RefreshWorkflowTasks_Result.ServiceBusyError")
			}
			return &WorkflowService_RefreshWorkflowTasks_Result{ServiceBusyError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RefreshWorkflowTasks_Result.EntityNotExistError")
			}
			return &WorkflowService_RefreshWorkflowTasks_Result{EntityNotExistError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RefreshWorkflowTasks_Result.AccessDeniedError")
			}
			return &WorkflowService_RefreshWorkflowTasks_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_RefreshWorkflowTasks_Helper.UnwrapResponse = func(result *WorkflowService_RefreshWorkflowTasks_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// WorkflowService_RefreshWorkflowTasks_Result represents the result of a WorkflowService.RefreshWorkflowTasks function call.
//
// The result of a RefreshWorkflowTasks execution is sent and received over the wire as this struct.
type WorkflowService_RefreshWorkflowTasks_Result struct {
	BadRequestError      *shared.BadRequestError      `json:"badRequestError,omitempty"`
	DomainNotActiveError *shared.DomainNotActiveError `json:"domainNotActiveError,omitempty"`
	ServiceBusyError     *shared.ServiceBusyError     `json:"serviceBusyError,omitempty"`
	EntityNotExistError  *shared.EntityNotExistsError `json:"entityNotExistError,omitempty"`
	AccessDeniedError    *shared.AccessDeniedError    `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_RefreshWorkflowTasks_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_RefreshWorkflowTasks_Result) ToWire() (wire.Value, error) {
	var (
		fields [5]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 2, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_RefreshWorkflowTasks_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a WorkflowService_RefreshWorkflowTasks_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_RefreshWorkflowTasks_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RefreshWorkflowTasks_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RefreshWorkflowTasks_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 2:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("WorkflowService_RefreshWorkflowTasks_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RefreshWorkflowTasks_Result
// struct.
func (v *WorkflowService_RefreshWorkflowTasks_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [5]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_RefreshWorkflowTasks_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RefreshWorkflowTasks_Result match the
// provided WorkflowService_RefreshWorkflowTasks_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_RefreshWorkflowTasks_Result) Equals(rhs *WorkflowService_RefreshWorkflowTasks_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		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_RefreshWorkflowTasks_Result.
func (v *WorkflowService_RefreshWorkflowTasks_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RefreshWorkflowTasks_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_RefreshWorkflowTasks_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RefreshWorkflowTasks_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_RefreshWorkflowTasks_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RefreshWorkflowTasks_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_RefreshWorkflowTasks_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RefreshWorkflowTasks_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_RefreshWorkflowTasks_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RefreshWorkflowTasks_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_RefreshWorkflowTasks_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 "RefreshWorkflowTasks" for this struct.
func (v *WorkflowService_RefreshWorkflowTasks_Result) MethodName() string {
	return "RefreshWorkflowTasks"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_RefreshWorkflowTasks_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_RegisterDomain_Args represents the arguments for the WorkflowService.RegisterDomain function.
//
// The arguments for RegisterDomain are sent and received over the wire as this struct.
type WorkflowService_RegisterDomain_Args struct {
	RegisterRequest *shared.RegisterDomainRequest `json:"registerRequest,omitempty"`
}

// ToWire translates a WorkflowService_RegisterDomain_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_RegisterDomain_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.RegisterRequest != nil {
		w, err = v.RegisterRequest.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 _RegisterDomainRequest_Read(w wire.Value) (*shared.RegisterDomainRequest, error) {
	var v shared.RegisterDomainRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RegisterDomain_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_RegisterDomain_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RegisterDomain_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RegisterDomain_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.RegisterRequest, err = _RegisterDomainRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RegisterDomain_Args
// struct.
func (v *WorkflowService_RegisterDomain_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.RegisterRequest != nil {
		fields[i] = fmt.Sprintf("RegisterRequest: %v", v.RegisterRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_RegisterDomain_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RegisterDomain_Args match the
// provided WorkflowService_RegisterDomain_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_RegisterDomain_Args) Equals(rhs *WorkflowService_RegisterDomain_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.RegisterRequest == nil && rhs.RegisterRequest == nil) || (v.RegisterRequest != nil && rhs.RegisterRequest != nil && v.RegisterRequest.Equals(rhs.RegisterRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_RegisterDomain_Args.
func (v *WorkflowService_RegisterDomain_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.RegisterRequest != nil {
		err = multierr.Append(err, enc.AddObject("registerRequest", v.RegisterRequest))
	}
	return err
}

// GetRegisterRequest returns the value of RegisterRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RegisterDomain_Args) GetRegisterRequest() (o *shared.RegisterDomainRequest) {
	if v != nil && v.RegisterRequest != nil {
		return v.RegisterRequest
	}

	return
}

// IsSetRegisterRequest returns true if RegisterRequest is not nil.
func (v *WorkflowService_RegisterDomain_Args) IsSetRegisterRequest() bool {
	return v != nil && v.RegisterRequest != 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 "RegisterDomain" for this struct.
func (v *WorkflowService_RegisterDomain_Args) MethodName() string {
	return "RegisterDomain"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_RegisterDomain_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_RegisterDomain_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.RegisterDomain
// function.
var WorkflowService_RegisterDomain_Helper = struct {
	// Args accepts the parameters of RegisterDomain in-order and returns
	// the arguments struct for the function.
	Args func(
		registerRequest *shared.RegisterDomainRequest,
	) *WorkflowService_RegisterDomain_Args

	// IsException returns true if the given error can be thrown
	// by RegisterDomain.
	//
	// An error can be thrown by RegisterDomain 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 RegisterDomain
	// given the error returned by it. The provided error may
	// be nil if RegisterDomain did not fail.
	//
	// This allows mapping errors returned by RegisterDomain into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// RegisterDomain
	//
	//   err := RegisterDomain(args)
	//   result, err := WorkflowService_RegisterDomain_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RegisterDomain: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*WorkflowService_RegisterDomain_Result, error)

	// UnwrapResponse takes the result struct for RegisterDomain
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if RegisterDomain threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := WorkflowService_RegisterDomain_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_RegisterDomain_Result) error
}{}

func init() {
	WorkflowService_RegisterDomain_Helper.Args = func(
		registerRequest *shared.RegisterDomainRequest,
	) *WorkflowService_RegisterDomain_Args {
		return &WorkflowService_RegisterDomain_Args{
			RegisterRequest: registerRequest,
		}
	}

	WorkflowService_RegisterDomain_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.DomainAlreadyExistsError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_RegisterDomain_Helper.WrapResponse = func(err error) (*WorkflowService_RegisterDomain_Result, error) {
		if err == nil {
			return &WorkflowService_RegisterDomain_Result{}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RegisterDomain_Result.BadRequestError")
			}
			return &WorkflowService_RegisterDomain_Result{BadRequestError: e}, nil
		case *shared.DomainAlreadyExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RegisterDomain_Result.DomainExistsError")
			}
			return &WorkflowService_RegisterDomain_Result{DomainExistsError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RegisterDomain_Result.ServiceBusyError")
			}
			return &WorkflowService_RegisterDomain_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_RegisterDomain_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_RegisterDomain_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_RegisterDomain_Result.AccessDeniedError")
			}
			return &WorkflowService_RegisterDomain_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_RegisterDomain_Helper.UnwrapResponse = func(result *WorkflowService_RegisterDomain_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.DomainExistsError != nil {
			err = result.DomainExistsError
			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
		}
		return
	}

}

// WorkflowService_RegisterDomain_Result represents the result of a WorkflowService.RegisterDomain function call.
//
// The result of a RegisterDomain execution is sent and received over the wire as this struct.
type WorkflowService_RegisterDomain_Result struct {
	BadRequestError                *shared.BadRequestError                `json:"badRequestError,omitempty"`
	DomainExistsError              *shared.DomainAlreadyExistsError       `json:"domainExistsError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError               `json:"serviceBusyError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"`
	AccessDeniedError              *shared.AccessDeniedError              `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_RegisterDomain_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_RegisterDomain_Result) ToWire() (wire.Value, error) {
	var (
		fields [5]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.DomainExistsError != nil {
		w, err = v.DomainExistsError.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_RegisterDomain_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _DomainAlreadyExistsError_Read(w wire.Value) (*shared.DomainAlreadyExistsError, error) {
	var v shared.DomainAlreadyExistsError
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RegisterDomain_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_RegisterDomain_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RegisterDomain_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RegisterDomain_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.DomainExistsError, err = _DomainAlreadyExistsError_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.BadRequestError != nil {
		count++
	}
	if v.DomainExistsError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("WorkflowService_RegisterDomain_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RegisterDomain_Result
// struct.
func (v *WorkflowService_RegisterDomain_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [5]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.DomainExistsError != nil {
		fields[i] = fmt.Sprintf("DomainExistsError: %v", v.DomainExistsError)
		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_RegisterDomain_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RegisterDomain_Result match the
// provided WorkflowService_RegisterDomain_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_RegisterDomain_Result) Equals(rhs *WorkflowService_RegisterDomain_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.DomainExistsError == nil && rhs.DomainExistsError == nil) || (v.DomainExistsError != nil && rhs.DomainExistsError != nil && v.DomainExistsError.Equals(rhs.DomainExistsError))) {
		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_RegisterDomain_Result.
func (v *WorkflowService_RegisterDomain_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.DomainExistsError != nil {
		err = multierr.Append(err, enc.AddObject("domainExistsError", v.DomainExistsError))
	}
	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
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RegisterDomain_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_RegisterDomain_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetDomainExistsError returns the value of DomainExistsError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RegisterDomain_Result) GetDomainExistsError() (o *shared.DomainAlreadyExistsError) {
	if v != nil && v.DomainExistsError != nil {
		return v.DomainExistsError
	}

	return
}

// IsSetDomainExistsError returns true if DomainExistsError is not nil.
func (v *WorkflowService_RegisterDomain_Result) IsSetDomainExistsError() bool {
	return v != nil && v.DomainExistsError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RegisterDomain_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_RegisterDomain_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_RegisterDomain_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_RegisterDomain_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_RegisterDomain_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_RegisterDomain_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 "RegisterDomain" for this struct.
func (v *WorkflowService_RegisterDomain_Result) MethodName() string {
	return "RegisterDomain"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_RegisterDomain_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_RequestCancelWorkflowExecution_Args represents the arguments for the WorkflowService.RequestCancelWorkflowExecution function.
//
// The arguments for RequestCancelWorkflowExecution are sent and received over the wire as this struct.
type WorkflowService_RequestCancelWorkflowExecution_Args struct {
	CancelRequest *shared.RequestCancelWorkflowExecutionRequest `json:"cancelRequest,omitempty"`
}

// ToWire translates a WorkflowService_RequestCancelWorkflowExecution_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_RequestCancelWorkflowExecution_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.CancelRequest != nil {
		w, err = v.CancelRequest.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 _RequestCancelWorkflowExecutionRequest_Read(w wire.Value) (*shared.RequestCancelWorkflowExecutionRequest, error) {
	var v shared.RequestCancelWorkflowExecutionRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RequestCancelWorkflowExecution_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_RequestCancelWorkflowExecution_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RequestCancelWorkflowExecution_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RequestCancelWorkflowExecution_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.CancelRequest, err = _RequestCancelWorkflowExecutionRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RequestCancelWorkflowExecution_Args
// struct.
func (v *WorkflowService_RequestCancelWorkflowExecution_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.CancelRequest != nil {
		fields[i] = fmt.Sprintf("CancelRequest: %v", v.CancelRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_RequestCancelWorkflowExecution_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RequestCancelWorkflowExecution_Args match the
// provided WorkflowService_RequestCancelWorkflowExecution_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_RequestCancelWorkflowExecution_Args) Equals(rhs *WorkflowService_RequestCancelWorkflowExecution_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.CancelRequest == nil && rhs.CancelRequest == nil) || (v.CancelRequest != nil && rhs.CancelRequest != nil && v.CancelRequest.Equals(rhs.CancelRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_RequestCancelWorkflowExecution_Args.
func (v *WorkflowService_RequestCancelWorkflowExecution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.CancelRequest != nil {
		err = multierr.Append(err, enc.AddObject("cancelRequest", v.CancelRequest))
	}
	return err
}

// GetCancelRequest returns the value of CancelRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RequestCancelWorkflowExecution_Args) GetCancelRequest() (o *shared.RequestCancelWorkflowExecutionRequest) {
	if v != nil && v.CancelRequest != nil {
		return v.CancelRequest
	}

	return
}

// IsSetCancelRequest returns true if CancelRequest is not nil.
func (v *WorkflowService_RequestCancelWorkflowExecution_Args) IsSetCancelRequest() bool {
	return v != nil && v.CancelRequest != 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 "RequestCancelWorkflowExecution" for this struct.
func (v *WorkflowService_RequestCancelWorkflowExecution_Args) MethodName() string {
	return "RequestCancelWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_RequestCancelWorkflowExecution_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_RequestCancelWorkflowExecution_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.RequestCancelWorkflowExecution
// function.
var WorkflowService_RequestCancelWorkflowExecution_Helper = struct {
	// Args accepts the parameters of RequestCancelWorkflowExecution in-order and returns
	// the arguments struct for the function.
	Args func(
		cancelRequest *shared.RequestCancelWorkflowExecutionRequest,
	) *WorkflowService_RequestCancelWorkflowExecution_Args

	// IsException returns true if the given error can be thrown
	// by RequestCancelWorkflowExecution.
	//
	// An error can be thrown by RequestCancelWorkflowExecution 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 RequestCancelWorkflowExecution
	// given the error returned by it. The provided error may
	// be nil if RequestCancelWorkflowExecution did not fail.
	//
	// This allows mapping errors returned by RequestCancelWorkflowExecution into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// RequestCancelWorkflowExecution
	//
	//   err := RequestCancelWorkflowExecution(args)
	//   result, err := WorkflowService_RequestCancelWorkflowExecution_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RequestCancelWorkflowExecution: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*WorkflowService_RequestCancelWorkflowExecution_Result, error)

	// UnwrapResponse takes the result struct for RequestCancelWorkflowExecution
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if RequestCancelWorkflowExecution threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := WorkflowService_RequestCancelWorkflowExecution_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_RequestCancelWorkflowExecution_Result) error
}{}

func init() {
	WorkflowService_RequestCancelWorkflowExecution_Helper.Args = func(
		cancelRequest *shared.RequestCancelWorkflowExecutionRequest,
	) *WorkflowService_RequestCancelWorkflowExecution_Args {
		return &WorkflowService_RequestCancelWorkflowExecution_Args{
			CancelRequest: cancelRequest,
		}
	}

	WorkflowService_RequestCancelWorkflowExecution_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.CancellationAlreadyRequestedError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.WorkflowExecutionAlreadyCompletedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_RequestCancelWorkflowExecution_Helper.WrapResponse = func(err error) (*WorkflowService_RequestCancelWorkflowExecution_Result, error) {
		if err == nil {
			return &WorkflowService_RequestCancelWorkflowExecution_Result{}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RequestCancelWorkflowExecution_Result.BadRequestError")
			}
			return &WorkflowService_RequestCancelWorkflowExecution_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_RequestCancelWorkflowExecution_Result.EntityNotExistError")
			}
			return &WorkflowService_RequestCancelWorkflowExecution_Result{EntityNotExistError: e}, nil
		case *shared.CancellationAlreadyRequestedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RequestCancelWorkflowExecution_Result.CancellationAlreadyRequestedError")
			}
			return &WorkflowService_RequestCancelWorkflowExecution_Result{CancellationAlreadyRequestedError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RequestCancelWorkflowExecution_Result.ServiceBusyError")
			}
			return &WorkflowService_RequestCancelWorkflowExecution_Result{ServiceBusyError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RequestCancelWorkflowExecution_Result.DomainNotActiveError")
			}
			return &WorkflowService_RequestCancelWorkflowExecution_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RequestCancelWorkflowExecution_Result.LimitExceededError")
			}
			return &WorkflowService_RequestCancelWorkflowExecution_Result{LimitExceededError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RequestCancelWorkflowExecution_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_RequestCancelWorkflowExecution_Result{ClientVersionNotSupportedError: e}, nil
		case *shared.WorkflowExecutionAlreadyCompletedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RequestCancelWorkflowExecution_Result.WorkflowExecutionAlreadyCompletedError")
			}
			return &WorkflowService_RequestCancelWorkflowExecution_Result{WorkflowExecutionAlreadyCompletedError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RequestCancelWorkflowExecution_Result.AccessDeniedError")
			}
			return &WorkflowService_RequestCancelWorkflowExecution_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_RequestCancelWorkflowExecution_Helper.UnwrapResponse = func(result *WorkflowService_RequestCancelWorkflowExecution_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.CancellationAlreadyRequestedError != nil {
			err = result.CancellationAlreadyRequestedError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.LimitExceededError != nil {
			err = result.LimitExceededError
			return
		}
		if result.ClientVersionNotSupportedError != nil {
			err = result.ClientVersionNotSupportedError
			return
		}
		if result.WorkflowExecutionAlreadyCompletedError != nil {
			err = result.WorkflowExecutionAlreadyCompletedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// WorkflowService_RequestCancelWorkflowExecution_Result represents the result of a WorkflowService.RequestCancelWorkflowExecution function call.
//
// The result of a RequestCancelWorkflowExecution execution is sent and received over the wire as this struct.
type WorkflowService_RequestCancelWorkflowExecution_Result struct {
	BadRequestError                        *shared.BadRequestError                        `json:"badRequestError,omitempty"`
	EntityNotExistError                    *shared.EntityNotExistsError                   `json:"entityNotExistError,omitempty"`
	CancellationAlreadyRequestedError      *shared.CancellationAlreadyRequestedError      `json:"cancellationAlreadyRequestedError,omitempty"`
	ServiceBusyError                       *shared.ServiceBusyError                       `json:"serviceBusyError,omitempty"`
	DomainNotActiveError                   *shared.DomainNotActiveError                   `json:"domainNotActiveError,omitempty"`
	LimitExceededError                     *shared.LimitExceededError                     `json:"limitExceededError,omitempty"`
	ClientVersionNotSupportedError         *shared.ClientVersionNotSupportedError         `json:"clientVersionNotSupportedError,omitempty"`
	WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"`
	AccessDeniedError                      *shared.AccessDeniedError                      `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_RequestCancelWorkflowExecution_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_RequestCancelWorkflowExecution_Result) ToWire() (wire.Value, error) {
	var (
		fields [9]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.CancellationAlreadyRequestedError != nil {
		w, err = v.CancellationAlreadyRequestedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_RequestCancelWorkflowExecution_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _CancellationAlreadyRequestedError_Read(w wire.Value) (*shared.CancellationAlreadyRequestedError, error) {
	var v shared.CancellationAlreadyRequestedError
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RequestCancelWorkflowExecution_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_RequestCancelWorkflowExecution_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RequestCancelWorkflowExecution_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RequestCancelWorkflowExecution_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.CancellationAlreadyRequestedError, err = _CancellationAlreadyRequestedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			if field.Value.Type() == wire.TStruct {
				v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 10:
			if field.Value.Type() == wire.TStruct {
				v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.CancellationAlreadyRequestedError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("WorkflowService_RequestCancelWorkflowExecution_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RequestCancelWorkflowExecution_Result
// struct.
func (v *WorkflowService_RequestCancelWorkflowExecution_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [9]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.CancellationAlreadyRequestedError != nil {
		fields[i] = fmt.Sprintf("CancellationAlreadyRequestedError: %v", v.CancellationAlreadyRequestedError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError)
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_RequestCancelWorkflowExecution_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RequestCancelWorkflowExecution_Result match the
// provided WorkflowService_RequestCancelWorkflowExecution_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_RequestCancelWorkflowExecution_Result) Equals(rhs *WorkflowService_RequestCancelWorkflowExecution_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.CancellationAlreadyRequestedError == nil && rhs.CancellationAlreadyRequestedError == nil) || (v.CancellationAlreadyRequestedError != nil && rhs.CancellationAlreadyRequestedError != nil && v.CancellationAlreadyRequestedError.Equals(rhs.CancellationAlreadyRequestedError))) {
		return false
	}
	if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) {
		return false
	}
	if !((v.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) {
		return false
	}
	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_RequestCancelWorkflowExecution_Result.
func (v *WorkflowService_RequestCancelWorkflowExecution_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.CancellationAlreadyRequestedError != nil {
		err = multierr.Append(err, enc.AddObject("cancellationAlreadyRequestedError", v.CancellationAlreadyRequestedError))
	}
	if v.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.ClientVersionNotSupportedError != nil {
		err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError))
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError))
	}
	if v.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RequestCancelWorkflowExecution_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_RequestCancelWorkflowExecution_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_RequestCancelWorkflowExecution_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_RequestCancelWorkflowExecution_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetCancellationAlreadyRequestedError returns the value of CancellationAlreadyRequestedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RequestCancelWorkflowExecution_Result) GetCancellationAlreadyRequestedError() (o *shared.CancellationAlreadyRequestedError) {
	if v != nil && v.CancellationAlreadyRequestedError != nil {
		return v.CancellationAlreadyRequestedError
	}

	return
}

// IsSetCancellationAlreadyRequestedError returns true if CancellationAlreadyRequestedError is not nil.
func (v *WorkflowService_RequestCancelWorkflowExecution_Result) IsSetCancellationAlreadyRequestedError() bool {
	return v != nil && v.CancellationAlreadyRequestedError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RequestCancelWorkflowExecution_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_RequestCancelWorkflowExecution_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RequestCancelWorkflowExecution_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_RequestCancelWorkflowExecution_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RequestCancelWorkflowExecution_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_RequestCancelWorkflowExecution_Result) IsSetLimitExceededError() bool {
	return v != nil && v.LimitExceededError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RequestCancelWorkflowExecution_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_RequestCancelWorkflowExecution_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RequestCancelWorkflowExecution_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) {
	if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil {
		return v.WorkflowExecutionAlreadyCompletedError
	}

	return
}

// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil.
func (v *WorkflowService_RequestCancelWorkflowExecution_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool {
	return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RequestCancelWorkflowExecution_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_RequestCancelWorkflowExecution_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 "RequestCancelWorkflowExecution" for this struct.
func (v *WorkflowService_RequestCancelWorkflowExecution_Result) MethodName() string {
	return "RequestCancelWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_RequestCancelWorkflowExecution_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_ResetStickyTaskList_Args represents the arguments for the WorkflowService.ResetStickyTaskList function.
//
// The arguments for ResetStickyTaskList are sent and received over the wire as this struct.
type WorkflowService_ResetStickyTaskList_Args struct {
	ResetRequest *shared.ResetStickyTaskListRequest `json:"resetRequest,omitempty"`
}

// ToWire translates a WorkflowService_ResetStickyTaskList_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_ResetStickyTaskList_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.ResetRequest != nil {
		w, err = v.ResetRequest.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 _ResetStickyTaskListRequest_Read(w wire.Value) (*shared.ResetStickyTaskListRequest, error) {
	var v shared.ResetStickyTaskListRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_ResetStickyTaskList_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_ResetStickyTaskList_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ResetStickyTaskList_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_ResetStickyTaskList_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.ResetRequest, err = _ResetStickyTaskListRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_ResetStickyTaskList_Args
// struct.
func (v *WorkflowService_ResetStickyTaskList_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.ResetRequest != nil {
		fields[i] = fmt.Sprintf("ResetRequest: %v", v.ResetRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_ResetStickyTaskList_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_ResetStickyTaskList_Args match the
// provided WorkflowService_ResetStickyTaskList_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_ResetStickyTaskList_Args) Equals(rhs *WorkflowService_ResetStickyTaskList_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.ResetRequest == nil && rhs.ResetRequest == nil) || (v.ResetRequest != nil && rhs.ResetRequest != nil && v.ResetRequest.Equals(rhs.ResetRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_ResetStickyTaskList_Args.
func (v *WorkflowService_ResetStickyTaskList_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.ResetRequest != nil {
		err = multierr.Append(err, enc.AddObject("resetRequest", v.ResetRequest))
	}
	return err
}

// GetResetRequest returns the value of ResetRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_ResetStickyTaskList_Args) GetResetRequest() (o *shared.ResetStickyTaskListRequest) {
	if v != nil && v.ResetRequest != nil {
		return v.ResetRequest
	}

	return
}

// IsSetResetRequest returns true if ResetRequest is not nil.
func (v *WorkflowService_ResetStickyTaskList_Args) IsSetResetRequest() bool {
	return v != nil && v.ResetRequest != 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 "ResetStickyTaskList" for this struct.
func (v *WorkflowService_ResetStickyTaskList_Args) MethodName() string {
	return "ResetStickyTaskList"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_ResetStickyTaskList_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_ResetStickyTaskList_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.ResetStickyTaskList
// function.
var WorkflowService_ResetStickyTaskList_Helper = struct {
	// Args accepts the parameters of ResetStickyTaskList in-order and returns
	// the arguments struct for the function.
	Args func(
		resetRequest *shared.ResetStickyTaskListRequest,
	) *WorkflowService_ResetStickyTaskList_Args

	// IsException returns true if the given error can be thrown
	// by ResetStickyTaskList.
	//
	// An error can be thrown by ResetStickyTaskList 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 ResetStickyTaskList
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// ResetStickyTaskList into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by ResetStickyTaskList
	//
	//   value, err := ResetStickyTaskList(args)
	//   result, err := WorkflowService_ResetStickyTaskList_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from ResetStickyTaskList: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.ResetStickyTaskListResponse, error) (*WorkflowService_ResetStickyTaskList_Result, error)

	// UnwrapResponse takes the result struct for ResetStickyTaskList
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if ResetStickyTaskList threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_ResetStickyTaskList_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_ResetStickyTaskList_Result) (*shared.ResetStickyTaskListResponse, error)
}{}

func init() {
	WorkflowService_ResetStickyTaskList_Helper.Args = func(
		resetRequest *shared.ResetStickyTaskListRequest,
	) *WorkflowService_ResetStickyTaskList_Args {
		return &WorkflowService_ResetStickyTaskList_Args{
			ResetRequest: resetRequest,
		}
	}

	WorkflowService_ResetStickyTaskList_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.DomainNotActiveError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.WorkflowExecutionAlreadyCompletedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_ResetStickyTaskList_Helper.WrapResponse = func(success *shared.ResetStickyTaskListResponse, err error) (*WorkflowService_ResetStickyTaskList_Result, error) {
		if err == nil {
			return &WorkflowService_ResetStickyTaskList_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_ResetStickyTaskList_Result.BadRequestError")
			}
			return &WorkflowService_ResetStickyTaskList_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_ResetStickyTaskList_Result.EntityNotExistError")
			}
			return &WorkflowService_ResetStickyTaskList_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_ResetStickyTaskList_Result.LimitExceededError")
			}
			return &WorkflowService_ResetStickyTaskList_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_ResetStickyTaskList_Result.ServiceBusyError")
			}
			return &WorkflowService_ResetStickyTaskList_Result{ServiceBusyError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ResetStickyTaskList_Result.DomainNotActiveError")
			}
			return &WorkflowService_ResetStickyTaskList_Result{DomainNotActiveError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ResetStickyTaskList_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_ResetStickyTaskList_Result{ClientVersionNotSupportedError: e}, nil
		case *shared.WorkflowExecutionAlreadyCompletedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ResetStickyTaskList_Result.WorkflowExecutionAlreadyCompletedError")
			}
			return &WorkflowService_ResetStickyTaskList_Result{WorkflowExecutionAlreadyCompletedError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ResetStickyTaskList_Result.AccessDeniedError")
			}
			return &WorkflowService_ResetStickyTaskList_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_ResetStickyTaskList_Helper.UnwrapResponse = func(result *WorkflowService_ResetStickyTaskList_Result) (success *shared.ResetStickyTaskListResponse, 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.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.ClientVersionNotSupportedError != nil {
			err = result.ClientVersionNotSupportedError
			return
		}
		if result.WorkflowExecutionAlreadyCompletedError != nil {
			err = result.WorkflowExecutionAlreadyCompletedError
			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_ResetStickyTaskList_Result represents the result of a WorkflowService.ResetStickyTaskList function call.
//
// The result of a ResetStickyTaskList 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_ResetStickyTaskList_Result struct {
	// Value returned by ResetStickyTaskList after a successful execution.
	Success                                *shared.ResetStickyTaskListResponse            `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"`
	DomainNotActiveError                   *shared.DomainNotActiveError                   `json:"domainNotActiveError,omitempty"`
	ClientVersionNotSupportedError         *shared.ClientVersionNotSupportedError         `json:"clientVersionNotSupportedError,omitempty"`
	WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"`
	AccessDeniedError                      *shared.AccessDeniedError                      `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_ResetStickyTaskList_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_ResetStickyTaskList_Result) ToWire() (wire.Value, error) {
	var (
		fields [9]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: 3, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_ResetStickyTaskList_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _ResetStickyTaskListResponse_Read(w wire.Value) (*shared.ResetStickyTaskListResponse, error) {
	var v shared.ResetStickyTaskListResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_ResetStickyTaskList_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_ResetStickyTaskList_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ResetStickyTaskList_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_ResetStickyTaskList_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 = _ResetStickyTaskListResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			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.DomainNotActiveError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_ResetStickyTaskList_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_ResetStickyTaskList_Result
// struct.
func (v *WorkflowService_ResetStickyTaskList_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [9]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.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError)
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_ResetStickyTaskList_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_ResetStickyTaskList_Result match the
// provided WorkflowService_ResetStickyTaskList_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_ResetStickyTaskList_Result) Equals(rhs *WorkflowService_ResetStickyTaskList_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.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) {
		return false
	}
	if !((v.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) {
		return false
	}
	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_ResetStickyTaskList_Result.
func (v *WorkflowService_ResetStickyTaskList_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.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.ClientVersionNotSupportedError != nil {
		err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError))
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError))
	}
	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_ResetStickyTaskList_Result) GetSuccess() (o *shared.ResetStickyTaskListResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_ResetStickyTaskList_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_ResetStickyTaskList_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_ResetStickyTaskList_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_ResetStickyTaskList_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_ResetStickyTaskList_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_ResetStickyTaskList_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_ResetStickyTaskList_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_ResetStickyTaskList_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_ResetStickyTaskList_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_ResetStickyTaskList_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_ResetStickyTaskList_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_ResetStickyTaskList_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_ResetStickyTaskList_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_ResetStickyTaskList_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) {
	if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil {
		return v.WorkflowExecutionAlreadyCompletedError
	}

	return
}

// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil.
func (v *WorkflowService_ResetStickyTaskList_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool {
	return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_ResetStickyTaskList_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_ResetStickyTaskList_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 "ResetStickyTaskList" for this struct.
func (v *WorkflowService_ResetStickyTaskList_Result) MethodName() string {
	return "ResetStickyTaskList"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_ResetStickyTaskList_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_ResetWorkflowExecution_Args represents the arguments for the WorkflowService.ResetWorkflowExecution function.
//
// The arguments for ResetWorkflowExecution are sent and received over the wire as this struct.
type WorkflowService_ResetWorkflowExecution_Args struct {
	ResetRequest *shared.ResetWorkflowExecutionRequest `json:"resetRequest,omitempty"`
}

// ToWire translates a WorkflowService_ResetWorkflowExecution_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_ResetWorkflowExecution_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.ResetRequest != nil {
		w, err = v.ResetRequest.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 _ResetWorkflowExecutionRequest_Read(w wire.Value) (*shared.ResetWorkflowExecutionRequest, error) {
	var v shared.ResetWorkflowExecutionRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_ResetWorkflowExecution_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_ResetWorkflowExecution_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ResetWorkflowExecution_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_ResetWorkflowExecution_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.ResetRequest, err = _ResetWorkflowExecutionRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_ResetWorkflowExecution_Args
// struct.
func (v *WorkflowService_ResetWorkflowExecution_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.ResetRequest != nil {
		fields[i] = fmt.Sprintf("ResetRequest: %v", v.ResetRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_ResetWorkflowExecution_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_ResetWorkflowExecution_Args match the
// provided WorkflowService_ResetWorkflowExecution_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_ResetWorkflowExecution_Args) Equals(rhs *WorkflowService_ResetWorkflowExecution_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.ResetRequest == nil && rhs.ResetRequest == nil) || (v.ResetRequest != nil && rhs.ResetRequest != nil && v.ResetRequest.Equals(rhs.ResetRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_ResetWorkflowExecution_Args.
func (v *WorkflowService_ResetWorkflowExecution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.ResetRequest != nil {
		err = multierr.Append(err, enc.AddObject("resetRequest", v.ResetRequest))
	}
	return err
}

// GetResetRequest returns the value of ResetRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_ResetWorkflowExecution_Args) GetResetRequest() (o *shared.ResetWorkflowExecutionRequest) {
	if v != nil && v.ResetRequest != nil {
		return v.ResetRequest
	}

	return
}

// IsSetResetRequest returns true if ResetRequest is not nil.
func (v *WorkflowService_ResetWorkflowExecution_Args) IsSetResetRequest() bool {
	return v != nil && v.ResetRequest != 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 "ResetWorkflowExecution" for this struct.
func (v *WorkflowService_ResetWorkflowExecution_Args) MethodName() string {
	return "ResetWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_ResetWorkflowExecution_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_ResetWorkflowExecution_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.ResetWorkflowExecution
// function.
var WorkflowService_ResetWorkflowExecution_Helper = struct {
	// Args accepts the parameters of ResetWorkflowExecution in-order and returns
	// the arguments struct for the function.
	Args func(
		resetRequest *shared.ResetWorkflowExecutionRequest,
	) *WorkflowService_ResetWorkflowExecution_Args

	// IsException returns true if the given error can be thrown
	// by ResetWorkflowExecution.
	//
	// An error can be thrown by ResetWorkflowExecution 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 ResetWorkflowExecution
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// ResetWorkflowExecution into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by ResetWorkflowExecution
	//
	//   value, err := ResetWorkflowExecution(args)
	//   result, err := WorkflowService_ResetWorkflowExecution_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from ResetWorkflowExecution: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.ResetWorkflowExecutionResponse, error) (*WorkflowService_ResetWorkflowExecution_Result, error)

	// UnwrapResponse takes the result struct for ResetWorkflowExecution
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if ResetWorkflowExecution threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_ResetWorkflowExecution_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_ResetWorkflowExecution_Result) (*shared.ResetWorkflowExecutionResponse, error)
}{}

func init() {
	WorkflowService_ResetWorkflowExecution_Helper.Args = func(
		resetRequest *shared.ResetWorkflowExecutionRequest,
	) *WorkflowService_ResetWorkflowExecution_Args {
		return &WorkflowService_ResetWorkflowExecution_Args{
			ResetRequest: resetRequest,
		}
	}

	WorkflowService_ResetWorkflowExecution_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_ResetWorkflowExecution_Helper.WrapResponse = func(success *shared.ResetWorkflowExecutionResponse, err error) (*WorkflowService_ResetWorkflowExecution_Result, error) {
		if err == nil {
			return &WorkflowService_ResetWorkflowExecution_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_ResetWorkflowExecution_Result.BadRequestError")
			}
			return &WorkflowService_ResetWorkflowExecution_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_ResetWorkflowExecution_Result.EntityNotExistError")
			}
			return &WorkflowService_ResetWorkflowExecution_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_ResetWorkflowExecution_Result.ServiceBusyError")
			}
			return &WorkflowService_ResetWorkflowExecution_Result{ServiceBusyError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ResetWorkflowExecution_Result.DomainNotActiveError")
			}
			return &WorkflowService_ResetWorkflowExecution_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ResetWorkflowExecution_Result.LimitExceededError")
			}
			return &WorkflowService_ResetWorkflowExecution_Result{LimitExceededError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_ResetWorkflowExecution_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_ResetWorkflowExecution_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_ResetWorkflowExecution_Result.AccessDeniedError")
			}
			return &WorkflowService_ResetWorkflowExecution_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_ResetWorkflowExecution_Helper.UnwrapResponse = func(result *WorkflowService_ResetWorkflowExecution_Result) (success *shared.ResetWorkflowExecutionResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.LimitExceededError != nil {
			err = result.LimitExceededError
			return
		}
		if result.ClientVersionNotSupportedError != nil {
			err = result.ClientVersionNotSupportedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// WorkflowService_ResetWorkflowExecution_Result represents the result of a WorkflowService.ResetWorkflowExecution function call.
//
// The result of a ResetWorkflowExecution 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_ResetWorkflowExecution_Result struct {
	// Value returned by ResetWorkflowExecution after a successful execution.
	Success                        *shared.ResetWorkflowExecutionResponse `json:"success,omitempty"`
	BadRequestError                *shared.BadRequestError                `json:"badRequestError,omitempty"`
	EntityNotExistError            *shared.EntityNotExistsError           `json:"entityNotExistError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError               `json:"serviceBusyError,omitempty"`
	DomainNotActiveError           *shared.DomainNotActiveError           `json:"domainNotActiveError,omitempty"`
	LimitExceededError             *shared.LimitExceededError             `json:"limitExceededError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"`
	AccessDeniedError              *shared.AccessDeniedError              `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_ResetWorkflowExecution_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_ResetWorkflowExecution_Result) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_ResetWorkflowExecution_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _ResetWorkflowExecutionResponse_Read(w wire.Value) (*shared.ResetWorkflowExecutionResponse, error) {
	var v shared.ResetWorkflowExecutionResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_ResetWorkflowExecution_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_ResetWorkflowExecution_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ResetWorkflowExecution_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_ResetWorkflowExecution_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 = _ResetWorkflowExecutionResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.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.ServiceBusyError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_ResetWorkflowExecution_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_ResetWorkflowExecution_Result
// struct.
func (v *WorkflowService_ResetWorkflowExecution_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_ResetWorkflowExecution_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_ResetWorkflowExecution_Result match the
// provided WorkflowService_ResetWorkflowExecution_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_ResetWorkflowExecution_Result) Equals(rhs *WorkflowService_ResetWorkflowExecution_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.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) {
		return false
	}
	if !((v.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_ResetWorkflowExecution_Result.
func (v *WorkflowService_ResetWorkflowExecution_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.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.ClientVersionNotSupportedError != nil {
		err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError))
	}
	if v.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_ResetWorkflowExecution_Result) GetSuccess() (o *shared.ResetWorkflowExecutionResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_ResetWorkflowExecution_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_ResetWorkflowExecution_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_ResetWorkflowExecution_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_ResetWorkflowExecution_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_ResetWorkflowExecution_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_ResetWorkflowExecution_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_ResetWorkflowExecution_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_ResetWorkflowExecution_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_ResetWorkflowExecution_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_ResetWorkflowExecution_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_ResetWorkflowExecution_Result) IsSetLimitExceededError() bool {
	return v != nil && v.LimitExceededError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_ResetWorkflowExecution_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_ResetWorkflowExecution_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_ResetWorkflowExecution_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_ResetWorkflowExecution_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 "ResetWorkflowExecution" for this struct.
func (v *WorkflowService_ResetWorkflowExecution_Result) MethodName() string {
	return "ResetWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_ResetWorkflowExecution_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_RespondActivityTaskCanceled_Args represents the arguments for the WorkflowService.RespondActivityTaskCanceled function.
//
// The arguments for RespondActivityTaskCanceled are sent and received over the wire as this struct.
type WorkflowService_RespondActivityTaskCanceled_Args struct {
	CanceledRequest *shared.RespondActivityTaskCanceledRequest `json:"canceledRequest,omitempty"`
}

// ToWire translates a WorkflowService_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.CanceledRequest != nil {
		w, err = v.CanceledRequest.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 _RespondActivityTaskCanceledRequest_Read(w wire.Value) (*shared.RespondActivityTaskCanceledRequest, error) {
	var v shared.RespondActivityTaskCanceledRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondActivityTaskCanceled_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondActivityTaskCanceled_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.CanceledRequest, err = _RespondActivityTaskCanceledRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondActivityTaskCanceled_Args
// struct.
func (v *WorkflowService_RespondActivityTaskCanceled_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.CanceledRequest != nil {
		fields[i] = fmt.Sprintf("CanceledRequest: %v", v.CanceledRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondActivityTaskCanceled_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondActivityTaskCanceled_Args match the
// provided WorkflowService_RespondActivityTaskCanceled_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondActivityTaskCanceled_Args) Equals(rhs *WorkflowService_RespondActivityTaskCanceled_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.CanceledRequest == nil && rhs.CanceledRequest == nil) || (v.CanceledRequest != nil && rhs.CanceledRequest != nil && v.CanceledRequest.Equals(rhs.CanceledRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_RespondActivityTaskCanceled_Args.
func (v *WorkflowService_RespondActivityTaskCanceled_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.CanceledRequest != nil {
		err = multierr.Append(err, enc.AddObject("canceledRequest", v.CanceledRequest))
	}
	return err
}

// GetCanceledRequest returns the value of CanceledRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCanceled_Args) GetCanceledRequest() (o *shared.RespondActivityTaskCanceledRequest) {
	if v != nil && v.CanceledRequest != nil {
		return v.CanceledRequest
	}

	return
}

// IsSetCanceledRequest returns true if CanceledRequest is not nil.
func (v *WorkflowService_RespondActivityTaskCanceled_Args) IsSetCanceledRequest() bool {
	return v != nil && v.CanceledRequest != 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 "RespondActivityTaskCanceled" for this struct.
func (v *WorkflowService_RespondActivityTaskCanceled_Args) MethodName() string {
	return "RespondActivityTaskCanceled"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_RespondActivityTaskCanceled_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_RespondActivityTaskCanceled_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.RespondActivityTaskCanceled
// function.
var WorkflowService_RespondActivityTaskCanceled_Helper = struct {
	// Args accepts the parameters of RespondActivityTaskCanceled in-order and returns
	// the arguments struct for the function.
	Args func(
		canceledRequest *shared.RespondActivityTaskCanceledRequest,
	) *WorkflowService_RespondActivityTaskCanceled_Args

	// IsException returns true if the given error can be thrown
	// by RespondActivityTaskCanceled.
	//
	// An error can be thrown by RespondActivityTaskCanceled 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 RespondActivityTaskCanceled
	// given the error returned by it. The provided error may
	// be nil if RespondActivityTaskCanceled did not fail.
	//
	// This allows mapping errors returned by RespondActivityTaskCanceled into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// RespondActivityTaskCanceled
	//
	//   err := RespondActivityTaskCanceled(args)
	//   result, err := WorkflowService_RespondActivityTaskCanceled_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RespondActivityTaskCanceled: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*WorkflowService_RespondActivityTaskCanceled_Result, error)

	// UnwrapResponse takes the result struct for RespondActivityTaskCanceled
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if RespondActivityTaskCanceled threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := WorkflowService_RespondActivityTaskCanceled_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_RespondActivityTaskCanceled_Result) error
}{}

func init() {
	WorkflowService_RespondActivityTaskCanceled_Helper.Args = func(
		canceledRequest *shared.RespondActivityTaskCanceledRequest,
	) *WorkflowService_RespondActivityTaskCanceled_Args {
		return &WorkflowService_RespondActivityTaskCanceled_Args{
			CanceledRequest: canceledRequest,
		}
	}

	WorkflowService_RespondActivityTaskCanceled_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.WorkflowExecutionAlreadyCompletedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_RespondActivityTaskCanceled_Helper.WrapResponse = func(err error) (*WorkflowService_RespondActivityTaskCanceled_Result, error) {
		if err == nil {
			return &WorkflowService_RespondActivityTaskCanceled_Result{}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCanceled_Result.BadRequestError")
			}
			return &WorkflowService_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_Result.EntityNotExistError")
			}
			return &WorkflowService_RespondActivityTaskCanceled_Result{EntityNotExistError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCanceled_Result.DomainNotActiveError")
			}
			return &WorkflowService_RespondActivityTaskCanceled_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCanceled_Result.LimitExceededError")
			}
			return &WorkflowService_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_Result.ServiceBusyError")
			}
			return &WorkflowService_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_RespondActivityTaskCanceled_Result{ClientVersionNotSupportedError: e}, nil
		case *shared.WorkflowExecutionAlreadyCompletedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCanceled_Result.WorkflowExecutionAlreadyCompletedError")
			}
			return &WorkflowService_RespondActivityTaskCanceled_Result{WorkflowExecutionAlreadyCompletedError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCanceled_Result.AccessDeniedError")
			}
			return &WorkflowService_RespondActivityTaskCanceled_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_RespondActivityTaskCanceled_Helper.UnwrapResponse = func(result *WorkflowService_RespondActivityTaskCanceled_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			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.WorkflowExecutionAlreadyCompletedError != nil {
			err = result.WorkflowExecutionAlreadyCompletedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// WorkflowService_RespondActivityTaskCanceled_Result represents the result of a WorkflowService.RespondActivityTaskCanceled function call.
//
// The result of a RespondActivityTaskCanceled execution is sent and received over the wire as this struct.
type WorkflowService_RespondActivityTaskCanceled_Result struct {
	BadRequestError                        *shared.BadRequestError                        `json:"badRequestError,omitempty"`
	EntityNotExistError                    *shared.EntityNotExistsError                   `json:"entityNotExistError,omitempty"`
	DomainNotActiveError                   *shared.DomainNotActiveError                   `json:"domainNotActiveError,omitempty"`
	LimitExceededError                     *shared.LimitExceededError                     `json:"limitExceededError,omitempty"`
	ServiceBusyError                       *shared.ServiceBusyError                       `json:"serviceBusyError,omitempty"`
	ClientVersionNotSupportedError         *shared.ClientVersionNotSupportedError         `json:"clientVersionNotSupportedError,omitempty"`
	WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"`
	AccessDeniedError                      *shared.AccessDeniedError                      `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_Result) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_RespondActivityTaskCanceled_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a WorkflowService_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondActivityTaskCanceled_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondActivityTaskCanceled_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			if field.Value.Type() == wire.TStruct {
				v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("WorkflowService_RespondActivityTaskCanceled_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondActivityTaskCanceled_Result
// struct.
func (v *WorkflowService_RespondActivityTaskCanceled_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondActivityTaskCanceled_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondActivityTaskCanceled_Result match the
// provided WorkflowService_RespondActivityTaskCanceled_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondActivityTaskCanceled_Result) Equals(rhs *WorkflowService_RespondActivityTaskCanceled_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.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.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) {
		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_RespondActivityTaskCanceled_Result.
func (v *WorkflowService_RespondActivityTaskCanceled_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError))
	}
	if v.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCanceled_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_RespondActivityTaskCanceled_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCanceled_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) {
	if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil {
		return v.WorkflowExecutionAlreadyCompletedError
	}

	return
}

// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil.
func (v *WorkflowService_RespondActivityTaskCanceled_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool {
	return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCanceled_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_RespondActivityTaskCanceled_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 "RespondActivityTaskCanceled" for this struct.
func (v *WorkflowService_RespondActivityTaskCanceled_Result) MethodName() string {
	return "RespondActivityTaskCanceled"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_RespondActivityTaskCanceled_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_RespondActivityTaskCanceledByID_Args represents the arguments for the WorkflowService.RespondActivityTaskCanceledByID function.
//
// The arguments for RespondActivityTaskCanceledByID are sent and received over the wire as this struct.
type WorkflowService_RespondActivityTaskCanceledByID_Args struct {
	CanceledRequest *shared.RespondActivityTaskCanceledByIDRequest `json:"canceledRequest,omitempty"`
}

// ToWire translates a WorkflowService_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.CanceledRequest != nil {
		w, err = v.CanceledRequest.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 _RespondActivityTaskCanceledByIDRequest_Read(w wire.Value) (*shared.RespondActivityTaskCanceledByIDRequest, error) {
	var v shared.RespondActivityTaskCanceledByIDRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondActivityTaskCanceledByID_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondActivityTaskCanceledByID_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.CanceledRequest, err = _RespondActivityTaskCanceledByIDRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondActivityTaskCanceledByID_Args
// struct.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.CanceledRequest != nil {
		fields[i] = fmt.Sprintf("CanceledRequest: %v", v.CanceledRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondActivityTaskCanceledByID_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondActivityTaskCanceledByID_Args match the
// provided WorkflowService_RespondActivityTaskCanceledByID_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Args) Equals(rhs *WorkflowService_RespondActivityTaskCanceledByID_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.CanceledRequest == nil && rhs.CanceledRequest == nil) || (v.CanceledRequest != nil && rhs.CanceledRequest != nil && v.CanceledRequest.Equals(rhs.CanceledRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_RespondActivityTaskCanceledByID_Args.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.CanceledRequest != nil {
		err = multierr.Append(err, enc.AddObject("canceledRequest", v.CanceledRequest))
	}
	return err
}

// GetCanceledRequest returns the value of CanceledRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Args) GetCanceledRequest() (o *shared.RespondActivityTaskCanceledByIDRequest) {
	if v != nil && v.CanceledRequest != nil {
		return v.CanceledRequest
	}

	return
}

// IsSetCanceledRequest returns true if CanceledRequest is not nil.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Args) IsSetCanceledRequest() bool {
	return v != nil && v.CanceledRequest != 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 "RespondActivityTaskCanceledByID" for this struct.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Args) MethodName() string {
	return "RespondActivityTaskCanceledByID"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_RespondActivityTaskCanceledByID_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.RespondActivityTaskCanceledByID
// function.
var WorkflowService_RespondActivityTaskCanceledByID_Helper = struct {
	// Args accepts the parameters of RespondActivityTaskCanceledByID in-order and returns
	// the arguments struct for the function.
	Args func(
		canceledRequest *shared.RespondActivityTaskCanceledByIDRequest,
	) *WorkflowService_RespondActivityTaskCanceledByID_Args

	// IsException returns true if the given error can be thrown
	// by RespondActivityTaskCanceledByID.
	//
	// An error can be thrown by RespondActivityTaskCanceledByID 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 RespondActivityTaskCanceledByID
	// given the error returned by it. The provided error may
	// be nil if RespondActivityTaskCanceledByID did not fail.
	//
	// This allows mapping errors returned by RespondActivityTaskCanceledByID into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// RespondActivityTaskCanceledByID
	//
	//   err := RespondActivityTaskCanceledByID(args)
	//   result, err := WorkflowService_RespondActivityTaskCanceledByID_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RespondActivityTaskCanceledByID: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*WorkflowService_RespondActivityTaskCanceledByID_Result, error)

	// UnwrapResponse takes the result struct for RespondActivityTaskCanceledByID
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if RespondActivityTaskCanceledByID threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := WorkflowService_RespondActivityTaskCanceledByID_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_RespondActivityTaskCanceledByID_Result) error
}{}

func init() {
	WorkflowService_RespondActivityTaskCanceledByID_Helper.Args = func(
		canceledRequest *shared.RespondActivityTaskCanceledByIDRequest,
	) *WorkflowService_RespondActivityTaskCanceledByID_Args {
		return &WorkflowService_RespondActivityTaskCanceledByID_Args{
			CanceledRequest: canceledRequest,
		}
	}

	WorkflowService_RespondActivityTaskCanceledByID_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.WorkflowExecutionAlreadyCompletedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_RespondActivityTaskCanceledByID_Helper.WrapResponse = func(err error) (*WorkflowService_RespondActivityTaskCanceledByID_Result, error) {
		if err == nil {
			return &WorkflowService_RespondActivityTaskCanceledByID_Result{}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCanceledByID_Result.BadRequestError")
			}
			return &WorkflowService_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_Result.EntityNotExistError")
			}
			return &WorkflowService_RespondActivityTaskCanceledByID_Result{EntityNotExistError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCanceledByID_Result.DomainNotActiveError")
			}
			return &WorkflowService_RespondActivityTaskCanceledByID_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCanceledByID_Result.LimitExceededError")
			}
			return &WorkflowService_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_Result.ServiceBusyError")
			}
			return &WorkflowService_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_RespondActivityTaskCanceledByID_Result{ClientVersionNotSupportedError: e}, nil
		case *shared.WorkflowExecutionAlreadyCompletedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCanceledByID_Result.WorkflowExecutionAlreadyCompletedError")
			}
			return &WorkflowService_RespondActivityTaskCanceledByID_Result{WorkflowExecutionAlreadyCompletedError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCanceledByID_Result.AccessDeniedError")
			}
			return &WorkflowService_RespondActivityTaskCanceledByID_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_RespondActivityTaskCanceledByID_Helper.UnwrapResponse = func(result *WorkflowService_RespondActivityTaskCanceledByID_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			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.WorkflowExecutionAlreadyCompletedError != nil {
			err = result.WorkflowExecutionAlreadyCompletedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// WorkflowService_RespondActivityTaskCanceledByID_Result represents the result of a WorkflowService.RespondActivityTaskCanceledByID function call.
//
// The result of a RespondActivityTaskCanceledByID execution is sent and received over the wire as this struct.
type WorkflowService_RespondActivityTaskCanceledByID_Result struct {
	BadRequestError                        *shared.BadRequestError                        `json:"badRequestError,omitempty"`
	EntityNotExistError                    *shared.EntityNotExistsError                   `json:"entityNotExistError,omitempty"`
	DomainNotActiveError                   *shared.DomainNotActiveError                   `json:"domainNotActiveError,omitempty"`
	LimitExceededError                     *shared.LimitExceededError                     `json:"limitExceededError,omitempty"`
	ServiceBusyError                       *shared.ServiceBusyError                       `json:"serviceBusyError,omitempty"`
	ClientVersionNotSupportedError         *shared.ClientVersionNotSupportedError         `json:"clientVersionNotSupportedError,omitempty"`
	WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"`
	AccessDeniedError                      *shared.AccessDeniedError                      `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_Result) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_RespondActivityTaskCanceledByID_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a WorkflowService_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondActivityTaskCanceledByID_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondActivityTaskCanceledByID_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			if field.Value.Type() == wire.TStruct {
				v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("WorkflowService_RespondActivityTaskCanceledByID_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondActivityTaskCanceledByID_Result
// struct.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondActivityTaskCanceledByID_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondActivityTaskCanceledByID_Result match the
// provided WorkflowService_RespondActivityTaskCanceledByID_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Result) Equals(rhs *WorkflowService_RespondActivityTaskCanceledByID_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.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.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) {
		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_RespondActivityTaskCanceledByID_Result.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError))
	}
	if v.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) {
	if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil {
		return v.WorkflowExecutionAlreadyCompletedError
	}

	return
}

// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool {
	return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCanceledByID_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_RespondActivityTaskCanceledByID_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 "RespondActivityTaskCanceledByID" for this struct.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Result) MethodName() string {
	return "RespondActivityTaskCanceledByID"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_RespondActivityTaskCanceledByID_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_RespondActivityTaskCompleted_Args represents the arguments for the WorkflowService.RespondActivityTaskCompleted function.
//
// The arguments for RespondActivityTaskCompleted are sent and received over the wire as this struct.
type WorkflowService_RespondActivityTaskCompleted_Args struct {
	CompleteRequest *shared.RespondActivityTaskCompletedRequest `json:"completeRequest,omitempty"`
}

// ToWire translates a WorkflowService_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.CompleteRequest != nil {
		w, err = v.CompleteRequest.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 _RespondActivityTaskCompletedRequest_Read(w wire.Value) (*shared.RespondActivityTaskCompletedRequest, error) {
	var v shared.RespondActivityTaskCompletedRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondActivityTaskCompleted_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondActivityTaskCompleted_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.CompleteRequest, err = _RespondActivityTaskCompletedRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondActivityTaskCompleted_Args
// struct.
func (v *WorkflowService_RespondActivityTaskCompleted_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.CompleteRequest != nil {
		fields[i] = fmt.Sprintf("CompleteRequest: %v", v.CompleteRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondActivityTaskCompleted_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondActivityTaskCompleted_Args match the
// provided WorkflowService_RespondActivityTaskCompleted_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondActivityTaskCompleted_Args) Equals(rhs *WorkflowService_RespondActivityTaskCompleted_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.CompleteRequest == nil && rhs.CompleteRequest == nil) || (v.CompleteRequest != nil && rhs.CompleteRequest != nil && v.CompleteRequest.Equals(rhs.CompleteRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_RespondActivityTaskCompleted_Args.
func (v *WorkflowService_RespondActivityTaskCompleted_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.CompleteRequest != nil {
		err = multierr.Append(err, enc.AddObject("completeRequest", v.CompleteRequest))
	}
	return err
}

// GetCompleteRequest returns the value of CompleteRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCompleted_Args) GetCompleteRequest() (o *shared.RespondActivityTaskCompletedRequest) {
	if v != nil && v.CompleteRequest != nil {
		return v.CompleteRequest
	}

	return
}

// IsSetCompleteRequest returns true if CompleteRequest is not nil.
func (v *WorkflowService_RespondActivityTaskCompleted_Args) IsSetCompleteRequest() bool {
	return v != nil && v.CompleteRequest != 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 "RespondActivityTaskCompleted" for this struct.
func (v *WorkflowService_RespondActivityTaskCompleted_Args) MethodName() string {
	return "RespondActivityTaskCompleted"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_RespondActivityTaskCompleted_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_RespondActivityTaskCompleted_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.RespondActivityTaskCompleted
// function.
var WorkflowService_RespondActivityTaskCompleted_Helper = struct {
	// Args accepts the parameters of RespondActivityTaskCompleted in-order and returns
	// the arguments struct for the function.
	Args func(
		completeRequest *shared.RespondActivityTaskCompletedRequest,
	) *WorkflowService_RespondActivityTaskCompleted_Args

	// IsException returns true if the given error can be thrown
	// by RespondActivityTaskCompleted.
	//
	// An error can be thrown by RespondActivityTaskCompleted 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 RespondActivityTaskCompleted
	// given the error returned by it. The provided error may
	// be nil if RespondActivityTaskCompleted did not fail.
	//
	// This allows mapping errors returned by RespondActivityTaskCompleted into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// RespondActivityTaskCompleted
	//
	//   err := RespondActivityTaskCompleted(args)
	//   result, err := WorkflowService_RespondActivityTaskCompleted_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RespondActivityTaskCompleted: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*WorkflowService_RespondActivityTaskCompleted_Result, error)

	// UnwrapResponse takes the result struct for RespondActivityTaskCompleted
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if RespondActivityTaskCompleted threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := WorkflowService_RespondActivityTaskCompleted_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_RespondActivityTaskCompleted_Result) error
}{}

func init() {
	WorkflowService_RespondActivityTaskCompleted_Helper.Args = func(
		completeRequest *shared.RespondActivityTaskCompletedRequest,
	) *WorkflowService_RespondActivityTaskCompleted_Args {
		return &WorkflowService_RespondActivityTaskCompleted_Args{
			CompleteRequest: completeRequest,
		}
	}

	WorkflowService_RespondActivityTaskCompleted_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.WorkflowExecutionAlreadyCompletedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_RespondActivityTaskCompleted_Helper.WrapResponse = func(err error) (*WorkflowService_RespondActivityTaskCompleted_Result, error) {
		if err == nil {
			return &WorkflowService_RespondActivityTaskCompleted_Result{}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCompleted_Result.BadRequestError")
			}
			return &WorkflowService_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_Result.EntityNotExistError")
			}
			return &WorkflowService_RespondActivityTaskCompleted_Result{EntityNotExistError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCompleted_Result.DomainNotActiveError")
			}
			return &WorkflowService_RespondActivityTaskCompleted_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCompleted_Result.LimitExceededError")
			}
			return &WorkflowService_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_Result.ServiceBusyError")
			}
			return &WorkflowService_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_RespondActivityTaskCompleted_Result{ClientVersionNotSupportedError: e}, nil
		case *shared.WorkflowExecutionAlreadyCompletedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCompleted_Result.WorkflowExecutionAlreadyCompletedError")
			}
			return &WorkflowService_RespondActivityTaskCompleted_Result{WorkflowExecutionAlreadyCompletedError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCompleted_Result.AccessDeniedError")
			}
			return &WorkflowService_RespondActivityTaskCompleted_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_RespondActivityTaskCompleted_Helper.UnwrapResponse = func(result *WorkflowService_RespondActivityTaskCompleted_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			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.WorkflowExecutionAlreadyCompletedError != nil {
			err = result.WorkflowExecutionAlreadyCompletedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// WorkflowService_RespondActivityTaskCompleted_Result represents the result of a WorkflowService.RespondActivityTaskCompleted function call.
//
// The result of a RespondActivityTaskCompleted execution is sent and received over the wire as this struct.
type WorkflowService_RespondActivityTaskCompleted_Result struct {
	BadRequestError                        *shared.BadRequestError                        `json:"badRequestError,omitempty"`
	EntityNotExistError                    *shared.EntityNotExistsError                   `json:"entityNotExistError,omitempty"`
	DomainNotActiveError                   *shared.DomainNotActiveError                   `json:"domainNotActiveError,omitempty"`
	LimitExceededError                     *shared.LimitExceededError                     `json:"limitExceededError,omitempty"`
	ServiceBusyError                       *shared.ServiceBusyError                       `json:"serviceBusyError,omitempty"`
	ClientVersionNotSupportedError         *shared.ClientVersionNotSupportedError         `json:"clientVersionNotSupportedError,omitempty"`
	WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"`
	AccessDeniedError                      *shared.AccessDeniedError                      `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_Result) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_RespondActivityTaskCompleted_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a WorkflowService_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondActivityTaskCompleted_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondActivityTaskCompleted_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			if field.Value.Type() == wire.TStruct {
				v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("WorkflowService_RespondActivityTaskCompleted_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondActivityTaskCompleted_Result
// struct.
func (v *WorkflowService_RespondActivityTaskCompleted_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondActivityTaskCompleted_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondActivityTaskCompleted_Result match the
// provided WorkflowService_RespondActivityTaskCompleted_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondActivityTaskCompleted_Result) Equals(rhs *WorkflowService_RespondActivityTaskCompleted_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.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.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) {
		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_RespondActivityTaskCompleted_Result.
func (v *WorkflowService_RespondActivityTaskCompleted_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError))
	}
	if v.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCompleted_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_RespondActivityTaskCompleted_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCompleted_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) {
	if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil {
		return v.WorkflowExecutionAlreadyCompletedError
	}

	return
}

// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil.
func (v *WorkflowService_RespondActivityTaskCompleted_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool {
	return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCompleted_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_RespondActivityTaskCompleted_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 "RespondActivityTaskCompleted" for this struct.
func (v *WorkflowService_RespondActivityTaskCompleted_Result) MethodName() string {
	return "RespondActivityTaskCompleted"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_RespondActivityTaskCompleted_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_RespondActivityTaskCompletedByID_Args represents the arguments for the WorkflowService.RespondActivityTaskCompletedByID function.
//
// The arguments for RespondActivityTaskCompletedByID are sent and received over the wire as this struct.
type WorkflowService_RespondActivityTaskCompletedByID_Args struct {
	CompleteRequest *shared.RespondActivityTaskCompletedByIDRequest `json:"completeRequest,omitempty"`
}

// ToWire translates a WorkflowService_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.CompleteRequest != nil {
		w, err = v.CompleteRequest.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 _RespondActivityTaskCompletedByIDRequest_Read(w wire.Value) (*shared.RespondActivityTaskCompletedByIDRequest, error) {
	var v shared.RespondActivityTaskCompletedByIDRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondActivityTaskCompletedByID_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondActivityTaskCompletedByID_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.CompleteRequest, err = _RespondActivityTaskCompletedByIDRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondActivityTaskCompletedByID_Args
// struct.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.CompleteRequest != nil {
		fields[i] = fmt.Sprintf("CompleteRequest: %v", v.CompleteRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondActivityTaskCompletedByID_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondActivityTaskCompletedByID_Args match the
// provided WorkflowService_RespondActivityTaskCompletedByID_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Args) Equals(rhs *WorkflowService_RespondActivityTaskCompletedByID_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.CompleteRequest == nil && rhs.CompleteRequest == nil) || (v.CompleteRequest != nil && rhs.CompleteRequest != nil && v.CompleteRequest.Equals(rhs.CompleteRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_RespondActivityTaskCompletedByID_Args.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.CompleteRequest != nil {
		err = multierr.Append(err, enc.AddObject("completeRequest", v.CompleteRequest))
	}
	return err
}

// GetCompleteRequest returns the value of CompleteRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Args) GetCompleteRequest() (o *shared.RespondActivityTaskCompletedByIDRequest) {
	if v != nil && v.CompleteRequest != nil {
		return v.CompleteRequest
	}

	return
}

// IsSetCompleteRequest returns true if CompleteRequest is not nil.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Args) IsSetCompleteRequest() bool {
	return v != nil && v.CompleteRequest != 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 "RespondActivityTaskCompletedByID" for this struct.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Args) MethodName() string {
	return "RespondActivityTaskCompletedByID"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_RespondActivityTaskCompletedByID_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.RespondActivityTaskCompletedByID
// function.
var WorkflowService_RespondActivityTaskCompletedByID_Helper = struct {
	// Args accepts the parameters of RespondActivityTaskCompletedByID in-order and returns
	// the arguments struct for the function.
	Args func(
		completeRequest *shared.RespondActivityTaskCompletedByIDRequest,
	) *WorkflowService_RespondActivityTaskCompletedByID_Args

	// IsException returns true if the given error can be thrown
	// by RespondActivityTaskCompletedByID.
	//
	// An error can be thrown by RespondActivityTaskCompletedByID 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 RespondActivityTaskCompletedByID
	// given the error returned by it. The provided error may
	// be nil if RespondActivityTaskCompletedByID did not fail.
	//
	// This allows mapping errors returned by RespondActivityTaskCompletedByID into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// RespondActivityTaskCompletedByID
	//
	//   err := RespondActivityTaskCompletedByID(args)
	//   result, err := WorkflowService_RespondActivityTaskCompletedByID_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RespondActivityTaskCompletedByID: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*WorkflowService_RespondActivityTaskCompletedByID_Result, error)

	// UnwrapResponse takes the result struct for RespondActivityTaskCompletedByID
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if RespondActivityTaskCompletedByID threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := WorkflowService_RespondActivityTaskCompletedByID_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_RespondActivityTaskCompletedByID_Result) error
}{}

func init() {
	WorkflowService_RespondActivityTaskCompletedByID_Helper.Args = func(
		completeRequest *shared.RespondActivityTaskCompletedByIDRequest,
	) *WorkflowService_RespondActivityTaskCompletedByID_Args {
		return &WorkflowService_RespondActivityTaskCompletedByID_Args{
			CompleteRequest: completeRequest,
		}
	}

	WorkflowService_RespondActivityTaskCompletedByID_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.WorkflowExecutionAlreadyCompletedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_RespondActivityTaskCompletedByID_Helper.WrapResponse = func(err error) (*WorkflowService_RespondActivityTaskCompletedByID_Result, error) {
		if err == nil {
			return &WorkflowService_RespondActivityTaskCompletedByID_Result{}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCompletedByID_Result.BadRequestError")
			}
			return &WorkflowService_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_Result.EntityNotExistError")
			}
			return &WorkflowService_RespondActivityTaskCompletedByID_Result{EntityNotExistError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCompletedByID_Result.DomainNotActiveError")
			}
			return &WorkflowService_RespondActivityTaskCompletedByID_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCompletedByID_Result.LimitExceededError")
			}
			return &WorkflowService_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_Result.ServiceBusyError")
			}
			return &WorkflowService_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_RespondActivityTaskCompletedByID_Result{ClientVersionNotSupportedError: e}, nil
		case *shared.WorkflowExecutionAlreadyCompletedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCompletedByID_Result.WorkflowExecutionAlreadyCompletedError")
			}
			return &WorkflowService_RespondActivityTaskCompletedByID_Result{WorkflowExecutionAlreadyCompletedError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskCompletedByID_Result.AccessDeniedError")
			}
			return &WorkflowService_RespondActivityTaskCompletedByID_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_RespondActivityTaskCompletedByID_Helper.UnwrapResponse = func(result *WorkflowService_RespondActivityTaskCompletedByID_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			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.WorkflowExecutionAlreadyCompletedError != nil {
			err = result.WorkflowExecutionAlreadyCompletedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// WorkflowService_RespondActivityTaskCompletedByID_Result represents the result of a WorkflowService.RespondActivityTaskCompletedByID function call.
//
// The result of a RespondActivityTaskCompletedByID execution is sent and received over the wire as this struct.
type WorkflowService_RespondActivityTaskCompletedByID_Result struct {
	BadRequestError                        *shared.BadRequestError                        `json:"badRequestError,omitempty"`
	EntityNotExistError                    *shared.EntityNotExistsError                   `json:"entityNotExistError,omitempty"`
	DomainNotActiveError                   *shared.DomainNotActiveError                   `json:"domainNotActiveError,omitempty"`
	LimitExceededError                     *shared.LimitExceededError                     `json:"limitExceededError,omitempty"`
	ServiceBusyError                       *shared.ServiceBusyError                       `json:"serviceBusyError,omitempty"`
	ClientVersionNotSupportedError         *shared.ClientVersionNotSupportedError         `json:"clientVersionNotSupportedError,omitempty"`
	WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"`
	AccessDeniedError                      *shared.AccessDeniedError                      `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_Result) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_RespondActivityTaskCompletedByID_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a WorkflowService_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondActivityTaskCompletedByID_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondActivityTaskCompletedByID_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			if field.Value.Type() == wire.TStruct {
				v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("WorkflowService_RespondActivityTaskCompletedByID_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondActivityTaskCompletedByID_Result
// struct.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondActivityTaskCompletedByID_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondActivityTaskCompletedByID_Result match the
// provided WorkflowService_RespondActivityTaskCompletedByID_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Result) Equals(rhs *WorkflowService_RespondActivityTaskCompletedByID_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.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.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) {
		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_RespondActivityTaskCompletedByID_Result.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError))
	}
	if v.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) {
	if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil {
		return v.WorkflowExecutionAlreadyCompletedError
	}

	return
}

// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool {
	return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskCompletedByID_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_RespondActivityTaskCompletedByID_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 "RespondActivityTaskCompletedByID" for this struct.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Result) MethodName() string {
	return "RespondActivityTaskCompletedByID"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_RespondActivityTaskCompletedByID_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_RespondActivityTaskFailed_Args represents the arguments for the WorkflowService.RespondActivityTaskFailed function.
//
// The arguments for RespondActivityTaskFailed are sent and received over the wire as this struct.
type WorkflowService_RespondActivityTaskFailed_Args struct {
	FailRequest *shared.RespondActivityTaskFailedRequest `json:"failRequest,omitempty"`
}

// ToWire translates a WorkflowService_RespondActivityTaskFailed_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_RespondActivityTaskFailed_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.FailRequest != nil {
		w, err = v.FailRequest.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 _RespondActivityTaskFailedRequest_Read(w wire.Value) (*shared.RespondActivityTaskFailedRequest, error) {
	var v shared.RespondActivityTaskFailedRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RespondActivityTaskFailed_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_RespondActivityTaskFailed_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondActivityTaskFailed_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondActivityTaskFailed_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.FailRequest, err = _RespondActivityTaskFailedRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondActivityTaskFailed_Args
// struct.
func (v *WorkflowService_RespondActivityTaskFailed_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.FailRequest != nil {
		fields[i] = fmt.Sprintf("FailRequest: %v", v.FailRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondActivityTaskFailed_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondActivityTaskFailed_Args match the
// provided WorkflowService_RespondActivityTaskFailed_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondActivityTaskFailed_Args) Equals(rhs *WorkflowService_RespondActivityTaskFailed_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.FailRequest == nil && rhs.FailRequest == nil) || (v.FailRequest != nil && rhs.FailRequest != nil && v.FailRequest.Equals(rhs.FailRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_RespondActivityTaskFailed_Args.
func (v *WorkflowService_RespondActivityTaskFailed_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.FailRequest != nil {
		err = multierr.Append(err, enc.AddObject("failRequest", v.FailRequest))
	}
	return err
}

// GetFailRequest returns the value of FailRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskFailed_Args) GetFailRequest() (o *shared.RespondActivityTaskFailedRequest) {
	if v != nil && v.FailRequest != nil {
		return v.FailRequest
	}

	return
}

// IsSetFailRequest returns true if FailRequest is not nil.
func (v *WorkflowService_RespondActivityTaskFailed_Args) IsSetFailRequest() bool {
	return v != nil && v.FailRequest != 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 "RespondActivityTaskFailed" for this struct.
func (v *WorkflowService_RespondActivityTaskFailed_Args) MethodName() string {
	return "RespondActivityTaskFailed"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_RespondActivityTaskFailed_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_RespondActivityTaskFailed_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.RespondActivityTaskFailed
// function.
var WorkflowService_RespondActivityTaskFailed_Helper = struct {
	// Args accepts the parameters of RespondActivityTaskFailed in-order and returns
	// the arguments struct for the function.
	Args func(
		failRequest *shared.RespondActivityTaskFailedRequest,
	) *WorkflowService_RespondActivityTaskFailed_Args

	// IsException returns true if the given error can be thrown
	// by RespondActivityTaskFailed.
	//
	// An error can be thrown by RespondActivityTaskFailed 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 RespondActivityTaskFailed
	// given the error returned by it. The provided error may
	// be nil if RespondActivityTaskFailed did not fail.
	//
	// This allows mapping errors returned by RespondActivityTaskFailed into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// RespondActivityTaskFailed
	//
	//   err := RespondActivityTaskFailed(args)
	//   result, err := WorkflowService_RespondActivityTaskFailed_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RespondActivityTaskFailed: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*WorkflowService_RespondActivityTaskFailed_Result, error)

	// UnwrapResponse takes the result struct for RespondActivityTaskFailed
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if RespondActivityTaskFailed threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := WorkflowService_RespondActivityTaskFailed_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_RespondActivityTaskFailed_Result) error
}{}

func init() {
	WorkflowService_RespondActivityTaskFailed_Helper.Args = func(
		failRequest *shared.RespondActivityTaskFailedRequest,
	) *WorkflowService_RespondActivityTaskFailed_Args {
		return &WorkflowService_RespondActivityTaskFailed_Args{
			FailRequest: failRequest,
		}
	}

	WorkflowService_RespondActivityTaskFailed_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.WorkflowExecutionAlreadyCompletedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_RespondActivityTaskFailed_Helper.WrapResponse = func(err error) (*WorkflowService_RespondActivityTaskFailed_Result, error) {
		if err == nil {
			return &WorkflowService_RespondActivityTaskFailed_Result{}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskFailed_Result.BadRequestError")
			}
			return &WorkflowService_RespondActivityTaskFailed_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_RespondActivityTaskFailed_Result.EntityNotExistError")
			}
			return &WorkflowService_RespondActivityTaskFailed_Result{EntityNotExistError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskFailed_Result.DomainNotActiveError")
			}
			return &WorkflowService_RespondActivityTaskFailed_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskFailed_Result.LimitExceededError")
			}
			return &WorkflowService_RespondActivityTaskFailed_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_RespondActivityTaskFailed_Result.ServiceBusyError")
			}
			return &WorkflowService_RespondActivityTaskFailed_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_RespondActivityTaskFailed_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_RespondActivityTaskFailed_Result{ClientVersionNotSupportedError: e}, nil
		case *shared.WorkflowExecutionAlreadyCompletedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskFailed_Result.WorkflowExecutionAlreadyCompletedError")
			}
			return &WorkflowService_RespondActivityTaskFailed_Result{WorkflowExecutionAlreadyCompletedError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskFailed_Result.AccessDeniedError")
			}
			return &WorkflowService_RespondActivityTaskFailed_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_RespondActivityTaskFailed_Helper.UnwrapResponse = func(result *WorkflowService_RespondActivityTaskFailed_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			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.WorkflowExecutionAlreadyCompletedError != nil {
			err = result.WorkflowExecutionAlreadyCompletedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// WorkflowService_RespondActivityTaskFailed_Result represents the result of a WorkflowService.RespondActivityTaskFailed function call.
//
// The result of a RespondActivityTaskFailed execution is sent and received over the wire as this struct.
type WorkflowService_RespondActivityTaskFailed_Result struct {
	BadRequestError                        *shared.BadRequestError                        `json:"badRequestError,omitempty"`
	EntityNotExistError                    *shared.EntityNotExistsError                   `json:"entityNotExistError,omitempty"`
	DomainNotActiveError                   *shared.DomainNotActiveError                   `json:"domainNotActiveError,omitempty"`
	LimitExceededError                     *shared.LimitExceededError                     `json:"limitExceededError,omitempty"`
	ServiceBusyError                       *shared.ServiceBusyError                       `json:"serviceBusyError,omitempty"`
	ClientVersionNotSupportedError         *shared.ClientVersionNotSupportedError         `json:"clientVersionNotSupportedError,omitempty"`
	WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"`
	AccessDeniedError                      *shared.AccessDeniedError                      `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_RespondActivityTaskFailed_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_RespondActivityTaskFailed_Result) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_RespondActivityTaskFailed_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a WorkflowService_RespondActivityTaskFailed_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_RespondActivityTaskFailed_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondActivityTaskFailed_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondActivityTaskFailed_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			if field.Value.Type() == wire.TStruct {
				v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("WorkflowService_RespondActivityTaskFailed_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondActivityTaskFailed_Result
// struct.
func (v *WorkflowService_RespondActivityTaskFailed_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondActivityTaskFailed_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondActivityTaskFailed_Result match the
// provided WorkflowService_RespondActivityTaskFailed_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondActivityTaskFailed_Result) Equals(rhs *WorkflowService_RespondActivityTaskFailed_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.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.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) {
		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_RespondActivityTaskFailed_Result.
func (v *WorkflowService_RespondActivityTaskFailed_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError))
	}
	if v.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskFailed_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_RespondActivityTaskFailed_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_RespondActivityTaskFailed_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_RespondActivityTaskFailed_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskFailed_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_RespondActivityTaskFailed_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskFailed_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_RespondActivityTaskFailed_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_RespondActivityTaskFailed_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_RespondActivityTaskFailed_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_RespondActivityTaskFailed_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_RespondActivityTaskFailed_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskFailed_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) {
	if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil {
		return v.WorkflowExecutionAlreadyCompletedError
	}

	return
}

// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil.
func (v *WorkflowService_RespondActivityTaskFailed_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool {
	return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskFailed_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_RespondActivityTaskFailed_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 "RespondActivityTaskFailed" for this struct.
func (v *WorkflowService_RespondActivityTaskFailed_Result) MethodName() string {
	return "RespondActivityTaskFailed"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_RespondActivityTaskFailed_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_RespondActivityTaskFailedByID_Args represents the arguments for the WorkflowService.RespondActivityTaskFailedByID function.
//
// The arguments for RespondActivityTaskFailedByID are sent and received over the wire as this struct.
type WorkflowService_RespondActivityTaskFailedByID_Args struct {
	FailRequest *shared.RespondActivityTaskFailedByIDRequest `json:"failRequest,omitempty"`
}

// ToWire translates a WorkflowService_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.FailRequest != nil {
		w, err = v.FailRequest.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 _RespondActivityTaskFailedByIDRequest_Read(w wire.Value) (*shared.RespondActivityTaskFailedByIDRequest, error) {
	var v shared.RespondActivityTaskFailedByIDRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondActivityTaskFailedByID_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondActivityTaskFailedByID_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.FailRequest, err = _RespondActivityTaskFailedByIDRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondActivityTaskFailedByID_Args
// struct.
func (v *WorkflowService_RespondActivityTaskFailedByID_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.FailRequest != nil {
		fields[i] = fmt.Sprintf("FailRequest: %v", v.FailRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondActivityTaskFailedByID_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondActivityTaskFailedByID_Args match the
// provided WorkflowService_RespondActivityTaskFailedByID_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondActivityTaskFailedByID_Args) Equals(rhs *WorkflowService_RespondActivityTaskFailedByID_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.FailRequest == nil && rhs.FailRequest == nil) || (v.FailRequest != nil && rhs.FailRequest != nil && v.FailRequest.Equals(rhs.FailRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_RespondActivityTaskFailedByID_Args.
func (v *WorkflowService_RespondActivityTaskFailedByID_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.FailRequest != nil {
		err = multierr.Append(err, enc.AddObject("failRequest", v.FailRequest))
	}
	return err
}

// GetFailRequest returns the value of FailRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskFailedByID_Args) GetFailRequest() (o *shared.RespondActivityTaskFailedByIDRequest) {
	if v != nil && v.FailRequest != nil {
		return v.FailRequest
	}

	return
}

// IsSetFailRequest returns true if FailRequest is not nil.
func (v *WorkflowService_RespondActivityTaskFailedByID_Args) IsSetFailRequest() bool {
	return v != nil && v.FailRequest != 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 "RespondActivityTaskFailedByID" for this struct.
func (v *WorkflowService_RespondActivityTaskFailedByID_Args) MethodName() string {
	return "RespondActivityTaskFailedByID"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_RespondActivityTaskFailedByID_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_RespondActivityTaskFailedByID_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.RespondActivityTaskFailedByID
// function.
var WorkflowService_RespondActivityTaskFailedByID_Helper = struct {
	// Args accepts the parameters of RespondActivityTaskFailedByID in-order and returns
	// the arguments struct for the function.
	Args func(
		failRequest *shared.RespondActivityTaskFailedByIDRequest,
	) *WorkflowService_RespondActivityTaskFailedByID_Args

	// IsException returns true if the given error can be thrown
	// by RespondActivityTaskFailedByID.
	//
	// An error can be thrown by RespondActivityTaskFailedByID 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 RespondActivityTaskFailedByID
	// given the error returned by it. The provided error may
	// be nil if RespondActivityTaskFailedByID did not fail.
	//
	// This allows mapping errors returned by RespondActivityTaskFailedByID into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// RespondActivityTaskFailedByID
	//
	//   err := RespondActivityTaskFailedByID(args)
	//   result, err := WorkflowService_RespondActivityTaskFailedByID_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RespondActivityTaskFailedByID: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*WorkflowService_RespondActivityTaskFailedByID_Result, error)

	// UnwrapResponse takes the result struct for RespondActivityTaskFailedByID
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if RespondActivityTaskFailedByID threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := WorkflowService_RespondActivityTaskFailedByID_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_RespondActivityTaskFailedByID_Result) error
}{}

func init() {
	WorkflowService_RespondActivityTaskFailedByID_Helper.Args = func(
		failRequest *shared.RespondActivityTaskFailedByIDRequest,
	) *WorkflowService_RespondActivityTaskFailedByID_Args {
		return &WorkflowService_RespondActivityTaskFailedByID_Args{
			FailRequest: failRequest,
		}
	}

	WorkflowService_RespondActivityTaskFailedByID_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.WorkflowExecutionAlreadyCompletedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_RespondActivityTaskFailedByID_Helper.WrapResponse = func(err error) (*WorkflowService_RespondActivityTaskFailedByID_Result, error) {
		if err == nil {
			return &WorkflowService_RespondActivityTaskFailedByID_Result{}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskFailedByID_Result.BadRequestError")
			}
			return &WorkflowService_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_Result.EntityNotExistError")
			}
			return &WorkflowService_RespondActivityTaskFailedByID_Result{EntityNotExistError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskFailedByID_Result.DomainNotActiveError")
			}
			return &WorkflowService_RespondActivityTaskFailedByID_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskFailedByID_Result.LimitExceededError")
			}
			return &WorkflowService_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_Result.ServiceBusyError")
			}
			return &WorkflowService_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_RespondActivityTaskFailedByID_Result{ClientVersionNotSupportedError: e}, nil
		case *shared.WorkflowExecutionAlreadyCompletedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskFailedByID_Result.WorkflowExecutionAlreadyCompletedError")
			}
			return &WorkflowService_RespondActivityTaskFailedByID_Result{WorkflowExecutionAlreadyCompletedError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondActivityTaskFailedByID_Result.AccessDeniedError")
			}
			return &WorkflowService_RespondActivityTaskFailedByID_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_RespondActivityTaskFailedByID_Helper.UnwrapResponse = func(result *WorkflowService_RespondActivityTaskFailedByID_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			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.WorkflowExecutionAlreadyCompletedError != nil {
			err = result.WorkflowExecutionAlreadyCompletedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// WorkflowService_RespondActivityTaskFailedByID_Result represents the result of a WorkflowService.RespondActivityTaskFailedByID function call.
//
// The result of a RespondActivityTaskFailedByID execution is sent and received over the wire as this struct.
type WorkflowService_RespondActivityTaskFailedByID_Result struct {
	BadRequestError                        *shared.BadRequestError                        `json:"badRequestError,omitempty"`
	EntityNotExistError                    *shared.EntityNotExistsError                   `json:"entityNotExistError,omitempty"`
	DomainNotActiveError                   *shared.DomainNotActiveError                   `json:"domainNotActiveError,omitempty"`
	LimitExceededError                     *shared.LimitExceededError                     `json:"limitExceededError,omitempty"`
	ServiceBusyError                       *shared.ServiceBusyError                       `json:"serviceBusyError,omitempty"`
	ClientVersionNotSupportedError         *shared.ClientVersionNotSupportedError         `json:"clientVersionNotSupportedError,omitempty"`
	WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"`
	AccessDeniedError                      *shared.AccessDeniedError                      `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_Result) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_RespondActivityTaskFailedByID_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a WorkflowService_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondActivityTaskFailedByID_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondActivityTaskFailedByID_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			if field.Value.Type() == wire.TStruct {
				v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("WorkflowService_RespondActivityTaskFailedByID_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondActivityTaskFailedByID_Result
// struct.
func (v *WorkflowService_RespondActivityTaskFailedByID_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondActivityTaskFailedByID_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondActivityTaskFailedByID_Result match the
// provided WorkflowService_RespondActivityTaskFailedByID_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondActivityTaskFailedByID_Result) Equals(rhs *WorkflowService_RespondActivityTaskFailedByID_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.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.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) {
		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_RespondActivityTaskFailedByID_Result.
func (v *WorkflowService_RespondActivityTaskFailedByID_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError))
	}
	if v.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskFailedByID_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_RespondActivityTaskFailedByID_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskFailedByID_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) {
	if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil {
		return v.WorkflowExecutionAlreadyCompletedError
	}

	return
}

// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil.
func (v *WorkflowService_RespondActivityTaskFailedByID_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool {
	return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondActivityTaskFailedByID_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_RespondActivityTaskFailedByID_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 "RespondActivityTaskFailedByID" for this struct.
func (v *WorkflowService_RespondActivityTaskFailedByID_Result) MethodName() string {
	return "RespondActivityTaskFailedByID"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_RespondActivityTaskFailedByID_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_RespondDecisionTaskCompleted_Args represents the arguments for the WorkflowService.RespondDecisionTaskCompleted function.
//
// The arguments for RespondDecisionTaskCompleted are sent and received over the wire as this struct.
type WorkflowService_RespondDecisionTaskCompleted_Args struct {
	CompleteRequest *shared.RespondDecisionTaskCompletedRequest `json:"completeRequest,omitempty"`
}

// ToWire translates a WorkflowService_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.CompleteRequest != nil {
		w, err = v.CompleteRequest.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 _RespondDecisionTaskCompletedRequest_Read(w wire.Value) (*shared.RespondDecisionTaskCompletedRequest, error) {
	var v shared.RespondDecisionTaskCompletedRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondDecisionTaskCompleted_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondDecisionTaskCompleted_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.CompleteRequest, err = _RespondDecisionTaskCompletedRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondDecisionTaskCompleted_Args
// struct.
func (v *WorkflowService_RespondDecisionTaskCompleted_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.CompleteRequest != nil {
		fields[i] = fmt.Sprintf("CompleteRequest: %v", v.CompleteRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondDecisionTaskCompleted_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondDecisionTaskCompleted_Args match the
// provided WorkflowService_RespondDecisionTaskCompleted_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondDecisionTaskCompleted_Args) Equals(rhs *WorkflowService_RespondDecisionTaskCompleted_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.CompleteRequest == nil && rhs.CompleteRequest == nil) || (v.CompleteRequest != nil && rhs.CompleteRequest != nil && v.CompleteRequest.Equals(rhs.CompleteRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_RespondDecisionTaskCompleted_Args.
func (v *WorkflowService_RespondDecisionTaskCompleted_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.CompleteRequest != nil {
		err = multierr.Append(err, enc.AddObject("completeRequest", v.CompleteRequest))
	}
	return err
}

// GetCompleteRequest returns the value of CompleteRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondDecisionTaskCompleted_Args) GetCompleteRequest() (o *shared.RespondDecisionTaskCompletedRequest) {
	if v != nil && v.CompleteRequest != nil {
		return v.CompleteRequest
	}

	return
}

// IsSetCompleteRequest returns true if CompleteRequest is not nil.
func (v *WorkflowService_RespondDecisionTaskCompleted_Args) IsSetCompleteRequest() bool {
	return v != nil && v.CompleteRequest != 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 "RespondDecisionTaskCompleted" for this struct.
func (v *WorkflowService_RespondDecisionTaskCompleted_Args) MethodName() string {
	return "RespondDecisionTaskCompleted"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_RespondDecisionTaskCompleted_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_RespondDecisionTaskCompleted_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.RespondDecisionTaskCompleted
// function.
var WorkflowService_RespondDecisionTaskCompleted_Helper = struct {
	// Args accepts the parameters of RespondDecisionTaskCompleted in-order and returns
	// the arguments struct for the function.
	Args func(
		completeRequest *shared.RespondDecisionTaskCompletedRequest,
	) *WorkflowService_RespondDecisionTaskCompleted_Args

	// IsException returns true if the given error can be thrown
	// by RespondDecisionTaskCompleted.
	//
	// An error can be thrown by RespondDecisionTaskCompleted 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 RespondDecisionTaskCompleted
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// RespondDecisionTaskCompleted into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by RespondDecisionTaskCompleted
	//
	//   value, err := RespondDecisionTaskCompleted(args)
	//   result, err := WorkflowService_RespondDecisionTaskCompleted_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RespondDecisionTaskCompleted: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.RespondDecisionTaskCompletedResponse, error) (*WorkflowService_RespondDecisionTaskCompleted_Result, error)

	// UnwrapResponse takes the result struct for RespondDecisionTaskCompleted
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if RespondDecisionTaskCompleted threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_RespondDecisionTaskCompleted_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_RespondDecisionTaskCompleted_Result) (*shared.RespondDecisionTaskCompletedResponse, error)
}{}

func init() {
	WorkflowService_RespondDecisionTaskCompleted_Helper.Args = func(
		completeRequest *shared.RespondDecisionTaskCompletedRequest,
	) *WorkflowService_RespondDecisionTaskCompleted_Args {
		return &WorkflowService_RespondDecisionTaskCompleted_Args{
			CompleteRequest: completeRequest,
		}
	}

	WorkflowService_RespondDecisionTaskCompleted_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.WorkflowExecutionAlreadyCompletedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_RespondDecisionTaskCompleted_Helper.WrapResponse = func(success *shared.RespondDecisionTaskCompletedResponse, err error) (*WorkflowService_RespondDecisionTaskCompleted_Result, error) {
		if err == nil {
			return &WorkflowService_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_Result.BadRequestError")
			}
			return &WorkflowService_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_Result.EntityNotExistError")
			}
			return &WorkflowService_RespondDecisionTaskCompleted_Result{EntityNotExistError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondDecisionTaskCompleted_Result.DomainNotActiveError")
			}
			return &WorkflowService_RespondDecisionTaskCompleted_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondDecisionTaskCompleted_Result.LimitExceededError")
			}
			return &WorkflowService_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_Result.ServiceBusyError")
			}
			return &WorkflowService_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_RespondDecisionTaskCompleted_Result{ClientVersionNotSupportedError: e}, nil
		case *shared.WorkflowExecutionAlreadyCompletedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondDecisionTaskCompleted_Result.WorkflowExecutionAlreadyCompletedError")
			}
			return &WorkflowService_RespondDecisionTaskCompleted_Result{WorkflowExecutionAlreadyCompletedError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondDecisionTaskCompleted_Result.AccessDeniedError")
			}
			return &WorkflowService_RespondDecisionTaskCompleted_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_RespondDecisionTaskCompleted_Helper.UnwrapResponse = func(result *WorkflowService_RespondDecisionTaskCompleted_Result) (success *shared.RespondDecisionTaskCompletedResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			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.WorkflowExecutionAlreadyCompletedError != nil {
			err = result.WorkflowExecutionAlreadyCompletedError
			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_RespondDecisionTaskCompleted_Result represents the result of a WorkflowService.RespondDecisionTaskCompleted function call.
//
// The result of a RespondDecisionTaskCompleted 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_RespondDecisionTaskCompleted_Result struct {
	// Value returned by RespondDecisionTaskCompleted after a successful execution.
	Success                                *shared.RespondDecisionTaskCompletedResponse   `json:"success,omitempty"`
	BadRequestError                        *shared.BadRequestError                        `json:"badRequestError,omitempty"`
	EntityNotExistError                    *shared.EntityNotExistsError                   `json:"entityNotExistError,omitempty"`
	DomainNotActiveError                   *shared.DomainNotActiveError                   `json:"domainNotActiveError,omitempty"`
	LimitExceededError                     *shared.LimitExceededError                     `json:"limitExceededError,omitempty"`
	ServiceBusyError                       *shared.ServiceBusyError                       `json:"serviceBusyError,omitempty"`
	ClientVersionNotSupportedError         *shared.ClientVersionNotSupportedError         `json:"clientVersionNotSupportedError,omitempty"`
	WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"`
	AccessDeniedError                      *shared.AccessDeniedError                      `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_Result) ToWire() (wire.Value, error) {
	var (
		fields [9]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: 3, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_RespondDecisionTaskCompleted_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _RespondDecisionTaskCompletedResponse_Read(w wire.Value) (*shared.RespondDecisionTaskCompletedResponse, error) {
	var v shared.RespondDecisionTaskCompletedResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondDecisionTaskCompleted_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondDecisionTaskCompleted_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 = _RespondDecisionTaskCompletedResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			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.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_RespondDecisionTaskCompleted_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondDecisionTaskCompleted_Result
// struct.
func (v *WorkflowService_RespondDecisionTaskCompleted_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [9]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.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondDecisionTaskCompleted_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondDecisionTaskCompleted_Result match the
// provided WorkflowService_RespondDecisionTaskCompleted_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondDecisionTaskCompleted_Result) Equals(rhs *WorkflowService_RespondDecisionTaskCompleted_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.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.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.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) {
		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_RespondDecisionTaskCompleted_Result.
func (v *WorkflowService_RespondDecisionTaskCompleted_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.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError))
	}
	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_RespondDecisionTaskCompleted_Result) GetSuccess() (o *shared.RespondDecisionTaskCompletedResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondDecisionTaskCompleted_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_RespondDecisionTaskCompleted_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondDecisionTaskCompleted_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) {
	if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil {
		return v.WorkflowExecutionAlreadyCompletedError
	}

	return
}

// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil.
func (v *WorkflowService_RespondDecisionTaskCompleted_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool {
	return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondDecisionTaskCompleted_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_RespondDecisionTaskCompleted_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 "RespondDecisionTaskCompleted" for this struct.
func (v *WorkflowService_RespondDecisionTaskCompleted_Result) MethodName() string {
	return "RespondDecisionTaskCompleted"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_RespondDecisionTaskCompleted_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_RespondDecisionTaskFailed_Args represents the arguments for the WorkflowService.RespondDecisionTaskFailed function.
//
// The arguments for RespondDecisionTaskFailed are sent and received over the wire as this struct.
type WorkflowService_RespondDecisionTaskFailed_Args struct {
	FailedRequest *shared.RespondDecisionTaskFailedRequest `json:"failedRequest,omitempty"`
}

// ToWire translates a WorkflowService_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.FailedRequest != nil {
		w, err = v.FailedRequest.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 _RespondDecisionTaskFailedRequest_Read(w wire.Value) (*shared.RespondDecisionTaskFailedRequest, error) {
	var v shared.RespondDecisionTaskFailedRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondDecisionTaskFailed_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondDecisionTaskFailed_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.FailedRequest, err = _RespondDecisionTaskFailedRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondDecisionTaskFailed_Args
// struct.
func (v *WorkflowService_RespondDecisionTaskFailed_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.FailedRequest != nil {
		fields[i] = fmt.Sprintf("FailedRequest: %v", v.FailedRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondDecisionTaskFailed_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondDecisionTaskFailed_Args match the
// provided WorkflowService_RespondDecisionTaskFailed_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondDecisionTaskFailed_Args) Equals(rhs *WorkflowService_RespondDecisionTaskFailed_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.FailedRequest == nil && rhs.FailedRequest == nil) || (v.FailedRequest != nil && rhs.FailedRequest != nil && v.FailedRequest.Equals(rhs.FailedRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_RespondDecisionTaskFailed_Args.
func (v *WorkflowService_RespondDecisionTaskFailed_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.FailedRequest != nil {
		err = multierr.Append(err, enc.AddObject("failedRequest", v.FailedRequest))
	}
	return err
}

// GetFailedRequest returns the value of FailedRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondDecisionTaskFailed_Args) GetFailedRequest() (o *shared.RespondDecisionTaskFailedRequest) {
	if v != nil && v.FailedRequest != nil {
		return v.FailedRequest
	}

	return
}

// IsSetFailedRequest returns true if FailedRequest is not nil.
func (v *WorkflowService_RespondDecisionTaskFailed_Args) IsSetFailedRequest() bool {
	return v != nil && v.FailedRequest != 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 "RespondDecisionTaskFailed" for this struct.
func (v *WorkflowService_RespondDecisionTaskFailed_Args) MethodName() string {
	return "RespondDecisionTaskFailed"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_RespondDecisionTaskFailed_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_RespondDecisionTaskFailed_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.RespondDecisionTaskFailed
// function.
var WorkflowService_RespondDecisionTaskFailed_Helper = struct {
	// Args accepts the parameters of RespondDecisionTaskFailed in-order and returns
	// the arguments struct for the function.
	Args func(
		failedRequest *shared.RespondDecisionTaskFailedRequest,
	) *WorkflowService_RespondDecisionTaskFailed_Args

	// IsException returns true if the given error can be thrown
	// by RespondDecisionTaskFailed.
	//
	// An error can be thrown by RespondDecisionTaskFailed 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 RespondDecisionTaskFailed
	// given the error returned by it. The provided error may
	// be nil if RespondDecisionTaskFailed did not fail.
	//
	// This allows mapping errors returned by RespondDecisionTaskFailed into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// RespondDecisionTaskFailed
	//
	//   err := RespondDecisionTaskFailed(args)
	//   result, err := WorkflowService_RespondDecisionTaskFailed_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RespondDecisionTaskFailed: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*WorkflowService_RespondDecisionTaskFailed_Result, error)

	// UnwrapResponse takes the result struct for RespondDecisionTaskFailed
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if RespondDecisionTaskFailed threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := WorkflowService_RespondDecisionTaskFailed_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_RespondDecisionTaskFailed_Result) error
}{}

func init() {
	WorkflowService_RespondDecisionTaskFailed_Helper.Args = func(
		failedRequest *shared.RespondDecisionTaskFailedRequest,
	) *WorkflowService_RespondDecisionTaskFailed_Args {
		return &WorkflowService_RespondDecisionTaskFailed_Args{
			FailedRequest: failedRequest,
		}
	}

	WorkflowService_RespondDecisionTaskFailed_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.WorkflowExecutionAlreadyCompletedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_RespondDecisionTaskFailed_Helper.WrapResponse = func(err error) (*WorkflowService_RespondDecisionTaskFailed_Result, error) {
		if err == nil {
			return &WorkflowService_RespondDecisionTaskFailed_Result{}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondDecisionTaskFailed_Result.BadRequestError")
			}
			return &WorkflowService_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_Result.EntityNotExistError")
			}
			return &WorkflowService_RespondDecisionTaskFailed_Result{EntityNotExistError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondDecisionTaskFailed_Result.DomainNotActiveError")
			}
			return &WorkflowService_RespondDecisionTaskFailed_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondDecisionTaskFailed_Result.LimitExceededError")
			}
			return &WorkflowService_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_Result.ServiceBusyError")
			}
			return &WorkflowService_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_RespondDecisionTaskFailed_Result{ClientVersionNotSupportedError: e}, nil
		case *shared.WorkflowExecutionAlreadyCompletedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondDecisionTaskFailed_Result.WorkflowExecutionAlreadyCompletedError")
			}
			return &WorkflowService_RespondDecisionTaskFailed_Result{WorkflowExecutionAlreadyCompletedError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondDecisionTaskFailed_Result.AccessDeniedError")
			}
			return &WorkflowService_RespondDecisionTaskFailed_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_RespondDecisionTaskFailed_Helper.UnwrapResponse = func(result *WorkflowService_RespondDecisionTaskFailed_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			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.WorkflowExecutionAlreadyCompletedError != nil {
			err = result.WorkflowExecutionAlreadyCompletedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// WorkflowService_RespondDecisionTaskFailed_Result represents the result of a WorkflowService.RespondDecisionTaskFailed function call.
//
// The result of a RespondDecisionTaskFailed execution is sent and received over the wire as this struct.
type WorkflowService_RespondDecisionTaskFailed_Result struct {
	BadRequestError                        *shared.BadRequestError                        `json:"badRequestError,omitempty"`
	EntityNotExistError                    *shared.EntityNotExistsError                   `json:"entityNotExistError,omitempty"`
	DomainNotActiveError                   *shared.DomainNotActiveError                   `json:"domainNotActiveError,omitempty"`
	LimitExceededError                     *shared.LimitExceededError                     `json:"limitExceededError,omitempty"`
	ServiceBusyError                       *shared.ServiceBusyError                       `json:"serviceBusyError,omitempty"`
	ClientVersionNotSupportedError         *shared.ClientVersionNotSupportedError         `json:"clientVersionNotSupportedError,omitempty"`
	WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"`
	AccessDeniedError                      *shared.AccessDeniedError                      `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_Result) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_RespondDecisionTaskFailed_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a WorkflowService_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondDecisionTaskFailed_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondDecisionTaskFailed_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			if field.Value.Type() == wire.TStruct {
				v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("WorkflowService_RespondDecisionTaskFailed_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondDecisionTaskFailed_Result
// struct.
func (v *WorkflowService_RespondDecisionTaskFailed_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondDecisionTaskFailed_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondDecisionTaskFailed_Result match the
// provided WorkflowService_RespondDecisionTaskFailed_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondDecisionTaskFailed_Result) Equals(rhs *WorkflowService_RespondDecisionTaskFailed_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.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.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) {
		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_RespondDecisionTaskFailed_Result.
func (v *WorkflowService_RespondDecisionTaskFailed_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.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.WorkflowExecutionAlreadyCompletedError != nil {
		err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError))
	}
	if v.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondDecisionTaskFailed_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_RespondDecisionTaskFailed_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondDecisionTaskFailed_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) {
	if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil {
		return v.WorkflowExecutionAlreadyCompletedError
	}

	return
}

// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil.
func (v *WorkflowService_RespondDecisionTaskFailed_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool {
	return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondDecisionTaskFailed_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_RespondDecisionTaskFailed_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 "RespondDecisionTaskFailed" for this struct.
func (v *WorkflowService_RespondDecisionTaskFailed_Result) MethodName() string {
	return "RespondDecisionTaskFailed"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_RespondDecisionTaskFailed_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_RespondQueryTaskCompleted_Args represents the arguments for the WorkflowService.RespondQueryTaskCompleted function.
//
// The arguments for RespondQueryTaskCompleted are sent and received over the wire as this struct.
type WorkflowService_RespondQueryTaskCompleted_Args struct {
	CompleteRequest *shared.RespondQueryTaskCompletedRequest `json:"completeRequest,omitempty"`
}

// ToWire translates a WorkflowService_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.CompleteRequest != nil {
		w, err = v.CompleteRequest.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 _RespondQueryTaskCompletedRequest_Read(w wire.Value) (*shared.RespondQueryTaskCompletedRequest, error) {
	var v shared.RespondQueryTaskCompletedRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondQueryTaskCompleted_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondQueryTaskCompleted_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.CompleteRequest, err = _RespondQueryTaskCompletedRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondQueryTaskCompleted_Args
// struct.
func (v *WorkflowService_RespondQueryTaskCompleted_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.CompleteRequest != nil {
		fields[i] = fmt.Sprintf("CompleteRequest: %v", v.CompleteRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_RespondQueryTaskCompleted_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondQueryTaskCompleted_Args match the
// provided WorkflowService_RespondQueryTaskCompleted_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondQueryTaskCompleted_Args) Equals(rhs *WorkflowService_RespondQueryTaskCompleted_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.CompleteRequest == nil && rhs.CompleteRequest == nil) || (v.CompleteRequest != nil && rhs.CompleteRequest != nil && v.CompleteRequest.Equals(rhs.CompleteRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_RespondQueryTaskCompleted_Args.
func (v *WorkflowService_RespondQueryTaskCompleted_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.CompleteRequest != nil {
		err = multierr.Append(err, enc.AddObject("completeRequest", v.CompleteRequest))
	}
	return err
}

// GetCompleteRequest returns the value of CompleteRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondQueryTaskCompleted_Args) GetCompleteRequest() (o *shared.RespondQueryTaskCompletedRequest) {
	if v != nil && v.CompleteRequest != nil {
		return v.CompleteRequest
	}

	return
}

// IsSetCompleteRequest returns true if CompleteRequest is not nil.
func (v *WorkflowService_RespondQueryTaskCompleted_Args) IsSetCompleteRequest() bool {
	return v != nil && v.CompleteRequest != 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 "RespondQueryTaskCompleted" for this struct.
func (v *WorkflowService_RespondQueryTaskCompleted_Args) MethodName() string {
	return "RespondQueryTaskCompleted"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_RespondQueryTaskCompleted_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_RespondQueryTaskCompleted_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.RespondQueryTaskCompleted
// function.
var WorkflowService_RespondQueryTaskCompleted_Helper = struct {
	// Args accepts the parameters of RespondQueryTaskCompleted in-order and returns
	// the arguments struct for the function.
	Args func(
		completeRequest *shared.RespondQueryTaskCompletedRequest,
	) *WorkflowService_RespondQueryTaskCompleted_Args

	// IsException returns true if the given error can be thrown
	// by RespondQueryTaskCompleted.
	//
	// An error can be thrown by RespondQueryTaskCompleted 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 RespondQueryTaskCompleted
	// given the error returned by it. The provided error may
	// be nil if RespondQueryTaskCompleted did not fail.
	//
	// This allows mapping errors returned by RespondQueryTaskCompleted into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// RespondQueryTaskCompleted
	//
	//   err := RespondQueryTaskCompleted(args)
	//   result, err := WorkflowService_RespondQueryTaskCompleted_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RespondQueryTaskCompleted: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*WorkflowService_RespondQueryTaskCompleted_Result, error)

	// UnwrapResponse takes the result struct for RespondQueryTaskCompleted
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if RespondQueryTaskCompleted threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := WorkflowService_RespondQueryTaskCompleted_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_RespondQueryTaskCompleted_Result) error
}{}

func init() {
	WorkflowService_RespondQueryTaskCompleted_Helper.Args = func(
		completeRequest *shared.RespondQueryTaskCompletedRequest,
	) *WorkflowService_RespondQueryTaskCompleted_Args {
		return &WorkflowService_RespondQueryTaskCompleted_Args{
			CompleteRequest: completeRequest,
		}
	}

	WorkflowService_RespondQueryTaskCompleted_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.DomainNotActiveError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_RespondQueryTaskCompleted_Helper.WrapResponse = func(err error) (*WorkflowService_RespondQueryTaskCompleted_Result, error) {
		if err == nil {
			return &WorkflowService_RespondQueryTaskCompleted_Result{}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondQueryTaskCompleted_Result.BadRequestError")
			}
			return &WorkflowService_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_Result.EntityNotExistError")
			}
			return &WorkflowService_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_Result.LimitExceededError")
			}
			return &WorkflowService_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_Result.ServiceBusyError")
			}
			return &WorkflowService_RespondQueryTaskCompleted_Result{ServiceBusyError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondQueryTaskCompleted_Result.DomainNotActiveError")
			}
			return &WorkflowService_RespondQueryTaskCompleted_Result{DomainNotActiveError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RespondQueryTaskCompleted_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_Result.AccessDeniedError")
			}
			return &WorkflowService_RespondQueryTaskCompleted_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_RespondQueryTaskCompleted_Helper.UnwrapResponse = func(result *WorkflowService_RespondQueryTaskCompleted_Result) (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.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.ClientVersionNotSupportedError != nil {
			err = result.ClientVersionNotSupportedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// WorkflowService_RespondQueryTaskCompleted_Result represents the result of a WorkflowService.RespondQueryTaskCompleted function call.
//
// The result of a RespondQueryTaskCompleted execution is sent and received over the wire as this struct.
type WorkflowService_RespondQueryTaskCompleted_Result struct {
	BadRequestError                *shared.BadRequestError                `json:"badRequestError,omitempty"`
	EntityNotExistError            *shared.EntityNotExistsError           `json:"entityNotExistError,omitempty"`
	LimitExceededError             *shared.LimitExceededError             `json:"limitExceededError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError               `json:"serviceBusyError,omitempty"`
	DomainNotActiveError           *shared.DomainNotActiveError           `json:"domainNotActiveError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"`
	AccessDeniedError              *shared.AccessDeniedError              `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_Result) ToWire() (wire.Value, error) {
	var (
		fields [7]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_RespondQueryTaskCompleted_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a WorkflowService_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RespondQueryTaskCompleted_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RespondQueryTaskCompleted_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("WorkflowService_RespondQueryTaskCompleted_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RespondQueryTaskCompleted_Result
// struct.
func (v *WorkflowService_RespondQueryTaskCompleted_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [7]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.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.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		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_RespondQueryTaskCompleted_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RespondQueryTaskCompleted_Result match the
// provided WorkflowService_RespondQueryTaskCompleted_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_RespondQueryTaskCompleted_Result) Equals(rhs *WorkflowService_RespondQueryTaskCompleted_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.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.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		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_RespondQueryTaskCompleted_Result.
func (v *WorkflowService_RespondQueryTaskCompleted_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.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.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	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
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondQueryTaskCompleted_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_RespondQueryTaskCompleted_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_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_RespondQueryTaskCompleted_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 "RespondQueryTaskCompleted" for this struct.
func (v *WorkflowService_RespondQueryTaskCompleted_Result) MethodName() string {
	return "RespondQueryTaskCompleted"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_RespondQueryTaskCompleted_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_RestartWorkflowExecution_Args represents the arguments for the WorkflowService.RestartWorkflowExecution function.
//
// The arguments for RestartWorkflowExecution are sent and received over the wire as this struct.
type WorkflowService_RestartWorkflowExecution_Args struct {
	RestartRequest *shared.RestartWorkflowExecutionRequest `json:"restartRequest,omitempty"`
}

// ToWire translates a WorkflowService_RestartWorkflowExecution_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_RestartWorkflowExecution_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.RestartRequest != nil {
		w, err = v.RestartRequest.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 _RestartWorkflowExecutionRequest_Read(w wire.Value) (*shared.RestartWorkflowExecutionRequest, error) {
	var v shared.RestartWorkflowExecutionRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RestartWorkflowExecution_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_RestartWorkflowExecution_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RestartWorkflowExecution_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RestartWorkflowExecution_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.RestartRequest, err = _RestartWorkflowExecutionRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RestartWorkflowExecution_Args
// struct.
func (v *WorkflowService_RestartWorkflowExecution_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.RestartRequest != nil {
		fields[i] = fmt.Sprintf("RestartRequest: %v", v.RestartRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_RestartWorkflowExecution_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RestartWorkflowExecution_Args match the
// provided WorkflowService_RestartWorkflowExecution_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_RestartWorkflowExecution_Args) Equals(rhs *WorkflowService_RestartWorkflowExecution_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.RestartRequest == nil && rhs.RestartRequest == nil) || (v.RestartRequest != nil && rhs.RestartRequest != nil && v.RestartRequest.Equals(rhs.RestartRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_RestartWorkflowExecution_Args.
func (v *WorkflowService_RestartWorkflowExecution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.RestartRequest != nil {
		err = multierr.Append(err, enc.AddObject("restartRequest", v.RestartRequest))
	}
	return err
}

// GetRestartRequest returns the value of RestartRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RestartWorkflowExecution_Args) GetRestartRequest() (o *shared.RestartWorkflowExecutionRequest) {
	if v != nil && v.RestartRequest != nil {
		return v.RestartRequest
	}

	return
}

// IsSetRestartRequest returns true if RestartRequest is not nil.
func (v *WorkflowService_RestartWorkflowExecution_Args) IsSetRestartRequest() bool {
	return v != nil && v.RestartRequest != 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 "RestartWorkflowExecution" for this struct.
func (v *WorkflowService_RestartWorkflowExecution_Args) MethodName() string {
	return "RestartWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_RestartWorkflowExecution_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_RestartWorkflowExecution_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.RestartWorkflowExecution
// function.
var WorkflowService_RestartWorkflowExecution_Helper = struct {
	// Args accepts the parameters of RestartWorkflowExecution in-order and returns
	// the arguments struct for the function.
	Args func(
		restartRequest *shared.RestartWorkflowExecutionRequest,
	) *WorkflowService_RestartWorkflowExecution_Args

	// IsException returns true if the given error can be thrown
	// by RestartWorkflowExecution.
	//
	// An error can be thrown by RestartWorkflowExecution 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 RestartWorkflowExecution
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// RestartWorkflowExecution into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by RestartWorkflowExecution
	//
	//   value, err := RestartWorkflowExecution(args)
	//   result, err := WorkflowService_RestartWorkflowExecution_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from RestartWorkflowExecution: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.RestartWorkflowExecutionResponse, error) (*WorkflowService_RestartWorkflowExecution_Result, error)

	// UnwrapResponse takes the result struct for RestartWorkflowExecution
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if RestartWorkflowExecution threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_RestartWorkflowExecution_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_RestartWorkflowExecution_Result) (*shared.RestartWorkflowExecutionResponse, error)
}{}

func init() {
	WorkflowService_RestartWorkflowExecution_Helper.Args = func(
		restartRequest *shared.RestartWorkflowExecutionRequest,
	) *WorkflowService_RestartWorkflowExecution_Args {
		return &WorkflowService_RestartWorkflowExecution_Args{
			RestartRequest: restartRequest,
		}
	}

	WorkflowService_RestartWorkflowExecution_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_RestartWorkflowExecution_Helper.WrapResponse = func(success *shared.RestartWorkflowExecutionResponse, err error) (*WorkflowService_RestartWorkflowExecution_Result, error) {
		if err == nil {
			return &WorkflowService_RestartWorkflowExecution_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_RestartWorkflowExecution_Result.BadRequestError")
			}
			return &WorkflowService_RestartWorkflowExecution_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_RestartWorkflowExecution_Result.ServiceBusyError")
			}
			return &WorkflowService_RestartWorkflowExecution_Result{ServiceBusyError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RestartWorkflowExecution_Result.DomainNotActiveError")
			}
			return &WorkflowService_RestartWorkflowExecution_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RestartWorkflowExecution_Result.LimitExceededError")
			}
			return &WorkflowService_RestartWorkflowExecution_Result{LimitExceededError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RestartWorkflowExecution_Result.EntityNotExistError")
			}
			return &WorkflowService_RestartWorkflowExecution_Result{EntityNotExistError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_RestartWorkflowExecution_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_RestartWorkflowExecution_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_RestartWorkflowExecution_Result.AccessDeniedError")
			}
			return &WorkflowService_RestartWorkflowExecution_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_RestartWorkflowExecution_Helper.UnwrapResponse = func(result *WorkflowService_RestartWorkflowExecution_Result) (success *shared.RestartWorkflowExecutionResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.LimitExceededError != nil {
			err = result.LimitExceededError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ClientVersionNotSupportedError != nil {
			err = result.ClientVersionNotSupportedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// WorkflowService_RestartWorkflowExecution_Result represents the result of a WorkflowService.RestartWorkflowExecution function call.
//
// The result of a RestartWorkflowExecution 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_RestartWorkflowExecution_Result struct {
	// Value returned by RestartWorkflowExecution after a successful execution.
	Success                        *shared.RestartWorkflowExecutionResponse `json:"success,omitempty"`
	BadRequestError                *shared.BadRequestError                  `json:"badRequestError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError                 `json:"serviceBusyError,omitempty"`
	DomainNotActiveError           *shared.DomainNotActiveError             `json:"domainNotActiveError,omitempty"`
	LimitExceededError             *shared.LimitExceededError               `json:"limitExceededError,omitempty"`
	EntityNotExistError            *shared.EntityNotExistsError             `json:"entityNotExistError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError   `json:"clientVersionNotSupportedError,omitempty"`
	AccessDeniedError              *shared.AccessDeniedError                `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_RestartWorkflowExecution_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_RestartWorkflowExecution_Result) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 2, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_RestartWorkflowExecution_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _RestartWorkflowExecutionResponse_Read(w wire.Value) (*shared.RestartWorkflowExecutionResponse, error) {
	var v shared.RestartWorkflowExecutionResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_RestartWorkflowExecution_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_RestartWorkflowExecution_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_RestartWorkflowExecution_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_RestartWorkflowExecution_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 = _RestartWorkflowExecutionResponse_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.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			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.ServiceBusyError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_RestartWorkflowExecution_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_RestartWorkflowExecution_Result
// struct.
func (v *WorkflowService_RestartWorkflowExecution_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_RestartWorkflowExecution_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_RestartWorkflowExecution_Result match the
// provided WorkflowService_RestartWorkflowExecution_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_RestartWorkflowExecution_Result) Equals(rhs *WorkflowService_RestartWorkflowExecution_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.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) {
		return false
	}
	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_RestartWorkflowExecution_Result.
func (v *WorkflowService_RestartWorkflowExecution_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))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.ClientVersionNotSupportedError != nil {
		err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError))
	}
	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_RestartWorkflowExecution_Result) GetSuccess() (o *shared.RestartWorkflowExecutionResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_RestartWorkflowExecution_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_RestartWorkflowExecution_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_RestartWorkflowExecution_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_RestartWorkflowExecution_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_RestartWorkflowExecution_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RestartWorkflowExecution_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_RestartWorkflowExecution_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RestartWorkflowExecution_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_RestartWorkflowExecution_Result) IsSetLimitExceededError() bool {
	return v != nil && v.LimitExceededError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RestartWorkflowExecution_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_RestartWorkflowExecution_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_RestartWorkflowExecution_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_RestartWorkflowExecution_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_RestartWorkflowExecution_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_RestartWorkflowExecution_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 "RestartWorkflowExecution" for this struct.
func (v *WorkflowService_RestartWorkflowExecution_Result) MethodName() string {
	return "RestartWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_RestartWorkflowExecution_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_ScanWorkflowExecutions_Args represents the arguments for the WorkflowService.ScanWorkflowExecutions function.
//
// The arguments for ScanWorkflowExecutions are sent and received over the wire as this struct.
type WorkflowService_ScanWorkflowExecutions_Args struct {
	ListRequest *shared.ListWorkflowExecutionsRequest `json:"listRequest,omitempty"`
}

// ToWire translates a WorkflowService_ScanWorkflowExecutions_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_ScanWorkflowExecutions_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.ListRequest != nil {
		w, err = v.ListRequest.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_ScanWorkflowExecutions_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_ScanWorkflowExecutions_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ScanWorkflowExecutions_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_ScanWorkflowExecutions_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 = _ListWorkflowExecutionsRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_ScanWorkflowExecutions_Args
// struct.
func (v *WorkflowService_ScanWorkflowExecutions_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.ListRequest != nil {
		fields[i] = fmt.Sprintf("ListRequest: %v", v.ListRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_ScanWorkflowExecutions_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_ScanWorkflowExecutions_Args match the
// provided WorkflowService_ScanWorkflowExecutions_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_ScanWorkflowExecutions_Args) Equals(rhs *WorkflowService_ScanWorkflowExecutions_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.ListRequest == nil && rhs.ListRequest == nil) || (v.ListRequest != nil && rhs.ListRequest != nil && v.ListRequest.Equals(rhs.ListRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_ScanWorkflowExecutions_Args.
func (v *WorkflowService_ScanWorkflowExecutions_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.ListRequest != nil {
		err = multierr.Append(err, enc.AddObject("listRequest", v.ListRequest))
	}
	return err
}

// GetListRequest returns the value of ListRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_ScanWorkflowExecutions_Args) GetListRequest() (o *shared.ListWorkflowExecutionsRequest) {
	if v != nil && v.ListRequest != nil {
		return v.ListRequest
	}

	return
}

// IsSetListRequest returns true if ListRequest is not nil.
func (v *WorkflowService_ScanWorkflowExecutions_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 "ScanWorkflowExecutions" for this struct.
func (v *WorkflowService_ScanWorkflowExecutions_Args) MethodName() string {
	return "ScanWorkflowExecutions"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_ScanWorkflowExecutions_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_ScanWorkflowExecutions_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.ScanWorkflowExecutions
// function.
var WorkflowService_ScanWorkflowExecutions_Helper = struct {
	// Args accepts the parameters of ScanWorkflowExecutions in-order and returns
	// the arguments struct for the function.
	Args func(
		listRequest *shared.ListWorkflowExecutionsRequest,
	) *WorkflowService_ScanWorkflowExecutions_Args

	// IsException returns true if the given error can be thrown
	// by ScanWorkflowExecutions.
	//
	// An error can be thrown by ScanWorkflowExecutions 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 ScanWorkflowExecutions
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// ScanWorkflowExecutions into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by ScanWorkflowExecutions
	//
	//   value, err := ScanWorkflowExecutions(args)
	//   result, err := WorkflowService_ScanWorkflowExecutions_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from ScanWorkflowExecutions: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.ListWorkflowExecutionsResponse, error) (*WorkflowService_ScanWorkflowExecutions_Result, error)

	// UnwrapResponse takes the result struct for ScanWorkflowExecutions
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if ScanWorkflowExecutions threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_ScanWorkflowExecutions_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_ScanWorkflowExecutions_Result) (*shared.ListWorkflowExecutionsResponse, error)
}{}

func init() {
	WorkflowService_ScanWorkflowExecutions_Helper.Args = func(
		listRequest *shared.ListWorkflowExecutionsRequest,
	) *WorkflowService_ScanWorkflowExecutions_Args {
		return &WorkflowService_ScanWorkflowExecutions_Args{
			ListRequest: listRequest,
		}
	}

	WorkflowService_ScanWorkflowExecutions_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:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_ScanWorkflowExecutions_Helper.WrapResponse = func(success *shared.ListWorkflowExecutionsResponse, err error) (*WorkflowService_ScanWorkflowExecutions_Result, error) {
		if err == nil {
			return &WorkflowService_ScanWorkflowExecutions_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_ScanWorkflowExecutions_Result.BadRequestError")
			}
			return &WorkflowService_ScanWorkflowExecutions_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_ScanWorkflowExecutions_Result.EntityNotExistError")
			}
			return &WorkflowService_ScanWorkflowExecutions_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_ScanWorkflowExecutions_Result.ServiceBusyError")
			}
			return &WorkflowService_ScanWorkflowExecutions_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_ScanWorkflowExecutions_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_ScanWorkflowExecutions_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_ScanWorkflowExecutions_Result.AccessDeniedError")
			}
			return &WorkflowService_ScanWorkflowExecutions_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_ScanWorkflowExecutions_Helper.UnwrapResponse = func(result *WorkflowService_ScanWorkflowExecutions_Result) (success *shared.ListWorkflowExecutionsResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.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_ScanWorkflowExecutions_Result represents the result of a WorkflowService.ScanWorkflowExecutions function call.
//
// The result of a ScanWorkflowExecutions 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_ScanWorkflowExecutions_Result struct {
	// Value returned by ScanWorkflowExecutions after a successful execution.
	Success                        *shared.ListWorkflowExecutionsResponse `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_ScanWorkflowExecutions_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_ScanWorkflowExecutions_Result) ToWire() (wire.Value, error) {
	var (
		fields [6]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: 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_ScanWorkflowExecutions_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a WorkflowService_ScanWorkflowExecutions_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_ScanWorkflowExecutions_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_ScanWorkflowExecutions_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_ScanWorkflowExecutions_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 = _ListWorkflowExecutionsResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.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.ServiceBusyError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_ScanWorkflowExecutions_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_ScanWorkflowExecutions_Result
// struct.
func (v *WorkflowService_ScanWorkflowExecutions_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [6]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.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_ScanWorkflowExecutions_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_ScanWorkflowExecutions_Result match the
// provided WorkflowService_ScanWorkflowExecutions_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_ScanWorkflowExecutions_Result) Equals(rhs *WorkflowService_ScanWorkflowExecutions_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.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_ScanWorkflowExecutions_Result.
func (v *WorkflowService_ScanWorkflowExecutions_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.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_ScanWorkflowExecutions_Result) GetSuccess() (o *shared.ListWorkflowExecutionsResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_ScanWorkflowExecutions_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_ScanWorkflowExecutions_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_ScanWorkflowExecutions_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_ScanWorkflowExecutions_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_ScanWorkflowExecutions_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_ScanWorkflowExecutions_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_ScanWorkflowExecutions_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_ScanWorkflowExecutions_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_ScanWorkflowExecutions_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_ScanWorkflowExecutions_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_ScanWorkflowExecutions_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 "ScanWorkflowExecutions" for this struct.
func (v *WorkflowService_ScanWorkflowExecutions_Result) MethodName() string {
	return "ScanWorkflowExecutions"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_ScanWorkflowExecutions_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_SignalWithStartWorkflowExecution_Args represents the arguments for the WorkflowService.SignalWithStartWorkflowExecution function.
//
// The arguments for SignalWithStartWorkflowExecution are sent and received over the wire as this struct.
type WorkflowService_SignalWithStartWorkflowExecution_Args struct {
	SignalWithStartRequest *shared.SignalWithStartWorkflowExecutionRequest `json:"signalWithStartRequest,omitempty"`
}

// ToWire translates a WorkflowService_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.SignalWithStartRequest != nil {
		w, err = v.SignalWithStartRequest.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 _SignalWithStartWorkflowExecutionRequest_Read(w wire.Value) (*shared.SignalWithStartWorkflowExecutionRequest, error) {
	var v shared.SignalWithStartWorkflowExecutionRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_SignalWithStartWorkflowExecution_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_SignalWithStartWorkflowExecution_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.SignalWithStartRequest, err = _SignalWithStartWorkflowExecutionRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_SignalWithStartWorkflowExecution_Args
// struct.
func (v *WorkflowService_SignalWithStartWorkflowExecution_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.SignalWithStartRequest != nil {
		fields[i] = fmt.Sprintf("SignalWithStartRequest: %v", v.SignalWithStartRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_SignalWithStartWorkflowExecution_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_SignalWithStartWorkflowExecution_Args match the
// provided WorkflowService_SignalWithStartWorkflowExecution_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_SignalWithStartWorkflowExecution_Args) Equals(rhs *WorkflowService_SignalWithStartWorkflowExecution_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.SignalWithStartRequest == nil && rhs.SignalWithStartRequest == nil) || (v.SignalWithStartRequest != nil && rhs.SignalWithStartRequest != nil && v.SignalWithStartRequest.Equals(rhs.SignalWithStartRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_SignalWithStartWorkflowExecution_Args.
func (v *WorkflowService_SignalWithStartWorkflowExecution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.SignalWithStartRequest != nil {
		err = multierr.Append(err, enc.AddObject("signalWithStartRequest", v.SignalWithStartRequest))
	}
	return err
}

// GetSignalWithStartRequest returns the value of SignalWithStartRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWithStartWorkflowExecution_Args) GetSignalWithStartRequest() (o *shared.SignalWithStartWorkflowExecutionRequest) {
	if v != nil && v.SignalWithStartRequest != nil {
		return v.SignalWithStartRequest
	}

	return
}

// IsSetSignalWithStartRequest returns true if SignalWithStartRequest is not nil.
func (v *WorkflowService_SignalWithStartWorkflowExecution_Args) IsSetSignalWithStartRequest() bool {
	return v != nil && v.SignalWithStartRequest != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "SignalWithStartWorkflowExecution" for this struct.
func (v *WorkflowService_SignalWithStartWorkflowExecution_Args) MethodName() string {
	return "SignalWithStartWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_SignalWithStartWorkflowExecution_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_SignalWithStartWorkflowExecution_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.SignalWithStartWorkflowExecution
// function.
var WorkflowService_SignalWithStartWorkflowExecution_Helper = struct {
	// Args accepts the parameters of SignalWithStartWorkflowExecution in-order and returns
	// the arguments struct for the function.
	Args func(
		signalWithStartRequest *shared.SignalWithStartWorkflowExecutionRequest,
	) *WorkflowService_SignalWithStartWorkflowExecution_Args

	// IsException returns true if the given error can be thrown
	// by SignalWithStartWorkflowExecution.
	//
	// An error can be thrown by SignalWithStartWorkflowExecution 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 SignalWithStartWorkflowExecution
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// SignalWithStartWorkflowExecution into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by SignalWithStartWorkflowExecution
	//
	//   value, err := SignalWithStartWorkflowExecution(args)
	//   result, err := WorkflowService_SignalWithStartWorkflowExecution_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from SignalWithStartWorkflowExecution: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.StartWorkflowExecutionResponse, error) (*WorkflowService_SignalWithStartWorkflowExecution_Result, error)

	// UnwrapResponse takes the result struct for SignalWithStartWorkflowExecution
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if SignalWithStartWorkflowExecution threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_SignalWithStartWorkflowExecution_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_SignalWithStartWorkflowExecution_Result) (*shared.StartWorkflowExecutionResponse, error)
}{}

func init() {
	WorkflowService_SignalWithStartWorkflowExecution_Helper.Args = func(
		signalWithStartRequest *shared.SignalWithStartWorkflowExecutionRequest,
	) *WorkflowService_SignalWithStartWorkflowExecution_Args {
		return &WorkflowService_SignalWithStartWorkflowExecution_Args{
			SignalWithStartRequest: signalWithStartRequest,
		}
	}

	WorkflowService_SignalWithStartWorkflowExecution_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.WorkflowExecutionAlreadyStartedError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_SignalWithStartWorkflowExecution_Helper.WrapResponse = func(success *shared.StartWorkflowExecutionResponse, err error) (*WorkflowService_SignalWithStartWorkflowExecution_Result, error) {
		if err == nil {
			return &WorkflowService_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_Result.BadRequestError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_Result.EntityNotExistError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_Result.ServiceBusyError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecution_Result{ServiceBusyError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecution_Result.DomainNotActiveError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecution_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecution_Result.LimitExceededError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecution_Result{LimitExceededError: e}, nil
		case *shared.WorkflowExecutionAlreadyStartedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecution_Result.WorkflowAlreadyStartedError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecution_Result{WorkflowAlreadyStartedError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecution_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_Result.AccessDeniedError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecution_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_SignalWithStartWorkflowExecution_Helper.UnwrapResponse = func(result *WorkflowService_SignalWithStartWorkflowExecution_Result) (success *shared.StartWorkflowExecutionResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.LimitExceededError != nil {
			err = result.LimitExceededError
			return
		}
		if result.WorkflowAlreadyStartedError != nil {
			err = result.WorkflowAlreadyStartedError
			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_SignalWithStartWorkflowExecution_Result represents the result of a WorkflowService.SignalWithStartWorkflowExecution function call.
//
// The result of a SignalWithStartWorkflowExecution 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_SignalWithStartWorkflowExecution_Result struct {
	// Value returned by SignalWithStartWorkflowExecution after a successful execution.
	Success                        *shared.StartWorkflowExecutionResponse       `json:"success,omitempty"`
	BadRequestError                *shared.BadRequestError                      `json:"badRequestError,omitempty"`
	EntityNotExistError            *shared.EntityNotExistsError                 `json:"entityNotExistError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError                     `json:"serviceBusyError,omitempty"`
	DomainNotActiveError           *shared.DomainNotActiveError                 `json:"domainNotActiveError,omitempty"`
	LimitExceededError             *shared.LimitExceededError                   `json:"limitExceededError,omitempty"`
	WorkflowAlreadyStartedError    *shared.WorkflowExecutionAlreadyStartedError `json:"workflowAlreadyStartedError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError       `json:"clientVersionNotSupportedError,omitempty"`
	AccessDeniedError              *shared.AccessDeniedError                    `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_Result) ToWire() (wire.Value, error) {
	var (
		fields [9]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: 3, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.WorkflowAlreadyStartedError != nil {
		w, err = v.WorkflowAlreadyStartedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_SignalWithStartWorkflowExecution_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _StartWorkflowExecutionResponse_Read(w wire.Value) (*shared.StartWorkflowExecutionResponse, error) {
	var v shared.StartWorkflowExecutionResponse
	err := v.FromWire(w)
	return &v, err
}

func _WorkflowExecutionAlreadyStartedError_Read(w wire.Value) (*shared.WorkflowExecutionAlreadyStartedError, error) {
	var v shared.WorkflowExecutionAlreadyStartedError
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_SignalWithStartWorkflowExecution_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_SignalWithStartWorkflowExecution_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _StartWorkflowExecutionResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.WorkflowAlreadyStartedError, err = _WorkflowExecutionAlreadyStartedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			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.ServiceBusyError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.WorkflowAlreadyStartedError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_SignalWithStartWorkflowExecution_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_SignalWithStartWorkflowExecution_Result
// struct.
func (v *WorkflowService_SignalWithStartWorkflowExecution_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [9]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.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.WorkflowAlreadyStartedError != nil {
		fields[i] = fmt.Sprintf("WorkflowAlreadyStartedError: %v", v.WorkflowAlreadyStartedError)
		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_SignalWithStartWorkflowExecution_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_SignalWithStartWorkflowExecution_Result match the
// provided WorkflowService_SignalWithStartWorkflowExecution_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_SignalWithStartWorkflowExecution_Result) Equals(rhs *WorkflowService_SignalWithStartWorkflowExecution_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.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.WorkflowAlreadyStartedError == nil && rhs.WorkflowAlreadyStartedError == nil) || (v.WorkflowAlreadyStartedError != nil && rhs.WorkflowAlreadyStartedError != nil && v.WorkflowAlreadyStartedError.Equals(rhs.WorkflowAlreadyStartedError))) {
		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_SignalWithStartWorkflowExecution_Result.
func (v *WorkflowService_SignalWithStartWorkflowExecution_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.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.WorkflowAlreadyStartedError != nil {
		err = multierr.Append(err, enc.AddObject("workflowAlreadyStartedError", v.WorkflowAlreadyStartedError))
	}
	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_SignalWithStartWorkflowExecution_Result) GetSuccess() (o *shared.StartWorkflowExecutionResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWithStartWorkflowExecution_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_SignalWithStartWorkflowExecution_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_Result) IsSetLimitExceededError() bool {
	return v != nil && v.LimitExceededError != nil
}

// GetWorkflowAlreadyStartedError returns the value of WorkflowAlreadyStartedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWithStartWorkflowExecution_Result) GetWorkflowAlreadyStartedError() (o *shared.WorkflowExecutionAlreadyStartedError) {
	if v != nil && v.WorkflowAlreadyStartedError != nil {
		return v.WorkflowAlreadyStartedError
	}

	return
}

// IsSetWorkflowAlreadyStartedError returns true if WorkflowAlreadyStartedError is not nil.
func (v *WorkflowService_SignalWithStartWorkflowExecution_Result) IsSetWorkflowAlreadyStartedError() bool {
	return v != nil && v.WorkflowAlreadyStartedError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_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_SignalWithStartWorkflowExecution_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 "SignalWithStartWorkflowExecution" for this struct.
func (v *WorkflowService_SignalWithStartWorkflowExecution_Result) MethodName() string {
	return "SignalWithStartWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_SignalWithStartWorkflowExecution_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_SignalWithStartWorkflowExecutionAsync_Args represents the arguments for the WorkflowService.SignalWithStartWorkflowExecutionAsync function.
//
// The arguments for SignalWithStartWorkflowExecutionAsync are sent and received over the wire as this struct.
type WorkflowService_SignalWithStartWorkflowExecutionAsync_Args struct {
	SignalWithStartRequest *shared.SignalWithStartWorkflowExecutionAsyncRequest `json:"signalWithStartRequest,omitempty"`
}

// ToWire translates a WorkflowService_SignalWithStartWorkflowExecutionAsync_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_SignalWithStartWorkflowExecutionAsync_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.SignalWithStartRequest != nil {
		w, err = v.SignalWithStartRequest.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 _SignalWithStartWorkflowExecutionAsyncRequest_Read(w wire.Value) (*shared.SignalWithStartWorkflowExecutionAsyncRequest, error) {
	var v shared.SignalWithStartWorkflowExecutionAsyncRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_SignalWithStartWorkflowExecutionAsync_Args struct from its Thrift-level
// representation. The Thrift-level representation may be obtained
// from a ThriftRW protocol implementation.
//
// An error is returned if we were unable to build a WorkflowService_SignalWithStartWorkflowExecutionAsync_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_SignalWithStartWorkflowExecutionAsync_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.SignalWithStartRequest, err = _SignalWithStartWorkflowExecutionAsyncRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_SignalWithStartWorkflowExecutionAsync_Args
// struct.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.SignalWithStartRequest != nil {
		fields[i] = fmt.Sprintf("SignalWithStartRequest: %v", v.SignalWithStartRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_SignalWithStartWorkflowExecutionAsync_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_SignalWithStartWorkflowExecutionAsync_Args match the
// provided WorkflowService_SignalWithStartWorkflowExecutionAsync_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) Equals(rhs *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.SignalWithStartRequest == nil && rhs.SignalWithStartRequest == nil) || (v.SignalWithStartRequest != nil && rhs.SignalWithStartRequest != nil && v.SignalWithStartRequest.Equals(rhs.SignalWithStartRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_SignalWithStartWorkflowExecutionAsync_Args.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.SignalWithStartRequest != nil {
		err = multierr.Append(err, enc.AddObject("signalWithStartRequest", v.SignalWithStartRequest))
	}
	return err
}

// GetSignalWithStartRequest returns the value of SignalWithStartRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) GetSignalWithStartRequest() (o *shared.SignalWithStartWorkflowExecutionAsyncRequest) {
	if v != nil && v.SignalWithStartRequest != nil {
		return v.SignalWithStartRequest
	}

	return
}

// IsSetSignalWithStartRequest returns true if SignalWithStartRequest is not nil.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) IsSetSignalWithStartRequest() bool {
	return v != nil && v.SignalWithStartRequest != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "SignalWithStartWorkflowExecutionAsync" for this struct.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) MethodName() string {
	return "SignalWithStartWorkflowExecutionAsync"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.SignalWithStartWorkflowExecutionAsync
// function.
var WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper = struct {
	// Args accepts the parameters of SignalWithStartWorkflowExecutionAsync in-order and returns
	// the arguments struct for the function.
	Args func(
		signalWithStartRequest *shared.SignalWithStartWorkflowExecutionAsyncRequest,
	) *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args

	// IsException returns true if the given error can be thrown
	// by SignalWithStartWorkflowExecutionAsync.
	//
	// An error can be thrown by SignalWithStartWorkflowExecutionAsync only if the
	// corresponding exception type was mentioned in the 'throws'
	// section for it in the Thrift file.
	IsException func(error) bool

	// WrapResponse returns the result struct for SignalWithStartWorkflowExecutionAsync
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// SignalWithStartWorkflowExecutionAsync into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by SignalWithStartWorkflowExecutionAsync
	//
	//   value, err := SignalWithStartWorkflowExecutionAsync(args)
	//   result, err := WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from SignalWithStartWorkflowExecutionAsync: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.SignalWithStartWorkflowExecutionAsyncResponse, error) (*WorkflowService_SignalWithStartWorkflowExecutionAsync_Result, error)

	// UnwrapResponse takes the result struct for SignalWithStartWorkflowExecutionAsync
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if SignalWithStartWorkflowExecutionAsync threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) (*shared.SignalWithStartWorkflowExecutionAsyncResponse, error)
}{}

func init() {
	WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper.Args = func(
		signalWithStartRequest *shared.SignalWithStartWorkflowExecutionAsyncRequest,
	) *WorkflowService_SignalWithStartWorkflowExecutionAsync_Args {
		return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Args{
			SignalWithStartRequest: signalWithStartRequest,
		}
	}

	WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.WorkflowExecutionAlreadyStartedError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper.WrapResponse = func(success *shared.SignalWithStartWorkflowExecutionAsyncResponse, err error) (*WorkflowService_SignalWithStartWorkflowExecutionAsync_Result, error) {
		if err == nil {
			return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{Success: success}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecutionAsync_Result.BadRequestError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{BadRequestError: e}, nil
		case *shared.WorkflowExecutionAlreadyStartedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecutionAsync_Result.SessionAlreadyExistError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{SessionAlreadyExistError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecutionAsync_Result.ServiceBusyError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{ServiceBusyError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecutionAsync_Result.DomainNotActiveError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecutionAsync_Result.LimitExceededError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{LimitExceededError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecutionAsync_Result.EntityNotExistError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{EntityNotExistError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWithStartWorkflowExecutionAsync_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecutionAsync_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_SignalWithStartWorkflowExecutionAsync_Result.AccessDeniedError")
			}
			return &WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_SignalWithStartWorkflowExecutionAsync_Helper.UnwrapResponse = func(result *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) (success *shared.SignalWithStartWorkflowExecutionAsyncResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.SessionAlreadyExistError != nil {
			err = result.SessionAlreadyExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.LimitExceededError != nil {
			err = result.LimitExceededError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ClientVersionNotSupportedError != nil {
			err = result.ClientVersionNotSupportedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// WorkflowService_SignalWithStartWorkflowExecutionAsync_Result represents the result of a WorkflowService.SignalWithStartWorkflowExecutionAsync function call.
//
// The result of a SignalWithStartWorkflowExecutionAsync execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type WorkflowService_SignalWithStartWorkflowExecutionAsync_Result struct {
	// Value returned by SignalWithStartWorkflowExecutionAsync after a successful execution.
	Success                        *shared.SignalWithStartWorkflowExecutionAsyncResponse `json:"success,omitempty"`
	BadRequestError                *shared.BadRequestError                               `json:"badRequestError,omitempty"`
	SessionAlreadyExistError       *shared.WorkflowExecutionAlreadyStartedError          `json:"sessionAlreadyExistError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError                              `json:"serviceBusyError,omitempty"`
	DomainNotActiveError           *shared.DomainNotActiveError                          `json:"domainNotActiveError,omitempty"`
	LimitExceededError             *shared.LimitExceededError                            `json:"limitExceededError,omitempty"`
	EntityNotExistError            *shared.EntityNotExistsError                          `json:"entityNotExistError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError                `json:"clientVersionNotSupportedError,omitempty"`
	AccessDeniedError              *shared.AccessDeniedError                             `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_SignalWithStartWorkflowExecutionAsync_Result struct into a Thrift-level intermediate
// representation. This intermediate representation may be serialized
// into bytes using a ThriftRW protocol implementation.
//
// 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_SignalWithStartWorkflowExecutionAsync_Result) ToWire() (wire.Value, error) {
	var (
		fields [9]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.SessionAlreadyExistError != nil {
		w, err = v.SessionAlreadyExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_SignalWithStartWorkflowExecutionAsync_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _SignalWithStartWorkflowExecutionAsyncResponse_Read(w wire.Value) (*shared.SignalWithStartWorkflowExecutionAsyncResponse, error) {
	var v shared.SignalWithStartWorkflowExecutionAsyncResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_SignalWithStartWorkflowExecutionAsync_Result struct from its Thrift-level
// representation. The Thrift-level representation may be obtained
// from a ThriftRW protocol implementation.
//
// An error is returned if we were unable to build a WorkflowService_SignalWithStartWorkflowExecutionAsync_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_SignalWithStartWorkflowExecutionAsync_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _SignalWithStartWorkflowExecutionAsyncResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.SessionAlreadyExistError, err = _WorkflowExecutionAlreadyStartedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			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.SessionAlreadyExistError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_SignalWithStartWorkflowExecutionAsync_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_SignalWithStartWorkflowExecutionAsync_Result
// struct.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [9]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.SessionAlreadyExistError != nil {
		fields[i] = fmt.Sprintf("SessionAlreadyExistError: %v", v.SessionAlreadyExistError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_SignalWithStartWorkflowExecutionAsync_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_SignalWithStartWorkflowExecutionAsync_Result match the
// provided WorkflowService_SignalWithStartWorkflowExecutionAsync_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) Equals(rhs *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.SessionAlreadyExistError == nil && rhs.SessionAlreadyExistError == nil) || (v.SessionAlreadyExistError != nil && rhs.SessionAlreadyExistError != nil && v.SessionAlreadyExistError.Equals(rhs.SessionAlreadyExistError))) {
		return false
	}
	if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) {
		return false
	}
	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_SignalWithStartWorkflowExecutionAsync_Result.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.SessionAlreadyExistError != nil {
		err = multierr.Append(err, enc.AddObject("sessionAlreadyExistError", v.SessionAlreadyExistError))
	}
	if v.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.ClientVersionNotSupportedError != nil {
		err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError))
	}
	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_SignalWithStartWorkflowExecutionAsync_Result) GetSuccess() (o *shared.SignalWithStartWorkflowExecutionAsyncResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetSessionAlreadyExistError returns the value of SessionAlreadyExistError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) GetSessionAlreadyExistError() (o *shared.WorkflowExecutionAlreadyStartedError) {
	if v != nil && v.SessionAlreadyExistError != nil {
		return v.SessionAlreadyExistError
	}

	return
}

// IsSetSessionAlreadyExistError returns true if SessionAlreadyExistError is not nil.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetSessionAlreadyExistError() bool {
	return v != nil && v.SessionAlreadyExistError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) GetLimitExceededError() (o *shared.LimitExceededError) {
	if v != nil && v.LimitExceededError != nil {
		return v.LimitExceededError
	}

	return
}

// IsSetLimitExceededError returns true if LimitExceededError is not nil.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetLimitExceededError() bool {
	return v != nil && v.LimitExceededError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) {
	if v != nil && v.EntityNotExistError != nil {
		return v.EntityNotExistError
	}

	return
}

// IsSetEntityNotExistError returns true if EntityNotExistError is not nil.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) {
	if v != nil && v.ClientVersionNotSupportedError != nil {
		return v.ClientVersionNotSupportedError
	}

	return
}

// IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_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_SignalWithStartWorkflowExecutionAsync_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 "SignalWithStartWorkflowExecutionAsync" for this struct.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) MethodName() string {
	return "SignalWithStartWorkflowExecutionAsync"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_SignalWithStartWorkflowExecutionAsync_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_SignalWorkflowExecution_Args represents the arguments for the WorkflowService.SignalWorkflowExecution function.
//
// The arguments for SignalWorkflowExecution are sent and received over the wire as this struct.
type WorkflowService_SignalWorkflowExecution_Args struct {
	SignalRequest *shared.SignalWorkflowExecutionRequest `json:"signalRequest,omitempty"`
}

// ToWire translates a WorkflowService_SignalWorkflowExecution_Args struct into a Thrift-level intermediate
// representation. This intermediate representation may be serialized
// into bytes using a ThriftRW protocol implementation.
//
// An error is returned if the struct or any of its fields failed to
// validate.
//
//	x, err := v.ToWire()
//	if err != nil {
//	  return err
//	}
//
//	if err := binaryProtocol.Encode(x, writer); err != nil {
//	  return err
//	}
func (v *WorkflowService_SignalWorkflowExecution_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.SignalRequest != nil {
		w, err = v.SignalRequest.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _SignalWorkflowExecutionRequest_Read(w wire.Value) (*shared.SignalWorkflowExecutionRequest, error) {
	var v shared.SignalWorkflowExecutionRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_SignalWorkflowExecution_Args struct from its Thrift-level
// representation. The Thrift-level representation may be obtained
// from a ThriftRW protocol implementation.
//
// An error is returned if we were unable to build a WorkflowService_SignalWorkflowExecution_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_SignalWorkflowExecution_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_SignalWorkflowExecution_Args) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.SignalRequest, err = _SignalWorkflowExecutionRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_SignalWorkflowExecution_Args
// struct.
func (v *WorkflowService_SignalWorkflowExecution_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.SignalRequest != nil {
		fields[i] = fmt.Sprintf("SignalRequest: %v", v.SignalRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_SignalWorkflowExecution_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_SignalWorkflowExecution_Args match the
// provided WorkflowService_SignalWorkflowExecution_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_SignalWorkflowExecution_Args) Equals(rhs *WorkflowService_SignalWorkflowExecution_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.SignalRequest == nil && rhs.SignalRequest == nil) || (v.SignalRequest != nil && rhs.SignalRequest != nil && v.SignalRequest.Equals(rhs.SignalRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_SignalWorkflowExecution_Args.
func (v *WorkflowService_SignalWorkflowExecution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.SignalRequest != nil {
		err = multierr.Append(err, enc.AddObject("signalRequest", v.SignalRequest))
	}
	return err
}

// GetSignalRequest returns the value of SignalRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWorkflowExecution_Args) GetSignalRequest() (o *shared.SignalWorkflowExecutionRequest) {
	if v != nil && v.SignalRequest != nil {
		return v.SignalRequest
	}

	return
}

// IsSetSignalRequest returns true if SignalRequest is not nil.
func (v *WorkflowService_SignalWorkflowExecution_Args) IsSetSignalRequest() bool {
	return v != nil && v.SignalRequest != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "SignalWorkflowExecution" for this struct.
func (v *WorkflowService_SignalWorkflowExecution_Args) MethodName() string {
	return "SignalWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_SignalWorkflowExecution_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_SignalWorkflowExecution_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.SignalWorkflowExecution
// function.
var WorkflowService_SignalWorkflowExecution_Helper = struct {
	// Args accepts the parameters of SignalWorkflowExecution in-order and returns
	// the arguments struct for the function.
	Args func(
		signalRequest *shared.SignalWorkflowExecutionRequest,
	) *WorkflowService_SignalWorkflowExecution_Args

	// IsException returns true if the given error can be thrown
	// by SignalWorkflowExecution.
	//
	// An error can be thrown by SignalWorkflowExecution only if the
	// corresponding exception type was mentioned in the 'throws'
	// section for it in the Thrift file.
	IsException func(error) bool

	// WrapResponse returns the result struct for SignalWorkflowExecution
	// given the error returned by it. The provided error may
	// be nil if SignalWorkflowExecution did not fail.
	//
	// This allows mapping errors returned by SignalWorkflowExecution into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// SignalWorkflowExecution
	//
	//   err := SignalWorkflowExecution(args)
	//   result, err := WorkflowService_SignalWorkflowExecution_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from SignalWorkflowExecution: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*WorkflowService_SignalWorkflowExecution_Result, error)

	// UnwrapResponse takes the result struct for SignalWorkflowExecution
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if SignalWorkflowExecution threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := WorkflowService_SignalWorkflowExecution_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_SignalWorkflowExecution_Result) error
}{}

func init() {
	WorkflowService_SignalWorkflowExecution_Helper.Args = func(
		signalRequest *shared.SignalWorkflowExecutionRequest,
	) *WorkflowService_SignalWorkflowExecution_Args {
		return &WorkflowService_SignalWorkflowExecution_Args{
			SignalRequest: signalRequest,
		}
	}

	WorkflowService_SignalWorkflowExecution_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.WorkflowExecutionAlreadyCompletedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_SignalWorkflowExecution_Helper.WrapResponse = func(err error) (*WorkflowService_SignalWorkflowExecution_Result, error) {
		if err == nil {
			return &WorkflowService_SignalWorkflowExecution_Result{}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.BadRequestError")
			}
			return &WorkflowService_SignalWorkflowExecution_Result{BadRequestError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.EntityNotExistError")
			}
			return &WorkflowService_SignalWorkflowExecution_Result{EntityNotExistError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.ServiceBusyError")
			}
			return &WorkflowService_SignalWorkflowExecution_Result{ServiceBusyError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.DomainNotActiveError")
			}
			return &WorkflowService_SignalWorkflowExecution_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.LimitExceededError")
			}
			return &WorkflowService_SignalWorkflowExecution_Result{LimitExceededError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_SignalWorkflowExecution_Result{ClientVersionNotSupportedError: e}, nil
		case *shared.WorkflowExecutionAlreadyCompletedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.WorkflowExecutionAlreadyCompletedError")
			}
			return &WorkflowService_SignalWorkflowExecution_Result{WorkflowExecutionAlreadyCompletedError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_SignalWorkflowExecution_Result.AccessDeniedError")
			}
			return &WorkflowService_SignalWorkflowExecution_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_SignalWorkflowExecution_Helper.UnwrapResponse = func(result *WorkflowService_SignalWorkflowExecution_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.LimitExceededError != nil {
			err = result.LimitExceededError
			return
		}
		if result.ClientVersionNotSupportedError != nil {
			err = result.ClientVersionNotSupportedError
			return
		}
		if result.WorkflowExecutionAlreadyCompletedError != nil {
			err = result.WorkflowExecutionAlreadyCompletedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// WorkflowService_SignalWorkflowExecution_Result represents the result of a WorkflowService.SignalWorkflowExecution function call.
//
// The result of a SignalWorkflowExecution execution is sent and received over the wire as this struct.
type WorkflowService_SignalWorkflowExecution_Result struct {
	BadRequestError                        *shared.BadRequestError                        `json:"badRequestError,omitempty"`
	EntityNotExistError                    *shared.EntityNotExistsError                   `json:"entityNotExistError,omitempty"`
	ServiceBusyError                       *shared.ServiceBusyError                       `json:"serviceBusyError,omitempty"`
	DomainNotActiveError                   *shared.DomainNotActiveError                   `json:"domainNotActiveError,omitempty"`
	LimitExceededError                     *shared.LimitExceededError                     `json:"limitExceededError,omitempty"`
	ClientVersionNotSupportedError         *shared.ClientVersionNotSupportedError         `json:"clientVersionNotSupportedError,omitempty"`
	WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"`
	AccessDeniedError                      *shared.AccessDeniedError                      `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_SignalWorkflowExecution_Result struct into a Thrift-level intermediate
// representation. This intermediate representation may be serialized
// into bytes using a ThriftRW protocol implementation.
//
// An error is returned if the struct or any of its fields failed to
// validate.
//
//	x, err := v.ToWire()
//	if err != nil {
//	  return err
//	}
//
//	if err := binaryProtocol.Encode(x, writer); err != nil {
//	  return err
//	}
func (v *WorkflowService_SignalWorkflowExecution_Result) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_SignalWorkflowExecution_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a WorkflowService_SignalWorkflowExecution_Result struct from its Thrift-level
// representation. The Thrift-level representation may be obtained
// from a ThriftRW protocol implementation.
//
// An error is returned if we were unable to build a WorkflowService_SignalWorkflowExecution_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_SignalWorkflowExecution_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_SignalWorkflowExecution_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			if field.Value.Type() == wire.TStruct {
				v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("WorkflowService_SignalWorkflowExecution_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_SignalWorkflowExecution_Result
// struct.
func (v *WorkflowService_SignalWorkflowExecution_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError)
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_SignalWorkflowExecution_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_SignalWorkflowExecution_Result match the
// provided WorkflowService_SignalWorkflowExecution_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_SignalWorkflowExecution_Result) Equals(rhs *WorkflowService_SignalWorkflowExecution_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) {
		return false
	}
	if !((v.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) {
		return false
	}
	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_SignalWorkflowExecution_Result.
func (v *WorkflowService_SignalWorkflowExecution_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.ClientVersionNotSupportedError != nil {
		err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError))
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError))
	}
	if v.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWorkflowExecution_Result) GetBadRequestError() (o *shared.BadRequestError) {
	if v != nil && v.BadRequestError != nil {
		return v.BadRequestError
	}

	return
}

// IsSetBadRequestError returns true if BadRequestError is not nil.
func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWorkflowExecution_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) {
	if v != nil && v.EntityNotExistError != nil {
		return v.EntityNotExistError
	}

	return
}

// IsSetEntityNotExistError returns true if EntityNotExistError is not nil.
func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWorkflowExecution_Result) GetServiceBusyError() (o *shared.ServiceBusyError) {
	if v != nil && v.ServiceBusyError != nil {
		return v.ServiceBusyError
	}

	return
}

// IsSetServiceBusyError returns true if ServiceBusyError is not nil.
func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWorkflowExecution_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWorkflowExecution_Result) GetLimitExceededError() (o *shared.LimitExceededError) {
	if v != nil && v.LimitExceededError != nil {
		return v.LimitExceededError
	}

	return
}

// IsSetLimitExceededError returns true if LimitExceededError is not nil.
func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetLimitExceededError() bool {
	return v != nil && v.LimitExceededError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWorkflowExecution_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) {
	if v != nil && v.ClientVersionNotSupportedError != nil {
		return v.ClientVersionNotSupportedError
	}

	return
}

// IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil.
func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWorkflowExecution_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) {
	if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil {
		return v.WorkflowExecutionAlreadyCompletedError
	}

	return
}

// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil.
func (v *WorkflowService_SignalWorkflowExecution_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool {
	return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_SignalWorkflowExecution_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_SignalWorkflowExecution_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 "SignalWorkflowExecution" for this struct.
func (v *WorkflowService_SignalWorkflowExecution_Result) MethodName() string {
	return "SignalWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_SignalWorkflowExecution_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_StartWorkflowExecution_Args represents the arguments for the WorkflowService.StartWorkflowExecution function.
//
// The arguments for StartWorkflowExecution are sent and received over the wire as this struct.
type WorkflowService_StartWorkflowExecution_Args struct {
	StartRequest *shared.StartWorkflowExecutionRequest `json:"startRequest,omitempty"`
}

// ToWire translates a WorkflowService_StartWorkflowExecution_Args struct into a Thrift-level intermediate
// representation. This intermediate representation may be serialized
// into bytes using a ThriftRW protocol implementation.
//
// An error is returned if the struct or any of its fields failed to
// validate.
//
//	x, err := v.ToWire()
//	if err != nil {
//	  return err
//	}
//
//	if err := binaryProtocol.Encode(x, writer); err != nil {
//	  return err
//	}
func (v *WorkflowService_StartWorkflowExecution_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.StartRequest != nil {
		w, err = v.StartRequest.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _StartWorkflowExecutionRequest_Read(w wire.Value) (*shared.StartWorkflowExecutionRequest, error) {
	var v shared.StartWorkflowExecutionRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_StartWorkflowExecution_Args struct from its Thrift-level
// representation. The Thrift-level representation may be obtained
// from a ThriftRW protocol implementation.
//
// An error is returned if we were unable to build a WorkflowService_StartWorkflowExecution_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_StartWorkflowExecution_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_StartWorkflowExecution_Args) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.StartRequest, err = _StartWorkflowExecutionRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_StartWorkflowExecution_Args
// struct.
func (v *WorkflowService_StartWorkflowExecution_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.StartRequest != nil {
		fields[i] = fmt.Sprintf("StartRequest: %v", v.StartRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_StartWorkflowExecution_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_StartWorkflowExecution_Args match the
// provided WorkflowService_StartWorkflowExecution_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_StartWorkflowExecution_Args) Equals(rhs *WorkflowService_StartWorkflowExecution_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.StartRequest == nil && rhs.StartRequest == nil) || (v.StartRequest != nil && rhs.StartRequest != nil && v.StartRequest.Equals(rhs.StartRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_StartWorkflowExecution_Args.
func (v *WorkflowService_StartWorkflowExecution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.StartRequest != nil {
		err = multierr.Append(err, enc.AddObject("startRequest", v.StartRequest))
	}
	return err
}

// GetStartRequest returns the value of StartRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecution_Args) GetStartRequest() (o *shared.StartWorkflowExecutionRequest) {
	if v != nil && v.StartRequest != nil {
		return v.StartRequest
	}

	return
}

// IsSetStartRequest returns true if StartRequest is not nil.
func (v *WorkflowService_StartWorkflowExecution_Args) IsSetStartRequest() bool {
	return v != nil && v.StartRequest != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "StartWorkflowExecution" for this struct.
func (v *WorkflowService_StartWorkflowExecution_Args) MethodName() string {
	return "StartWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_StartWorkflowExecution_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_StartWorkflowExecution_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.StartWorkflowExecution
// function.
var WorkflowService_StartWorkflowExecution_Helper = struct {
	// Args accepts the parameters of StartWorkflowExecution in-order and returns
	// the arguments struct for the function.
	Args func(
		startRequest *shared.StartWorkflowExecutionRequest,
	) *WorkflowService_StartWorkflowExecution_Args

	// IsException returns true if the given error can be thrown
	// by StartWorkflowExecution.
	//
	// An error can be thrown by StartWorkflowExecution only if the
	// corresponding exception type was mentioned in the 'throws'
	// section for it in the Thrift file.
	IsException func(error) bool

	// WrapResponse returns the result struct for StartWorkflowExecution
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// StartWorkflowExecution into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by StartWorkflowExecution
	//
	//   value, err := StartWorkflowExecution(args)
	//   result, err := WorkflowService_StartWorkflowExecution_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from StartWorkflowExecution: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.StartWorkflowExecutionResponse, error) (*WorkflowService_StartWorkflowExecution_Result, error)

	// UnwrapResponse takes the result struct for StartWorkflowExecution
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if StartWorkflowExecution threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_StartWorkflowExecution_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_StartWorkflowExecution_Result) (*shared.StartWorkflowExecutionResponse, error)
}{}

func init() {
	WorkflowService_StartWorkflowExecution_Helper.Args = func(
		startRequest *shared.StartWorkflowExecutionRequest,
	) *WorkflowService_StartWorkflowExecution_Args {
		return &WorkflowService_StartWorkflowExecution_Args{
			StartRequest: startRequest,
		}
	}

	WorkflowService_StartWorkflowExecution_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.WorkflowExecutionAlreadyStartedError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_StartWorkflowExecution_Helper.WrapResponse = func(success *shared.StartWorkflowExecutionResponse, err error) (*WorkflowService_StartWorkflowExecution_Result, error) {
		if err == nil {
			return &WorkflowService_StartWorkflowExecution_Result{Success: success}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.BadRequestError")
			}
			return &WorkflowService_StartWorkflowExecution_Result{BadRequestError: e}, nil
		case *shared.WorkflowExecutionAlreadyStartedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.SessionAlreadyExistError")
			}
			return &WorkflowService_StartWorkflowExecution_Result{SessionAlreadyExistError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.ServiceBusyError")
			}
			return &WorkflowService_StartWorkflowExecution_Result{ServiceBusyError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.DomainNotActiveError")
			}
			return &WorkflowService_StartWorkflowExecution_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.LimitExceededError")
			}
			return &WorkflowService_StartWorkflowExecution_Result{LimitExceededError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.EntityNotExistError")
			}
			return &WorkflowService_StartWorkflowExecution_Result{EntityNotExistError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_StartWorkflowExecution_Result{ClientVersionNotSupportedError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecution_Result.AccessDeniedError")
			}
			return &WorkflowService_StartWorkflowExecution_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_StartWorkflowExecution_Helper.UnwrapResponse = func(result *WorkflowService_StartWorkflowExecution_Result) (success *shared.StartWorkflowExecutionResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.SessionAlreadyExistError != nil {
			err = result.SessionAlreadyExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.LimitExceededError != nil {
			err = result.LimitExceededError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ClientVersionNotSupportedError != nil {
			err = result.ClientVersionNotSupportedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// WorkflowService_StartWorkflowExecution_Result represents the result of a WorkflowService.StartWorkflowExecution function call.
//
// The result of a StartWorkflowExecution execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type WorkflowService_StartWorkflowExecution_Result struct {
	// Value returned by StartWorkflowExecution after a successful execution.
	Success                        *shared.StartWorkflowExecutionResponse       `json:"success,omitempty"`
	BadRequestError                *shared.BadRequestError                      `json:"badRequestError,omitempty"`
	SessionAlreadyExistError       *shared.WorkflowExecutionAlreadyStartedError `json:"sessionAlreadyExistError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError                     `json:"serviceBusyError,omitempty"`
	DomainNotActiveError           *shared.DomainNotActiveError                 `json:"domainNotActiveError,omitempty"`
	LimitExceededError             *shared.LimitExceededError                   `json:"limitExceededError,omitempty"`
	EntityNotExistError            *shared.EntityNotExistsError                 `json:"entityNotExistError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError       `json:"clientVersionNotSupportedError,omitempty"`
	AccessDeniedError              *shared.AccessDeniedError                    `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_StartWorkflowExecution_Result struct into a Thrift-level intermediate
// representation. This intermediate representation may be serialized
// into bytes using a ThriftRW protocol implementation.
//
// An error is returned if the struct or any of its fields failed to
// validate.
//
//	x, err := v.ToWire()
//	if err != nil {
//	  return err
//	}
//
//	if err := binaryProtocol.Encode(x, writer); err != nil {
//	  return err
//	}
func (v *WorkflowService_StartWorkflowExecution_Result) ToWire() (wire.Value, error) {
	var (
		fields [9]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.SessionAlreadyExistError != nil {
		w, err = v.SessionAlreadyExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_StartWorkflowExecution_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a WorkflowService_StartWorkflowExecution_Result struct from its Thrift-level
// representation. The Thrift-level representation may be obtained
// from a ThriftRW protocol implementation.
//
// An error is returned if we were unable to build a WorkflowService_StartWorkflowExecution_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_StartWorkflowExecution_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_StartWorkflowExecution_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _StartWorkflowExecutionResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.SessionAlreadyExistError, err = _WorkflowExecutionAlreadyStartedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			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.SessionAlreadyExistError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_StartWorkflowExecution_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_StartWorkflowExecution_Result
// struct.
func (v *WorkflowService_StartWorkflowExecution_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [9]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.SessionAlreadyExistError != nil {
		fields[i] = fmt.Sprintf("SessionAlreadyExistError: %v", v.SessionAlreadyExistError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_StartWorkflowExecution_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_StartWorkflowExecution_Result match the
// provided WorkflowService_StartWorkflowExecution_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_StartWorkflowExecution_Result) Equals(rhs *WorkflowService_StartWorkflowExecution_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.SessionAlreadyExistError == nil && rhs.SessionAlreadyExistError == nil) || (v.SessionAlreadyExistError != nil && rhs.SessionAlreadyExistError != nil && v.SessionAlreadyExistError.Equals(rhs.SessionAlreadyExistError))) {
		return false
	}
	if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) {
		return false
	}
	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_StartWorkflowExecution_Result.
func (v *WorkflowService_StartWorkflowExecution_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.SessionAlreadyExistError != nil {
		err = multierr.Append(err, enc.AddObject("sessionAlreadyExistError", v.SessionAlreadyExistError))
	}
	if v.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.ClientVersionNotSupportedError != nil {
		err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError))
	}
	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_StartWorkflowExecution_Result) GetSuccess() (o *shared.StartWorkflowExecutionResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_StartWorkflowExecution_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecution_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_StartWorkflowExecution_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetSessionAlreadyExistError returns the value of SessionAlreadyExistError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecution_Result) GetSessionAlreadyExistError() (o *shared.WorkflowExecutionAlreadyStartedError) {
	if v != nil && v.SessionAlreadyExistError != nil {
		return v.SessionAlreadyExistError
	}

	return
}

// IsSetSessionAlreadyExistError returns true if SessionAlreadyExistError is not nil.
func (v *WorkflowService_StartWorkflowExecution_Result) IsSetSessionAlreadyExistError() bool {
	return v != nil && v.SessionAlreadyExistError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecution_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_StartWorkflowExecution_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecution_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_StartWorkflowExecution_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecution_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_StartWorkflowExecution_Result) IsSetLimitExceededError() bool {
	return v != nil && v.LimitExceededError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecution_Result) GetEntityNotExistError() (o *shared.EntityNotExistsError) {
	if v != nil && v.EntityNotExistError != nil {
		return v.EntityNotExistError
	}

	return
}

// IsSetEntityNotExistError returns true if EntityNotExistError is not nil.
func (v *WorkflowService_StartWorkflowExecution_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecution_Result) GetClientVersionNotSupportedError() (o *shared.ClientVersionNotSupportedError) {
	if v != nil && v.ClientVersionNotSupportedError != nil {
		return v.ClientVersionNotSupportedError
	}

	return
}

// IsSetClientVersionNotSupportedError returns true if ClientVersionNotSupportedError is not nil.
func (v *WorkflowService_StartWorkflowExecution_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_StartWorkflowExecution_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_StartWorkflowExecution_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 "StartWorkflowExecution" for this struct.
func (v *WorkflowService_StartWorkflowExecution_Result) MethodName() string {
	return "StartWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_StartWorkflowExecution_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_StartWorkflowExecutionAsync_Args represents the arguments for the WorkflowService.StartWorkflowExecutionAsync function.
//
// The arguments for StartWorkflowExecutionAsync are sent and received over the wire as this struct.
type WorkflowService_StartWorkflowExecutionAsync_Args struct {
	StartRequest *shared.StartWorkflowExecutionAsyncRequest `json:"startRequest,omitempty"`
}

// ToWire translates a WorkflowService_StartWorkflowExecutionAsync_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_StartWorkflowExecutionAsync_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.StartRequest != nil {
		w, err = v.StartRequest.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _StartWorkflowExecutionAsyncRequest_Read(w wire.Value) (*shared.StartWorkflowExecutionAsyncRequest, error) {
	var v shared.StartWorkflowExecutionAsyncRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_StartWorkflowExecutionAsync_Args struct from its Thrift-level
// representation. The Thrift-level representation may be obtained
// from a ThriftRW protocol implementation.
//
// An error is returned if we were unable to build a WorkflowService_StartWorkflowExecutionAsync_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_StartWorkflowExecutionAsync_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_StartWorkflowExecutionAsync_Args) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.StartRequest, err = _StartWorkflowExecutionAsyncRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_StartWorkflowExecutionAsync_Args
// struct.
func (v *WorkflowService_StartWorkflowExecutionAsync_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.StartRequest != nil {
		fields[i] = fmt.Sprintf("StartRequest: %v", v.StartRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_StartWorkflowExecutionAsync_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_StartWorkflowExecutionAsync_Args match the
// provided WorkflowService_StartWorkflowExecutionAsync_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_StartWorkflowExecutionAsync_Args) Equals(rhs *WorkflowService_StartWorkflowExecutionAsync_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.StartRequest == nil && rhs.StartRequest == nil) || (v.StartRequest != nil && rhs.StartRequest != nil && v.StartRequest.Equals(rhs.StartRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_StartWorkflowExecutionAsync_Args.
func (v *WorkflowService_StartWorkflowExecutionAsync_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.StartRequest != nil {
		err = multierr.Append(err, enc.AddObject("startRequest", v.StartRequest))
	}
	return err
}

// GetStartRequest returns the value of StartRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecutionAsync_Args) GetStartRequest() (o *shared.StartWorkflowExecutionAsyncRequest) {
	if v != nil && v.StartRequest != nil {
		return v.StartRequest
	}

	return
}

// IsSetStartRequest returns true if StartRequest is not nil.
func (v *WorkflowService_StartWorkflowExecutionAsync_Args) IsSetStartRequest() bool {
	return v != nil && v.StartRequest != nil
}

// MethodName returns the name of the Thrift function as specified in
// the IDL, for which this struct represent the arguments.
//
// This will always be "StartWorkflowExecutionAsync" for this struct.
func (v *WorkflowService_StartWorkflowExecutionAsync_Args) MethodName() string {
	return "StartWorkflowExecutionAsync"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_StartWorkflowExecutionAsync_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_StartWorkflowExecutionAsync_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.StartWorkflowExecutionAsync
// function.
var WorkflowService_StartWorkflowExecutionAsync_Helper = struct {
	// Args accepts the parameters of StartWorkflowExecutionAsync in-order and returns
	// the arguments struct for the function.
	Args func(
		startRequest *shared.StartWorkflowExecutionAsyncRequest,
	) *WorkflowService_StartWorkflowExecutionAsync_Args

	// IsException returns true if the given error can be thrown
	// by StartWorkflowExecutionAsync.
	//
	// An error can be thrown by StartWorkflowExecutionAsync only if the
	// corresponding exception type was mentioned in the 'throws'
	// section for it in the Thrift file.
	IsException func(error) bool

	// WrapResponse returns the result struct for StartWorkflowExecutionAsync
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// StartWorkflowExecutionAsync into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by StartWorkflowExecutionAsync
	//
	//   value, err := StartWorkflowExecutionAsync(args)
	//   result, err := WorkflowService_StartWorkflowExecutionAsync_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from StartWorkflowExecutionAsync: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.StartWorkflowExecutionAsyncResponse, error) (*WorkflowService_StartWorkflowExecutionAsync_Result, error)

	// UnwrapResponse takes the result struct for StartWorkflowExecutionAsync
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if StartWorkflowExecutionAsync threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_StartWorkflowExecutionAsync_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_StartWorkflowExecutionAsync_Result) (*shared.StartWorkflowExecutionAsyncResponse, error)
}{}

func init() {
	WorkflowService_StartWorkflowExecutionAsync_Helper.Args = func(
		startRequest *shared.StartWorkflowExecutionAsyncRequest,
	) *WorkflowService_StartWorkflowExecutionAsync_Args {
		return &WorkflowService_StartWorkflowExecutionAsync_Args{
			StartRequest: startRequest,
		}
	}

	WorkflowService_StartWorkflowExecutionAsync_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.WorkflowExecutionAlreadyStartedError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_StartWorkflowExecutionAsync_Helper.WrapResponse = func(success *shared.StartWorkflowExecutionAsyncResponse, err error) (*WorkflowService_StartWorkflowExecutionAsync_Result, error) {
		if err == nil {
			return &WorkflowService_StartWorkflowExecutionAsync_Result{Success: success}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecutionAsync_Result.BadRequestError")
			}
			return &WorkflowService_StartWorkflowExecutionAsync_Result{BadRequestError: e}, nil
		case *shared.WorkflowExecutionAlreadyStartedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecutionAsync_Result.SessionAlreadyExistError")
			}
			return &WorkflowService_StartWorkflowExecutionAsync_Result{SessionAlreadyExistError: e}, nil
		case *shared.ServiceBusyError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecutionAsync_Result.ServiceBusyError")
			}
			return &WorkflowService_StartWorkflowExecutionAsync_Result{ServiceBusyError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecutionAsync_Result.DomainNotActiveError")
			}
			return &WorkflowService_StartWorkflowExecutionAsync_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecutionAsync_Result.LimitExceededError")
			}
			return &WorkflowService_StartWorkflowExecutionAsync_Result{LimitExceededError: e}, nil
		case *shared.EntityNotExistsError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecutionAsync_Result.EntityNotExistError")
			}
			return &WorkflowService_StartWorkflowExecutionAsync_Result{EntityNotExistError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_StartWorkflowExecutionAsync_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_StartWorkflowExecutionAsync_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_StartWorkflowExecutionAsync_Result.AccessDeniedError")
			}
			return &WorkflowService_StartWorkflowExecutionAsync_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_StartWorkflowExecutionAsync_Helper.UnwrapResponse = func(result *WorkflowService_StartWorkflowExecutionAsync_Result) (success *shared.StartWorkflowExecutionAsyncResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.SessionAlreadyExistError != nil {
			err = result.SessionAlreadyExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.LimitExceededError != nil {
			err = result.LimitExceededError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ClientVersionNotSupportedError != nil {
			err = result.ClientVersionNotSupportedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}

		if result.Success != nil {
			success = result.Success
			return
		}

		err = errors.New("expected a non-void result")
		return
	}

}

// WorkflowService_StartWorkflowExecutionAsync_Result represents the result of a WorkflowService.StartWorkflowExecutionAsync function call.
//
// The result of a StartWorkflowExecutionAsync execution is sent and received over the wire as this struct.
//
// Success is set only if the function did not throw an exception.
type WorkflowService_StartWorkflowExecutionAsync_Result struct {
	// Value returned by StartWorkflowExecutionAsync after a successful execution.
	Success                        *shared.StartWorkflowExecutionAsyncResponse  `json:"success,omitempty"`
	BadRequestError                *shared.BadRequestError                      `json:"badRequestError,omitempty"`
	SessionAlreadyExistError       *shared.WorkflowExecutionAlreadyStartedError `json:"sessionAlreadyExistError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError                     `json:"serviceBusyError,omitempty"`
	DomainNotActiveError           *shared.DomainNotActiveError                 `json:"domainNotActiveError,omitempty"`
	LimitExceededError             *shared.LimitExceededError                   `json:"limitExceededError,omitempty"`
	EntityNotExistError            *shared.EntityNotExistsError                 `json:"entityNotExistError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError       `json:"clientVersionNotSupportedError,omitempty"`
	AccessDeniedError              *shared.AccessDeniedError                    `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_StartWorkflowExecutionAsync_Result struct into a Thrift-level intermediate
// representation. This intermediate representation may be serialized
// into bytes using a ThriftRW protocol implementation.
//
// 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_StartWorkflowExecutionAsync_Result) ToWire() (wire.Value, error) {
	var (
		fields [9]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.Success != nil {
		w, err = v.Success.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 0, Value: w}
		i++
	}
	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.SessionAlreadyExistError != nil {
		w, err = v.SessionAlreadyExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_StartWorkflowExecutionAsync_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _StartWorkflowExecutionAsyncResponse_Read(w wire.Value) (*shared.StartWorkflowExecutionAsyncResponse, error) {
	var v shared.StartWorkflowExecutionAsyncResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_StartWorkflowExecutionAsync_Result struct from its Thrift-level
// representation. The Thrift-level representation may be obtained
// from a ThriftRW protocol implementation.
//
// An error is returned if we were unable to build a WorkflowService_StartWorkflowExecutionAsync_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_StartWorkflowExecutionAsync_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_StartWorkflowExecutionAsync_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 0:
			if field.Value.Type() == wire.TStruct {
				v.Success, err = _StartWorkflowExecutionAsyncResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.SessionAlreadyExistError, err = _WorkflowExecutionAlreadyStartedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			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.SessionAlreadyExistError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_StartWorkflowExecutionAsync_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_StartWorkflowExecutionAsync_Result
// struct.
func (v *WorkflowService_StartWorkflowExecutionAsync_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [9]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.SessionAlreadyExistError != nil {
		fields[i] = fmt.Sprintf("SessionAlreadyExistError: %v", v.SessionAlreadyExistError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_StartWorkflowExecutionAsync_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_StartWorkflowExecutionAsync_Result match the
// provided WorkflowService_StartWorkflowExecutionAsync_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_StartWorkflowExecutionAsync_Result) Equals(rhs *WorkflowService_StartWorkflowExecutionAsync_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Success == nil && rhs.Success == nil) || (v.Success != nil && rhs.Success != nil && v.Success.Equals(rhs.Success))) {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.SessionAlreadyExistError == nil && rhs.SessionAlreadyExistError == nil) || (v.SessionAlreadyExistError != nil && rhs.SessionAlreadyExistError != nil && v.SessionAlreadyExistError.Equals(rhs.SessionAlreadyExistError))) {
		return false
	}
	if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) {
		return false
	}
	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_StartWorkflowExecutionAsync_Result.
func (v *WorkflowService_StartWorkflowExecutionAsync_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.Success != nil {
		err = multierr.Append(err, enc.AddObject("success", v.Success))
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.SessionAlreadyExistError != nil {
		err = multierr.Append(err, enc.AddObject("sessionAlreadyExistError", v.SessionAlreadyExistError))
	}
	if v.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.ClientVersionNotSupportedError != nil {
		err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError))
	}
	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_StartWorkflowExecutionAsync_Result) GetSuccess() (o *shared.StartWorkflowExecutionAsyncResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_StartWorkflowExecutionAsync_Result) IsSetSuccess() bool {
	return v != nil && v.Success != nil
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecutionAsync_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_StartWorkflowExecutionAsync_Result) IsSetBadRequestError() bool {
	return v != nil && v.BadRequestError != nil
}

// GetSessionAlreadyExistError returns the value of SessionAlreadyExistError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecutionAsync_Result) GetSessionAlreadyExistError() (o *shared.WorkflowExecutionAlreadyStartedError) {
	if v != nil && v.SessionAlreadyExistError != nil {
		return v.SessionAlreadyExistError
	}

	return
}

// IsSetSessionAlreadyExistError returns true if SessionAlreadyExistError is not nil.
func (v *WorkflowService_StartWorkflowExecutionAsync_Result) IsSetSessionAlreadyExistError() bool {
	return v != nil && v.SessionAlreadyExistError != nil
}

// GetServiceBusyError returns the value of ServiceBusyError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecutionAsync_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_StartWorkflowExecutionAsync_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecutionAsync_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_StartWorkflowExecutionAsync_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecutionAsync_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_StartWorkflowExecutionAsync_Result) IsSetLimitExceededError() bool {
	return v != nil && v.LimitExceededError != nil
}

// GetEntityNotExistError returns the value of EntityNotExistError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecutionAsync_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_StartWorkflowExecutionAsync_Result) IsSetEntityNotExistError() bool {
	return v != nil && v.EntityNotExistError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_StartWorkflowExecutionAsync_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_StartWorkflowExecutionAsync_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_StartWorkflowExecutionAsync_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_StartWorkflowExecutionAsync_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 "StartWorkflowExecutionAsync" for this struct.
func (v *WorkflowService_StartWorkflowExecutionAsync_Result) MethodName() string {
	return "StartWorkflowExecutionAsync"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_StartWorkflowExecutionAsync_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_TerminateWorkflowExecution_Args represents the arguments for the WorkflowService.TerminateWorkflowExecution function.
//
// The arguments for TerminateWorkflowExecution are sent and received over the wire as this struct.
type WorkflowService_TerminateWorkflowExecution_Args struct {
	TerminateRequest *shared.TerminateWorkflowExecutionRequest `json:"terminateRequest,omitempty"`
}

// ToWire translates a WorkflowService_TerminateWorkflowExecution_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_TerminateWorkflowExecution_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.TerminateRequest != nil {
		w, err = v.TerminateRequest.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 _TerminateWorkflowExecutionRequest_Read(w wire.Value) (*shared.TerminateWorkflowExecutionRequest, error) {
	var v shared.TerminateWorkflowExecutionRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_TerminateWorkflowExecution_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_TerminateWorkflowExecution_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_TerminateWorkflowExecution_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_TerminateWorkflowExecution_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.TerminateRequest, err = _TerminateWorkflowExecutionRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_TerminateWorkflowExecution_Args
// struct.
func (v *WorkflowService_TerminateWorkflowExecution_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.TerminateRequest != nil {
		fields[i] = fmt.Sprintf("TerminateRequest: %v", v.TerminateRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_TerminateWorkflowExecution_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_TerminateWorkflowExecution_Args match the
// provided WorkflowService_TerminateWorkflowExecution_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_TerminateWorkflowExecution_Args) Equals(rhs *WorkflowService_TerminateWorkflowExecution_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.TerminateRequest == nil && rhs.TerminateRequest == nil) || (v.TerminateRequest != nil && rhs.TerminateRequest != nil && v.TerminateRequest.Equals(rhs.TerminateRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_TerminateWorkflowExecution_Args.
func (v *WorkflowService_TerminateWorkflowExecution_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.TerminateRequest != nil {
		err = multierr.Append(err, enc.AddObject("terminateRequest", v.TerminateRequest))
	}
	return err
}

// GetTerminateRequest returns the value of TerminateRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_TerminateWorkflowExecution_Args) GetTerminateRequest() (o *shared.TerminateWorkflowExecutionRequest) {
	if v != nil && v.TerminateRequest != nil {
		return v.TerminateRequest
	}

	return
}

// IsSetTerminateRequest returns true if TerminateRequest is not nil.
func (v *WorkflowService_TerminateWorkflowExecution_Args) IsSetTerminateRequest() bool {
	return v != nil && v.TerminateRequest != 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 "TerminateWorkflowExecution" for this struct.
func (v *WorkflowService_TerminateWorkflowExecution_Args) MethodName() string {
	return "TerminateWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_TerminateWorkflowExecution_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_TerminateWorkflowExecution_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.TerminateWorkflowExecution
// function.
var WorkflowService_TerminateWorkflowExecution_Helper = struct {
	// Args accepts the parameters of TerminateWorkflowExecution in-order and returns
	// the arguments struct for the function.
	Args func(
		terminateRequest *shared.TerminateWorkflowExecutionRequest,
	) *WorkflowService_TerminateWorkflowExecution_Args

	// IsException returns true if the given error can be thrown
	// by TerminateWorkflowExecution.
	//
	// An error can be thrown by TerminateWorkflowExecution 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 TerminateWorkflowExecution
	// given the error returned by it. The provided error may
	// be nil if TerminateWorkflowExecution did not fail.
	//
	// This allows mapping errors returned by TerminateWorkflowExecution into a
	// serializable result struct. WrapResponse returns a
	// non-nil error if the provided error cannot be thrown by
	// TerminateWorkflowExecution
	//
	//   err := TerminateWorkflowExecution(args)
	//   result, err := WorkflowService_TerminateWorkflowExecution_Helper.WrapResponse(err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from TerminateWorkflowExecution: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(error) (*WorkflowService_TerminateWorkflowExecution_Result, error)

	// UnwrapResponse takes the result struct for TerminateWorkflowExecution
	// and returns the erorr returned by it (if any).
	//
	// The error is non-nil only if TerminateWorkflowExecution threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   err := WorkflowService_TerminateWorkflowExecution_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_TerminateWorkflowExecution_Result) error
}{}

func init() {
	WorkflowService_TerminateWorkflowExecution_Helper.Args = func(
		terminateRequest *shared.TerminateWorkflowExecutionRequest,
	) *WorkflowService_TerminateWorkflowExecution_Args {
		return &WorkflowService_TerminateWorkflowExecution_Args{
			TerminateRequest: terminateRequest,
		}
	}

	WorkflowService_TerminateWorkflowExecution_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.LimitExceededError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.WorkflowExecutionAlreadyCompletedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_TerminateWorkflowExecution_Helper.WrapResponse = func(err error) (*WorkflowService_TerminateWorkflowExecution_Result, error) {
		if err == nil {
			return &WorkflowService_TerminateWorkflowExecution_Result{}, nil
		}

		switch e := err.(type) {
		case *shared.BadRequestError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_TerminateWorkflowExecution_Result.BadRequestError")
			}
			return &WorkflowService_TerminateWorkflowExecution_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_TerminateWorkflowExecution_Result.EntityNotExistError")
			}
			return &WorkflowService_TerminateWorkflowExecution_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_TerminateWorkflowExecution_Result.ServiceBusyError")
			}
			return &WorkflowService_TerminateWorkflowExecution_Result{ServiceBusyError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_TerminateWorkflowExecution_Result.DomainNotActiveError")
			}
			return &WorkflowService_TerminateWorkflowExecution_Result{DomainNotActiveError: e}, nil
		case *shared.LimitExceededError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_TerminateWorkflowExecution_Result.LimitExceededError")
			}
			return &WorkflowService_TerminateWorkflowExecution_Result{LimitExceededError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_TerminateWorkflowExecution_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_TerminateWorkflowExecution_Result{ClientVersionNotSupportedError: e}, nil
		case *shared.WorkflowExecutionAlreadyCompletedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_TerminateWorkflowExecution_Result.WorkflowExecutionAlreadyCompletedError")
			}
			return &WorkflowService_TerminateWorkflowExecution_Result{WorkflowExecutionAlreadyCompletedError: e}, nil
		case *shared.AccessDeniedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_TerminateWorkflowExecution_Result.AccessDeniedError")
			}
			return &WorkflowService_TerminateWorkflowExecution_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_TerminateWorkflowExecution_Helper.UnwrapResponse = func(result *WorkflowService_TerminateWorkflowExecution_Result) (err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.LimitExceededError != nil {
			err = result.LimitExceededError
			return
		}
		if result.ClientVersionNotSupportedError != nil {
			err = result.ClientVersionNotSupportedError
			return
		}
		if result.WorkflowExecutionAlreadyCompletedError != nil {
			err = result.WorkflowExecutionAlreadyCompletedError
			return
		}
		if result.AccessDeniedError != nil {
			err = result.AccessDeniedError
			return
		}
		return
	}

}

// WorkflowService_TerminateWorkflowExecution_Result represents the result of a WorkflowService.TerminateWorkflowExecution function call.
//
// The result of a TerminateWorkflowExecution execution is sent and received over the wire as this struct.
type WorkflowService_TerminateWorkflowExecution_Result struct {
	BadRequestError                        *shared.BadRequestError                        `json:"badRequestError,omitempty"`
	EntityNotExistError                    *shared.EntityNotExistsError                   `json:"entityNotExistError,omitempty"`
	ServiceBusyError                       *shared.ServiceBusyError                       `json:"serviceBusyError,omitempty"`
	DomainNotActiveError                   *shared.DomainNotActiveError                   `json:"domainNotActiveError,omitempty"`
	LimitExceededError                     *shared.LimitExceededError                     `json:"limitExceededError,omitempty"`
	ClientVersionNotSupportedError         *shared.ClientVersionNotSupportedError         `json:"clientVersionNotSupportedError,omitempty"`
	WorkflowExecutionAlreadyCompletedError *shared.WorkflowExecutionAlreadyCompletedError `json:"workflowExecutionAlreadyCompletedError,omitempty"`
	AccessDeniedError                      *shared.AccessDeniedError                      `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_TerminateWorkflowExecution_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_TerminateWorkflowExecution_Result) ToWire() (wire.Value, error) {
	var (
		fields [8]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.BadRequestError != nil {
		w, err = v.BadRequestError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 1, Value: w}
		i++
	}
	if v.EntityNotExistError != nil {
		w, err = v.EntityNotExistError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 3, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.LimitExceededError != nil {
		w, err = v.LimitExceededError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		w, err = v.WorkflowExecutionAlreadyCompletedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 8, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 9, Value: w}
		i++
	}

	if i > 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_TerminateWorkflowExecution_Result should have at most one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

// FromWire deserializes a WorkflowService_TerminateWorkflowExecution_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_TerminateWorkflowExecution_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_TerminateWorkflowExecution_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_TerminateWorkflowExecution_Result) FromWire(w wire.Value) error {
	var err error

	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.LimitExceededError, err = _LimitExceededError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 8:
			if field.Value.Type() == wire.TStruct {
				v.WorkflowExecutionAlreadyCompletedError, err = _WorkflowExecutionAlreadyCompletedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 9:
			if field.Value.Type() == wire.TStruct {
				v.AccessDeniedError, err = _AccessDeniedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	count := 0
	if v.BadRequestError != nil {
		count++
	}
	if v.EntityNotExistError != nil {
		count++
	}
	if v.ServiceBusyError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.LimitExceededError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count > 1 {
		return fmt.Errorf("WorkflowService_TerminateWorkflowExecution_Result should have at most one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_TerminateWorkflowExecution_Result
// struct.
func (v *WorkflowService_TerminateWorkflowExecution_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [8]string
	i := 0
	if v.BadRequestError != nil {
		fields[i] = fmt.Sprintf("BadRequestError: %v", v.BadRequestError)
		i++
	}
	if v.EntityNotExistError != nil {
		fields[i] = fmt.Sprintf("EntityNotExistError: %v", v.EntityNotExistError)
		i++
	}
	if v.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.LimitExceededError != nil {
		fields[i] = fmt.Sprintf("LimitExceededError: %v", v.LimitExceededError)
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		fields[i] = fmt.Sprintf("ClientVersionNotSupportedError: %v", v.ClientVersionNotSupportedError)
		i++
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		fields[i] = fmt.Sprintf("WorkflowExecutionAlreadyCompletedError: %v", v.WorkflowExecutionAlreadyCompletedError)
		i++
	}
	if v.AccessDeniedError != nil {
		fields[i] = fmt.Sprintf("AccessDeniedError: %v", v.AccessDeniedError)
		i++
	}

	return fmt.Sprintf("WorkflowService_TerminateWorkflowExecution_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_TerminateWorkflowExecution_Result match the
// provided WorkflowService_TerminateWorkflowExecution_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_TerminateWorkflowExecution_Result) Equals(rhs *WorkflowService_TerminateWorkflowExecution_Result) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.BadRequestError == nil && rhs.BadRequestError == nil) || (v.BadRequestError != nil && rhs.BadRequestError != nil && v.BadRequestError.Equals(rhs.BadRequestError))) {
		return false
	}
	if !((v.EntityNotExistError == nil && rhs.EntityNotExistError == nil) || (v.EntityNotExistError != nil && rhs.EntityNotExistError != nil && v.EntityNotExistError.Equals(rhs.EntityNotExistError))) {
		return false
	}
	if !((v.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.LimitExceededError == nil && rhs.LimitExceededError == nil) || (v.LimitExceededError != nil && rhs.LimitExceededError != nil && v.LimitExceededError.Equals(rhs.LimitExceededError))) {
		return false
	}
	if !((v.ClientVersionNotSupportedError == nil && rhs.ClientVersionNotSupportedError == nil) || (v.ClientVersionNotSupportedError != nil && rhs.ClientVersionNotSupportedError != nil && v.ClientVersionNotSupportedError.Equals(rhs.ClientVersionNotSupportedError))) {
		return false
	}
	if !((v.WorkflowExecutionAlreadyCompletedError == nil && rhs.WorkflowExecutionAlreadyCompletedError == nil) || (v.WorkflowExecutionAlreadyCompletedError != nil && rhs.WorkflowExecutionAlreadyCompletedError != nil && v.WorkflowExecutionAlreadyCompletedError.Equals(rhs.WorkflowExecutionAlreadyCompletedError))) {
		return false
	}
	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_TerminateWorkflowExecution_Result.
func (v *WorkflowService_TerminateWorkflowExecution_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.BadRequestError != nil {
		err = multierr.Append(err, enc.AddObject("badRequestError", v.BadRequestError))
	}
	if v.EntityNotExistError != nil {
		err = multierr.Append(err, enc.AddObject("entityNotExistError", v.EntityNotExistError))
	}
	if v.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.LimitExceededError != nil {
		err = multierr.Append(err, enc.AddObject("limitExceededError", v.LimitExceededError))
	}
	if v.ClientVersionNotSupportedError != nil {
		err = multierr.Append(err, enc.AddObject("clientVersionNotSupportedError", v.ClientVersionNotSupportedError))
	}
	if v.WorkflowExecutionAlreadyCompletedError != nil {
		err = multierr.Append(err, enc.AddObject("workflowExecutionAlreadyCompletedError", v.WorkflowExecutionAlreadyCompletedError))
	}
	if v.AccessDeniedError != nil {
		err = multierr.Append(err, enc.AddObject("accessDeniedError", v.AccessDeniedError))
	}
	return err
}

// GetBadRequestError returns the value of BadRequestError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_TerminateWorkflowExecution_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_TerminateWorkflowExecution_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_TerminateWorkflowExecution_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_TerminateWorkflowExecution_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_TerminateWorkflowExecution_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_TerminateWorkflowExecution_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_TerminateWorkflowExecution_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_TerminateWorkflowExecution_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetLimitExceededError returns the value of LimitExceededError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_TerminateWorkflowExecution_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_TerminateWorkflowExecution_Result) IsSetLimitExceededError() bool {
	return v != nil && v.LimitExceededError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_TerminateWorkflowExecution_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_TerminateWorkflowExecution_Result) IsSetClientVersionNotSupportedError() bool {
	return v != nil && v.ClientVersionNotSupportedError != nil
}

// GetWorkflowExecutionAlreadyCompletedError returns the value of WorkflowExecutionAlreadyCompletedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_TerminateWorkflowExecution_Result) GetWorkflowExecutionAlreadyCompletedError() (o *shared.WorkflowExecutionAlreadyCompletedError) {
	if v != nil && v.WorkflowExecutionAlreadyCompletedError != nil {
		return v.WorkflowExecutionAlreadyCompletedError
	}

	return
}

// IsSetWorkflowExecutionAlreadyCompletedError returns true if WorkflowExecutionAlreadyCompletedError is not nil.
func (v *WorkflowService_TerminateWorkflowExecution_Result) IsSetWorkflowExecutionAlreadyCompletedError() bool {
	return v != nil && v.WorkflowExecutionAlreadyCompletedError != nil
}

// GetAccessDeniedError returns the value of AccessDeniedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_TerminateWorkflowExecution_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_TerminateWorkflowExecution_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 "TerminateWorkflowExecution" for this struct.
func (v *WorkflowService_TerminateWorkflowExecution_Result) MethodName() string {
	return "TerminateWorkflowExecution"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_TerminateWorkflowExecution_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}

// WorkflowService_UpdateDomain_Args represents the arguments for the WorkflowService.UpdateDomain function.
//
// The arguments for UpdateDomain are sent and received over the wire as this struct.
type WorkflowService_UpdateDomain_Args struct {
	UpdateRequest *shared.UpdateDomainRequest `json:"updateRequest,omitempty"`
}

// ToWire translates a WorkflowService_UpdateDomain_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_UpdateDomain_Args) ToWire() (wire.Value, error) {
	var (
		fields [1]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)

	if v.UpdateRequest != nil {
		w, err = v.UpdateRequest.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 _UpdateDomainRequest_Read(w wire.Value) (*shared.UpdateDomainRequest, error) {
	var v shared.UpdateDomainRequest
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_UpdateDomain_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_UpdateDomain_Args struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_UpdateDomain_Args
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_UpdateDomain_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.UpdateRequest, err = _UpdateDomainRequest_Read(field.Value)
				if err != nil {
					return err
				}

			}
		}
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_UpdateDomain_Args
// struct.
func (v *WorkflowService_UpdateDomain_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.UpdateRequest != nil {
		fields[i] = fmt.Sprintf("UpdateRequest: %v", v.UpdateRequest)
		i++
	}

	return fmt.Sprintf("WorkflowService_UpdateDomain_Args{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_UpdateDomain_Args match the
// provided WorkflowService_UpdateDomain_Args.
//
// This function performs a deep comparison.
func (v *WorkflowService_UpdateDomain_Args) Equals(rhs *WorkflowService_UpdateDomain_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.UpdateRequest == nil && rhs.UpdateRequest == nil) || (v.UpdateRequest != nil && rhs.UpdateRequest != nil && v.UpdateRequest.Equals(rhs.UpdateRequest))) {
		return false
	}

	return true
}

// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of WorkflowService_UpdateDomain_Args.
func (v *WorkflowService_UpdateDomain_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.UpdateRequest != nil {
		err = multierr.Append(err, enc.AddObject("updateRequest", v.UpdateRequest))
	}
	return err
}

// GetUpdateRequest returns the value of UpdateRequest if it is set or its
// zero value if it is unset.
func (v *WorkflowService_UpdateDomain_Args) GetUpdateRequest() (o *shared.UpdateDomainRequest) {
	if v != nil && v.UpdateRequest != nil {
		return v.UpdateRequest
	}

	return
}

// IsSetUpdateRequest returns true if UpdateRequest is not nil.
func (v *WorkflowService_UpdateDomain_Args) IsSetUpdateRequest() bool {
	return v != nil && v.UpdateRequest != 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 "UpdateDomain" for this struct.
func (v *WorkflowService_UpdateDomain_Args) MethodName() string {
	return "UpdateDomain"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Call for this struct.
func (v *WorkflowService_UpdateDomain_Args) EnvelopeType() wire.EnvelopeType {
	return wire.Call
}

// WorkflowService_UpdateDomain_Helper provides functions that aid in handling the
// parameters and return values of the WorkflowService.UpdateDomain
// function.
var WorkflowService_UpdateDomain_Helper = struct {
	// Args accepts the parameters of UpdateDomain in-order and returns
	// the arguments struct for the function.
	Args func(
		updateRequest *shared.UpdateDomainRequest,
	) *WorkflowService_UpdateDomain_Args

	// IsException returns true if the given error can be thrown
	// by UpdateDomain.
	//
	// An error can be thrown by UpdateDomain 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 UpdateDomain
	// given its return value and error.
	//
	// This allows mapping values and errors returned by
	// UpdateDomain into a serializable result struct.
	// WrapResponse returns a non-nil error if the provided
	// error cannot be thrown by UpdateDomain
	//
	//   value, err := UpdateDomain(args)
	//   result, err := WorkflowService_UpdateDomain_Helper.WrapResponse(value, err)
	//   if err != nil {
	//     return fmt.Errorf("unexpected error from UpdateDomain: %v", err)
	//   }
	//   serialize(result)
	WrapResponse func(*shared.UpdateDomainResponse, error) (*WorkflowService_UpdateDomain_Result, error)

	// UnwrapResponse takes the result struct for UpdateDomain
	// and returns the value or error returned by it.
	//
	// The error is non-nil only if UpdateDomain threw an
	// exception.
	//
	//   result := deserialize(bytes)
	//   value, err := WorkflowService_UpdateDomain_Helper.UnwrapResponse(result)
	UnwrapResponse func(*WorkflowService_UpdateDomain_Result) (*shared.UpdateDomainResponse, error)
}{}

func init() {
	WorkflowService_UpdateDomain_Helper.Args = func(
		updateRequest *shared.UpdateDomainRequest,
	) *WorkflowService_UpdateDomain_Args {
		return &WorkflowService_UpdateDomain_Args{
			UpdateRequest: updateRequest,
		}
	}

	WorkflowService_UpdateDomain_Helper.IsException = func(err error) bool {
		switch err.(type) {
		case *shared.BadRequestError:
			return true
		case *shared.EntityNotExistsError:
			return true
		case *shared.ServiceBusyError:
			return true
		case *shared.DomainNotActiveError:
			return true
		case *shared.ClientVersionNotSupportedError:
			return true
		case *shared.AccessDeniedError:
			return true
		default:
			return false
		}
	}

	WorkflowService_UpdateDomain_Helper.WrapResponse = func(success *shared.UpdateDomainResponse, err error) (*WorkflowService_UpdateDomain_Result, error) {
		if err == nil {
			return &WorkflowService_UpdateDomain_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_UpdateDomain_Result.BadRequestError")
			}
			return &WorkflowService_UpdateDomain_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_UpdateDomain_Result.EntityNotExistError")
			}
			return &WorkflowService_UpdateDomain_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_UpdateDomain_Result.ServiceBusyError")
			}
			return &WorkflowService_UpdateDomain_Result{ServiceBusyError: e}, nil
		case *shared.DomainNotActiveError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_UpdateDomain_Result.DomainNotActiveError")
			}
			return &WorkflowService_UpdateDomain_Result{DomainNotActiveError: e}, nil
		case *shared.ClientVersionNotSupportedError:
			if e == nil {
				return nil, errors.New("WrapResponse received non-nil error type with nil value for WorkflowService_UpdateDomain_Result.ClientVersionNotSupportedError")
			}
			return &WorkflowService_UpdateDomain_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_UpdateDomain_Result.AccessDeniedError")
			}
			return &WorkflowService_UpdateDomain_Result{AccessDeniedError: e}, nil
		}

		return nil, err
	}
	WorkflowService_UpdateDomain_Helper.UnwrapResponse = func(result *WorkflowService_UpdateDomain_Result) (success *shared.UpdateDomainResponse, err error) {
		if result.BadRequestError != nil {
			err = result.BadRequestError
			return
		}
		if result.EntityNotExistError != nil {
			err = result.EntityNotExistError
			return
		}
		if result.ServiceBusyError != nil {
			err = result.ServiceBusyError
			return
		}
		if result.DomainNotActiveError != nil {
			err = result.DomainNotActiveError
			return
		}
		if result.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_UpdateDomain_Result represents the result of a WorkflowService.UpdateDomain function call.
//
// The result of a UpdateDomain 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_UpdateDomain_Result struct {
	// Value returned by UpdateDomain after a successful execution.
	Success                        *shared.UpdateDomainResponse           `json:"success,omitempty"`
	BadRequestError                *shared.BadRequestError                `json:"badRequestError,omitempty"`
	EntityNotExistError            *shared.EntityNotExistsError           `json:"entityNotExistError,omitempty"`
	ServiceBusyError               *shared.ServiceBusyError               `json:"serviceBusyError,omitempty"`
	DomainNotActiveError           *shared.DomainNotActiveError           `json:"domainNotActiveError,omitempty"`
	ClientVersionNotSupportedError *shared.ClientVersionNotSupportedError `json:"clientVersionNotSupportedError,omitempty"`
	AccessDeniedError              *shared.AccessDeniedError              `json:"accessDeniedError,omitempty"`
}

// ToWire translates a WorkflowService_UpdateDomain_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_UpdateDomain_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: 3, Value: w}
		i++
	}
	if v.ServiceBusyError != nil {
		w, err = v.ServiceBusyError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 4, Value: w}
		i++
	}
	if v.DomainNotActiveError != nil {
		w, err = v.DomainNotActiveError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 5, Value: w}
		i++
	}
	if v.ClientVersionNotSupportedError != nil {
		w, err = v.ClientVersionNotSupportedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 6, Value: w}
		i++
	}
	if v.AccessDeniedError != nil {
		w, err = v.AccessDeniedError.ToWire()
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 7, Value: w}
		i++
	}

	if i != 1 {
		return wire.Value{}, fmt.Errorf("WorkflowService_UpdateDomain_Result should have exactly one field: got %v fields", i)
	}

	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}

func _UpdateDomainResponse_Read(w wire.Value) (*shared.UpdateDomainResponse, error) {
	var v shared.UpdateDomainResponse
	err := v.FromWire(w)
	return &v, err
}

// FromWire deserializes a WorkflowService_UpdateDomain_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_UpdateDomain_Result struct
// from the provided intermediate representation.
//
//	x, err := binaryProtocol.Decode(reader, wire.TStruct)
//	if err != nil {
//	  return nil, err
//	}
//
//	var v WorkflowService_UpdateDomain_Result
//	if err := v.FromWire(x); err != nil {
//	  return nil, err
//	}
//	return &v, nil
func (v *WorkflowService_UpdateDomain_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 = _UpdateDomainResponse_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 1:
			if field.Value.Type() == wire.TStruct {
				v.BadRequestError, err = _BadRequestError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 3:
			if field.Value.Type() == wire.TStruct {
				v.EntityNotExistError, err = _EntityNotExistsError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 4:
			if field.Value.Type() == wire.TStruct {
				v.ServiceBusyError, err = _ServiceBusyError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 5:
			if field.Value.Type() == wire.TStruct {
				v.DomainNotActiveError, err = _DomainNotActiveError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 6:
			if field.Value.Type() == wire.TStruct {
				v.ClientVersionNotSupportedError, err = _ClientVersionNotSupportedError_Read(field.Value)
				if err != nil {
					return err
				}

			}
		case 7:
			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.ServiceBusyError != nil {
		count++
	}
	if v.DomainNotActiveError != nil {
		count++
	}
	if v.ClientVersionNotSupportedError != nil {
		count++
	}
	if v.AccessDeniedError != nil {
		count++
	}
	if count != 1 {
		return fmt.Errorf("WorkflowService_UpdateDomain_Result should have exactly one field: got %v fields", count)
	}

	return nil
}

// String returns a readable string representation of a WorkflowService_UpdateDomain_Result
// struct.
func (v *WorkflowService_UpdateDomain_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	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.ServiceBusyError != nil {
		fields[i] = fmt.Sprintf("ServiceBusyError: %v", v.ServiceBusyError)
		i++
	}
	if v.DomainNotActiveError != nil {
		fields[i] = fmt.Sprintf("DomainNotActiveError: %v", v.DomainNotActiveError)
		i++
	}
	if v.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_UpdateDomain_Result{%v}", strings.Join(fields[:i], ", "))
}

// Equals returns true if all the fields of this WorkflowService_UpdateDomain_Result match the
// provided WorkflowService_UpdateDomain_Result.
//
// This function performs a deep comparison.
func (v *WorkflowService_UpdateDomain_Result) Equals(rhs *WorkflowService_UpdateDomain_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.ServiceBusyError == nil && rhs.ServiceBusyError == nil) || (v.ServiceBusyError != nil && rhs.ServiceBusyError != nil && v.ServiceBusyError.Equals(rhs.ServiceBusyError))) {
		return false
	}
	if !((v.DomainNotActiveError == nil && rhs.DomainNotActiveError == nil) || (v.DomainNotActiveError != nil && rhs.DomainNotActiveError != nil && v.DomainNotActiveError.Equals(rhs.DomainNotActiveError))) {
		return false
	}
	if !((v.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_UpdateDomain_Result.
func (v *WorkflowService_UpdateDomain_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.ServiceBusyError != nil {
		err = multierr.Append(err, enc.AddObject("serviceBusyError", v.ServiceBusyError))
	}
	if v.DomainNotActiveError != nil {
		err = multierr.Append(err, enc.AddObject("domainNotActiveError", v.DomainNotActiveError))
	}
	if v.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_UpdateDomain_Result) GetSuccess() (o *shared.UpdateDomainResponse) {
	if v != nil && v.Success != nil {
		return v.Success
	}

	return
}

// IsSetSuccess returns true if Success is not nil.
func (v *WorkflowService_UpdateDomain_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_UpdateDomain_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_UpdateDomain_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_UpdateDomain_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_UpdateDomain_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_UpdateDomain_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_UpdateDomain_Result) IsSetServiceBusyError() bool {
	return v != nil && v.ServiceBusyError != nil
}

// GetDomainNotActiveError returns the value of DomainNotActiveError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_UpdateDomain_Result) GetDomainNotActiveError() (o *shared.DomainNotActiveError) {
	if v != nil && v.DomainNotActiveError != nil {
		return v.DomainNotActiveError
	}

	return
}

// IsSetDomainNotActiveError returns true if DomainNotActiveError is not nil.
func (v *WorkflowService_UpdateDomain_Result) IsSetDomainNotActiveError() bool {
	return v != nil && v.DomainNotActiveError != nil
}

// GetClientVersionNotSupportedError returns the value of ClientVersionNotSupportedError if it is set or its
// zero value if it is unset.
func (v *WorkflowService_UpdateDomain_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_UpdateDomain_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_UpdateDomain_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_UpdateDomain_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 "UpdateDomain" for this struct.
func (v *WorkflowService_UpdateDomain_Result) MethodName() string {
	return "UpdateDomain"
}

// EnvelopeType returns the kind of value inside this struct.
//
// This will always be Reply for this struct.
func (v *WorkflowService_UpdateDomain_Result) EnvelopeType() wire.EnvelopeType {
	return wire.Reply
}
