// Code generated by mockery v2.13.0-beta.1. DO NOT EDIT.

package proxy

import (
	context "context"

	centchain "github.com/centrifuge/pod/centchain"

	mock "github.com/stretchr/testify/mock"

	pkgproxy "github.com/centrifuge/chain-custom-types/pkg/proxy"

	signature "github.com/centrifuge/go-substrate-rpc-client/v4/signature"

	types "github.com/centrifuge/go-substrate-rpc-client/v4/types"
)

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

// AddProxy provides a mock function with given fields: ctx, delegate, proxyType, delay, krp
func (_m *APIMock) AddProxy(ctx context.Context, delegate *types.AccountID, proxyType pkgproxy.CentrifugeProxyType, delay types.U32, krp signature.KeyringPair) error {
	ret := _m.Called(ctx, delegate, proxyType, delay, krp)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *types.AccountID, pkgproxy.CentrifugeProxyType, types.U32, signature.KeyringPair) error); ok {
		r0 = rf(ctx, delegate, proxyType, delay, krp)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// GetProxies provides a mock function with given fields: accountID
func (_m *APIMock) GetProxies(accountID *types.AccountID) (*types.ProxyStorageEntry, error) {
	ret := _m.Called(accountID)

	var r0 *types.ProxyStorageEntry
	if rf, ok := ret.Get(0).(func(*types.AccountID) *types.ProxyStorageEntry); ok {
		r0 = rf(accountID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*types.ProxyStorageEntry)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(*types.AccountID) error); ok {
		r1 = rf(accountID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// ProxyCall provides a mock function with given fields: ctx, delegator, proxyKeyringPair, forcedProxyType, proxiedCall
func (_m *APIMock) ProxyCall(ctx context.Context, delegator *types.AccountID, proxyKeyringPair signature.KeyringPair, forcedProxyType types.Option[pkgproxy.CentrifugeProxyType], proxiedCall types.Call) (*centchain.ExtrinsicInfo, error) {
	ret := _m.Called(ctx, delegator, proxyKeyringPair, forcedProxyType, proxiedCall)

	var r0 *centchain.ExtrinsicInfo
	if rf, ok := ret.Get(0).(func(context.Context, *types.AccountID, signature.KeyringPair, types.Option[pkgproxy.CentrifugeProxyType], types.Call) *centchain.ExtrinsicInfo); ok {
		r0 = rf(ctx, delegator, proxyKeyringPair, forcedProxyType, proxiedCall)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*centchain.ExtrinsicInfo)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *types.AccountID, signature.KeyringPair, types.Option[pkgproxy.CentrifugeProxyType], types.Call) error); ok {
		r1 = rf(ctx, delegator, proxyKeyringPair, forcedProxyType, proxiedCall)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

type NewAPIMockT interface {
	mock.TestingT
	Cleanup(func())
}

// NewAPIMock creates a new instance of APIMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewAPIMock(t NewAPIMockT) *APIMock {
	mock := &APIMock{}
	mock.Mock.Test(t)

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

	return mock
}
