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

package mocks

import (
	"context"

	"github.com/argoproj/argo-cd/v3/commitserver/apiclient"
	mock "github.com/stretchr/testify/mock"
	"google.golang.org/grpc"
)

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

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

	return mock
}

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

type CommitServiceClient_Expecter struct {
	mock *mock.Mock
}

func (_m *CommitServiceClient) EXPECT() *CommitServiceClient_Expecter {
	return &CommitServiceClient_Expecter{mock: &_m.Mock}
}

// CommitHydratedManifests provides a mock function for the type CommitServiceClient
func (_mock *CommitServiceClient) CommitHydratedManifests(ctx context.Context, in *apiclient.CommitHydratedManifestsRequest, opts ...grpc.CallOption) (*apiclient.CommitHydratedManifestsResponse, 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 CommitHydratedManifests")
	}

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

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

// CommitHydratedManifests is a helper method to define mock.On call
//   - ctx context.Context
//   - in *apiclient.CommitHydratedManifestsRequest
//   - opts ...grpc.CallOption
func (_e *CommitServiceClient_Expecter) CommitHydratedManifests(ctx interface{}, in interface{}, opts ...interface{}) *CommitServiceClient_CommitHydratedManifests_Call {
	return &CommitServiceClient_CommitHydratedManifests_Call{Call: _e.mock.On("CommitHydratedManifests",
		append([]interface{}{ctx, in}, opts...)...)}
}

func (_c *CommitServiceClient_CommitHydratedManifests_Call) Run(run func(ctx context.Context, in *apiclient.CommitHydratedManifestsRequest, opts ...grpc.CallOption)) *CommitServiceClient_CommitHydratedManifests_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *apiclient.CommitHydratedManifestsRequest
		if args[1] != nil {
			arg1 = args[1].(*apiclient.CommitHydratedManifestsRequest)
		}
		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 *CommitServiceClient_CommitHydratedManifests_Call) Return(commitHydratedManifestsResponse *apiclient.CommitHydratedManifestsResponse, err error) *CommitServiceClient_CommitHydratedManifests_Call {
	_c.Call.Return(commitHydratedManifestsResponse, err)
	return _c
}

func (_c *CommitServiceClient_CommitHydratedManifests_Call) RunAndReturn(run func(ctx context.Context, in *apiclient.CommitHydratedManifestsRequest, opts ...grpc.CallOption) (*apiclient.CommitHydratedManifestsResponse, error)) *CommitServiceClient_CommitHydratedManifests_Call {
	_c.Call.Return(run)
	return _c
}
