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

package mocks

import (
	context "context"

	database "github.com/ergomake/ergomake/internal/database"
	environments "github.com/ergomake/ergomake/internal/environments"

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

	uuid "github.com/google/uuid"
)

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

type EnvironmentsProvider_Expecter struct {
	mock *mock.Mock
}

func (_m *EnvironmentsProvider) EXPECT() *EnvironmentsProvider_Expecter {
	return &EnvironmentsProvider_Expecter{mock: &_m.Mock}
}

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

	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
}

// EnvironmentsProvider_DeleteEnvironment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteEnvironment'
type EnvironmentsProvider_DeleteEnvironment_Call struct {
	*mock.Call
}

// DeleteEnvironment is a helper method to define mock.On call
//   - ctx context.Context
//   - id uuid.UUID
func (_e *EnvironmentsProvider_Expecter) DeleteEnvironment(ctx interface{}, id interface{}) *EnvironmentsProvider_DeleteEnvironment_Call {
	return &EnvironmentsProvider_DeleteEnvironment_Call{Call: _e.mock.On("DeleteEnvironment", ctx, id)}
}

func (_c *EnvironmentsProvider_DeleteEnvironment_Call) Run(run func(ctx context.Context, id uuid.UUID)) *EnvironmentsProvider_DeleteEnvironment_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(uuid.UUID))
	})
	return _c
}

func (_c *EnvironmentsProvider_DeleteEnvironment_Call) Return(_a0 error) *EnvironmentsProvider_DeleteEnvironment_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *EnvironmentsProvider_DeleteEnvironment_Call) RunAndReturn(run func(context.Context, uuid.UUID) error) *EnvironmentsProvider_DeleteEnvironment_Call {
	_c.Call.Return(run)
	return _c
}

// GetEnvironmentFromHost provides a mock function with given fields: ctx, host
func (_m *EnvironmentsProvider) GetEnvironmentFromHost(ctx context.Context, host string) (*database.Environment, error) {
	ret := _m.Called(ctx, host)

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

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

	return r0, r1
}

// EnvironmentsProvider_GetEnvironmentFromHost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEnvironmentFromHost'
type EnvironmentsProvider_GetEnvironmentFromHost_Call struct {
	*mock.Call
}

// GetEnvironmentFromHost is a helper method to define mock.On call
//   - ctx context.Context
//   - host string
func (_e *EnvironmentsProvider_Expecter) GetEnvironmentFromHost(ctx interface{}, host interface{}) *EnvironmentsProvider_GetEnvironmentFromHost_Call {
	return &EnvironmentsProvider_GetEnvironmentFromHost_Call{Call: _e.mock.On("GetEnvironmentFromHost", ctx, host)}
}

func (_c *EnvironmentsProvider_GetEnvironmentFromHost_Call) Run(run func(ctx context.Context, host string)) *EnvironmentsProvider_GetEnvironmentFromHost_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *EnvironmentsProvider_GetEnvironmentFromHost_Call) Return(_a0 *database.Environment, _a1 error) *EnvironmentsProvider_GetEnvironmentFromHost_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *EnvironmentsProvider_GetEnvironmentFromHost_Call) RunAndReturn(run func(context.Context, string) (*database.Environment, error)) *EnvironmentsProvider_GetEnvironmentFromHost_Call {
	_c.Call.Return(run)
	return _c
}

// IsOwnerLimited provides a mock function with given fields: ctx, owner
func (_m *EnvironmentsProvider) IsOwnerLimited(ctx context.Context, owner string) (bool, error) {
	ret := _m.Called(ctx, owner)

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

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

	return r0, r1
}

// EnvironmentsProvider_IsOwnerLimited_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsOwnerLimited'
type EnvironmentsProvider_IsOwnerLimited_Call struct {
	*mock.Call
}

// IsOwnerLimited is a helper method to define mock.On call
//   - ctx context.Context
//   - owner string
func (_e *EnvironmentsProvider_Expecter) IsOwnerLimited(ctx interface{}, owner interface{}) *EnvironmentsProvider_IsOwnerLimited_Call {
	return &EnvironmentsProvider_IsOwnerLimited_Call{Call: _e.mock.On("IsOwnerLimited", ctx, owner)}
}

func (_c *EnvironmentsProvider_IsOwnerLimited_Call) Run(run func(ctx context.Context, owner string)) *EnvironmentsProvider_IsOwnerLimited_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *EnvironmentsProvider_IsOwnerLimited_Call) Return(_a0 bool, _a1 error) *EnvironmentsProvider_IsOwnerLimited_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *EnvironmentsProvider_IsOwnerLimited_Call) RunAndReturn(run func(context.Context, string) (bool, error)) *EnvironmentsProvider_IsOwnerLimited_Call {
	_c.Call.Return(run)
	return _c
}

