// The MIT License (MIT)

// Copyright (c) 2017-2020 Uber Technologies Inc.

// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

// Code generated by mockery v2.32.0. DO NOT EDIT.

package mocks

import (
	context "context"

	mock "github.com/stretchr/testify/mock"

	persistence "github.com/uber/cadence/common/persistence"
	types "github.com/uber/cadence/common/types"
)

// ExecutionManager is an autogenerated mock type for the ExecutionManager type
type ExecutionManager struct {
	mock.Mock
}

// Close provides a mock function with given fields:
func (_m *ExecutionManager) Close() {
	_m.Called()
}

// CompleteHistoryTask provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) CompleteHistoryTask(ctx context.Context, request *persistence.CompleteHistoryTaskRequest) error {
	ret := _m.Called(ctx, request)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.CompleteHistoryTaskRequest) error); ok {
		r0 = rf(ctx, request)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// ConflictResolveWorkflowExecution provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) ConflictResolveWorkflowExecution(ctx context.Context, request *persistence.ConflictResolveWorkflowExecutionRequest) (*persistence.ConflictResolveWorkflowExecutionResponse, error) {
	ret := _m.Called(ctx, request)

	var r0 *persistence.ConflictResolveWorkflowExecutionResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.ConflictResolveWorkflowExecutionRequest) (*persistence.ConflictResolveWorkflowExecutionResponse, error)); ok {
		return rf(ctx, request)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.ConflictResolveWorkflowExecutionRequest) *persistence.ConflictResolveWorkflowExecutionResponse); ok {
		r0 = rf(ctx, request)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*persistence.ConflictResolveWorkflowExecutionResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *persistence.ConflictResolveWorkflowExecutionRequest) error); ok {
		r1 = rf(ctx, request)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// CreateFailoverMarkerTasks provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) CreateFailoverMarkerTasks(ctx context.Context, request *persistence.CreateFailoverMarkersRequest) error {
	ret := _m.Called(ctx, request)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.CreateFailoverMarkersRequest) error); ok {
		r0 = rf(ctx, request)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// CreateWorkflowExecution provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) CreateWorkflowExecution(ctx context.Context, request *persistence.CreateWorkflowExecutionRequest) (*persistence.CreateWorkflowExecutionResponse, error) {
	ret := _m.Called(ctx, request)

	var r0 *persistence.CreateWorkflowExecutionResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.CreateWorkflowExecutionRequest) (*persistence.CreateWorkflowExecutionResponse, error)); ok {
		return rf(ctx, request)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.CreateWorkflowExecutionRequest) *persistence.CreateWorkflowExecutionResponse); ok {
		r0 = rf(ctx, request)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*persistence.CreateWorkflowExecutionResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *persistence.CreateWorkflowExecutionRequest) error); ok {
		r1 = rf(ctx, request)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// DeleteCurrentWorkflowExecution provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) DeleteCurrentWorkflowExecution(ctx context.Context, request *persistence.DeleteCurrentWorkflowExecutionRequest) error {
	ret := _m.Called(ctx, request)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.DeleteCurrentWorkflowExecutionRequest) error); ok {
		r0 = rf(ctx, request)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DeleteReplicationTaskFromDLQ provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) DeleteReplicationTaskFromDLQ(ctx context.Context, request *persistence.DeleteReplicationTaskFromDLQRequest) error {
	ret := _m.Called(ctx, request)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.DeleteReplicationTaskFromDLQRequest) error); ok {
		r0 = rf(ctx, request)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DeleteWorkflowExecution provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) DeleteWorkflowExecution(ctx context.Context, request *persistence.DeleteWorkflowExecutionRequest) error {
	ret := _m.Called(ctx, request)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.DeleteWorkflowExecutionRequest) error); ok {
		r0 = rf(ctx, request)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// GetCurrentExecution provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) GetCurrentExecution(ctx context.Context, request *persistence.GetCurrentExecutionRequest) (*persistence.GetCurrentExecutionResponse, error) {
	ret := _m.Called(ctx, request)

	var r0 *persistence.GetCurrentExecutionResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.GetCurrentExecutionRequest) (*persistence.GetCurrentExecutionResponse, error)); ok {
		return rf(ctx, request)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.GetCurrentExecutionRequest) *persistence.GetCurrentExecutionResponse); ok {
		r0 = rf(ctx, request)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*persistence.GetCurrentExecutionResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *persistence.GetCurrentExecutionRequest) error); ok {
		r1 = rf(ctx, request)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetHistoryTasks provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) GetHistoryTasks(ctx context.Context, request *persistence.GetHistoryTasksRequest) (*persistence.GetHistoryTasksResponse, error) {
	ret := _m.Called(ctx, request)

	var r0 *persistence.GetHistoryTasksResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.GetHistoryTasksRequest) (*persistence.GetHistoryTasksResponse, error)); ok {
		return rf(ctx, request)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.GetHistoryTasksRequest) *persistence.GetHistoryTasksResponse); ok {
		r0 = rf(ctx, request)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*persistence.GetHistoryTasksResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *persistence.GetHistoryTasksRequest) error); ok {
		r1 = rf(ctx, request)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetName provides a mock function with given fields:
func (_m *ExecutionManager) GetName() string {
	ret := _m.Called()

	var r0 string
	if rf, ok := ret.Get(0).(func() string); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(string)
	}

	return r0
}

