// Copyright 2021-2025 Zenauth Ltd.
// SPDX-License-Identifier: Apache-2.0

// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package mocks

import (
	"context"

	"github.com/cerbos/cloud-api/genpb/cerbos/cloud/logs/v1"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type IngestSyncer_Expecter struct {
	mock *mock.Mock
}

func (_m *IngestSyncer) EXPECT() *IngestSyncer_Expecter {
	return &IngestSyncer_Expecter{mock: &_m.Mock}
}

// Sync provides a mock function for the type IngestSyncer
func (_mock *IngestSyncer) Sync(context1 context.Context, ingestBatch *logsv1.IngestBatch) error {
	ret := _mock.Called(context1, ingestBatch)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *logsv1.IngestBatch) error); ok {
		r0 = returnFunc(context1, ingestBatch)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Sync is a helper method to define mock.On call
//   - context1 context.Context
//   - ingestBatch *logsv1.IngestBatch
func (_e *IngestSyncer_Expecter) Sync(context1 interface{}, ingestBatch interface{}) *IngestSyncer_Sync_Call {
	return &IngestSyncer_Sync_Call{Call: _e.mock.On("Sync", context1, ingestBatch)}
}

func (_c *IngestSyncer_Sync_Call) Run(run func(context1 context.Context, ingestBatch *logsv1.IngestBatch)) *IngestSyncer_Sync_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *logsv1.IngestBatch
		if args[1] != nil {
			arg1 = args[1].(*logsv1.IngestBatch)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *IngestSyncer_Sync_Call) Return(err error) *IngestSyncer_Sync_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *IngestSyncer_Sync_Call) RunAndReturn(run func(context1 context.Context, ingestBatch *logsv1.IngestBatch) error) *IngestSyncer_Sync_Call {
	_c.Call.Return(run)
	return _c
}
