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

package query

import (
	context "context"
	"fmt"

	backend "github.com/grafana/grafana-plugin-sdk-go/backend"

	dtos "github.com/grafana/grafana/pkg/api/dtos"
	"github.com/grafana/grafana/pkg/expr"

	identity "github.com/grafana/grafana/pkg/apimachinery/identity"

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

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

// QueryData provides a mock function with given fields: ctx, user, skipDSCache, reqDTO
func (_m *FakeQueryService) QueryData(ctx context.Context, user identity.Requester, skipDSCache bool, reqDTO dtos.MetricRequest) (*backend.QueryDataResponse, error) {
	ret := _m.Called(ctx, user, skipDSCache, reqDTO)

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

	var r0 *backend.QueryDataResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, identity.Requester, bool, dtos.MetricRequest) (*backend.QueryDataResponse, error)); ok {
		return rf(ctx, user, skipDSCache, reqDTO)
	}
	if rf, ok := ret.Get(0).(func(context.Context, identity.Requester, bool, dtos.MetricRequest) *backend.QueryDataResponse); ok {
		r0 = rf(ctx, user, skipDSCache, reqDTO)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*backend.QueryDataResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, identity.Requester, bool, dtos.MetricRequest) error); ok {
		r1 = rf(ctx, user, skipDSCache, reqDTO)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// QueryDataNew provides a mock function with given fields: ctx, user, skipDSCache, reqDTO
func (_m *FakeQueryService) QueryDataNew(ctx context.Context, user identity.Requester, skipDSCache bool, reqDTO dtos.MetricRequest) (*backend.QueryDataResponse, error) {
	ret := _m.Called(ctx, user, skipDSCache, reqDTO)

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

	var r0 *backend.QueryDataResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, identity.Requester, bool, dtos.MetricRequest) (*backend.QueryDataResponse, error)); ok {
		return rf(ctx, user, skipDSCache, reqDTO)
	}
	if rf, ok := ret.Get(0).(func(context.Context, identity.Requester, bool, dtos.MetricRequest) *backend.QueryDataResponse); ok {
		r0 = rf(ctx, user, skipDSCache, reqDTO)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*backend.QueryDataResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, identity.Requester, bool, dtos.MetricRequest) error); ok {
		r1 = rf(ctx, user, skipDSCache, reqDTO)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Run provides a mock function with given fields: ctx
func (_m *FakeQueryService) Run(ctx context.Context) error {
	ret := _m.Called(ctx)

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

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

	return r0
}

func (_m *FakeQueryService) GetSQLSchemas(ctx context.Context, user identity.Requester, reqDTO dtos.MetricRequest) (expr.SQLSchemas, error) {
	return nil, fmt.Errorf("sql schema endpoint not supported with public dashboards")
}

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

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

	return mock
}