// GetReplicationDLQSize provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) GetReplicationDLQSize(ctx context.Context, request *persistence.GetReplicationDLQSizeRequest) (*persistence.GetReplicationDLQSizeResponse, error) {
	ret := _m.Called(ctx, request)

	var r0 *persistence.GetReplicationDLQSizeResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.GetReplicationDLQSizeRequest) (*persistence.GetReplicationDLQSizeResponse, error)); ok {
		return rf(ctx, request)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.GetReplicationDLQSizeRequest) *persistence.GetReplicationDLQSizeResponse); ok {
		r0 = rf(ctx, request)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*persistence.GetReplicationDLQSizeResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *persistence.GetReplicationDLQSizeRequest) error); ok {
		r1 = rf(ctx, request)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetReplicationTasksFromDLQ provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) GetReplicationTasksFromDLQ(ctx context.Context, request *persistence.GetReplicationTasksFromDLQRequest) (*persistence.GetHistoryTasksResponse, error) {
	ret := _m.Called(ctx, request)

	var r0 *persistence.GetHistoryTasksResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.GetReplicationTasksFromDLQRequest) (*persistence.GetHistoryTasksResponse, error)); ok {
		return rf(ctx, request)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.GetReplicationTasksFromDLQRequest) *persistence.GetHistoryTasksResponse); ok {
		r0 = rf(ctx, request)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*persistence.GetHistoryTasksResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *persistence.GetReplicationTasksFromDLQRequest) error); ok {
		r1 = rf(ctx, request)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetShardID provides a mock function with given fields:
func (_m *ExecutionManager) GetShardID() int {
	ret := _m.Called()

	var r0 int
	if rf, ok := ret.Get(0).(func() int); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(int)
	}

	return r0
}

