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

package prometheus

import (
	context "context"

	model "github.com/prometheus/common/model"
	mock "github.com/stretchr/testify/mock"

	v1 "github.com/prometheus/client_golang/api/prometheus/v1"
)

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

type mockPrometheusClient_Expecter struct {
	mock *mock.Mock
}

func (_m *mockPrometheusClient) EXPECT() *mockPrometheusClient_Expecter {
	return &mockPrometheusClient_Expecter{mock: &_m.Mock}
}

// QueryRange provides a mock function with given fields: ctx, query, r, opts
func (_m *mockPrometheusClient) QueryRange(ctx context.Context, query string, r v1.Range, opts ...v1.Option) (model.Value, v1.Warnings, error) {
	_va := make([]interface{}, len(opts))
	for _i := range opts {
		_va[_i] = opts[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, query, r)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 model.Value
	var r1 v1.Warnings
	var r2 error
	if rf, ok := ret.Get(0).(func(context.Context, string, v1.Range, ...v1.Option) (model.Value, v1.Warnings, error)); ok {
		return rf(ctx, query, r, opts...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, v1.Range, ...v1.Option) model.Value); ok {
		r0 = rf(ctx, query, r, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(model.Value)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, v1.Range, ...v1.Option) v1.Warnings); ok {
		r1 = rf(ctx, query, r, opts...)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(v1.Warnings)
		}
	}

	if rf, ok := ret.Get(2).(func(context.Context, string, v1.Range, ...v1.Option) error); ok {
		r2 = rf(ctx, query, r, opts...)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

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

// QueryRange is a helper method to define mock.On call
//   - ctx context.Context
//   - query string
//   - r v1.Range
//   - opts ...v1.Option
func (_e *mockPrometheusClient_Expecter) QueryRange(ctx interface{}, query interface{}, r interface{}, opts ...interface{}) *mockPrometheusClient_QueryRange_Call {
	return &mockPrometheusClient_QueryRange_Call{Call: _e.mock.On("QueryRange",
		append([]interface{}{ctx, query, r}, opts...)...)}
}

func (_c *mockPrometheusClient_QueryRange_Call) Run(run func(ctx context.Context, query string, r v1.Range, opts ...v1.Option)) *mockPrometheusClient_QueryRange_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]v1.Option, len(args)-3)
		for i, a := range args[3:] {
			if a != nil {
				variadicArgs[i] = a.(v1.Option)
			}
		}
		run(args[0].(context.Context), args[1].(string), args[2].(v1.Range), variadicArgs...)
	})
	return _c
}

func (_c *mockPrometheusClient_QueryRange_Call) Return(_a0 model.Value, _a1 v1.Warnings, _a2 error) *mockPrometheusClient_QueryRange_Call {
	_c.Call.Return(_a0, _a1, _a2)
	return _c
}

func (_c *mockPrometheusClient_QueryRange_Call) RunAndReturn(run func(context.Context, string, v1.Range, ...v1.Option) (model.Value, v1.Warnings, error)) *mockPrometheusClient_QueryRange_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
