// Code generated by MockGen. DO NOT EDIT.
// Source: gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/module/modshared (interfaces: RPCAPI,API)
//
// Generated by this command:
//
//	mockgen -typed -destination api.go -package mock_modshared gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/module/modshared RPCAPI,API
//

// Package mock_modshared is a generated GoMock package.
package mock_modshared

import (
	context "context"
	slog "log/slog"
	reflect "reflect"

	retry "gitlab.com/gitlab-org/cluster-integration/tunnel/tool/retry"
	gomock "go.uber.org/mock/gomock"
)

// MockRPCAPI is a mock of RPCAPI interface.
type MockRPCAPI struct {
	ctrl     *gomock.Controller
	recorder *MockRPCAPIMockRecorder
	isgomock struct{}
}

// MockRPCAPIMockRecorder is the mock recorder for MockRPCAPI.
type MockRPCAPIMockRecorder struct {
	mock *MockRPCAPI
}

// NewMockRPCAPI creates a new mock instance.
func NewMockRPCAPI(ctrl *gomock.Controller) *MockRPCAPI {
	mock := &MockRPCAPI{ctrl: ctrl}
	mock.recorder = &MockRPCAPIMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockRPCAPI) EXPECT() *MockRPCAPIMockRecorder {
	return m.recorder
}

// HandleIOError mocks base method.
func (m *MockRPCAPI) HandleIOError(log *slog.Logger, msg string, err error) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "HandleIOError", log, msg, err)
	ret0, _ := ret[0].(error)
	return ret0
}

// HandleIOError indicates an expected call of HandleIOError.
func (mr *MockRPCAPIMockRecorder) HandleIOError(log, msg, err any) *MockRPCAPIHandleIOErrorCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleIOError", reflect.TypeOf((*MockRPCAPI)(nil).HandleIOError), log, msg, err)
	return &MockRPCAPIHandleIOErrorCall{Call: call}
}

// MockRPCAPIHandleIOErrorCall wrap *gomock.Call
type MockRPCAPIHandleIOErrorCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockRPCAPIHandleIOErrorCall) Return(arg0 error) *MockRPCAPIHandleIOErrorCall {
	c.Call = c.Call.Return(arg0)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockRPCAPIHandleIOErrorCall) Do(f func(*slog.Logger, string, error) error) *MockRPCAPIHandleIOErrorCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockRPCAPIHandleIOErrorCall) DoAndReturn(f func(*slog.Logger, string, error) error) *MockRPCAPIHandleIOErrorCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// HandleProcessingError mocks base method.
func (m *MockRPCAPI) HandleProcessingError(log *slog.Logger, msg string, err error, fields ...slog.Attr) {
	m.ctrl.T.Helper()
	varargs := []any{log, msg, err}
	for _, a := range fields {
		varargs = append(varargs, a)
	}
	m.ctrl.Call(m, "HandleProcessingError", varargs...)
}

// HandleProcessingError indicates an expected call of HandleProcessingError.
func (mr *MockRPCAPIMockRecorder) HandleProcessingError(log, msg, err any, fields ...any) *MockRPCAPIHandleProcessingErrorCall {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{log, msg, err}, fields...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleProcessingError", reflect.TypeOf((*MockRPCAPI)(nil).HandleProcessingError), varargs...)
	return &MockRPCAPIHandleProcessingErrorCall{Call: call}
}

// MockRPCAPIHandleProcessingErrorCall wrap *gomock.Call
type MockRPCAPIHandleProcessingErrorCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockRPCAPIHandleProcessingErrorCall) Return() *MockRPCAPIHandleProcessingErrorCall {
	c.Call = c.Call.Return()
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockRPCAPIHandleProcessingErrorCall) Do(f func(*slog.Logger, string, error, ...slog.Attr)) *MockRPCAPIHandleProcessingErrorCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockRPCAPIHandleProcessingErrorCall) DoAndReturn(f func(*slog.Logger, string, error, ...slog.Attr)) *MockRPCAPIHandleProcessingErrorCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// Log mocks base method.
func (m *MockRPCAPI) Log() *slog.Logger {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Log")
	ret0, _ := ret[0].(*slog.Logger)
	return ret0
}

