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

package mock

import (
	context "context"

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

	entity "github.com/tidbcloud/dataflow-service/app/repo/entity"

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

	repo "github.com/tidbcloud/dataflow-service/app/repo"
)

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

// Get provides a mock function with given fields: ctx, ops
func (_m *TiDBClusterGCSwitchRepo) Get(ctx context.Context, ops ...repo.TiDBClusterGCSwitchFilterOp) (*entity.TiDBClusterGCSwitch, bizerr.BizError) {
	_va := make([]interface{}, len(ops))
	for _i := range ops {
		_va[_i] = ops[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 *entity.TiDBClusterGCSwitch
	var r1 bizerr.BizError
	if rf, ok := ret.Get(0).(func(context.Context, ...repo.TiDBClusterGCSwitchFilterOp) (*entity.TiDBClusterGCSwitch, bizerr.BizError)); ok {
		return rf(ctx, ops...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, ...repo.TiDBClusterGCSwitchFilterOp) *entity.TiDBClusterGCSwitch); ok {
		r0 = rf(ctx, ops...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entity.TiDBClusterGCSwitch)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, ...repo.TiDBClusterGCSwitchFilterOp) bizerr.BizError); ok {
		r1 = rf(ctx, ops...)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(bizerr.BizError)
		}
	}

	return r0, r1
}

// List provides a mock function with given fields: ctx, ops
func (_m *TiDBClusterGCSwitchRepo) List(ctx context.Context, ops ...repo.TiDBClusterGCSwitchFilterOp) ([]entity.TiDBClusterGCSwitch, bizerr.BizError) {
	_va := make([]interface{}, len(ops))
	for _i := range ops {
		_va[_i] = ops[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 []entity.TiDBClusterGCSwitch
	var r1 bizerr.BizError
	if rf, ok := ret.Get(0).(func(context.Context, ...repo.TiDBClusterGCSwitchFilterOp) ([]entity.TiDBClusterGCSwitch, bizerr.BizError)); ok {
		return rf(ctx, ops...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, ...repo.TiDBClusterGCSwitchFilterOp) []entity.TiDBClusterGCSwitch); ok {
		r0 = rf(ctx, ops...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]entity.TiDBClusterGCSwitch)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, ...repo.TiDBClusterGCSwitchFilterOp) bizerr.BizError); ok {
		r1 = rf(ctx, ops...)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(bizerr.BizError)
		}
	}

	return r0, r1
}

// Load provides a mock function with given fields: ctx, id
func (_m *TiDBClusterGCSwitchRepo) Load(ctx context.Context, id uint64) (*entity.TiDBClusterGCSwitch, bizerr.BizError) {
	ret := _m.Called(ctx, id)

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

	var r0 *entity.TiDBClusterGCSwitch
	var r1 bizerr.BizError
	if rf, ok := ret.Get(0).(func(context.Context, uint64) (*entity.TiDBClusterGCSwitch, bizerr.BizError)); ok {
		return rf(ctx, id)
	}
	if rf, ok := ret.Get(0).(func(context.Context, uint64) *entity.TiDBClusterGCSwitch); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entity.TiDBClusterGCSwitch)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, uint64) bizerr.BizError); ok {
		r1 = rf(ctx, id)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(bizerr.BizError)
		}
	}

	return r0, r1
}

// Save provides a mock function with given fields: ctx, record
func (_m *TiDBClusterGCSwitchRepo) Save(ctx context.Context, record *entity.TiDBClusterGCSwitch) bizerr.BizError {
	ret := _m.Called(ctx, record)

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

	var r0 bizerr.BizError
	if rf, ok := ret.Get(0).(func(context.Context, *entity.TiDBClusterGCSwitch) bizerr.BizError); ok {
		r0 = rf(ctx, record)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(bizerr.BizError)
		}
	}

	return r0
}

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

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

	return mock
}
