package thrift

// Code generated by gowrap. DO NOT EDIT.
// template: ../../../templates/thrift.tmpl
// gowrap: http://github.com/hexdigest/gowrap

import (
	"context"

	"github.com/uber/cadence/.gen/go/admin"
	"github.com/uber/cadence/.gen/go/replicator"
	"github.com/uber/cadence/.gen/go/shared"
	"github.com/uber/cadence/common/types/mapper/thrift"
)

func (g AdminHandler) AddSearchAttribute(ctx context.Context, Request *admin.AddSearchAttributeRequest) (err error) {
	err = g.h.AddSearchAttribute(ctx, thrift.ToAdminAddSearchAttributeRequest(Request))
	return thrift.FromError(err)
}

func (g AdminHandler) CloseShard(ctx context.Context, Request *shared.CloseShardRequest) (err error) {
	err = g.h.CloseShard(ctx, thrift.ToAdminCloseShardRequest(Request))
	return thrift.FromError(err)
}

func (g AdminHandler) DeleteWorkflow(ctx context.Context, Request *admin.AdminDeleteWorkflowRequest) (ap1 *admin.AdminDeleteWorkflowResponse, err error) {
	response, err := g.h.DeleteWorkflow(ctx, thrift.ToAdminDeleteWorkflowRequest(Request))
	return thrift.FromAdminDeleteWorkflowResponse(response), thrift.FromError(err)
}

func (g AdminHandler) DescribeCluster(ctx context.Context) (dp1 *admin.DescribeClusterResponse, err error) {
	response, err := g.h.DescribeCluster(ctx)
	return thrift.FromAdminDescribeClusterResponse(response), thrift.FromError(err)
}

func (g AdminHandler) DescribeHistoryHost(ctx context.Context, Request *shared.DescribeHistoryHostRequest) (dp1 *shared.DescribeHistoryHostResponse, err error) {
	response, err := g.h.DescribeHistoryHost(ctx, thrift.ToAdminDescribeHistoryHostRequest(Request))
	return thrift.FromAdminDescribeHistoryHostResponse(response), thrift.FromError(err)
}

func (g AdminHandler) DescribeQueue(ctx context.Context, Request *shared.DescribeQueueRequest) (dp1 *shared.DescribeQueueResponse, err error) {
	response, err := g.h.DescribeQueue(ctx, thrift.ToAdminDescribeQueueRequest(Request))
	return thrift.FromAdminDescribeQueueResponse(response), thrift.FromError(err)
}

func (g AdminHandler) DescribeShardDistribution(ctx context.Context, Request *shared.DescribeShardDistributionRequest) (dp1 *shared.DescribeShardDistributionResponse, err error) {
	response, err := g.h.DescribeShardDistribution(ctx, thrift.ToAdminDescribeShardDistributionRequest(Request))
	return thrift.FromAdminDescribeShardDistributionResponse(response), thrift.FromError(err)
}

func (g AdminHandler) DescribeWorkflowExecution(ctx context.Context, Request *admin.DescribeWorkflowExecutionRequest) (dp1 *admin.DescribeWorkflowExecutionResponse, err error) {
	response, err := g.h.DescribeWorkflowExecution(ctx, thrift.ToAdminDescribeWorkflowExecutionRequest(Request))
	return thrift.FromAdminDescribeWorkflowExecutionResponse(response), thrift.FromError(err)
}

func (g AdminHandler) GetCrossClusterTasks(ctx context.Context, Request *shared.GetCrossClusterTasksRequest) (gp1 *shared.GetCrossClusterTasksResponse, err error) {
	response, err := g.h.GetCrossClusterTasks(ctx, thrift.ToAdminGetCrossClusterTasksRequest(Request))
	return thrift.FromAdminGetCrossClusterTasksResponse(response), thrift.FromError(err)
}

func (g AdminHandler) GetDLQReplicationMessages(ctx context.Context, Request *replicator.GetDLQReplicationMessagesRequest) (gp1 *replicator.GetDLQReplicationMessagesResponse, err error) {
	response, err := g.h.GetDLQReplicationMessages(ctx, thrift.ToAdminGetDLQReplicationMessagesRequest(Request))
	return thrift.FromAdminGetDLQReplicationMessagesResponse(response), thrift.FromError(err)
}

func (g AdminHandler) GetDomainAsyncWorkflowConfiguraton(ctx context.Context, Request *admin.GetDomainAsyncWorkflowConfiguratonRequest) (gp1 *admin.GetDomainAsyncWorkflowConfiguratonResponse, err error) {
	response, err := g.h.GetDomainAsyncWorkflowConfiguraton(ctx, thrift.ToAdminGetDomainAsyncWorkflowConfiguratonRequest(Request))
	return thrift.FromAdminGetDomainAsyncWorkflowConfiguratonResponse(response), thrift.FromError(err)
}

