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

package e2e

import (
	"context"

	"github.com/hashicorp/consul/internal/tools/protoc-gen-grpc-clone/e2e/proto"
	mock "github.com/stretchr/testify/mock"
	"google.golang.org/grpc"
)

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

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

	return mock
}

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

type SimpleClient_Expecter struct {
	mock *mock.Mock
}

func (_m *SimpleClient) EXPECT() *SimpleClient_Expecter {
	return &SimpleClient_Expecter{mock: &_m.Mock}
}

// Flow provides a mock function for the type SimpleClient
func (_mock *SimpleClient) Flow(ctx context.Context, in *proto.Req, opts ...grpc.CallOption) (grpc.ServerStreamingClient[proto.Resp], error) {
	// grpc.CallOption
	_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 := _mock.Called(_ca...)

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

	var r0 grpc.ServerStreamingClient[proto.Resp]
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *proto.Req, ...grpc.CallOption) (grpc.ServerStreamingClient[proto.Resp], error)); ok {
		return returnFunc(ctx, in, opts...)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *proto.Req, ...grpc.CallOption) grpc.ServerStreamingClient[proto.Resp]); ok {
		r0 = returnFunc(ctx, in, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(grpc.ServerStreamingClient[proto.Resp])
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *proto.Req, ...grpc.CallOption) error); ok {
		r1 = returnFunc(ctx, in, opts...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Flow is a helper method to define mock.On call
//   - ctx context.Context
//   - in *proto.Req
//   - opts ...grpc.CallOption
func (_e *SimpleClient_Expecter) Flow(ctx interface{}, in interface{}, opts ...interface{}) *SimpleClient_Flow_Call {
	return &SimpleClient_Flow_Call{Call: _e.mock.On("Flow",
		append([]interface{}{ctx, in}, opts...)...)}
}

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

func (_c *SimpleClient_Flow_Call) Return(serverStreamingClient grpc.ServerStreamingClient[proto.Resp], err error) *SimpleClient_Flow_Call {
	_c.Call.Return(serverStreamingClient, err)
	return _c
}

func (_c *SimpleClient_Flow_Call) RunAndReturn(run func(ctx context.Context, in *proto.Req, opts ...grpc.CallOption) (grpc.ServerStreamingClient[proto.Resp], error)) *SimpleClient_Flow_Call {
	_c.Call.Return(run)
	return _c
}

// Something provides a mock function for the type SimpleClient
func (_mock *SimpleClient) Something(ctx context.Context, in *proto.Req, opts ...grpc.CallOption) (*proto.Resp, error) {
	// grpc.CallOption
	_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 := _mock.Called(_ca...)

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

	var r0 *proto.Resp
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *proto.Req, ...grpc.CallOption) (*proto.Resp, error)); ok {
		return returnFunc(ctx, in, opts...)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *proto.Req, ...grpc.CallOption) *proto.Resp); ok {
		r0 = returnFunc(ctx, in, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*proto.Resp)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *proto.Req, ...grpc.CallOption) error); ok {
		r1 = returnFunc(ctx, in, opts...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Something is a helper method to define mock.On call
//   - ctx context.Context
//   - in *proto.Req
//   - opts ...grpc.CallOption
func (_e *SimpleClient_Expecter) Something(ctx interface{}, in interface{}, opts ...interface{}) *SimpleClient_Something_Call {
	return &SimpleClient_Something_Call{Call: _e.mock.On("Something",
		append([]interface{}{ctx, in}, opts...)...)}
}

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

func (_c *SimpleClient_Something_Call) Return(resp *proto.Resp, err error) *SimpleClient_Something_Call {
	_c.Call.Return(resp, err)
	return _c
}

func (_c *SimpleClient_Something_Call) RunAndReturn(run func(ctx context.Context, in *proto.Req, opts ...grpc.CallOption) (*proto.Resp, error)) *SimpleClient_Something_Call {
	_c.Call.Return(run)
	return _c
}
