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

package mock

import (
	context "context"

	bizerr "github.com/tidbcloud/pkgv2/bizerr"

	core "github.com/tidbcloud/core-svc/idl/pbgen/proto/core"

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

	time "time"
)

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

// QueryClusterMetrics provides a mock function with given fields: ctx, cluster, expr, _a3
func (_m *InfraMetrics) QueryClusterMetrics(ctx context.Context, cluster *core.Cluster, expr string, _a3 time.Time) ([]byte, bizerr.BizError) {
	ret := _m.Called(ctx, cluster, expr, _a3)

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

	var r0 []byte
	var r1 bizerr.BizError
	if rf, ok := ret.Get(0).(func(context.Context, *core.Cluster, string, time.Time) ([]byte, bizerr.BizError)); ok {
		return rf(ctx, cluster, expr, _a3)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *core.Cluster, string, time.Time) []byte); ok {
		r0 = rf(ctx, cluster, expr, _a3)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]byte)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *core.Cluster, string, time.Time) bizerr.BizError); ok {
		r1 = rf(ctx, cluster, expr, _a3)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(bizerr.BizError)
		}
	}

	return r0, r1
}

// QueryClusterMetricsWithParam provides a mock function with given fields: ctx, cluster, expr, params
func (_m *InfraMetrics) QueryClusterMetricsWithParam(ctx context.Context, cluster *core.Cluster, expr string, params map[string]string) ([]byte, bizerr.BizError) {
	ret := _m.Called(ctx, cluster, expr, params)

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

	var r0 []byte
	var r1 bizerr.BizError
	if rf, ok := ret.Get(0).(func(context.Context, *core.Cluster, string, map[string]string) ([]byte, bizerr.BizError)); ok {
		return rf(ctx, cluster, expr, params)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *core.Cluster, string, map[string]string) []byte); ok {
		r0 = rf(ctx, cluster, expr, params)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]byte)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *core.Cluster, string, map[string]string) bizerr.BizError); ok {
		r1 = rf(ctx, cluster, expr, params)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(bizerr.BizError)
		}
	}

	return r0, r1
}

// QueryRangeClusterMetrics provides a mock function with given fields: ctx, cluster, expr
func (_m *InfraMetrics) QueryRangeClusterMetrics(ctx context.Context, cluster *core.Cluster, expr string) ([]byte, bizerr.BizError) {
	ret := _m.Called(ctx, cluster, expr)

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

	var r0 []byte
	var r1 bizerr.BizError
	if rf, ok := ret.Get(0).(func(context.Context, *core.Cluster, string) ([]byte, bizerr.BizError)); ok {
		return rf(ctx, cluster, expr)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *core.Cluster, string) []byte); ok {
		r0 = rf(ctx, cluster, expr)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]byte)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *core.Cluster, string) bizerr.BizError); ok {
		r1 = rf(ctx, cluster, expr)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(bizerr.BizError)
		}
	}

	return r0, r1
}

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

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

	return mock
}
