// Code generated by mockery v2.53.5. DO NOT EDIT.

package mocks

import (
	context "context"

	sdk "github.com/chainloop-dev/chainloop/app/controlplane/plugins/sdk/v1"
	mock "github.com/stretchr/testify/mock"
)

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

// Attach provides a mock function with given fields: ctx, req
func (_m *FanOut) Attach(ctx context.Context, req *sdk.AttachmentRequest) (*sdk.AttachmentResponse, error) {
	ret := _m.Called(ctx, req)

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

	var r0 *sdk.AttachmentResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *sdk.AttachmentRequest) (*sdk.AttachmentResponse, error)); ok {
		return rf(ctx, req)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *sdk.AttachmentRequest) *sdk.AttachmentResponse); ok {
		r0 = rf(ctx, req)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*sdk.AttachmentResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *sdk.AttachmentRequest) error); ok {
		r1 = rf(ctx, req)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Describe provides a mock function with no fields
func (_m *FanOut) Describe() *sdk.IntegrationInfo {
	ret := _m.Called()

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

	var r0 *sdk.IntegrationInfo
	if rf, ok := ret.Get(0).(func() *sdk.IntegrationInfo); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*sdk.IntegrationInfo)
		}
	}

	return r0
}

// Execute provides a mock function with given fields: ctx, req
func (_m *FanOut) Execute(ctx context.Context, req *sdk.ExecutionRequest) error {
	ret := _m.Called(ctx, req)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *sdk.ExecutionRequest) error); ok {
		r0 = rf(ctx, req)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// GetSubscribedMaterials provides a mock function with no fields
func (_m *FanOut) GetSubscribedMaterials() []*sdk.InputMaterial {
	ret := _m.Called()

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

	var r0 []*sdk.InputMaterial
	if rf, ok := ret.Get(0).(func() []*sdk.InputMaterial); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*sdk.InputMaterial)
		}
	}

	return r0
}

// IsSubscribedTo provides a mock function with given fields: materialType
func (_m *FanOut) IsSubscribedTo(materialType string) bool {
	ret := _m.Called(materialType)

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

	var r0 bool
	if rf, ok := ret.Get(0).(func(string) bool); ok {
		r0 = rf(materialType)
	} else {
		r0 = ret.Get(0).(bool)
	}

	return r0
}

// Register provides a mock function with given fields: ctx, req
func (_m *FanOut) Register(ctx context.Context, req *sdk.RegistrationRequest) (*sdk.RegistrationResponse, error) {
	ret := _m.Called(ctx, req)

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

	var r0 *sdk.RegistrationResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *sdk.RegistrationRequest) (*sdk.RegistrationResponse, error)); ok {
		return rf(ctx, req)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *sdk.RegistrationRequest) *sdk.RegistrationResponse); ok {
		r0 = rf(ctx, req)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*sdk.RegistrationResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *sdk.RegistrationRequest) error); ok {
		r1 = rf(ctx, req)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// String provides a mock function with no fields
func (_m *FanOut) String() string {
	ret := _m.Called()

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

	var r0 string
	if rf, ok := ret.Get(0).(func() string); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(string)
	}

	return r0
}

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

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

	return mock
}
