// Code generated by mockery. DO NOT EDIT.

package mocks

import (
	context "context"

	grpc "google.golang.org/grpc"

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

	nodev1 "buf.build/gen/go/agglayer/agglayer/protocolbuffers/go/agglayer/node/v1"
)

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

type NodeStateServiceClient_Expecter struct {
	mock *mock.Mock
}

func (_m *NodeStateServiceClient) EXPECT() *NodeStateServiceClient_Expecter {
	return &NodeStateServiceClient_Expecter{mock: &_m.Mock}
}

// GetCertificateHeader provides a mock function with given fields: ctx, in, opts
func (_m *NodeStateServiceClient) GetCertificateHeader(ctx context.Context, in *nodev1.GetCertificateHeaderRequest, opts ...grpc.CallOption) (*nodev1.GetCertificateHeaderResponse, 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 GetCertificateHeader")
	}

	var r0 *nodev1.GetCertificateHeaderResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *nodev1.GetCertificateHeaderRequest, ...grpc.CallOption) (*nodev1.GetCertificateHeaderResponse, error)); ok {
		return rf(ctx, in, opts...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *nodev1.GetCertificateHeaderRequest, ...grpc.CallOption) *nodev1.GetCertificateHeaderResponse); ok {
		r0 = rf(ctx, in, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*nodev1.GetCertificateHeaderResponse)
		}
	}

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

	return r0, r1
}

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

// GetCertificateHeader is a helper method to define mock.On call
//   - ctx context.Context
//   - in *nodev1.GetCertificateHeaderRequest
//   - opts ...grpc.CallOption
func (_e *NodeStateServiceClient_Expecter) GetCertificateHeader(ctx interface{}, in interface{}, opts ...interface{}) *NodeStateServiceClient_GetCertificateHeader_Call {
	return &NodeStateServiceClient_GetCertificateHeader_Call{Call: _e.mock.On("GetCertificateHeader",
		append([]interface{}{ctx, in}, opts...)...)}
}

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

func (_c *NodeStateServiceClient_GetCertificateHeader_Call) Return(_a0 *nodev1.GetCertificateHeaderResponse, _a1 error) *NodeStateServiceClient_GetCertificateHeader_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *NodeStateServiceClient_GetCertificateHeader_Call) RunAndReturn(run func(context.Context, *nodev1.GetCertificateHeaderRequest, ...grpc.CallOption) (*nodev1.GetCertificateHeaderResponse, error)) *NodeStateServiceClient_GetCertificateHeader_Call {
	_c.Call.Return(run)
	return _c
}

// GetLatestCertificateHeader provides a mock function with given fields: ctx, in, opts
func (_m *NodeStateServiceClient) GetLatestCertificateHeader(ctx context.Context, in *nodev1.GetLatestCertificateHeaderRequest, opts ...grpc.CallOption) (*nodev1.GetLatestCertificateHeaderResponse, 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 GetLatestCertificateHeader")
	}

	var r0 *nodev1.GetLatestCertificateHeaderResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *nodev1.GetLatestCertificateHeaderRequest, ...grpc.CallOption) (*nodev1.GetLatestCertificateHeaderResponse, error)); ok {
		return rf(ctx, in, opts...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *nodev1.GetLatestCertificateHeaderRequest, ...grpc.CallOption) *nodev1.GetLatestCertificateHeaderResponse); ok {
		r0 = rf(ctx, in, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*nodev1.GetLatestCertificateHeaderResponse)
		}
	}

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

	return r0, r1
}

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

// GetLatestCertificateHeader is a helper method to define mock.On call
//   - ctx context.Context
//   - in *nodev1.GetLatestCertificateHeaderRequest
//   - opts ...grpc.CallOption
func (_e *NodeStateServiceClient_Expecter) GetLatestCertificateHeader(ctx interface{}, in interface{}, opts ...interface{}) *NodeStateServiceClient_GetLatestCertificateHeader_Call {
	return &NodeStateServiceClient_GetLatestCertificateHeader_Call{Call: _e.mock.On("GetLatestCertificateHeader",
		append([]interface{}{ctx, in}, opts...)...)}
}

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

func (_c *NodeStateServiceClient_GetLatestCertificateHeader_Call) Return(_a0 *nodev1.GetLatestCertificateHeaderResponse, _a1 error) *NodeStateServiceClient_GetLatestCertificateHeader_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *NodeStateServiceClient_GetLatestCertificateHeader_Call) RunAndReturn(run func(context.Context, *nodev1.GetLatestCertificateHeaderRequest, ...grpc.CallOption) (*nodev1.GetLatestCertificateHeaderResponse, error)) *NodeStateServiceClient_GetLatestCertificateHeader_Call {
	_c.Call.Return(run)
	return _c
}

// GetNetworkInfo provides a mock function with given fields: ctx, in, opts
func (_m *NodeStateServiceClient) GetNetworkInfo(ctx context.Context, in *nodev1.GetNetworkInfoRequest, opts ...grpc.CallOption) (*nodev1.GetNetworkInfoResponse, 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 GetNetworkInfo")
	}

	var r0 *nodev1.GetNetworkInfoResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *nodev1.GetNetworkInfoRequest, ...grpc.CallOption) (*nodev1.GetNetworkInfoResponse, error)); ok {
		return rf(ctx, in, opts...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *nodev1.GetNetworkInfoRequest, ...grpc.CallOption) *nodev1.GetNetworkInfoResponse); ok {
		r0 = rf(ctx, in, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*nodev1.GetNetworkInfoResponse)
		}
	}

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

	return r0, r1
}

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

// GetNetworkInfo is a helper method to define mock.On call
//   - ctx context.Context
//   - in *nodev1.GetNetworkInfoRequest
//   - opts ...grpc.CallOption
func (_e *NodeStateServiceClient_Expecter) GetNetworkInfo(ctx interface{}, in interface{}, opts ...interface{}) *NodeStateServiceClient_GetNetworkInfo_Call {
	return &NodeStateServiceClient_GetNetworkInfo_Call{Call: _e.mock.On("GetNetworkInfo",
		append([]interface{}{ctx, in}, opts...)...)}
}

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

func (_c *NodeStateServiceClient_GetNetworkInfo_Call) Return(_a0 *nodev1.GetNetworkInfoResponse, _a1 error) *NodeStateServiceClient_GetNetworkInfo_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *NodeStateServiceClient_GetNetworkInfo_Call) RunAndReturn(run func(context.Context, *nodev1.GetNetworkInfoRequest, ...grpc.CallOption) (*nodev1.GetNetworkInfoResponse, error)) *NodeStateServiceClient_GetNetworkInfo_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
