// Code generated by thriftrw-plugin-yarpc
// @generated

package adminserviceserver

import (
	context "context"

	stream "go.uber.org/thriftrw/protocol/stream"
	wire "go.uber.org/thriftrw/wire"
	transport "go.uber.org/yarpc/api/transport"
	thrift "go.uber.org/yarpc/encoding/thrift"
	yarpcerrors "go.uber.org/yarpc/yarpcerrors"

	admin "github.com/uber/cadence/.gen/go/admin"
	replicator "github.com/uber/cadence/.gen/go/replicator"
	shared "github.com/uber/cadence/.gen/go/shared"
)

// Interface is the server-side interface for the AdminService service.
type Interface interface {
	AddSearchAttribute(
		ctx context.Context,
		Request *admin.AddSearchAttributeRequest,
	) error

	CloseShard(
		ctx context.Context,
		Request *shared.CloseShardRequest,
	) error

	DeleteWorkflow(
		ctx context.Context,
		Request *admin.AdminDeleteWorkflowRequest,
	) (*admin.AdminDeleteWorkflowResponse, error)

	DescribeCluster(
		ctx context.Context,
	) (*admin.DescribeClusterResponse, error)

	DescribeHistoryHost(
		ctx context.Context,
		Request *shared.DescribeHistoryHostRequest,
	) (*shared.DescribeHistoryHostResponse, error)

	DescribeQueue(
		ctx context.Context,
		Request *shared.DescribeQueueRequest,
	) (*shared.DescribeQueueResponse, error)

	DescribeShardDistribution(
		ctx context.Context,
		Request *shared.DescribeShardDistributionRequest,
	) (*shared.DescribeShardDistributionResponse, error)

	DescribeWorkflowExecution(
		ctx context.Context,
		Request *admin.DescribeWorkflowExecutionRequest,
	) (*admin.DescribeWorkflowExecutionResponse, error)

	GetCrossClusterTasks(
		ctx context.Context,
		Request *shared.GetCrossClusterTasksRequest,
	) (*shared.GetCrossClusterTasksResponse, error)

	GetDLQReplicationMessages(
		ctx context.Context,
		Request *replicator.GetDLQReplicationMessagesRequest,
	) (*replicator.GetDLQReplicationMessagesResponse, error)

	GetDomainAsyncWorkflowConfiguraton(
		ctx context.Context,
		Request *admin.GetDomainAsyncWorkflowConfiguratonRequest,
	) (*admin.GetDomainAsyncWorkflowConfiguratonResponse, error)

	GetDomainIsolationGroups(
		ctx context.Context,
		Request *admin.GetDomainIsolationGroupsRequest,
	) (*admin.GetDomainIsolationGroupsResponse, error)

	GetDomainReplicationMessages(
		ctx context.Context,
		Request *replicator.GetDomainReplicationMessagesRequest,
	) (*replicator.GetDomainReplicationMessagesResponse, error)

	GetDynamicConfig(
		ctx context.Context,
		Request *admin.GetDynamicConfigRequest,
	) (*admin.GetDynamicConfigResponse, error)

	GetGlobalIsolationGroups(
		ctx context.Context,
		Request *admin.GetGlobalIsolationGroupsRequest,
	) (*admin.GetGlobalIsolationGroupsResponse, error)

	GetReplicationMessages(
		ctx context.Context,
		Request *replicator.GetReplicationMessagesRequest,
	) (*replicator.GetReplicationMessagesResponse, error)

	GetWorkflowExecutionRawHistoryV2(
		ctx context.Context,
		GetRequest *admin.GetWorkflowExecutionRawHistoryV2Request,
	) (*admin.GetWorkflowExecutionRawHistoryV2Response, error)

	ListDynamicConfig(
		ctx context.Context,
		Request *admin.ListDynamicConfigRequest,
	) (*admin.ListDynamicConfigResponse, error)

	MaintainCorruptWorkflow(
		ctx context.Context,
		Request *admin.AdminMaintainWorkflowRequest,
	) (*admin.AdminMaintainWorkflowResponse, error)

	MergeDLQMessages(
		ctx context.Context,
		Request *replicator.MergeDLQMessagesRequest,
	) (*replicator.MergeDLQMessagesResponse, error)

	PurgeDLQMessages(
		ctx context.Context,
		Request *replicator.PurgeDLQMessagesRequest,
	) error

	ReadDLQMessages(
		ctx context.Context,
		Request *replicator.ReadDLQMessagesRequest,
	) (*replicator.ReadDLQMessagesResponse, error)

	ReapplyEvents(
		ctx context.Context,
		ReapplyEventsRequest *shared.ReapplyEventsRequest,
	) error

	RefreshWorkflowTasks(
		ctx context.Context,
		Request *shared.RefreshWorkflowTasksRequest,
	) error

	RemoveTask(
		ctx context.Context,
		Request *shared.RemoveTaskRequest,
	) error

	ResendReplicationTasks(
		ctx context.Context,
		Request *admin.ResendReplicationTasksRequest,
	) error

	ResetQueue(
		ctx context.Context,
		Request *shared.ResetQueueRequest,
	) error

	RespondCrossClusterTasksCompleted(
		ctx context.Context,
		Request *shared.RespondCrossClusterTasksCompletedRequest,
	) (*shared.RespondCrossClusterTasksCompletedResponse, error)

	RestoreDynamicConfig(
		ctx context.Context,
		Request *admin.RestoreDynamicConfigRequest,
	) error

	UpdateDomainAsyncWorkflowConfiguraton(
		ctx context.Context,
		Request *admin.UpdateDomainAsyncWorkflowConfiguratonRequest,
	) (*admin.UpdateDomainAsyncWorkflowConfiguratonResponse, error)

	UpdateDomainIsolationGroups(
		ctx context.Context,
		Request *admin.UpdateDomainIsolationGroupsRequest,
	) (*admin.UpdateDomainIsolationGroupsResponse, error)

	UpdateDynamicConfig(
		ctx context.Context,
		Request *admin.UpdateDynamicConfigRequest,
	) error

	UpdateGlobalIsolationGroups(
		ctx context.Context,
		Request *admin.UpdateGlobalIsolationGroupsRequest,
	) (*admin.UpdateGlobalIsolationGroupsResponse, error)
}

