/*
Copyright (c) Facebook, Inc. and its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Code generated by MockGen. DO NOT EDIT.
// Source: ptp/sptp/client/connection.go
//
// Generated by this command:
//
//	mockgen -source=ptp/sptp/client/connection.go -destination ptp/sptp/client/udpconn_mock_test.go -package client
//

// Package client is a generated GoMock package.
package client

import (
	netip "net/netip"
	reflect "reflect"
	time "time"

	gomock "github.com/golang/mock/gomock"
	unix "golang.org/x/sys/unix"
)

// MockUDPConnNoTS is a mock of UDPConnNoTS interface.
type MockUDPConnNoTS struct {
	ctrl     *gomock.Controller
	recorder *MockUDPConnNoTSMockRecorder
}

// MockUDPConnNoTSMockRecorder is the mock recorder for MockUDPConnNoTS.
type MockUDPConnNoTSMockRecorder struct {
	mock *MockUDPConnNoTS
}

// NewMockUDPConnNoTS creates a new mock instance.
func NewMockUDPConnNoTS(ctrl *gomock.Controller) *MockUDPConnNoTS {
	mock := &MockUDPConnNoTS{ctrl: ctrl}
	mock.recorder = &MockUDPConnNoTSMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockUDPConnNoTS) EXPECT() *MockUDPConnNoTSMockRecorder {
	return m.recorder
}

// Close mocks base method.
func (m *MockUDPConnNoTS) Close() error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Close")
	ret0, _ := ret[0].(error)
	return ret0
}

// Close indicates an expected call of Close.
func (mr *MockUDPConnNoTSMockRecorder) Close() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockUDPConnNoTS)(nil).Close))
}

// ReadPacketBuf mocks base method.
func (m *MockUDPConnNoTS) ReadPacketBuf(buf []byte) (int, netip.Addr, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ReadPacketBuf", buf)
	ret0, _ := ret[0].(int)
	ret1, _ := ret[1].(netip.Addr)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

// ReadPacketBuf indicates an expected call of ReadPacketBuf.
func (mr *MockUDPConnNoTSMockRecorder) ReadPacketBuf(buf any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadPacketBuf", reflect.TypeOf((*MockUDPConnNoTS)(nil).ReadPacketBuf), buf)
}

// WriteTo mocks base method.
func (m *MockUDPConnNoTS) WriteTo(b []byte, addr unix.Sockaddr) (int, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "WriteTo", b, addr)
	ret0, _ := ret[0].(int)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// WriteTo indicates an expected call of WriteTo.
func (mr *MockUDPConnNoTSMockRecorder) WriteTo(b, addr any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteTo", reflect.TypeOf((*MockUDPConnNoTS)(nil).WriteTo), b, addr)
}

// MockUDPConnWithTS is a mock of UDPConnWithTS interface.
type MockUDPConnWithTS struct {
	ctrl     *gomock.Controller
	recorder *MockUDPConnWithTSMockRecorder
}

// MockUDPConnWithTSMockRecorder is the mock recorder for MockUDPConnWithTS.
type MockUDPConnWithTSMockRecorder struct {
	mock *MockUDPConnWithTS
}

// NewMockUDPConnWithTS creates a new mock instance.
func NewMockUDPConnWithTS(ctrl *gomock.Controller) *MockUDPConnWithTS {
	mock := &MockUDPConnWithTS{ctrl: ctrl}
	mock.recorder = &MockUDPConnWithTSMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockUDPConnWithTS) EXPECT() *MockUDPConnWithTSMockRecorder {
	return m.recorder
}

// Close mocks base method.
func (m *MockUDPConnWithTS) Close() error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Close")
	ret0, _ := ret[0].(error)
	return ret0
}

// Close indicates an expected call of Close.
func (mr *MockUDPConnWithTSMockRecorder) Close() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockUDPConnWithTS)(nil).Close))
}

// ReadPacketWithRXTimestampBuf mocks base method.
func (m *MockUDPConnWithTS) ReadPacketWithRXTimestampBuf(buf, oob []byte) (int, unix.Sockaddr, time.Time, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ReadPacketWithRXTimestampBuf", buf, oob)
	ret0, _ := ret[0].(int)
	ret1, _ := ret[1].(unix.Sockaddr)
	ret2, _ := ret[2].(time.Time)
	ret3, _ := ret[3].(error)
	return ret0, ret1, ret2, ret3
}

// ReadPacketWithRXTimestampBuf indicates an expected call of ReadPacketWithRXTimestampBuf.
func (mr *MockUDPConnWithTSMockRecorder) ReadPacketWithRXTimestampBuf(buf, oob any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadPacketWithRXTimestampBuf", reflect.TypeOf((*MockUDPConnWithTS)(nil).ReadPacketWithRXTimestampBuf), buf, oob)
}

// WriteToWithTS mocks base method.
func (m *MockUDPConnWithTS) WriteToWithTS(b []byte, addr unix.Sockaddr) (int, time.Time, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "WriteToWithTS", b, addr)
	ret0, _ := ret[0].(int)
	ret1, _ := ret[1].(time.Time)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

// WriteToWithTS indicates an expected call of WriteToWithTS.
func (mr *MockUDPConnWithTSMockRecorder) WriteToWithTS(b, addr any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteToWithTS", reflect.TypeOf((*MockUDPConnWithTS)(nil).WriteToWithTS), b, addr)
}
