// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package mocks

import (
	"context"
	"time"

	"github.com/meilisearch/meilisearch-go"
	mock "github.com/stretchr/testify/mock"
)

// NewMockmeilisearchTaskReader creates a new instance of MockmeilisearchTaskReader. 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 NewMockmeilisearchTaskReader(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockmeilisearchTaskReader {
	mock := &MockmeilisearchTaskReader{}
	mock.Mock.Test(t)

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

	return mock
}

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

type MockmeilisearchTaskReader_Expecter struct {
	mock *mock.Mock
}

func (_m *MockmeilisearchTaskReader) EXPECT() *MockmeilisearchTaskReader_Expecter {
	return &MockmeilisearchTaskReader_Expecter{mock: &_m.Mock}
}

// GetTask provides a mock function for the type MockmeilisearchTaskReader
func (_mock *MockmeilisearchTaskReader) GetTask(taskUID int64) (*meilisearch.Task, error) {
	ret := _mock.Called(taskUID)

	if len(ret) == 0 {
		panic("no return value specified for GetTask")
	}

	var r0 *meilisearch.Task
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(int64) (*meilisearch.Task, error)); ok {
		return returnFunc(taskUID)
	}
	if returnFunc, ok := ret.Get(0).(func(int64) *meilisearch.Task); ok {
		r0 = returnFunc(taskUID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*meilisearch.Task)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(int64) error); ok {
		r1 = returnFunc(taskUID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// MockmeilisearchTaskReader_GetTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTask'
type MockmeilisearchTaskReader_GetTask_Call struct {
	*mock.Call
}

// GetTask is a helper method to define mock.On call
//   - taskUID int64
func (_e *MockmeilisearchTaskReader_Expecter) GetTask(taskUID interface{}) *MockmeilisearchTaskReader_GetTask_Call {
	return &MockmeilisearchTaskReader_GetTask_Call{Call: _e.mock.On("GetTask", taskUID)}
}

func (_c *MockmeilisearchTaskReader_GetTask_Call) Run(run func(taskUID int64)) *MockmeilisearchTaskReader_GetTask_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 int64
		if args[0] != nil {
			arg0 = args[0].(int64)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *MockmeilisearchTaskReader_GetTask_Call) Return(task *meilisearch.Task, err error) *MockmeilisearchTaskReader_GetTask_Call {
	_c.Call.Return(task, err)
	return _c
}

func (_c *MockmeilisearchTaskReader_GetTask_Call) RunAndReturn(run func(taskUID int64) (*meilisearch.Task, error)) *MockmeilisearchTaskReader_GetTask_Call {
	_c.Call.Return(run)
	return _c
}

// GetTaskWithContext provides a mock function for the type MockmeilisearchTaskReader
func (_mock *MockmeilisearchTaskReader) GetTaskWithContext(ctx context.Context, taskUID int64) (*meilisearch.Task, error) {
	ret := _mock.Called(ctx, taskUID)

	if len(ret) == 0 {
		panic("no return value specified for GetTaskWithContext")
	}

	var r0 *meilisearch.Task
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, int64) (*meilisearch.Task, error)); ok {
		return returnFunc(ctx, taskUID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, int64) *meilisearch.Task); ok {
		r0 = returnFunc(ctx, taskUID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*meilisearch.Task)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, int64) error); ok {
		r1 = returnFunc(ctx, taskUID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// MockmeilisearchTaskReader_GetTaskWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTaskWithContext'
type MockmeilisearchTaskReader_GetTaskWithContext_Call struct {
	*mock.Call
}

// GetTaskWithContext is a helper method to define mock.On call
//   - ctx context.Context
//   - taskUID int64
func (_e *MockmeilisearchTaskReader_Expecter) GetTaskWithContext(ctx interface{}, taskUID interface{}) *MockmeilisearchTaskReader_GetTaskWithContext_Call {
	return &MockmeilisearchTaskReader_GetTaskWithContext_Call{Call: _e.mock.On("GetTaskWithContext", ctx, taskUID)}
}

func (_c *MockmeilisearchTaskReader_GetTaskWithContext_Call) Run(run func(ctx context.Context, taskUID int64)) *MockmeilisearchTaskReader_GetTaskWithContext_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 int64
		if args[1] != nil {
			arg1 = args[1].(int64)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *MockmeilisearchTaskReader_GetTaskWithContext_Call) Return(task *meilisearch.Task, err error) *MockmeilisearchTaskReader_GetTaskWithContext_Call {
	_c.Call.Return(task, err)
	return _c
}

func (_c *MockmeilisearchTaskReader_GetTaskWithContext_Call) RunAndReturn(run func(ctx context.Context, taskUID int64) (*meilisearch.Task, error)) *MockmeilisearchTaskReader_GetTaskWithContext_Call {
	_c.Call.Return(run)
	return _c
}

// GetTasks provides a mock function for the type MockmeilisearchTaskReader
func (_mock *MockmeilisearchTaskReader) GetTasks(param *meilisearch.TasksQuery) (*meilisearch.TaskResult, error) {
	ret := _mock.Called(param)

	if len(ret) == 0 {
		panic("no return value specified for GetTasks")
	}

	var r0 *meilisearch.TaskResult
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(*meilisearch.TasksQuery) (*meilisearch.TaskResult, error)); ok {
		return returnFunc(param)
	}
	if returnFunc, ok := ret.Get(0).(func(*meilisearch.TasksQuery) *meilisearch.TaskResult); ok {
		r0 = returnFunc(param)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*meilisearch.TaskResult)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(*meilisearch.TasksQuery) error); ok {
		r1 = returnFunc(param)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// MockmeilisearchTaskReader_GetTasks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTasks'
type MockmeilisearchTaskReader_GetTasks_Call struct {
	*mock.Call
}

// GetTasks is a helper method to define mock.On call
//   - param *meilisearch.TasksQuery
func (_e *MockmeilisearchTaskReader_Expecter) GetTasks(param interface{}) *MockmeilisearchTaskReader_GetTasks_Call {
	return &MockmeilisearchTaskReader_GetTasks_Call{Call: _e.mock.On("GetTasks", param)}
}

func (_c *MockmeilisearchTaskReader_GetTasks_Call) Run(run func(param *meilisearch.TasksQuery)) *MockmeilisearchTaskReader_GetTasks_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *meilisearch.TasksQuery
		if args[0] != nil {
			arg0 = args[0].(*meilisearch.TasksQuery)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *MockmeilisearchTaskReader_GetTasks_Call) Return(taskResult *meilisearch.TaskResult, err error) *MockmeilisearchTaskReader_GetTasks_Call {
	_c.Call.Return(taskResult, err)
	return _c
}

func (_c *MockmeilisearchTaskReader_GetTasks_Call) RunAndReturn(run func(param *meilisearch.TasksQuery) (*meilisearch.TaskResult, error)) *MockmeilisearchTaskReader_GetTasks_Call {
	_c.Call.Return(run)
	return _c
}

// GetTasksWithContext provides a mock function for the type MockmeilisearchTaskReader
func (_mock *MockmeilisearchTaskReader) GetTasksWithContext(ctx context.Context, param *meilisearch.TasksQuery) (*meilisearch.TaskResult, error) {
	ret := _mock.Called(ctx, param)

	if len(ret) == 0 {
		panic("no return value specified for GetTasksWithContext")
	}

	var r0 *meilisearch.TaskResult
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *meilisearch.TasksQuery) (*meilisearch.TaskResult, error)); ok {
		return returnFunc(ctx, param)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *meilisearch.TasksQuery) *meilisearch.TaskResult); ok {
		r0 = returnFunc(ctx, param)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*meilisearch.TaskResult)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *meilisearch.TasksQuery) error); ok {
		r1 = returnFunc(ctx, param)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// MockmeilisearchTaskReader_GetTasksWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTasksWithContext'
type MockmeilisearchTaskReader_GetTasksWithContext_Call struct {
	*mock.Call
}

// GetTasksWithContext is a helper method to define mock.On call
//   - ctx context.Context
//   - param *meilisearch.TasksQuery
func (_e *MockmeilisearchTaskReader_Expecter) GetTasksWithContext(ctx interface{}, param interface{}) *MockmeilisearchTaskReader_GetTasksWithContext_Call {
	return &MockmeilisearchTaskReader_GetTasksWithContext_Call{Call: _e.mock.On("GetTasksWithContext", ctx, param)}
}

func (_c *MockmeilisearchTaskReader_GetTasksWithContext_Call) Run(run func(ctx context.Context, param *meilisearch.TasksQuery)) *MockmeilisearchTaskReader_GetTasksWithContext_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *meilisearch.TasksQuery
		if args[1] != nil {
			arg1 = args[1].(*meilisearch.TasksQuery)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *MockmeilisearchTaskReader_GetTasksWithContext_Call) Return(taskResult *meilisearch.TaskResult, err error) *MockmeilisearchTaskReader_GetTasksWithContext_Call {
	_c.Call.Return(taskResult, err)
	return _c
}

func (_c *MockmeilisearchTaskReader_GetTasksWithContext_Call) RunAndReturn(run func(ctx context.Context, param *meilisearch.TasksQuery) (*meilisearch.TaskResult, error)) *MockmeilisearchTaskReader_GetTasksWithContext_Call {
	_c.Call.Return(run)
	return _c
}

// WaitForTask provides a mock function for the type MockmeilisearchTaskReader
func (_mock *MockmeilisearchTaskReader) WaitForTask(taskUID int64, interval time.Duration) (*meilisearch.Task, error) {
	ret := _mock.Called(taskUID, interval)

	if len(ret) == 0 {
		panic("no return value specified for WaitForTask")
	}

	var r0 *meilisearch.Task
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(int64, time.Duration) (*meilisearch.Task, error)); ok {
		return returnFunc(taskUID, interval)
	}
	if returnFunc, ok := ret.Get(0).(func(int64, time.Duration) *meilisearch.Task); ok {
		r0 = returnFunc(taskUID, interval)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*meilisearch.Task)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(int64, time.Duration) error); ok {
		r1 = returnFunc(taskUID, interval)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// MockmeilisearchTaskReader_WaitForTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForTask'
type MockmeilisearchTaskReader_WaitForTask_Call struct {
	*mock.Call
}

// WaitForTask is a helper method to define mock.On call
//   - taskUID int64
//   - interval time.Duration
func (_e *MockmeilisearchTaskReader_Expecter) WaitForTask(taskUID interface{}, interval interface{}) *MockmeilisearchTaskReader_WaitForTask_Call {
	return &MockmeilisearchTaskReader_WaitForTask_Call{Call: _e.mock.On("WaitForTask", taskUID, interval)}
}

func (_c *MockmeilisearchTaskReader_WaitForTask_Call) Run(run func(taskUID int64, interval time.Duration)) *MockmeilisearchTaskReader_WaitForTask_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 int64
		if args[0] != nil {
			arg0 = args[0].(int64)
		}
		var arg1 time.Duration
		if args[1] != nil {
			arg1 = args[1].(time.Duration)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *MockmeilisearchTaskReader_WaitForTask_Call) Return(task *meilisearch.Task, err error) *MockmeilisearchTaskReader_WaitForTask_Call {
	_c.Call.Return(task, err)
	return _c
}

func (_c *MockmeilisearchTaskReader_WaitForTask_Call) RunAndReturn(run func(taskUID int64, interval time.Duration) (*meilisearch.Task, error)) *MockmeilisearchTaskReader_WaitForTask_Call {
	_c.Call.Return(run)
	return _c
}

// WaitForTaskWithContext provides a mock function for the type MockmeilisearchTaskReader
func (_mock *MockmeilisearchTaskReader) WaitForTaskWithContext(ctx context.Context, taskUID int64, interval time.Duration) (*meilisearch.Task, error) {
	ret := _mock.Called(ctx, taskUID, interval)

	if len(ret) == 0 {
		panic("no return value specified for WaitForTaskWithContext")
	}

	var r0 *meilisearch.Task
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, int64, time.Duration) (*meilisearch.Task, error)); ok {
		return returnFunc(ctx, taskUID, interval)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, int64, time.Duration) *meilisearch.Task); ok {
		r0 = returnFunc(ctx, taskUID, interval)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*meilisearch.Task)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, int64, time.Duration) error); ok {
		r1 = returnFunc(ctx, taskUID, interval)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// MockmeilisearchTaskReader_WaitForTaskWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForTaskWithContext'
type MockmeilisearchTaskReader_WaitForTaskWithContext_Call struct {
	*mock.Call
}

// WaitForTaskWithContext is a helper method to define mock.On call
//   - ctx context.Context
//   - taskUID int64
//   - interval time.Duration
func (_e *MockmeilisearchTaskReader_Expecter) WaitForTaskWithContext(ctx interface{}, taskUID interface{}, interval interface{}) *MockmeilisearchTaskReader_WaitForTaskWithContext_Call {
	return &MockmeilisearchTaskReader_WaitForTaskWithContext_Call{Call: _e.mock.On("WaitForTaskWithContext", ctx, taskUID, interval)}
}

func (_c *MockmeilisearchTaskReader_WaitForTaskWithContext_Call) Run(run func(ctx context.Context, taskUID int64, interval time.Duration)) *MockmeilisearchTaskReader_WaitForTaskWithContext_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 int64
		if args[1] != nil {
			arg1 = args[1].(int64)
		}
		var arg2 time.Duration
		if args[2] != nil {
			arg2 = args[2].(time.Duration)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *MockmeilisearchTaskReader_WaitForTaskWithContext_Call) Return(task *meilisearch.Task, err error) *MockmeilisearchTaskReader_WaitForTaskWithContext_Call {
	_c.Call.Return(task, err)
	return _c
}

func (_c *MockmeilisearchTaskReader_WaitForTaskWithContext_Call) RunAndReturn(run func(ctx context.Context, taskUID int64, interval time.Duration) (*meilisearch.Task, error)) *MockmeilisearchTaskReader_WaitForTaskWithContext_Call {
	_c.Call.Return(run)
	return _c
}
