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

package mocks

import (
	"context"

	"github.com/apache/airflow/go-sdk/pkg/api"
	mock "github.com/stretchr/testify/mock"
	"resty.dev/v3"
)

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

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

	return mock
}

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

type ConnectionsClient_Expecter struct {
	mock *mock.Mock
}

func (_m *ConnectionsClient) EXPECT() *ConnectionsClient_Expecter {
	return &ConnectionsClient_Expecter{mock: &_m.Mock}
}

// Get provides a mock function for the type ConnectionsClient
func (_mock *ConnectionsClient) Get(ctx context.Context, connectionId string) (*api.ConnectionResponse, error) {
	ret := _mock.Called(ctx, connectionId)

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

	var r0 *api.ConnectionResponse
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*api.ConnectionResponse, error)); ok {
		return returnFunc(ctx, connectionId)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) *api.ConnectionResponse); ok {
		r0 = returnFunc(ctx, connectionId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*api.ConnectionResponse)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, connectionId)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Get is a helper method to define mock.On call
//   - ctx context.Context
//   - connectionId string
func (_e *ConnectionsClient_Expecter) Get(ctx interface{}, connectionId interface{}) *ConnectionsClient_Get_Call {
	return &ConnectionsClient_Get_Call{Call: _e.mock.On("Get", ctx, connectionId)}
}

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

func (_c *ConnectionsClient_Get_Call) Return(connectionResponse *api.ConnectionResponse, err error) *ConnectionsClient_Get_Call {
	_c.Call.Return(connectionResponse, err)
	return _c
}

func (_c *ConnectionsClient_Get_Call) RunAndReturn(run func(ctx context.Context, connectionId string) (*api.ConnectionResponse, error)) *ConnectionsClient_Get_Call {
	_c.Call.Return(run)
	return _c
}

// GetResponse provides a mock function for the type ConnectionsClient
func (_mock *ConnectionsClient) GetResponse(ctx context.Context, connectionId string) (*resty.Response, error) {
	ret := _mock.Called(ctx, connectionId)

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

	var r0 *resty.Response
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*resty.Response, error)); ok {
		return returnFunc(ctx, connectionId)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) *resty.Response); ok {
		r0 = returnFunc(ctx, connectionId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*resty.Response)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, connectionId)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetResponse is a helper method to define mock.On call
//   - ctx context.Context
//   - connectionId string
func (_e *ConnectionsClient_Expecter) GetResponse(ctx interface{}, connectionId interface{}) *ConnectionsClient_GetResponse_Call {
	return &ConnectionsClient_GetResponse_Call{Call: _e.mock.On("GetResponse", ctx, connectionId)}
}

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

func (_c *ConnectionsClient_GetResponse_Call) Return(response *resty.Response, err error) *ConnectionsClient_GetResponse_Call {
	_c.Call.Return(response, err)
	return _c
}

func (_c *ConnectionsClient_GetResponse_Call) RunAndReturn(run func(ctx context.Context, connectionId string) (*resty.Response, error)) *ConnectionsClient_GetResponse_Call {
	_c.Call.Return(run)
	return _c
}
