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

package mocks

import (
	context "context"

	biz "github.com/chainloop-dev/chainloop/app/controlplane/pkg/biz"

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

	uuid "github.com/google/uuid"
)

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

// Create provides a mock function with given fields: ctx, name
func (_m *OrganizationRepo) Create(ctx context.Context, name string) (*biz.Organization, error) {
	ret := _m.Called(ctx, name)

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

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

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

	return r0, r1
}

// Delete provides a mock function with given fields: ctx, ID
func (_m *OrganizationRepo) Delete(ctx context.Context, ID uuid.UUID) error {
	ret := _m.Called(ctx, ID)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) error); ok {
		r0 = rf(ctx, ID)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// FindByID provides a mock function with given fields: ctx, orgID
func (_m *OrganizationRepo) FindByID(ctx context.Context, orgID uuid.UUID) (*biz.Organization, error) {
	ret := _m.Called(ctx, orgID)

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

	var r0 *biz.Organization
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) (*biz.Organization, error)); ok {
		return rf(ctx, orgID)
	}
	if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) *biz.Organization); ok {
		r0 = rf(ctx, orgID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*biz.Organization)
		}
	}

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

	return r0, r1
}

// FindByName provides a mock function with given fields: ctx, name
func (_m *OrganizationRepo) FindByName(ctx context.Context, name string) (*biz.Organization, error) {
	ret := _m.Called(ctx, name)

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

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

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

	return r0, r1
}

// Update provides a mock function with given fields: ctx, id, blockOnPolicyViolation, policiesAllowedHostnames
func (_m *OrganizationRepo) Update(ctx context.Context, id uuid.UUID, blockOnPolicyViolation *bool, policiesAllowedHostnames []string) (*biz.Organization, error) {
	ret := _m.Called(ctx, id, blockOnPolicyViolation, policiesAllowedHostnames)

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

	var r0 *biz.Organization
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, *bool, []string) (*biz.Organization, error)); ok {
		return rf(ctx, id, blockOnPolicyViolation, policiesAllowedHostnames)
	}
	if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, *bool, []string) *biz.Organization); ok {
		r0 = rf(ctx, id, blockOnPolicyViolation, policiesAllowedHostnames)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*biz.Organization)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, *bool, []string) error); ok {
		r1 = rf(ctx, id, blockOnPolicyViolation, policiesAllowedHostnames)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

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

	return mock
}