// New prepares an implementation of the AdminService service for
// registration.
//
//	handler := AdminServiceHandler{}
//	dispatcher.Register(adminserviceserver.New(handler))
func New(impl Interface, opts ...thrift.RegisterOption) []transport.Procedure {
	h := handler{impl}
	service := thrift.Service{
		Name: "AdminService",
		Methods: []thrift.Method{

			thrift.Method{
				Name: "AddSearchAttribute",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.AddSearchAttribute),
					NoWire: addsearchattribute_NoWireHandler{impl},
				},
				Signature:    "AddSearchAttribute(Request *admin.AddSearchAttributeRequest)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "CloseShard",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.CloseShard),
					NoWire: closeshard_NoWireHandler{impl},
				},
				Signature:    "CloseShard(Request *shared.CloseShardRequest)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "DeleteWorkflow",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.DeleteWorkflow),
					NoWire: deleteworkflow_NoWireHandler{impl},
				},
				Signature:    "DeleteWorkflow(Request *admin.AdminDeleteWorkflowRequest) (*admin.AdminDeleteWorkflowResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "DescribeCluster",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.DescribeCluster),
					NoWire: describecluster_NoWireHandler{impl},
				},
				Signature:    "DescribeCluster() (*admin.DescribeClusterResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "DescribeHistoryHost",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.DescribeHistoryHost),
					NoWire: describehistoryhost_NoWireHandler{impl},
				},
				Signature:    "DescribeHistoryHost(Request *shared.DescribeHistoryHostRequest) (*shared.DescribeHistoryHostResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "DescribeQueue",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.DescribeQueue),
					NoWire: describequeue_NoWireHandler{impl},
				},
				Signature:    "DescribeQueue(Request *shared.DescribeQueueRequest) (*shared.DescribeQueueResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "DescribeShardDistribution",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.DescribeShardDistribution),
					NoWire: describesharddistribution_NoWireHandler{impl},
				},
				Signature:    "DescribeShardDistribution(Request *shared.DescribeShardDistributionRequest) (*shared.DescribeShardDistributionResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "DescribeWorkflowExecution",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.DescribeWorkflowExecution),
					NoWire: describeworkflowexecution_NoWireHandler{impl},
				},
				Signature:    "DescribeWorkflowExecution(Request *admin.DescribeWorkflowExecutionRequest) (*admin.DescribeWorkflowExecutionResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "GetCrossClusterTasks",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.GetCrossClusterTasks),
					NoWire: getcrossclustertasks_NoWireHandler{impl},
				},
				Signature:    "GetCrossClusterTasks(Request *shared.GetCrossClusterTasksRequest) (*shared.GetCrossClusterTasksResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "GetDLQReplicationMessages",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.GetDLQReplicationMessages),
					NoWire: getdlqreplicationmessages_NoWireHandler{impl},
				},
				Signature:    "GetDLQReplicationMessages(Request *replicator.GetDLQReplicationMessagesRequest) (*replicator.GetDLQReplicationMessagesResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "GetDomainAsyncWorkflowConfiguraton",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.GetDomainAsyncWorkflowConfiguraton),
					NoWire: getdomainasyncworkflowconfiguraton_NoWireHandler{impl},
				},
				Signature:    "GetDomainAsyncWorkflowConfiguraton(Request *admin.GetDomainAsyncWorkflowConfiguratonRequest) (*admin.GetDomainAsyncWorkflowConfiguratonResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "GetDomainIsolationGroups",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.GetDomainIsolationGroups),
					NoWire: getdomainisolationgroups_NoWireHandler{impl},
				},
				Signature:    "GetDomainIsolationGroups(Request *admin.GetDomainIsolationGroupsRequest) (*admin.GetDomainIsolationGroupsResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "GetDomainReplicationMessages",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.GetDomainReplicationMessages),
					NoWire: getdomainreplicationmessages_NoWireHandler{impl},
				},
				Signature:    "GetDomainReplicationMessages(Request *replicator.GetDomainReplicationMessagesRequest) (*replicator.GetDomainReplicationMessagesResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "GetDynamicConfig",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.GetDynamicConfig),
					NoWire: getdynamicconfig_NoWireHandler{impl},
				},
				Signature:    "GetDynamicConfig(Request *admin.GetDynamicConfigRequest) (*admin.GetDynamicConfigResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "GetGlobalIsolationGroups",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.GetGlobalIsolationGroups),
					NoWire: getglobalisolationgroups_NoWireHandler{impl},
				},
				Signature:    "GetGlobalIsolationGroups(Request *admin.GetGlobalIsolationGroupsRequest) (*admin.GetGlobalIsolationGroupsResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "GetReplicationMessages",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.GetReplicationMessages),
					NoWire: getreplicationmessages_NoWireHandler{impl},
				},
				Signature:    "GetReplicationMessages(Request *replicator.GetReplicationMessagesRequest) (*replicator.GetReplicationMessagesResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "GetWorkflowExecutionRawHistoryV2",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.GetWorkflowExecutionRawHistoryV2),
					NoWire: getworkflowexecutionrawhistoryv2_NoWireHandler{impl},
				},
				Signature:    "GetWorkflowExecutionRawHistoryV2(GetRequest *admin.GetWorkflowExecutionRawHistoryV2Request) (*admin.GetWorkflowExecutionRawHistoryV2Response)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "ListDynamicConfig",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.ListDynamicConfig),
					NoWire: listdynamicconfig_NoWireHandler{impl},
				},
				Signature:    "ListDynamicConfig(Request *admin.ListDynamicConfigRequest) (*admin.ListDynamicConfigResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "MaintainCorruptWorkflow",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.MaintainCorruptWorkflow),
					NoWire: maintaincorruptworkflow_NoWireHandler{impl},
				},
				Signature:    "MaintainCorruptWorkflow(Request *admin.AdminMaintainWorkflowRequest) (*admin.AdminMaintainWorkflowResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "MergeDLQMessages",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.MergeDLQMessages),
					NoWire: mergedlqmessages_NoWireHandler{impl},
				},
				Signature:    "MergeDLQMessages(Request *replicator.MergeDLQMessagesRequest) (*replicator.MergeDLQMessagesResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "PurgeDLQMessages",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.PurgeDLQMessages),
					NoWire: purgedlqmessages_NoWireHandler{impl},
				},
				Signature:    "PurgeDLQMessages(Request *replicator.PurgeDLQMessagesRequest)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "ReadDLQMessages",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.ReadDLQMessages),
					NoWire: readdlqmessages_NoWireHandler{impl},
				},
				Signature:    "ReadDLQMessages(Request *replicator.ReadDLQMessagesRequest) (*replicator.ReadDLQMessagesResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "ReapplyEvents",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.ReapplyEvents),
					NoWire: reapplyevents_NoWireHandler{impl},
				},
				Signature:    "ReapplyEvents(ReapplyEventsRequest *shared.ReapplyEventsRequest)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "RefreshWorkflowTasks",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.RefreshWorkflowTasks),
					NoWire: refreshworkflowtasks_NoWireHandler{impl},
				},
				Signature:    "RefreshWorkflowTasks(Request *shared.RefreshWorkflowTasksRequest)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "RemoveTask",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.RemoveTask),
					NoWire: removetask_NoWireHandler{impl},
				},
				Signature:    "RemoveTask(Request *shared.RemoveTaskRequest)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "ResendReplicationTasks",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.ResendReplicationTasks),
					NoWire: resendreplicationtasks_NoWireHandler{impl},
				},
				Signature:    "ResendReplicationTasks(Request *admin.ResendReplicationTasksRequest)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "ResetQueue",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.ResetQueue),
					NoWire: resetqueue_NoWireHandler{impl},
				},
				Signature:    "ResetQueue(Request *shared.ResetQueueRequest)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "RespondCrossClusterTasksCompleted",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.RespondCrossClusterTasksCompleted),
					NoWire: respondcrossclustertaskscompleted_NoWireHandler{impl},
				},
				Signature:    "RespondCrossClusterTasksCompleted(Request *shared.RespondCrossClusterTasksCompletedRequest) (*shared.RespondCrossClusterTasksCompletedResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "RestoreDynamicConfig",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.RestoreDynamicConfig),
					NoWire: restoredynamicconfig_NoWireHandler{impl},
				},
				Signature:    "RestoreDynamicConfig(Request *admin.RestoreDynamicConfigRequest)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "UpdateDomainAsyncWorkflowConfiguraton",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.UpdateDomainAsyncWorkflowConfiguraton),
					NoWire: updatedomainasyncworkflowconfiguraton_NoWireHandler{impl},
				},
				Signature:    "UpdateDomainAsyncWorkflowConfiguraton(Request *admin.UpdateDomainAsyncWorkflowConfiguratonRequest) (*admin.UpdateDomainAsyncWorkflowConfiguratonResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "UpdateDomainIsolationGroups",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.UpdateDomainIsolationGroups),
					NoWire: updatedomainisolationgroups_NoWireHandler{impl},
				},
				Signature:    "UpdateDomainIsolationGroups(Request *admin.UpdateDomainIsolationGroupsRequest) (*admin.UpdateDomainIsolationGroupsResponse)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "UpdateDynamicConfig",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.UpdateDynamicConfig),
					NoWire: updatedynamicconfig_NoWireHandler{impl},
				},
				Signature:    "UpdateDynamicConfig(Request *admin.UpdateDynamicConfigRequest)",
				ThriftModule: admin.ThriftModule,
			},

			thrift.Method{
				Name: "UpdateGlobalIsolationGroups",
				HandlerSpec: thrift.HandlerSpec{

					Type:   transport.Unary,
					Unary:  thrift.UnaryHandler(h.UpdateGlobalIsolationGroups),
					NoWire: updateglobalisolationgroups_NoWireHandler{impl},
				},
				Signature:    "UpdateGlobalIsolationGroups(Request *admin.UpdateGlobalIsolationGroupsRequest) (*admin.UpdateGlobalIsolationGroupsResponse)",
				ThriftModule: admin.ThriftModule,
			},
		},
	}

	procedures := make([]transport.Procedure, 0, 33)
	procedures = append(procedures, thrift.BuildProcedures(service, opts...)...)
	return procedures
}