func (g AdminHandler) GetDomainIsolationGroups(ctx context.Context, Request *admin.GetDomainIsolationGroupsRequest) (gp1 *admin.GetDomainIsolationGroupsResponse, err error) {
	response, err := g.h.GetDomainIsolationGroups(ctx, thrift.ToAdminGetDomainIsolationGroupsRequest(Request))
	return thrift.FromAdminGetDomainIsolationGroupsResponse(response), thrift.FromError(err)
}

func (g AdminHandler) GetDomainReplicationMessages(ctx context.Context, Request *replicator.GetDomainReplicationMessagesRequest) (gp1 *replicator.GetDomainReplicationMessagesResponse, err error) {
	response, err := g.h.GetDomainReplicationMessages(ctx, thrift.ToAdminGetDomainReplicationMessagesRequest(Request))
	return thrift.FromAdminGetDomainReplicationMessagesResponse(response), thrift.FromError(err)
}

func (g AdminHandler) GetDynamicConfig(ctx context.Context, Request *admin.GetDynamicConfigRequest) (gp1 *admin.GetDynamicConfigResponse, err error) {
	response, err := g.h.GetDynamicConfig(ctx, thrift.ToAdminGetDynamicConfigRequest(Request))
	return thrift.FromAdminGetDynamicConfigResponse(response), thrift.FromError(err)
}

func (g AdminHandler) GetGlobalIsolationGroups(ctx context.Context, Request *admin.GetGlobalIsolationGroupsRequest) (gp1 *admin.GetGlobalIsolationGroupsResponse, err error) {
	response, err := g.h.GetGlobalIsolationGroups(ctx, thrift.ToAdminGetGlobalIsolationGroupsRequest(Request))
	return thrift.FromAdminGetGlobalIsolationGroupsResponse(response), thrift.FromError(err)
}

func (g AdminHandler) GetReplicationMessages(ctx context.Context, Request *replicator.GetReplicationMessagesRequest) (gp1 *replicator.GetReplicationMessagesResponse, err error) {
	response, err := g.h.GetReplicationMessages(ctx, thrift.ToAdminGetReplicationMessagesRequest(Request))
	return thrift.FromAdminGetReplicationMessagesResponse(response), thrift.FromError(err)
}

func (g AdminHandler) GetWorkflowExecutionRawHistoryV2(ctx context.Context, GetRequest *admin.GetWorkflowExecutionRawHistoryV2Request) (gp1 *admin.GetWorkflowExecutionRawHistoryV2Response, err error) {
	response, err := g.h.GetWorkflowExecutionRawHistoryV2(ctx, thrift.ToAdminGetWorkflowExecutionRawHistoryV2Request(GetRequest))
	return thrift.FromAdminGetWorkflowExecutionRawHistoryV2Response(response), thrift.FromError(err)
}

func (g AdminHandler) ListDynamicConfig(ctx context.Context, Request *admin.ListDynamicConfigRequest) (lp1 *admin.ListDynamicConfigResponse, err error) {
	response, err := g.h.ListDynamicConfig(ctx, thrift.ToAdminListDynamicConfigRequest(Request))
	return thrift.FromAdminListDynamicConfigResponse(response), thrift.FromError(err)
}

func (g AdminHandler) MaintainCorruptWorkflow(ctx context.Context, Request *admin.AdminMaintainWorkflowRequest) (ap1 *admin.AdminMaintainWorkflowResponse, err error) {
	response, err := g.h.MaintainCorruptWorkflow(ctx, thrift.ToAdminMaintainCorruptWorkflowRequest(Request))
	return thrift.FromAdminMaintainCorruptWorkflowResponse(response), thrift.FromError(err)
}

func (g AdminHandler) MergeDLQMessages(ctx context.Context, Request *replicator.MergeDLQMessagesRequest) (mp1 *replicator.MergeDLQMessagesResponse, err error) {
	response, err := g.h.MergeDLQMessages(ctx, thrift.ToAdminMergeDLQMessagesRequest(Request))
	return thrift.FromAdminMergeDLQMessagesResponse(response), thrift.FromError(err)
}

func (g AdminHandler) PurgeDLQMessages(ctx context.Context, Request *replicator.PurgeDLQMessagesRequest) (err error) {
	err = g.h.PurgeDLQMessages(ctx, thrift.ToAdminPurgeDLQMessagesRequest(Request))
	return thrift.FromError(err)
}

