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

package mockpbresource

import (
	"context"

	"github.com/hashicorp/consul/proto-public/pbresource"
	mock "github.com/stretchr/testify/mock"
	"google.golang.org/grpc"
)

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

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

	return mock
}

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

type ResourceServiceServer_Expecter struct {
	mock *mock.Mock
}

func (_m *ResourceServiceServer) EXPECT() *ResourceServiceServer_Expecter {
	return &ResourceServiceServer_Expecter{mock: &_m.Mock}
}

// Delete provides a mock function for the type ResourceServiceServer
func (_mock *ResourceServiceServer) Delete(context1 context.Context, deleteRequest *pbresource.DeleteRequest) (*pbresource.DeleteResponse, error) {
	ret := _mock.Called(context1, deleteRequest)

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

	var r0 *pbresource.DeleteResponse
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbresource.DeleteRequest) (*pbresource.DeleteResponse, error)); ok {
		return returnFunc(context1, deleteRequest)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbresource.DeleteRequest) *pbresource.DeleteResponse); ok {
		r0 = returnFunc(context1, deleteRequest)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*pbresource.DeleteResponse)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *pbresource.DeleteRequest) error); ok {
		r1 = returnFunc(context1, deleteRequest)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Delete is a helper method to define mock.On call
//   - context1 context.Context
//   - deleteRequest *pbresource.DeleteRequest
func (_e *ResourceServiceServer_Expecter) Delete(context1 interface{}, deleteRequest interface{}) *ResourceServiceServer_Delete_Call {
	return &ResourceServiceServer_Delete_Call{Call: _e.mock.On("Delete", context1, deleteRequest)}
}

func (_c *ResourceServiceServer_Delete_Call) Run(run func(context1 context.Context, deleteRequest *pbresource.DeleteRequest)) *ResourceServiceServer_Delete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *pbresource.DeleteRequest
		if args[1] != nil {
			arg1 = args[1].(*pbresource.DeleteRequest)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *ResourceServiceServer_Delete_Call) Return(deleteResponse *pbresource.DeleteResponse, err error) *ResourceServiceServer_Delete_Call {
	_c.Call.Return(deleteResponse, err)
	return _c
}

func (_c *ResourceServiceServer_Delete_Call) RunAndReturn(run func(context1 context.Context, deleteRequest *pbresource.DeleteRequest) (*pbresource.DeleteResponse, error)) *ResourceServiceServer_Delete_Call {
	_c.Call.Return(run)
	return _c
}

// List provides a mock function for the type ResourceServiceServer
func (_mock *ResourceServiceServer) List(context1 context.Context, listRequest *pbresource.ListRequest) (*pbresource.ListResponse, error) {
	ret := _mock.Called(context1, listRequest)

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

	var r0 *pbresource.ListResponse
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbresource.ListRequest) (*pbresource.ListResponse, error)); ok {
		return returnFunc(context1, listRequest)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbresource.ListRequest) *pbresource.ListResponse); ok {
		r0 = returnFunc(context1, listRequest)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*pbresource.ListResponse)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *pbresource.ListRequest) error); ok {
		r1 = returnFunc(context1, listRequest)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// List is a helper method to define mock.On call
//   - context1 context.Context
//   - listRequest *pbresource.ListRequest
func (_e *ResourceServiceServer_Expecter) List(context1 interface{}, listRequest interface{}) *ResourceServiceServer_List_Call {
	return &ResourceServiceServer_List_Call{Call: _e.mock.On("List", context1, listRequest)}
}

func (_c *ResourceServiceServer_List_Call) Run(run func(context1 context.Context, listRequest *pbresource.ListRequest)) *ResourceServiceServer_List_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *pbresource.ListRequest
		if args[1] != nil {
			arg1 = args[1].(*pbresource.ListRequest)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *ResourceServiceServer_List_Call) Return(listResponse *pbresource.ListResponse, err error) *ResourceServiceServer_List_Call {
	_c.Call.Return(listResponse, err)
	return _c
}

func (_c *ResourceServiceServer_List_Call) RunAndReturn(run func(context1 context.Context, listRequest *pbresource.ListRequest) (*pbresource.ListResponse, error)) *ResourceServiceServer_List_Call {
	_c.Call.Return(run)
	return _c
}

// ListByOwner provides a mock function for the type ResourceServiceServer
func (_mock *ResourceServiceServer) ListByOwner(context1 context.Context, listByOwnerRequest *pbresource.ListByOwnerRequest) (*pbresource.ListByOwnerResponse, error) {
	ret := _mock.Called(context1, listByOwnerRequest)

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

	var r0 *pbresource.ListByOwnerResponse
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbresource.ListByOwnerRequest) (*pbresource.ListByOwnerResponse, error)); ok {
		return returnFunc(context1, listByOwnerRequest)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbresource.ListByOwnerRequest) *pbresource.ListByOwnerResponse); ok {
		r0 = returnFunc(context1, listByOwnerRequest)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*pbresource.ListByOwnerResponse)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *pbresource.ListByOwnerRequest) error); ok {
		r1 = returnFunc(context1, listByOwnerRequest)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ListByOwner is a helper method to define mock.On call
//   - context1 context.Context
//   - listByOwnerRequest *pbresource.ListByOwnerRequest
func (_e *ResourceServiceServer_Expecter) ListByOwner(context1 interface{}, listByOwnerRequest interface{}) *ResourceServiceServer_ListByOwner_Call {
	return &ResourceServiceServer_ListByOwner_Call{Call: _e.mock.On("ListByOwner", context1, listByOwnerRequest)}
}

func (_c *ResourceServiceServer_ListByOwner_Call) Run(run func(context1 context.Context, listByOwnerRequest *pbresource.ListByOwnerRequest)) *ResourceServiceServer_ListByOwner_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *pbresource.ListByOwnerRequest
		if args[1] != nil {
			arg1 = args[1].(*pbresource.ListByOwnerRequest)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *ResourceServiceServer_ListByOwner_Call) Return(listByOwnerResponse *pbresource.ListByOwnerResponse, err error) *ResourceServiceServer_ListByOwner_Call {
	_c.Call.Return(listByOwnerResponse, err)
	return _c
}

func (_c *ResourceServiceServer_ListByOwner_Call) RunAndReturn(run func(context1 context.Context, listByOwnerRequest *pbresource.ListByOwnerRequest) (*pbresource.ListByOwnerResponse, error)) *ResourceServiceServer_ListByOwner_Call {
	_c.Call.Return(run)
	return _c
}

// MutateAndValidate provides a mock function for the type ResourceServiceServer
func (_mock *ResourceServiceServer) MutateAndValidate(context1 context.Context, mutateAndValidateRequest *pbresource.MutateAndValidateRequest) (*pbresource.MutateAndValidateResponse, error) {
	ret := _mock.Called(context1, mutateAndValidateRequest)

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

	var r0 *pbresource.MutateAndValidateResponse
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbresource.MutateAndValidateRequest) (*pbresource.MutateAndValidateResponse, error)); ok {
		return returnFunc(context1, mutateAndValidateRequest)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbresource.MutateAndValidateRequest) *pbresource.MutateAndValidateResponse); ok {
		r0 = returnFunc(context1, mutateAndValidateRequest)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*pbresource.MutateAndValidateResponse)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *pbresource.MutateAndValidateRequest) error); ok {
		r1 = returnFunc(context1, mutateAndValidateRequest)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// MutateAndValidate is a helper method to define mock.On call
//   - context1 context.Context
//   - mutateAndValidateRequest *pbresource.MutateAndValidateRequest
func (_e *ResourceServiceServer_Expecter) MutateAndValidate(context1 interface{}, mutateAndValidateRequest interface{}) *ResourceServiceServer_MutateAndValidate_Call {
	return &ResourceServiceServer_MutateAndValidate_Call{Call: _e.mock.On("MutateAndValidate", context1, mutateAndValidateRequest)}
}

func (_c *ResourceServiceServer_MutateAndValidate_Call) Run(run func(context1 context.Context, mutateAndValidateRequest *pbresource.MutateAndValidateRequest)) *ResourceServiceServer_MutateAndValidate_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *pbresource.MutateAndValidateRequest
		if args[1] != nil {
			arg1 = args[1].(*pbresource.MutateAndValidateRequest)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *ResourceServiceServer_MutateAndValidate_Call) Return(mutateAndValidateResponse *pbresource.MutateAndValidateResponse, err error) *ResourceServiceServer_MutateAndValidate_Call {
	_c.Call.Return(mutateAndValidateResponse, err)
	return _c
}

func (_c *ResourceServiceServer_MutateAndValidate_Call) RunAndReturn(run func(context1 context.Context, mutateAndValidateRequest *pbresource.MutateAndValidateRequest) (*pbresource.MutateAndValidateResponse, error)) *ResourceServiceServer_MutateAndValidate_Call {
	_c.Call.Return(run)
	return _c
}

// Read provides a mock function for the type ResourceServiceServer
func (_mock *ResourceServiceServer) Read(context1 context.Context, readRequest *pbresource.ReadRequest) (*pbresource.ReadResponse, error) {
	ret := _mock.Called(context1, readRequest)

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

	var r0 *pbresource.ReadResponse
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbresource.ReadRequest) (*pbresource.ReadResponse, error)); ok {
		return returnFunc(context1, readRequest)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbresource.ReadRequest) *pbresource.ReadResponse); ok {
		r0 = returnFunc(context1, readRequest)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*pbresource.ReadResponse)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *pbresource.ReadRequest) error); ok {
		r1 = returnFunc(context1, readRequest)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Read is a helper method to define mock.On call
//   - context1 context.Context
//   - readRequest *pbresource.ReadRequest
func (_e *ResourceServiceServer_Expecter) Read(context1 interface{}, readRequest interface{}) *ResourceServiceServer_Read_Call {
	return &ResourceServiceServer_Read_Call{Call: _e.mock.On("Read", context1, readRequest)}
}

func (_c *ResourceServiceServer_Read_Call) Run(run func(context1 context.Context, readRequest *pbresource.ReadRequest)) *ResourceServiceServer_Read_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *pbresource.ReadRequest
		if args[1] != nil {
			arg1 = args[1].(*pbresource.ReadRequest)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *ResourceServiceServer_Read_Call) Return(readResponse *pbresource.ReadResponse, err error) *ResourceServiceServer_Read_Call {
	_c.Call.Return(readResponse, err)
	return _c
}

func (_c *ResourceServiceServer_Read_Call) RunAndReturn(run func(context1 context.Context, readRequest *pbresource.ReadRequest) (*pbresource.ReadResponse, error)) *ResourceServiceServer_Read_Call {
	_c.Call.Return(run)
	return _c
}

// WatchList provides a mock function for the type ResourceServiceServer
func (_mock *ResourceServiceServer) WatchList(watchListRequest *pbresource.WatchListRequest, serverStreamingServer grpc.ServerStreamingServer[pbresource.WatchEvent]) error {
	ret := _mock.Called(watchListRequest, serverStreamingServer)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(*pbresource.WatchListRequest, grpc.ServerStreamingServer[pbresource.WatchEvent]) error); ok {
		r0 = returnFunc(watchListRequest, serverStreamingServer)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// WatchList is a helper method to define mock.On call
//   - watchListRequest *pbresource.WatchListRequest
//   - serverStreamingServer grpc.ServerStreamingServer[pbresource.WatchEvent]
func (_e *ResourceServiceServer_Expecter) WatchList(watchListRequest interface{}, serverStreamingServer interface{}) *ResourceServiceServer_WatchList_Call {
	return &ResourceServiceServer_WatchList_Call{Call: _e.mock.On("WatchList", watchListRequest, serverStreamingServer)}
}

func (_c *ResourceServiceServer_WatchList_Call) Run(run func(watchListRequest *pbresource.WatchListRequest, serverStreamingServer grpc.ServerStreamingServer[pbresource.WatchEvent])) *ResourceServiceServer_WatchList_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *pbresource.WatchListRequest
		if args[0] != nil {
			arg0 = args[0].(*pbresource.WatchListRequest)
		}
		var arg1 grpc.ServerStreamingServer[pbresource.WatchEvent]
		if args[1] != nil {
			arg1 = args[1].(grpc.ServerStreamingServer[pbresource.WatchEvent])
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *ResourceServiceServer_WatchList_Call) Return(err error) *ResourceServiceServer_WatchList_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *ResourceServiceServer_WatchList_Call) RunAndReturn(run func(watchListRequest *pbresource.WatchListRequest, serverStreamingServer grpc.ServerStreamingServer[pbresource.WatchEvent]) error) *ResourceServiceServer_WatchList_Call {
	_c.Call.Return(run)
	return _c
}

// Write provides a mock function for the type ResourceServiceServer
func (_mock *ResourceServiceServer) Write(context1 context.Context, writeRequest *pbresource.WriteRequest) (*pbresource.WriteResponse, error) {
	ret := _mock.Called(context1, writeRequest)

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

	var r0 *pbresource.WriteResponse
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbresource.WriteRequest) (*pbresource.WriteResponse, error)); ok {
		return returnFunc(context1, writeRequest)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbresource.WriteRequest) *pbresource.WriteResponse); ok {
		r0 = returnFunc(context1, writeRequest)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*pbresource.WriteResponse)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *pbresource.WriteRequest) error); ok {
		r1 = returnFunc(context1, writeRequest)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Write is a helper method to define mock.On call
//   - context1 context.Context
//   - writeRequest *pbresource.WriteRequest
func (_e *ResourceServiceServer_Expecter) Write(context1 interface{}, writeRequest interface{}) *ResourceServiceServer_Write_Call {
	return &ResourceServiceServer_Write_Call{Call: _e.mock.On("Write", context1, writeRequest)}
}

func (_c *ResourceServiceServer_Write_Call) Run(run func(context1 context.Context, writeRequest *pbresource.WriteRequest)) *ResourceServiceServer_Write_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *pbresource.WriteRequest
		if args[1] != nil {
			arg1 = args[1].(*pbresource.WriteRequest)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *ResourceServiceServer_Write_Call) Return(writeResponse *pbresource.WriteResponse, err error) *ResourceServiceServer_Write_Call {
	_c.Call.Return(writeResponse, err)
	return _c
}

func (_c *ResourceServiceServer_Write_Call) RunAndReturn(run func(context1 context.Context, writeRequest *pbresource.WriteRequest) (*pbresource.WriteResponse, error)) *ResourceServiceServer_Write_Call {
	_c.Call.Return(run)
	return _c
}

// WriteStatus provides a mock function for the type ResourceServiceServer
func (_mock *ResourceServiceServer) WriteStatus(context1 context.Context, writeStatusRequest *pbresource.WriteStatusRequest) (*pbresource.WriteStatusResponse, error) {
	ret := _mock.Called(context1, writeStatusRequest)

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

	var r0 *pbresource.WriteStatusResponse
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbresource.WriteStatusRequest) (*pbresource.WriteStatusResponse, error)); ok {
		return returnFunc(context1, writeStatusRequest)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbresource.WriteStatusRequest) *pbresource.WriteStatusResponse); ok {
		r0 = returnFunc(context1, writeStatusRequest)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*pbresource.WriteStatusResponse)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *pbresource.WriteStatusRequest) error); ok {
		r1 = returnFunc(context1, writeStatusRequest)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// WriteStatus is a helper method to define mock.On call
//   - context1 context.Context
//   - writeStatusRequest *pbresource.WriteStatusRequest
func (_e *ResourceServiceServer_Expecter) WriteStatus(context1 interface{}, writeStatusRequest interface{}) *ResourceServiceServer_WriteStatus_Call {
	return &ResourceServiceServer_WriteStatus_Call{Call: _e.mock.On("WriteStatus", context1, writeStatusRequest)}
}

func (_c *ResourceServiceServer_WriteStatus_Call) Run(run func(context1 context.Context, writeStatusRequest *pbresource.WriteStatusRequest)) *ResourceServiceServer_WriteStatus_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *pbresource.WriteStatusRequest
		if args[1] != nil {
			arg1 = args[1].(*pbresource.WriteStatusRequest)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *ResourceServiceServer_WriteStatus_Call) Return(writeStatusResponse *pbresource.WriteStatusResponse, err error) *ResourceServiceServer_WriteStatus_Call {
	_c.Call.Return(writeStatusResponse, err)
	return _c
}

func (_c *ResourceServiceServer_WriteStatus_Call) RunAndReturn(run func(context1 context.Context, writeStatusRequest *pbresource.WriteStatusRequest) (*pbresource.WriteStatusResponse, error)) *ResourceServiceServer_WriteStatus_Call {
	_c.Call.Return(run)
	return _c
}
