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

package mocks

import (
	object "github.com/kopia/kopia/repo/object"
	mock "github.com/stretchr/testify/mock"
)

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

// Checkpoint provides a mock function with given fields:
func (_m *Writer) Checkpoint() (object.ID, error) {
	ret := _m.Called()

	var r0 object.ID
	var r1 error
	if rf, ok := ret.Get(0).(func() (object.ID, error)); ok {
		return rf()
	}
	if rf, ok := ret.Get(0).(func() object.ID); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(object.ID)
	}

	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Close provides a mock function with given fields:
func (_m *Writer) Close() error {
	ret := _m.Called()

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

	return r0
}

// Result provides a mock function with given fields:
func (_m *Writer) Result() (object.ID, error) {
	ret := _m.Called()

	var r0 object.ID
	var r1 error
	if rf, ok := ret.Get(0).(func() (object.ID, error)); ok {
		return rf()
	}
	if rf, ok := ret.Get(0).(func() object.ID); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(object.ID)
	}

	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Write provides a mock function with given fields: p
func (_m *Writer) Write(p []byte) (int, error) {
	ret := _m.Called(p)

	var r0 int
	var r1 error
	if rf, ok := ret.Get(0).(func([]byte) (int, error)); ok {
		return rf(p)
	}
	if rf, ok := ret.Get(0).(func([]byte) int); ok {
		r0 = rf(p)
	} else {
		r0 = ret.Get(0).(int)
	}

	if rf, ok := ret.Get(1).(func([]byte) error); ok {
		r1 = rf(p)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

type mockConstructorTestingTNewWriter interface {
	mock.TestingT
	Cleanup(func())
}

// NewWriter creates a new instance of Writer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewWriter(t mockConstructorTestingTNewWriter) *Writer {
	mock := &Writer{}
	mock.Mock.Test(t)

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

	return mock
}