// GetWorkflowExecution provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) GetWorkflowExecution(ctx context.Context, request *persistence.GetWorkflowExecutionRequest) (*persistence.GetWorkflowExecutionResponse, error) {
	ret := _m.Called(ctx, request)

	var r0 *persistence.GetWorkflowExecutionResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.GetWorkflowExecutionRequest) (*persistence.GetWorkflowExecutionResponse, error)); ok {
		return rf(ctx, request)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.GetWorkflowExecutionRequest) *persistence.GetWorkflowExecutionResponse); ok {
		r0 = rf(ctx, request)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*persistence.GetWorkflowExecutionResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *persistence.GetWorkflowExecutionRequest) error); ok {
		r1 = rf(ctx, request)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// IsWorkflowExecutionExists provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) IsWorkflowExecutionExists(ctx context.Context, request *persistence.IsWorkflowExecutionExistsRequest) (*persistence.IsWorkflowExecutionExistsResponse, error) {
	ret := _m.Called(ctx, request)

	var r0 *persistence.IsWorkflowExecutionExistsResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.IsWorkflowExecutionExistsRequest) (*persistence.IsWorkflowExecutionExistsResponse, error)); ok {
		return rf(ctx, request)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.IsWorkflowExecutionExistsRequest) *persistence.IsWorkflowExecutionExistsResponse); ok {
		r0 = rf(ctx, request)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*persistence.IsWorkflowExecutionExistsResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *persistence.IsWorkflowExecutionExistsRequest) error); ok {
		r1 = rf(ctx, request)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// ListConcreteExecutions provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) ListConcreteExecutions(ctx context.Context, request *persistence.ListConcreteExecutionsRequest) (*persistence.ListConcreteExecutionsResponse, error) {
	ret := _m.Called(ctx, request)

	var r0 *persistence.ListConcreteExecutionsResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.ListConcreteExecutionsRequest) (*persistence.ListConcreteExecutionsResponse, error)); ok {
		return rf(ctx, request)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.ListConcreteExecutionsRequest) *persistence.ListConcreteExecutionsResponse); ok {
		r0 = rf(ctx, request)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*persistence.ListConcreteExecutionsResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *persistence.ListConcreteExecutionsRequest) error); ok {
		r1 = rf(ctx, request)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// ListCurrentExecutions provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) ListCurrentExecutions(ctx context.Context, request *persistence.ListCurrentExecutionsRequest) (*persistence.ListCurrentExecutionsResponse, error) {
	ret := _m.Called(ctx, request)

	var r0 *persistence.ListCurrentExecutionsResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.ListCurrentExecutionsRequest) (*persistence.ListCurrentExecutionsResponse, error)); ok {
		return rf(ctx, request)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.ListCurrentExecutionsRequest) *persistence.ListCurrentExecutionsResponse); ok {
		r0 = rf(ctx, request)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*persistence.ListCurrentExecutionsResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *persistence.ListCurrentExecutionsRequest) error); ok {
		r1 = rf(ctx, request)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// PutReplicationTaskToDLQ provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) PutReplicationTaskToDLQ(ctx context.Context, request *persistence.PutReplicationTaskToDLQRequest) error {
	ret := _m.Called(ctx, request)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.PutReplicationTaskToDLQRequest) error); ok {
		r0 = rf(ctx, request)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// RangeCompleteHistoryTask provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) RangeCompleteHistoryTask(ctx context.Context, request *persistence.RangeCompleteHistoryTaskRequest) (*persistence.RangeCompleteHistoryTaskResponse, error) {
	ret := _m.Called(ctx, request)

	var r0 *persistence.RangeCompleteHistoryTaskResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.RangeCompleteHistoryTaskRequest) (*persistence.RangeCompleteHistoryTaskResponse, error)); ok {
		return rf(ctx, request)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.RangeCompleteHistoryTaskRequest) *persistence.RangeCompleteHistoryTaskResponse); ok {
		r0 = rf(ctx, request)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*persistence.RangeCompleteHistoryTaskResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *persistence.RangeCompleteHistoryTaskRequest) error); ok {
		r1 = rf(ctx, request)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// RangeDeleteReplicationTaskFromDLQ provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) RangeDeleteReplicationTaskFromDLQ(ctx context.Context, request *persistence.RangeDeleteReplicationTaskFromDLQRequest) (*persistence.RangeDeleteReplicationTaskFromDLQResponse, error) {
	ret := _m.Called(ctx, request)

	var r0 *persistence.RangeDeleteReplicationTaskFromDLQResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.RangeDeleteReplicationTaskFromDLQRequest) (*persistence.RangeDeleteReplicationTaskFromDLQResponse, error)); ok {
		return rf(ctx, request)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.RangeDeleteReplicationTaskFromDLQRequest) *persistence.RangeDeleteReplicationTaskFromDLQResponse); ok {
		r0 = rf(ctx, request)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*persistence.RangeDeleteReplicationTaskFromDLQResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *persistence.RangeDeleteReplicationTaskFromDLQRequest) error); ok {
		r1 = rf(ctx, request)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// UpdateWorkflowExecution provides a mock function with given fields: ctx, request
func (_m *ExecutionManager) UpdateWorkflowExecution(ctx context.Context, request *persistence.UpdateWorkflowExecutionRequest) (*persistence.UpdateWorkflowExecutionResponse, error) {
	ret := _m.Called(ctx, request)

	var r0 *persistence.UpdateWorkflowExecutionResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.UpdateWorkflowExecutionRequest) (*persistence.UpdateWorkflowExecutionResponse, error)); ok {
		return rf(ctx, request)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *persistence.UpdateWorkflowExecutionRequest) *persistence.UpdateWorkflowExecutionResponse); ok {
		r0 = rf(ctx, request)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*persistence.UpdateWorkflowExecutionResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *persistence.UpdateWorkflowExecutionRequest) error); ok {
		r1 = rf(ctx, request)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetActiveClusterSelectionPolicy provides a mock function with given fields: ctx, domainID, wfID, rID
func (_m *ExecutionManager) GetActiveClusterSelectionPolicy(ctx context.Context, domainID, wfID, rID string) (*types.ActiveClusterSelectionPolicy, error) {
	ret := _m.Called(ctx, domainID, wfID, rID)

	var r0 *types.ActiveClusterSelectionPolicy
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*types.ActiveClusterSelectionPolicy, error)); ok {
		return rf(ctx, domainID, wfID, rID)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *types.ActiveClusterSelectionPolicy); ok {
		r0 = rf(ctx, domainID, wfID, rID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*types.ActiveClusterSelectionPolicy)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
		r1 = rf(ctx, domainID, wfID, rID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// DeleteActiveClusterSelectionPolicy provides a mock function with given fields: ctx, domainID, wfID, rID
func (_m *ExecutionManager) DeleteActiveClusterSelectionPolicy(ctx context.Context, domainID, wfID, rID string) error {
	ret := _m.Called(ctx, domainID, wfID, rID)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok {
		r0 = rf(ctx, domainID, wfID, rID)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// NewExecutionManager creates a new instance of ExecutionManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewExecutionManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *ExecutionManager {
	mock := &ExecutionManager{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
