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

package mocks

import (
	context "context"

	backend "github.com/chainloop-dev/chainloop/pkg/blobmanager"

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

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

// FromCredentials provides a mock function with given fields: ctx, secretName
func (_m *Provider) FromCredentials(ctx context.Context, secretName string) (backend.UploaderDownloader, error) {
	ret := _m.Called(ctx, secretName)

	var r0 backend.UploaderDownloader
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string) (backend.UploaderDownloader, error)); ok {
		return rf(ctx, secretName)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string) backend.UploaderDownloader); ok {
		r0 = rf(ctx, secretName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(backend.UploaderDownloader)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = rf(ctx, secretName)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// ID provides a mock function with given fields:
func (_m *Provider) ID() string {
	ret := _m.Called()

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

	return r0
}

// ValidateAndExtractCredentials provides a mock function with given fields: location, credsJSON
func (_m *Provider) ValidateAndExtractCredentials(location string, credsJSON []byte) (interface{}, error) {
	ret := _m.Called(location, credsJSON)

	var r0 interface{}
	var r1 error
	if rf, ok := ret.Get(0).(func(string, []byte) (interface{}, error)); ok {
		return rf(location, credsJSON)
	}
	if rf, ok := ret.Get(0).(func(string, []byte) interface{}); ok {
		r0 = rf(location, credsJSON)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(interface{})
		}
	}

	if rf, ok := ret.Get(1).(func(string, []byte) error); ok {
		r1 = rf(location, credsJSON)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

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

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

	return mock
}