// Log indicates an expected call of Log.
func (mr *MockRPCAPIMockRecorder) Log() *MockRPCAPILogCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Log", reflect.TypeOf((*MockRPCAPI)(nil).Log))
	return &MockRPCAPILogCall{Call: call}
}

// MockRPCAPILogCall wrap *gomock.Call
type MockRPCAPILogCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockRPCAPILogCall) Return(arg0 *slog.Logger) *MockRPCAPILogCall {
	c.Call = c.Call.Return(arg0)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockRPCAPILogCall) Do(f func() *slog.Logger) *MockRPCAPILogCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockRPCAPILogCall) DoAndReturn(f func() *slog.Logger) *MockRPCAPILogCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// PollWithBackoff mocks base method.
func (m *MockRPCAPI) PollWithBackoff(cfg retry.PollConfig, f retry.PollWithBackoffFunc, opts ...retry.PollOption) error {
	m.ctrl.T.Helper()
	varargs := []any{cfg, f}
	for _, a := range opts {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "PollWithBackoff", varargs...)
	ret0, _ := ret[0].(error)
	return ret0
}

// PollWithBackoff indicates an expected call of PollWithBackoff.
func (mr *MockRPCAPIMockRecorder) PollWithBackoff(cfg, f any, opts ...any) *MockRPCAPIPollWithBackoffCall {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{cfg, f}, opts...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PollWithBackoff", reflect.TypeOf((*MockRPCAPI)(nil).PollWithBackoff), varargs...)
	return &MockRPCAPIPollWithBackoffCall{Call: call}
}

// MockRPCAPIPollWithBackoffCall wrap *gomock.Call
type MockRPCAPIPollWithBackoffCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockRPCAPIPollWithBackoffCall) Return(arg0 error) *MockRPCAPIPollWithBackoffCall {
	c.Call = c.Call.Return(arg0)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockRPCAPIPollWithBackoffCall) Do(f func(retry.PollConfig, retry.PollWithBackoffFunc, ...retry.PollOption) error) *MockRPCAPIPollWithBackoffCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockRPCAPIPollWithBackoffCall) DoAndReturn(f func(retry.PollConfig, retry.PollWithBackoffFunc, ...retry.PollOption) error) *MockRPCAPIPollWithBackoffCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// MockAPI is a mock of API interface.
type MockAPI struct {
	ctrl     *gomock.Controller
	recorder *MockAPIMockRecorder
	isgomock struct{}
}

// MockAPIMockRecorder is the mock recorder for MockAPI.
type MockAPIMockRecorder struct {
	mock *MockAPI
}

// NewMockAPI creates a new mock instance.
func NewMockAPI(ctrl *gomock.Controller) *MockAPI {
	mock := &MockAPI{ctrl: ctrl}
	mock.recorder = &MockAPIMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockAPI) EXPECT() *MockAPIMockRecorder {
	return m.recorder
}

// HandleProcessingError mocks base method.
func (m *MockAPI) HandleProcessingError(ctx context.Context, log *slog.Logger, msg string, err error, fields ...slog.Attr) {
	m.ctrl.T.Helper()
	varargs := []any{ctx, log, msg, err}
	for _, a := range fields {
		varargs = append(varargs, a)
	}
	m.ctrl.Call(m, "HandleProcessingError", varargs...)
}

// HandleProcessingError indicates an expected call of HandleProcessingError.
func (mr *MockAPIMockRecorder) HandleProcessingError(ctx, log, msg, err any, fields ...any) *MockAPIHandleProcessingErrorCall {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{ctx, log, msg, err}, fields...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleProcessingError", reflect.TypeOf((*MockAPI)(nil).HandleProcessingError), varargs...)
	return &MockAPIHandleProcessingErrorCall{Call: call}
}

// MockAPIHandleProcessingErrorCall wrap *gomock.Call
type MockAPIHandleProcessingErrorCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockAPIHandleProcessingErrorCall) Return() *MockAPIHandleProcessingErrorCall {
	c.Call = c.Call.Return()
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockAPIHandleProcessingErrorCall) Do(f func(context.Context, *slog.Logger, string, error, ...slog.Attr)) *MockAPIHandleProcessingErrorCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockAPIHandleProcessingErrorCall) DoAndReturn(f func(context.Context, *slog.Logger, string, error, ...slog.Attr)) *MockAPIHandleProcessingErrorCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}