func (g AdminHandler) ReadDLQMessages(ctx context.Context, Request *replicator.ReadDLQMessagesRequest) (rp1 *replicator.ReadDLQMessagesResponse, err error) {
	response, err := g.h.ReadDLQMessages(ctx, thrift.ToAdminReadDLQMessagesRequest(Request))
	return thrift.FromAdminReadDLQMessagesResponse(response), thrift.FromError(err)
}

func (g AdminHandler) ReapplyEvents(ctx context.Context, ReapplyEventsRequest *shared.ReapplyEventsRequest) (err error) {
	err = g.h.ReapplyEvents(ctx, thrift.ToAdminReapplyEventsRequest(ReapplyEventsRequest))
	return thrift.FromError(err)
}

func (g AdminHandler) RefreshWorkflowTasks(ctx context.Context, Request *shared.RefreshWorkflowTasksRequest) (err error) {
	err = g.h.RefreshWorkflowTasks(ctx, thrift.ToAdminRefreshWorkflowTasksRequest(Request))
	return thrift.FromError(err)
}

func (g AdminHandler) RemoveTask(ctx context.Context, Request *shared.RemoveTaskRequest) (err error) {
	err = g.h.RemoveTask(ctx, thrift.ToAdminRemoveTaskRequest(Request))
	return thrift.FromError(err)
}

func (g AdminHandler) ResendReplicationTasks(ctx context.Context, Request *admin.ResendReplicationTasksRequest) (err error) {
	err = g.h.ResendReplicationTasks(ctx, thrift.ToAdminResendReplicationTasksRequest(Request))
	return thrift.FromError(err)
}

func (g AdminHandler) ResetQueue(ctx context.Context, Request *shared.ResetQueueRequest) (err error) {
	err = g.h.ResetQueue(ctx, thrift.ToAdminResetQueueRequest(Request))
	return thrift.FromError(err)
}

func (g AdminHandler) RespondCrossClusterTasksCompleted(ctx context.Context, Request *shared.RespondCrossClusterTasksCompletedRequest) (rp1 *shared.RespondCrossClusterTasksCompletedResponse, err error) {
	response, err := g.h.RespondCrossClusterTasksCompleted(ctx, thrift.ToAdminRespondCrossClusterTasksCompletedRequest(Request))
	return thrift.FromAdminRespondCrossClusterTasksCompletedResponse(response), thrift.FromError(err)
}

func (g AdminHandler) RestoreDynamicConfig(ctx context.Context, Request *admin.RestoreDynamicConfigRequest) (err error) {
	err = g.h.RestoreDynamicConfig(ctx, thrift.ToAdminRestoreDynamicConfigRequest(Request))
	return thrift.FromError(err)
}

func (g AdminHandler) UpdateDomainAsyncWorkflowConfiguraton(ctx context.Context, Request *admin.UpdateDomainAsyncWorkflowConfiguratonRequest) (up1 *admin.UpdateDomainAsyncWorkflowConfiguratonResponse, err error) {
	response, err := g.h.UpdateDomainAsyncWorkflowConfiguraton(ctx, thrift.ToAdminUpdateDomainAsyncWorkflowConfiguratonRequest(Request))
	return thrift.FromAdminUpdateDomainAsyncWorkflowConfiguratonResponse(response), thrift.FromError(err)
}

func (g AdminHandler) UpdateDomainIsolationGroups(ctx context.Context, Request *admin.UpdateDomainIsolationGroupsRequest) (up1 *admin.UpdateDomainIsolationGroupsResponse, err error) {
	response, err := g.h.UpdateDomainIsolationGroups(ctx, thrift.ToAdminUpdateDomainIsolationGroupsRequest(Request))
	return thrift.FromAdminUpdateDomainIsolationGroupsResponse(response), thrift.FromError(err)
}

func (g AdminHandler) UpdateDynamicConfig(ctx context.Context, Request *admin.UpdateDynamicConfigRequest) (err error) {
	err = g.h.UpdateDynamicConfig(ctx, thrift.ToAdminUpdateDynamicConfigRequest(Request))
	return thrift.FromError(err)
}

func (g AdminHandler) UpdateGlobalIsolationGroups(ctx context.Context, Request *admin.UpdateGlobalIsolationGroupsRequest) (up1 *admin.UpdateGlobalIsolationGroupsResponse, err error) {
	response, err := g.h.UpdateGlobalIsolationGroups(ctx, thrift.ToAdminUpdateGlobalIsolationGroupsRequest(Request))
	return thrift.FromAdminUpdateGlobalIsolationGroupsResponse(response), thrift.FromError(err)
}
