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

package mocks

import (
	context "context"

	client "go-micro.dev/v4/client"

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

	v0 "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/eventhistory/v0"
)

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

type EventHistoryService_Expecter struct {
	mock *mock.Mock
}

func (_m *EventHistoryService) EXPECT() *EventHistoryService_Expecter {
	return &EventHistoryService_Expecter{mock: &_m.Mock}
}

// GetEvents provides a mock function with given fields: ctx, in, opts
func (_m *EventHistoryService) GetEvents(ctx context.Context, in *v0.GetEventsRequest, opts ...client.CallOption) (*v0.GetEventsResponse, error) {
	_va := make([]interface{}, len(opts))
	for _i := range opts {
		_va[_i] = opts[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, in)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 *v0.GetEventsResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *v0.GetEventsRequest, ...client.CallOption) (*v0.GetEventsResponse, error)); ok {
		return rf(ctx, in, opts...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *v0.GetEventsRequest, ...client.CallOption) *v0.GetEventsResponse); ok {
		r0 = rf(ctx, in, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v0.GetEventsResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *v0.GetEventsRequest, ...client.CallOption) error); ok {
		r1 = rf(ctx, in, opts...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// GetEvents is a helper method to define mock.On call
//   - ctx context.Context
//   - in *v0.GetEventsRequest
//   - opts ...client.CallOption
func (_e *EventHistoryService_Expecter) GetEvents(ctx interface{}, in interface{}, opts ...interface{}) *EventHistoryService_GetEvents_Call {
	return &EventHistoryService_GetEvents_Call{Call: _e.mock.On("GetEvents",
		append([]interface{}{ctx, in}, opts...)...)}
}

func (_c *EventHistoryService_GetEvents_Call) Run(run func(ctx context.Context, in *v0.GetEventsRequest, opts ...client.CallOption)) *EventHistoryService_GetEvents_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]client.CallOption, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(client.CallOption)
			}
		}
		run(args[0].(context.Context), args[1].(*v0.GetEventsRequest), variadicArgs...)
	})
	return _c
}

func (_c *EventHistoryService_GetEvents_Call) Return(_a0 *v0.GetEventsResponse, _a1 error) *EventHistoryService_GetEvents_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *EventHistoryService_GetEvents_Call) RunAndReturn(run func(context.Context, *v0.GetEventsRequest, ...client.CallOption) (*v0.GetEventsResponse, error)) *EventHistoryService_GetEvents_Call {
	_c.Call.Return(run)
	return _c
}

// GetEventsForUser provides a mock function with given fields: ctx, in, opts
func (_m *EventHistoryService) GetEventsForUser(ctx context.Context, in *v0.GetEventsForUserRequest, opts ...client.CallOption) (*v0.GetEventsResponse, error) {
	_va := make([]interface{}, len(opts))
	for _i := range opts {
		_va[_i] = opts[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, in)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 *v0.GetEventsResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *v0.GetEventsForUserRequest, ...client.CallOption) (*v0.GetEventsResponse, error)); ok {
		return rf(ctx, in, opts...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *v0.GetEventsForUserRequest, ...client.CallOption) *v0.GetEventsResponse); ok {
		r0 = rf(ctx, in, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v0.GetEventsResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *v0.GetEventsForUserRequest, ...client.CallOption) error); ok {
		r1 = rf(ctx, in, opts...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// GetEventsForUser is a helper method to define mock.On call
//   - ctx context.Context
//   - in *v0.GetEventsForUserRequest
//   - opts ...client.CallOption
func (_e *EventHistoryService_Expecter) GetEventsForUser(ctx interface{}, in interface{}, opts ...interface{}) *EventHistoryService_GetEventsForUser_Call {
	return &EventHistoryService_GetEventsForUser_Call{Call: _e.mock.On("GetEventsForUser",
		append([]interface{}{ctx, in}, opts...)...)}
}

func (_c *EventHistoryService_GetEventsForUser_Call) Run(run func(ctx context.Context, in *v0.GetEventsForUserRequest, opts ...client.CallOption)) *EventHistoryService_GetEventsForUser_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]client.CallOption, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(client.CallOption)
			}
		}
		run(args[0].(context.Context), args[1].(*v0.GetEventsForUserRequest), variadicArgs...)
	})
	return _c
}

func (_c *EventHistoryService_GetEventsForUser_Call) Return(_a0 *v0.GetEventsResponse, _a1 error) *EventHistoryService_GetEventsForUser_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *EventHistoryService_GetEventsForUser_Call) RunAndReturn(run func(context.Context, *v0.GetEventsForUserRequest, ...client.CallOption) (*v0.GetEventsResponse, error)) *EventHistoryService_GetEventsForUser_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