type handler struct{ impl Interface }

type yarpcErrorNamer interface{ YARPCErrorName() string }

type yarpcErrorCoder interface{ YARPCErrorCode() *yarpcerrors.Code }

func (h handler) AddSearchAttribute(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_AddSearchAttribute_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'AddSearchAttribute': %w", err)
	}

	appErr := h.impl.AddSearchAttribute(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_AddSearchAttribute_Helper.WrapResponse(appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) CloseShard(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_CloseShard_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'CloseShard': %w", err)
	}

	appErr := h.impl.CloseShard(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_CloseShard_Helper.WrapResponse(appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) DeleteWorkflow(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_DeleteWorkflow_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'DeleteWorkflow': %w", err)
	}

	success, appErr := h.impl.DeleteWorkflow(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_DeleteWorkflow_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) DescribeCluster(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_DescribeCluster_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'DescribeCluster': %w", err)
	}

	success, appErr := h.impl.DescribeCluster(ctx)

	hadError := appErr != nil
	result, err := admin.AdminService_DescribeCluster_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) DescribeHistoryHost(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_DescribeHistoryHost_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'DescribeHistoryHost': %w", err)
	}

	success, appErr := h.impl.DescribeHistoryHost(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_DescribeHistoryHost_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) DescribeQueue(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_DescribeQueue_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'DescribeQueue': %w", err)
	}

	success, appErr := h.impl.DescribeQueue(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_DescribeQueue_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) DescribeShardDistribution(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_DescribeShardDistribution_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'DescribeShardDistribution': %w", err)
	}

	success, appErr := h.impl.DescribeShardDistribution(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_DescribeShardDistribution_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) DescribeWorkflowExecution(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_DescribeWorkflowExecution_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'DescribeWorkflowExecution': %w", err)
	}

	success, appErr := h.impl.DescribeWorkflowExecution(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_DescribeWorkflowExecution_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) GetCrossClusterTasks(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_GetCrossClusterTasks_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'GetCrossClusterTasks': %w", err)
	}

	success, appErr := h.impl.GetCrossClusterTasks(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetCrossClusterTasks_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) GetDLQReplicationMessages(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_GetDLQReplicationMessages_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'GetDLQReplicationMessages': %w", err)
	}

	success, appErr := h.impl.GetDLQReplicationMessages(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetDLQReplicationMessages_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) GetDomainAsyncWorkflowConfiguraton(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_GetDomainAsyncWorkflowConfiguraton_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'GetDomainAsyncWorkflowConfiguraton': %w", err)
	}

	success, appErr := h.impl.GetDomainAsyncWorkflowConfiguraton(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetDomainAsyncWorkflowConfiguraton_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) GetDomainIsolationGroups(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_GetDomainIsolationGroups_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'GetDomainIsolationGroups': %w", err)
	}

	success, appErr := h.impl.GetDomainIsolationGroups(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetDomainIsolationGroups_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) GetDomainReplicationMessages(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_GetDomainReplicationMessages_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'GetDomainReplicationMessages': %w", err)
	}

	success, appErr := h.impl.GetDomainReplicationMessages(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetDomainReplicationMessages_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) GetDynamicConfig(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_GetDynamicConfig_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'GetDynamicConfig': %w", err)
	}

	success, appErr := h.impl.GetDynamicConfig(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetDynamicConfig_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) GetGlobalIsolationGroups(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_GetGlobalIsolationGroups_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'GetGlobalIsolationGroups': %w", err)
	}

	success, appErr := h.impl.GetGlobalIsolationGroups(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetGlobalIsolationGroups_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) GetReplicationMessages(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_GetReplicationMessages_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'GetReplicationMessages': %w", err)
	}

	success, appErr := h.impl.GetReplicationMessages(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetReplicationMessages_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) GetWorkflowExecutionRawHistoryV2(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_GetWorkflowExecutionRawHistoryV2_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'GetWorkflowExecutionRawHistoryV2': %w", err)
	}

	success, appErr := h.impl.GetWorkflowExecutionRawHistoryV2(ctx, args.GetRequest)

	hadError := appErr != nil
	result, err := admin.AdminService_GetWorkflowExecutionRawHistoryV2_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) ListDynamicConfig(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_ListDynamicConfig_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'ListDynamicConfig': %w", err)
	}

	success, appErr := h.impl.ListDynamicConfig(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_ListDynamicConfig_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) MaintainCorruptWorkflow(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_MaintainCorruptWorkflow_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'MaintainCorruptWorkflow': %w", err)
	}

	success, appErr := h.impl.MaintainCorruptWorkflow(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_MaintainCorruptWorkflow_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) MergeDLQMessages(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_MergeDLQMessages_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'MergeDLQMessages': %w", err)
	}

	success, appErr := h.impl.MergeDLQMessages(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_MergeDLQMessages_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) PurgeDLQMessages(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_PurgeDLQMessages_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'PurgeDLQMessages': %w", err)
	}

	appErr := h.impl.PurgeDLQMessages(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_PurgeDLQMessages_Helper.WrapResponse(appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) ReadDLQMessages(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_ReadDLQMessages_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'ReadDLQMessages': %w", err)
	}

	success, appErr := h.impl.ReadDLQMessages(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_ReadDLQMessages_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) ReapplyEvents(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_ReapplyEvents_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'ReapplyEvents': %w", err)
	}

	appErr := h.impl.ReapplyEvents(ctx, args.ReapplyEventsRequest)

	hadError := appErr != nil
	result, err := admin.AdminService_ReapplyEvents_Helper.WrapResponse(appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) RefreshWorkflowTasks(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_RefreshWorkflowTasks_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'RefreshWorkflowTasks': %w", err)
	}

	appErr := h.impl.RefreshWorkflowTasks(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_RefreshWorkflowTasks_Helper.WrapResponse(appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) RemoveTask(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_RemoveTask_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'RemoveTask': %w", err)
	}

	appErr := h.impl.RemoveTask(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_RemoveTask_Helper.WrapResponse(appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) ResendReplicationTasks(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_ResendReplicationTasks_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'ResendReplicationTasks': %w", err)
	}

	appErr := h.impl.ResendReplicationTasks(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_ResendReplicationTasks_Helper.WrapResponse(appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) ResetQueue(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_ResetQueue_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'ResetQueue': %w", err)
	}

	appErr := h.impl.ResetQueue(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_ResetQueue_Helper.WrapResponse(appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) RespondCrossClusterTasksCompleted(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_RespondCrossClusterTasksCompleted_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'RespondCrossClusterTasksCompleted': %w", err)
	}

	success, appErr := h.impl.RespondCrossClusterTasksCompleted(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_RespondCrossClusterTasksCompleted_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) RestoreDynamicConfig(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_RestoreDynamicConfig_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'RestoreDynamicConfig': %w", err)
	}

	appErr := h.impl.RestoreDynamicConfig(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_RestoreDynamicConfig_Helper.WrapResponse(appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) UpdateDomainAsyncWorkflowConfiguraton(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'UpdateDomainAsyncWorkflowConfiguraton': %w", err)
	}

	success, appErr := h.impl.UpdateDomainAsyncWorkflowConfiguraton(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_UpdateDomainAsyncWorkflowConfiguraton_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) UpdateDomainIsolationGroups(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_UpdateDomainIsolationGroups_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'UpdateDomainIsolationGroups': %w", err)
	}

	success, appErr := h.impl.UpdateDomainIsolationGroups(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_UpdateDomainIsolationGroups_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) UpdateDynamicConfig(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_UpdateDynamicConfig_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'UpdateDynamicConfig': %w", err)
	}

	appErr := h.impl.UpdateDynamicConfig(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_UpdateDynamicConfig_Helper.WrapResponse(appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

func (h handler) UpdateGlobalIsolationGroups(ctx context.Context, body wire.Value) (thrift.Response, error) {
	var args admin.AdminService_UpdateGlobalIsolationGroups_Args
	if err := args.FromWire(body); err != nil {
		return thrift.Response{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode Thrift request for service 'AdminService' procedure 'UpdateGlobalIsolationGroups': %w", err)
	}

	success, appErr := h.impl.UpdateGlobalIsolationGroups(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_UpdateGlobalIsolationGroups_Helper.WrapResponse(success, appErr)

	var response thrift.Response
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}

	return response, err
}

type addsearchattribute_NoWireHandler struct{ impl Interface }

func (h addsearchattribute_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_AddSearchAttribute_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'AddSearchAttribute': %w", err)
	}

	appErr := h.impl.AddSearchAttribute(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_AddSearchAttribute_Helper.WrapResponse(appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type closeshard_NoWireHandler struct{ impl Interface }

func (h closeshard_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_CloseShard_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'CloseShard': %w", err)
	}

	appErr := h.impl.CloseShard(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_CloseShard_Helper.WrapResponse(appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type deleteworkflow_NoWireHandler struct{ impl Interface }

func (h deleteworkflow_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_DeleteWorkflow_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'DeleteWorkflow': %w", err)
	}

	success, appErr := h.impl.DeleteWorkflow(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_DeleteWorkflow_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type describecluster_NoWireHandler struct{ impl Interface }

func (h describecluster_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_DescribeCluster_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'DescribeCluster': %w", err)
	}

	success, appErr := h.impl.DescribeCluster(ctx)

	hadError := appErr != nil
	result, err := admin.AdminService_DescribeCluster_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type describehistoryhost_NoWireHandler struct{ impl Interface }

func (h describehistoryhost_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_DescribeHistoryHost_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'DescribeHistoryHost': %w", err)
	}

	success, appErr := h.impl.DescribeHistoryHost(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_DescribeHistoryHost_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type describequeue_NoWireHandler struct{ impl Interface }

func (h describequeue_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_DescribeQueue_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'DescribeQueue': %w", err)
	}

	success, appErr := h.impl.DescribeQueue(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_DescribeQueue_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type describesharddistribution_NoWireHandler struct{ impl Interface }

func (h describesharddistribution_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_DescribeShardDistribution_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'DescribeShardDistribution': %w", err)
	}

	success, appErr := h.impl.DescribeShardDistribution(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_DescribeShardDistribution_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type describeworkflowexecution_NoWireHandler struct{ impl Interface }

func (h describeworkflowexecution_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_DescribeWorkflowExecution_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'DescribeWorkflowExecution': %w", err)
	}

	success, appErr := h.impl.DescribeWorkflowExecution(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_DescribeWorkflowExecution_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type getcrossclustertasks_NoWireHandler struct{ impl Interface }

func (h getcrossclustertasks_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_GetCrossClusterTasks_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'GetCrossClusterTasks': %w", err)
	}

	success, appErr := h.impl.GetCrossClusterTasks(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetCrossClusterTasks_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type getdlqreplicationmessages_NoWireHandler struct{ impl Interface }

func (h getdlqreplicationmessages_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_GetDLQReplicationMessages_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'GetDLQReplicationMessages': %w", err)
	}

	success, appErr := h.impl.GetDLQReplicationMessages(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetDLQReplicationMessages_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type getdomainasyncworkflowconfiguraton_NoWireHandler struct{ impl Interface }

func (h getdomainasyncworkflowconfiguraton_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_GetDomainAsyncWorkflowConfiguraton_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'GetDomainAsyncWorkflowConfiguraton': %w", err)
	}

	success, appErr := h.impl.GetDomainAsyncWorkflowConfiguraton(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetDomainAsyncWorkflowConfiguraton_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type getdomainisolationgroups_NoWireHandler struct{ impl Interface }

func (h getdomainisolationgroups_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_GetDomainIsolationGroups_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'GetDomainIsolationGroups': %w", err)
	}

	success, appErr := h.impl.GetDomainIsolationGroups(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetDomainIsolationGroups_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type getdomainreplicationmessages_NoWireHandler struct{ impl Interface }

func (h getdomainreplicationmessages_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_GetDomainReplicationMessages_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'GetDomainReplicationMessages': %w", err)
	}

	success, appErr := h.impl.GetDomainReplicationMessages(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetDomainReplicationMessages_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type getdynamicconfig_NoWireHandler struct{ impl Interface }

func (h getdynamicconfig_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_GetDynamicConfig_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'GetDynamicConfig': %w", err)
	}

	success, appErr := h.impl.GetDynamicConfig(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetDynamicConfig_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type getglobalisolationgroups_NoWireHandler struct{ impl Interface }

func (h getglobalisolationgroups_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_GetGlobalIsolationGroups_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'GetGlobalIsolationGroups': %w", err)
	}

	success, appErr := h.impl.GetGlobalIsolationGroups(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetGlobalIsolationGroups_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type getreplicationmessages_NoWireHandler struct{ impl Interface }

func (h getreplicationmessages_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_GetReplicationMessages_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'GetReplicationMessages': %w", err)
	}

	success, appErr := h.impl.GetReplicationMessages(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_GetReplicationMessages_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type getworkflowexecutionrawhistoryv2_NoWireHandler struct{ impl Interface }

func (h getworkflowexecutionrawhistoryv2_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_GetWorkflowExecutionRawHistoryV2_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'GetWorkflowExecutionRawHistoryV2': %w", err)
	}

	success, appErr := h.impl.GetWorkflowExecutionRawHistoryV2(ctx, args.GetRequest)

	hadError := appErr != nil
	result, err := admin.AdminService_GetWorkflowExecutionRawHistoryV2_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type listdynamicconfig_NoWireHandler struct{ impl Interface }

func (h listdynamicconfig_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_ListDynamicConfig_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'ListDynamicConfig': %w", err)
	}

	success, appErr := h.impl.ListDynamicConfig(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_ListDynamicConfig_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type maintaincorruptworkflow_NoWireHandler struct{ impl Interface }

func (h maintaincorruptworkflow_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_MaintainCorruptWorkflow_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'MaintainCorruptWorkflow': %w", err)
	}

	success, appErr := h.impl.MaintainCorruptWorkflow(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_MaintainCorruptWorkflow_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type mergedlqmessages_NoWireHandler struct{ impl Interface }

func (h mergedlqmessages_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_MergeDLQMessages_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'MergeDLQMessages': %w", err)
	}

	success, appErr := h.impl.MergeDLQMessages(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_MergeDLQMessages_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type purgedlqmessages_NoWireHandler struct{ impl Interface }

func (h purgedlqmessages_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_PurgeDLQMessages_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'PurgeDLQMessages': %w", err)
	}

	appErr := h.impl.PurgeDLQMessages(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_PurgeDLQMessages_Helper.WrapResponse(appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type readdlqmessages_NoWireHandler struct{ impl Interface }

func (h readdlqmessages_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_ReadDLQMessages_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'ReadDLQMessages': %w", err)
	}

	success, appErr := h.impl.ReadDLQMessages(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_ReadDLQMessages_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type reapplyevents_NoWireHandler struct{ impl Interface }

func (h reapplyevents_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_ReapplyEvents_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'ReapplyEvents': %w", err)
	}

	appErr := h.impl.ReapplyEvents(ctx, args.ReapplyEventsRequest)

	hadError := appErr != nil
	result, err := admin.AdminService_ReapplyEvents_Helper.WrapResponse(appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type refreshworkflowtasks_NoWireHandler struct{ impl Interface }

func (h refreshworkflowtasks_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_RefreshWorkflowTasks_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'RefreshWorkflowTasks': %w", err)
	}

	appErr := h.impl.RefreshWorkflowTasks(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_RefreshWorkflowTasks_Helper.WrapResponse(appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type removetask_NoWireHandler struct{ impl Interface }

func (h removetask_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_RemoveTask_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'RemoveTask': %w", err)
	}

	appErr := h.impl.RemoveTask(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_RemoveTask_Helper.WrapResponse(appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type resendreplicationtasks_NoWireHandler struct{ impl Interface }

func (h resendreplicationtasks_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_ResendReplicationTasks_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'ResendReplicationTasks': %w", err)
	}

	appErr := h.impl.ResendReplicationTasks(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_ResendReplicationTasks_Helper.WrapResponse(appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type resetqueue_NoWireHandler struct{ impl Interface }

func (h resetqueue_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_ResetQueue_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'ResetQueue': %w", err)
	}

	appErr := h.impl.ResetQueue(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_ResetQueue_Helper.WrapResponse(appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type respondcrossclustertaskscompleted_NoWireHandler struct{ impl Interface }

func (h respondcrossclustertaskscompleted_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_RespondCrossClusterTasksCompleted_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'RespondCrossClusterTasksCompleted': %w", err)
	}

	success, appErr := h.impl.RespondCrossClusterTasksCompleted(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_RespondCrossClusterTasksCompleted_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type restoredynamicconfig_NoWireHandler struct{ impl Interface }

func (h restoredynamicconfig_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_RestoreDynamicConfig_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'RestoreDynamicConfig': %w", err)
	}

	appErr := h.impl.RestoreDynamicConfig(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_RestoreDynamicConfig_Helper.WrapResponse(appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type updatedomainasyncworkflowconfiguraton_NoWireHandler struct{ impl Interface }

func (h updatedomainasyncworkflowconfiguraton_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_UpdateDomainAsyncWorkflowConfiguraton_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'UpdateDomainAsyncWorkflowConfiguraton': %w", err)
	}

	success, appErr := h.impl.UpdateDomainAsyncWorkflowConfiguraton(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_UpdateDomainAsyncWorkflowConfiguraton_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type updatedomainisolationgroups_NoWireHandler struct{ impl Interface }

func (h updatedomainisolationgroups_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_UpdateDomainIsolationGroups_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'UpdateDomainIsolationGroups': %w", err)
	}

	success, appErr := h.impl.UpdateDomainIsolationGroups(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_UpdateDomainIsolationGroups_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type updatedynamicconfig_NoWireHandler struct{ impl Interface }

func (h updatedynamicconfig_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_UpdateDynamicConfig_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'UpdateDynamicConfig': %w", err)
	}

	appErr := h.impl.UpdateDynamicConfig(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_UpdateDynamicConfig_Helper.WrapResponse(appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}

type updateglobalisolationgroups_NoWireHandler struct{ impl Interface }

func (h updateglobalisolationgroups_NoWireHandler) HandleNoWire(ctx context.Context, nwc *thrift.NoWireCall) (thrift.NoWireResponse, error) {
	var (
		args admin.AdminService_UpdateGlobalIsolationGroups_Args
		rw   stream.ResponseWriter
		err  error
	)

	rw, err = nwc.RequestReader.ReadRequest(ctx, nwc.EnvelopeType, nwc.Reader, &args)
	if err != nil {
		return thrift.NoWireResponse{}, yarpcerrors.InvalidArgumentErrorf(
			"could not decode (via no wire) Thrift request for service 'AdminService' procedure 'UpdateGlobalIsolationGroups': %w", err)
	}

	success, appErr := h.impl.UpdateGlobalIsolationGroups(ctx, args.Request)

	hadError := appErr != nil
	result, err := admin.AdminService_UpdateGlobalIsolationGroups_Helper.WrapResponse(success, appErr)
	response := thrift.NoWireResponse{ResponseWriter: rw}
	if err == nil {
		response.IsApplicationError = hadError
		response.Body = result
		if namer, ok := appErr.(yarpcErrorNamer); ok {
			response.ApplicationErrorName = namer.YARPCErrorName()
		}
		if extractor, ok := appErr.(yarpcErrorCoder); ok {
			response.ApplicationErrorCode = extractor.YARPCErrorCode()
		}
		if appErr != nil {
			response.ApplicationErrorDetails = appErr.Error()
		}
	}
	return response, err

}
