// Copyright 2024 Antrea Authors
//
// 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: antrea.io/antrea/pkg/agent/util/iptables (interfaces: Interface)
//
// Generated by this command:
//
//	mockgen -copyright_file hack/boilerplate/license_header.raw.txt -destination pkg/agent/util/iptables/testing/mock_iptables_linux.go -package testing antrea.io/antrea/pkg/agent/util/iptables Interface
//

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

import (
	reflect "reflect"

	iptables "antrea.io/antrea/pkg/agent/util/iptables"
	gomock "go.uber.org/mock/gomock"
)

// MockInterface is a mock of Interface interface.
type MockInterface struct {
	ctrl     *gomock.Controller
	recorder *MockInterfaceMockRecorder
	isgomock struct{}
}

// MockInterfaceMockRecorder is the mock recorder for MockInterface.
type MockInterfaceMockRecorder struct {
	mock *MockInterface
}

// NewMockInterface creates a new mock instance.
func NewMockInterface(ctrl *gomock.Controller) *MockInterface {
	mock := &MockInterface{ctrl: ctrl}
	mock.recorder = &MockInterfaceMockRecorder{mock}
	return mock
}

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

// AppendRule mocks base method.
func (m *MockInterface) AppendRule(protocol iptables.Protocol, table, chain string, ruleSpec []string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AppendRule", protocol, table, chain, ruleSpec)
	ret0, _ := ret[0].(error)
	return ret0
}

// AppendRule indicates an expected call of AppendRule.
func (mr *MockInterfaceMockRecorder) AppendRule(protocol, table, chain, ruleSpec any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppendRule", reflect.TypeOf((*MockInterface)(nil).AppendRule), protocol, table, chain, ruleSpec)
}

// ChainExists mocks base method.
func (m *MockInterface) ChainExists(protocol iptables.Protocol, table, chain string) (bool, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ChainExists", protocol, table, chain)
	ret0, _ := ret[0].(bool)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ChainExists indicates an expected call of ChainExists.
func (mr *MockInterfaceMockRecorder) ChainExists(protocol, table, chain any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainExists", reflect.TypeOf((*MockInterface)(nil).ChainExists), protocol, table, chain)
}

// DeleteChain mocks base method.
func (m *MockInterface) DeleteChain(protocol iptables.Protocol, table, chain string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "DeleteChain", protocol, table, chain)
	ret0, _ := ret[0].(error)
	return ret0
}

// DeleteChain indicates an expected call of DeleteChain.
func (mr *MockInterfaceMockRecorder) DeleteChain(protocol, table, chain any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteChain", reflect.TypeOf((*MockInterface)(nil).DeleteChain), protocol, table, chain)
}

// DeleteRule mocks base method.
func (m *MockInterface) DeleteRule(protocol iptables.Protocol, table, chain string, ruleSpec []string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "DeleteRule", protocol, table, chain, ruleSpec)
	ret0, _ := ret[0].(error)
	return ret0
}

// DeleteRule indicates an expected call of DeleteRule.
func (mr *MockInterfaceMockRecorder) DeleteRule(protocol, table, chain, ruleSpec any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRule", reflect.TypeOf((*MockInterface)(nil).DeleteRule), protocol, table, chain, ruleSpec)
}

// EnsureChain mocks base method.
func (m *MockInterface) EnsureChain(protocol iptables.Protocol, table, chain string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "EnsureChain", protocol, table, chain)
	ret0, _ := ret[0].(error)
	return ret0
}

// EnsureChain indicates an expected call of EnsureChain.
func (mr *MockInterfaceMockRecorder) EnsureChain(protocol, table, chain any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureChain", reflect.TypeOf((*MockInterface)(nil).EnsureChain), protocol, table, chain)
}

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

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

// InsertRule mocks base method.
func (m *MockInterface) InsertRule(protocol iptables.Protocol, table, chain string, ruleSpec []string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "InsertRule", protocol, table, chain, ruleSpec)
	ret0, _ := ret[0].(error)
	return ret0
}

// InsertRule indicates an expected call of InsertRule.
func (mr *MockInterfaceMockRecorder) InsertRule(protocol, table, chain, ruleSpec any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertRule", reflect.TypeOf((*MockInterface)(nil).InsertRule), protocol, table, chain, ruleSpec)
}

// ListRules mocks base method.
func (m *MockInterface) ListRules(protocol iptables.Protocol, table, chain string) (map[iptables.Protocol][]string, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ListRules", protocol, table, chain)
	ret0, _ := ret[0].(map[iptables.Protocol][]string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ListRules indicates an expected call of ListRules.
func (mr *MockInterfaceMockRecorder) ListRules(protocol, table, chain any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRules", reflect.TypeOf((*MockInterface)(nil).ListRules), protocol, table, chain)
}

// Restore mocks base method.
func (m *MockInterface) Restore(data string, flush, useIPv6 bool) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Restore", data, flush, useIPv6)
	ret0, _ := ret[0].(error)
	return ret0
}

// Restore indicates an expected call of Restore.
func (mr *MockInterfaceMockRecorder) Restore(data, flush, useIPv6 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Restore", reflect.TypeOf((*MockInterface)(nil).Restore), data, flush, useIPv6)
}

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

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