// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/uber/cadence/common/quotas (interfaces: Limiter)
//
// Generated by this command:
//
//	mockgen -package=quotas -destination=limiter_mock.go github.com/uber/cadence/common/quotas Limiter
//

// Package quotas is a generated GoMock package.
package quotas

import (
	context "context"
	reflect "reflect"

	gomock "go.uber.org/mock/gomock"
	rate "golang.org/x/time/rate"

	clock "github.com/uber/cadence/common/clock"
)

// MockLimiter is a mock of Limiter interface.
type MockLimiter struct {
	ctrl     *gomock.Controller
	recorder *MockLimiterMockRecorder
	isgomock struct{}
}

// MockLimiterMockRecorder is the mock recorder for MockLimiter.
type MockLimiterMockRecorder struct {
	mock *MockLimiter
}

// NewMockLimiter creates a new mock instance.
func NewMockLimiter(ctrl *gomock.Controller) *MockLimiter {
	mock := &MockLimiter{ctrl: ctrl}
	mock.recorder = &MockLimiterMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockLimiter) EXPECT() *MockLimiterMockRecorder {
	return m.recorder
}

// Allow mocks base method.
func (m *MockLimiter) Allow() bool {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Allow")
	ret0, _ := ret[0].(bool)
	return ret0
}

// Allow indicates an expected call of Allow.
func (mr *MockLimiterMockRecorder) Allow() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Allow", reflect.TypeOf((*MockLimiter)(nil).Allow))
}

// Limit mocks base method.
func (m *MockLimiter) Limit() rate.Limit {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Limit")
	ret0, _ := ret[0].(rate.Limit)
	return ret0
}

// Limit indicates an expected call of Limit.
func (mr *MockLimiterMockRecorder) Limit() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Limit", reflect.TypeOf((*MockLimiter)(nil).Limit))
}

// Reserve mocks base method.
func (m *MockLimiter) Reserve() clock.Reservation {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Reserve")
	ret0, _ := ret[0].(clock.Reservation)
	return ret0
}

// Reserve indicates an expected call of Reserve.
func (mr *MockLimiterMockRecorder) Reserve() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reserve", reflect.TypeOf((*MockLimiter)(nil).Reserve))
}

// Wait mocks base method.
func (m *MockLimiter) Wait(ctx context.Context) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Wait", ctx)
	ret0, _ := ret[0].(error)
	return ret0
}

// Wait indicates an expected call of Wait.
func (mr *MockLimiterMockRecorder) Wait(ctx any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockLimiter)(nil).Wait), ctx)
}