// ListEnvironmentsByBranch provides a mock function with given fields: ctx, owner, repo, branch
func (_m *EnvironmentsProvider) ListEnvironmentsByBranch(ctx context.Context, owner string, repo string, branch string) ([]*database.Environment, error) {
	ret := _m.Called(ctx, owner, repo, branch)

	var r0 []*database.Environment
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) ([]*database.Environment, error)); ok {
		return rf(ctx, owner, repo, branch)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) []*database.Environment); ok {
		r0 = rf(ctx, owner, repo, branch)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*database.Environment)
		}
	}

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

	return r0, r1
}

// EnvironmentsProvider_ListEnvironmentsByBranch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListEnvironmentsByBranch'
type EnvironmentsProvider_ListEnvironmentsByBranch_Call struct {
	*mock.Call
}

// ListEnvironmentsByBranch is a helper method to define mock.On call
//   - ctx context.Context
//   - owner string
//   - repo string
//   - branch string
func (_e *EnvironmentsProvider_Expecter) ListEnvironmentsByBranch(ctx interface{}, owner interface{}, repo interface{}, branch interface{}) *EnvironmentsProvider_ListEnvironmentsByBranch_Call {
	return &EnvironmentsProvider_ListEnvironmentsByBranch_Call{Call: _e.mock.On("ListEnvironmentsByBranch", ctx, owner, repo, branch)}
}

func (_c *EnvironmentsProvider_ListEnvironmentsByBranch_Call) Run(run func(ctx context.Context, owner string, repo string, branch string)) *EnvironmentsProvider_ListEnvironmentsByBranch_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string))
	})
	return _c
}

func (_c *EnvironmentsProvider_ListEnvironmentsByBranch_Call) Return(_a0 []*database.Environment, _a1 error) *EnvironmentsProvider_ListEnvironmentsByBranch_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *EnvironmentsProvider_ListEnvironmentsByBranch_Call) RunAndReturn(run func(context.Context, string, string, string) ([]*database.Environment, error)) *EnvironmentsProvider_ListEnvironmentsByBranch_Call {
	_c.Call.Return(run)
	return _c
}

// ListSuccessEnvironments provides a mock function with given fields: ctx
func (_m *EnvironmentsProvider) ListSuccessEnvironments(ctx context.Context) ([]*database.Environment, error) {
	ret := _m.Called(ctx)

	var r0 []*database.Environment
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context) ([]*database.Environment, error)); ok {
		return rf(ctx)
	}
	if rf, ok := ret.Get(0).(func(context.Context) []*database.Environment); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*database.Environment)
		}
	}

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

	return r0, r1
}

// EnvironmentsProvider_ListSuccessEnvironments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSuccessEnvironments'
type EnvironmentsProvider_ListSuccessEnvironments_Call struct {
	*mock.Call
}

// ListSuccessEnvironments is a helper method to define mock.On call
//   - ctx context.Context
func (_e *EnvironmentsProvider_Expecter) ListSuccessEnvironments(ctx interface{}) *EnvironmentsProvider_ListSuccessEnvironments_Call {
	return &EnvironmentsProvider_ListSuccessEnvironments_Call{Call: _e.mock.On("ListSuccessEnvironments", ctx)}
}

func (_c *EnvironmentsProvider_ListSuccessEnvironments_Call) Run(run func(ctx context.Context)) *EnvironmentsProvider_ListSuccessEnvironments_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

func (_c *EnvironmentsProvider_ListSuccessEnvironments_Call) Return(_a0 []*database.Environment, _a1 error) *EnvironmentsProvider_ListSuccessEnvironments_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *EnvironmentsProvider_ListSuccessEnvironments_Call) RunAndReturn(run func(context.Context) ([]*database.Environment, error)) *EnvironmentsProvider_ListSuccessEnvironments_Call {
	_c.Call.Return(run)
	return _c
}

// SaveEnvironment provides a mock function with given fields: ctx, env
func (_m *EnvironmentsProvider) SaveEnvironment(ctx context.Context, env *database.Environment) error {
	ret := _m.Called(ctx, env)

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

	return r0
}

// EnvironmentsProvider_SaveEnvironment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveEnvironment'
type EnvironmentsProvider_SaveEnvironment_Call struct {
	*mock.Call
}

