// 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-ng/app/repo/entity"

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

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

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

// Get provides a mock function with given fields: ctx, ops
func (_m *TiCDCClusterRepo) Get(ctx context.Context, ops ...repo.TiCDCClusterFilterOp) (*entity.TiCDCCluster, 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.TiCDCCluster
	var r1 bizerr.BizError
	if rf, ok := ret.Get(0).(func(context.Context, ...repo.TiCDCClusterFilterOp) (*entity.TiCDCCluster, bizerr.BizError)); ok {
		return rf(ctx, ops...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, ...repo.TiCDCClusterFilterOp) *entity.TiCDCCluster); ok {
		r0 = rf(ctx, ops...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entity.TiCDCCluster)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, ...repo.TiCDCClusterFilterOp) 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 *TiCDCClusterRepo) List(ctx context.Context, ops ...repo.TiCDCClusterFilterOp) ([]entity.TiCDCCluster, 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.TiCDCCluster
	var r1 bizerr.BizError
	if rf, ok := ret.Get(0).(func(context.Context, ...repo.TiCDCClusterFilterOp) ([]entity.TiCDCCluster, bizerr.BizError)); ok {
		return rf(ctx, ops...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, ...repo.TiCDCClusterFilterOp) []entity.TiCDCCluster); ok {
		r0 = rf(ctx, ops...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]entity.TiCDCCluster)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, ...repo.TiCDCClusterFilterOp) 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 *TiCDCClusterRepo) Load(ctx context.Context, id uint64) (*entity.TiCDCCluster, bizerr.BizError) {
	ret := _m.Called(ctx, id)

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

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

	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 *TiCDCClusterRepo) Save(ctx context.Context, record *entity.TiCDCCluster) 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.TiCDCCluster) bizerr.BizError); ok {
		r0 = rf(ctx, record)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(bizerr.BizError)
		}
	}

	return r0
}

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

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

	return mock
}
