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

package gcp_secret_manager

import (
	"context"

	mock "github.com/stretchr/testify/mock"
	"gitlab.com/gitlab-org/gitlab-runner/common"
)

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

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

	return mock
}

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

type mockClient_Expecter struct {
	mock *mock.Mock
}

func (_m *mockClient) EXPECT() *mockClient_Expecter {
	return &mockClient_Expecter{mock: &_m.Mock}
}

// GetSecret provides a mock function for the type mockClient
func (_mock *mockClient) GetSecret(ctx context.Context, s *common.GCPSecretManagerSecret) (string, error) {
	ret := _mock.Called(ctx, s)

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

	var r0 string
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *common.GCPSecretManagerSecret) (string, error)); ok {
		return returnFunc(ctx, s)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *common.GCPSecretManagerSecret) string); ok {
		r0 = returnFunc(ctx, s)
	} else {
		r0 = ret.Get(0).(string)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *common.GCPSecretManagerSecret) error); ok {
		r1 = returnFunc(ctx, s)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetSecret is a helper method to define mock.On call
//   - ctx context.Context
//   - s *common.GCPSecretManagerSecret
func (_e *mockClient_Expecter) GetSecret(ctx interface{}, s interface{}) *mockClient_GetSecret_Call {
	return &mockClient_GetSecret_Call{Call: _e.mock.On("GetSecret", ctx, s)}
}

func (_c *mockClient_GetSecret_Call) Run(run func(ctx context.Context, s *common.GCPSecretManagerSecret)) *mockClient_GetSecret_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *common.GCPSecretManagerSecret
		if args[1] != nil {
			arg1 = args[1].(*common.GCPSecretManagerSecret)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *mockClient_GetSecret_Call) Return(s1 string, err error) *mockClient_GetSecret_Call {
	_c.Call.Return(s1, err)
	return _c
}

func (_c *mockClient_GetSecret_Call) RunAndReturn(run func(ctx context.Context, s *common.GCPSecretManagerSecret) (string, error)) *mockClient_GetSecret_Call {
	_c.Call.Return(run)
	return _c
}