// SaveEnvironment is a helper method to define mock.On call
//   - ctx context.Context
//   - env *database.Environment
func (_e *EnvironmentsProvider_Expecter) SaveEnvironment(ctx interface{}, env interface{}) *EnvironmentsProvider_SaveEnvironment_Call {
	return &EnvironmentsProvider_SaveEnvironment_Call{Call: _e.mock.On("SaveEnvironment", ctx, env)}
}

func (_c *EnvironmentsProvider_SaveEnvironment_Call) Run(run func(ctx context.Context, env *database.Environment)) *EnvironmentsProvider_SaveEnvironment_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*database.Environment))
	})
	return _c
}

func (_c *EnvironmentsProvider_SaveEnvironment_Call) Return(_a0 error) *EnvironmentsProvider_SaveEnvironment_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *EnvironmentsProvider_SaveEnvironment_Call) RunAndReturn(run func(context.Context, *database.Environment) error) *EnvironmentsProvider_SaveEnvironment_Call {
	_c.Call.Return(run)
	return _c
}

// ShouldDeploy provides a mock function with given fields: ctx, owner, repo, branch
func (_m *EnvironmentsProvider) ShouldDeploy(ctx context.Context, owner string, repo string, branch string) (bool, error) {
	ret := _m.Called(ctx, owner, repo, branch)

	var r0 bool
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (bool, error)); ok {
		return rf(ctx, owner, repo, branch)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) bool); ok {
		r0 = rf(ctx, owner, repo, branch)
	} else {
		r0 = ret.Get(0).(bool)
	}

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

	return r0, r1
}

// EnvironmentsProvider_ShouldDeploy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShouldDeploy'
type EnvironmentsProvider_ShouldDeploy_Call struct {
	*mock.Call
}

// ShouldDeploy is a helper method to define mock.On call
//   - ctx context.Context
//   - owner string
//   - repo string
//   - branch string
func (_e *EnvironmentsProvider_Expecter) ShouldDeploy(ctx interface{}, owner interface{}, repo interface{}, branch interface{}) *EnvironmentsProvider_ShouldDeploy_Call {
	return &EnvironmentsProvider_ShouldDeploy_Call{Call: _e.mock.On("ShouldDeploy", ctx, owner, repo, branch)}
}

func (_c *EnvironmentsProvider_ShouldDeploy_Call) Run(run func(ctx context.Context, owner string, repo string, branch string)) *EnvironmentsProvider_ShouldDeploy_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string))
	})
	return _c
}

func (_c *EnvironmentsProvider_ShouldDeploy_Call) Return(_a0 bool, _a1 error) *EnvironmentsProvider_ShouldDeploy_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *EnvironmentsProvider_ShouldDeploy_Call) RunAndReturn(run func(context.Context, string, string, string) (bool, error)) *EnvironmentsProvider_ShouldDeploy_Call {
	_c.Call.Return(run)
	return _c
}

// TerminateEnvironment provides a mock function with given fields: ctx, req
func (_m *EnvironmentsProvider) TerminateEnvironment(ctx context.Context, req environments.TerminateEnvironmentRequest) error {
	ret := _m.Called(ctx, req)

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

	return r0
}

// EnvironmentsProvider_TerminateEnvironment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TerminateEnvironment'
type EnvironmentsProvider_TerminateEnvironment_Call struct {
	*mock.Call
}

// TerminateEnvironment is a helper method to define mock.On call
//   - ctx context.Context
//   - req environments.TerminateEnvironmentRequest
func (_e *EnvironmentsProvider_Expecter) TerminateEnvironment(ctx interface{}, req interface{}) *EnvironmentsProvider_TerminateEnvironment_Call {
	return &EnvironmentsProvider_TerminateEnvironment_Call{Call: _e.mock.On("TerminateEnvironment", ctx, req)}
}

func (_c *EnvironmentsProvider_TerminateEnvironment_Call) Run(run func(ctx context.Context, req environments.TerminateEnvironmentRequest)) *EnvironmentsProvider_TerminateEnvironment_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(environments.TerminateEnvironmentRequest))
	})
	return _c
}

func (_c *EnvironmentsProvider_TerminateEnvironment_Call) Return(_a0 error) *EnvironmentsProvider_TerminateEnvironment_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *EnvironmentsProvider_TerminateEnvironment_Call) RunAndReturn(run func(context.Context, environments.TerminateEnvironmentRequest) error) *EnvironmentsProvider_TerminateEnvironment_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

	return mock
}
