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

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

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

	api "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/api"
	featureflag "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/tool/featureflag"
	fieldz "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/tool/fieldz"
	retry "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/tool/retry"
	gomock "go.uber.org/mock/gomock"
)

// MockAgentRPCAPI is a mock of AgentRPCAPI interface.
type MockAgentRPCAPI struct {
	ctrl     *gomock.Controller
	recorder *MockAgentRPCAPIMockRecorder
	isgomock struct{}
}

// MockAgentRPCAPIMockRecorder is the mock recorder for MockAgentRPCAPI.
type MockAgentRPCAPIMockRecorder struct {
	mock *MockAgentRPCAPI
}

// NewMockAgentRPCAPI creates a new mock instance.
func NewMockAgentRPCAPI(ctrl *gomock.Controller) *MockAgentRPCAPI {
	mock := &MockAgentRPCAPI{ctrl: ctrl}
	mock.recorder = &MockAgentRPCAPIMockRecorder{mock}
	return mock
}

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

// AgentInfo mocks base method.
func (m *MockAgentRPCAPI) AgentInfo(ctx context.Context, log *slog.Logger) (api.AgentInfo, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AgentInfo", ctx, log)
	ret0, _ := ret[0].(api.AgentInfo)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// AgentInfo indicates an expected call of AgentInfo.
func (mr *MockAgentRPCAPIMockRecorder) AgentInfo(ctx, log any) *MockAgentRPCAPIAgentInfoCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentInfo", reflect.TypeOf((*MockAgentRPCAPI)(nil).AgentInfo), ctx, log)
	return &MockAgentRPCAPIAgentInfoCall{Call: call}
}

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

// Return rewrite *gomock.Call.Return
func (c *MockAgentRPCAPIAgentInfoCall) Return(arg0 api.AgentInfo, arg1 error) *MockAgentRPCAPIAgentInfoCall {
	c.Call = c.Call.Return(arg0, arg1)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockAgentRPCAPIAgentInfoCall) Do(f func(context.Context, *slog.Logger) (api.AgentInfo, error)) *MockAgentRPCAPIAgentInfoCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockAgentRPCAPIAgentInfoCall) DoAndReturn(f func(context.Context, *slog.Logger) (api.AgentInfo, error)) *MockAgentRPCAPIAgentInfoCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// AgentTokenWithType mocks base method.
func (m *MockAgentRPCAPI) AgentTokenWithType() api.AgentTokenWithType {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AgentTokenWithType")
	ret0, _ := ret[0].(api.AgentTokenWithType)
	return ret0
}

// AgentTokenWithType indicates an expected call of AgentTokenWithType.
func (mr *MockAgentRPCAPIMockRecorder) AgentTokenWithType() *MockAgentRPCAPIAgentTokenWithTypeCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentTokenWithType", reflect.TypeOf((*MockAgentRPCAPI)(nil).AgentTokenWithType))
	return &MockAgentRPCAPIAgentTokenWithTypeCall{Call: call}
}

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

// Return rewrite *gomock.Call.Return
func (c *MockAgentRPCAPIAgentTokenWithTypeCall) Return(arg0 api.AgentTokenWithType) *MockAgentRPCAPIAgentTokenWithTypeCall {
	c.Call = c.Call.Return(arg0)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockAgentRPCAPIAgentTokenWithTypeCall) Do(f func() api.AgentTokenWithType) *MockAgentRPCAPIAgentTokenWithTypeCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockAgentRPCAPIAgentTokenWithTypeCall) DoAndReturn(f func() api.AgentTokenWithType) *MockAgentRPCAPIAgentTokenWithTypeCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// HandleIOError mocks base method.
func (m *MockAgentRPCAPI) 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 *MockAgentRPCAPIMockRecorder) HandleIOError(log, msg, err any) *MockAgentRPCAPIHandleIOErrorCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleIOError", reflect.TypeOf((*MockAgentRPCAPI)(nil).HandleIOError), log, msg, err)
	return &MockAgentRPCAPIHandleIOErrorCall{Call: call}
}

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

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

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

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

// HandleProcessingError mocks base method.
func (m *MockAgentRPCAPI) HandleProcessingError(log *slog.Logger, msg string, err error, fields ...fieldz.Field) {
	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 *MockAgentRPCAPIMockRecorder) HandleProcessingError(log, msg, err any, fields ...any) *MockAgentRPCAPIHandleProcessingErrorCall {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{log, msg, err}, fields...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleProcessingError", reflect.TypeOf((*MockAgentRPCAPI)(nil).HandleProcessingError), varargs...)
	return &MockAgentRPCAPIHandleProcessingErrorCall{Call: call}
}

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

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

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

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

// Log mocks base method.
func (m *MockAgentRPCAPI) 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 *MockAgentRPCAPIMockRecorder) Log() *MockAgentRPCAPILogCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Log", reflect.TypeOf((*MockAgentRPCAPI)(nil).Log))
	return &MockAgentRPCAPILogCall{Call: call}
}

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

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

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

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

// PollWithBackoff mocks base method.
func (m *MockAgentRPCAPI) PollWithBackoff(cfg retry.PollConfig, f retry.PollWithBackoffFunc) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "PollWithBackoff", cfg, f)
	ret0, _ := ret[0].(error)
	return ret0
}

// PollWithBackoff indicates an expected call of PollWithBackoff.
func (mr *MockAgentRPCAPIMockRecorder) PollWithBackoff(cfg, f any) *MockAgentRPCAPIPollWithBackoffCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PollWithBackoff", reflect.TypeOf((*MockAgentRPCAPI)(nil).PollWithBackoff), cfg, f)
	return &MockAgentRPCAPIPollWithBackoffCall{Call: call}
}

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

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

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

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

// 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 ...fieldz.Field) {
	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, ...fieldz.Field)) *MockRPCAPIHandleProcessingErrorCall {
	c.Call = c.Call.Do(f)
	return c
}

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

// IsDisabled mocks base method.
func (m *MockRPCAPI) IsDisabled(ff *featureflag.FeatureFlag) bool {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "IsDisabled", ff)
	ret0, _ := ret[0].(bool)
	return ret0
}

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

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

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

// Do rewrite *gomock.Call.Do
func (c *MockRPCAPIIsDisabledCall) Do(f func(*featureflag.FeatureFlag) bool) *MockRPCAPIIsDisabledCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockRPCAPIIsDisabledCall) DoAndReturn(f func(*featureflag.FeatureFlag) bool) *MockRPCAPIIsDisabledCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// IsEnabled mocks base method.
func (m *MockRPCAPI) IsEnabled(ff *featureflag.FeatureFlag) bool {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "IsEnabled", ff)
	ret0, _ := ret[0].(bool)
	return ret0
}

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

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

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

// Do rewrite *gomock.Call.Do
func (c *MockRPCAPIIsEnabledCall) Do(f func(*featureflag.FeatureFlag) bool) *MockRPCAPIIsEnabledCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockRPCAPIIsEnabledCall) DoAndReturn(f func(*featureflag.FeatureFlag) bool) *MockRPCAPIIsEnabledCall {
	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) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "PollWithBackoff", cfg, f)
	ret0, _ := ret[0].(error)
	return ret0
}

// PollWithBackoff indicates an expected call of PollWithBackoff.
func (mr *MockRPCAPIMockRecorder) PollWithBackoff(cfg, f any) *MockRPCAPIPollWithBackoffCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PollWithBackoff", reflect.TypeOf((*MockRPCAPI)(nil).PollWithBackoff), cfg, f)
	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) 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) error) *MockRPCAPIPollWithBackoffCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}
