//go:build !ignore_autogenerated
// +build !ignore_autogenerated

// Code generated by mga tool. DO NOT EDIT.

package auth

import (
	"context"
	"github.com/stretchr/testify/mock"
)

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

// FindUserRole provides a mock function.
func (_m *MockRoleSource) FindUserRole(ctx context.Context, organizationID uint, userID uint) (_result_0 string, _result_1 bool, _result_2 error) {
	ret := _m.Called(ctx, organizationID, userID)

	var r0 string
	if rf, ok := ret.Get(0).(func(context.Context, uint, uint) string); ok {
		r0 = rf(ctx, organizationID, userID)
	} else {
		r0 = ret.Get(0).(string)
	}

	var r1 bool
	if rf, ok := ret.Get(1).(func(context.Context, uint, uint) bool); ok {
		r1 = rf(ctx, organizationID, userID)
	} else {
		r1 = ret.Get(1).(bool)
	}

	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, uint, uint) error); ok {
		r2 = rf(ctx, organizationID, userID)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

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

// SyncOrganizations provides a mock function.
func (_m *MockOIDCOrganizationSyncer) SyncOrganizations(ctx context.Context, user User, idTokenClaims *IDTokenClaims) (_result_0 error) {
	ret := _m.Called(ctx, user, idTokenClaims)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, User, *IDTokenClaims) error); ok {
		r0 = rf(ctx, user, idTokenClaims)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// SyncOrganizations provides a mock function.
func (_m *MockOrganizationSyncer) SyncOrganizations(ctx context.Context, user User, upstreamMemberships []UpstreamOrganizationMembership) (_result_0 error) {
	ret := _m.Called(ctx, user, upstreamMemberships)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, User, []UpstreamOrganizationMembership) error); ok {
		r0 = rf(ctx, user, upstreamMemberships)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// ApplyUserMembership provides a mock function.
func (_m *MockOrganizationStore) ApplyUserMembership(ctx context.Context, organizationID uint, userID uint, role string) (_result_0 error) {
	ret := _m.Called(ctx, organizationID, userID, role)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, uint, uint, string) error); ok {
		r0 = rf(ctx, organizationID, userID, role)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// EnsureOrganizationExists provides a mock function.
func (_m *MockOrganizationStore) EnsureOrganizationExists(ctx context.Context, name string, provider string) (_result_0 bool, _result_1 uint, _result_2 error) {
	ret := _m.Called(ctx, name, provider)

	var r0 bool
	if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok {
		r0 = rf(ctx, name, provider)
	} else {
		r0 = ret.Get(0).(bool)
	}

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

	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, string, string) error); ok {
		r2 = rf(ctx, name, provider)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// GetOrganizationMembershipsOf provides a mock function.
func (_m *MockOrganizationStore) GetOrganizationMembershipsOf(ctx context.Context, userID uint) (_result_0 []UserOrganization, _result_1 error) {
	ret := _m.Called(ctx, userID)

	var r0 []UserOrganization
	if rf, ok := ret.Get(0).(func(context.Context, uint) []UserOrganization); ok {
		r0 = rf(ctx, userID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]UserOrganization)
		}
	}

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

	return r0, r1
}

// RemoveUserFromOrganization provides a mock function.
func (_m *MockOrganizationStore) RemoveUserFromOrganization(ctx context.Context, organizationID uint, userID uint) (_result_0 error) {
	ret := _m.Called(ctx, organizationID, userID)

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

	return r0
}

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

// OrganizationCreated provides a mock function.
func (_m *MockOrganizationEvents) OrganizationCreated(ctx context.Context, event OrganizationCreated) (_result_0 error) {
	ret := _m.Called(ctx, event)

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

	return r0
}
