// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium

// Code generated by client-gen. DO NOT EDIT.

package fake

import (
	v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2"
	ciliumiov2 "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2"
	gentype "k8s.io/client-go/gentype"
)

// fakeCiliumNetworkPolicies implements CiliumNetworkPolicyInterface
type fakeCiliumNetworkPolicies struct {
	*gentype.FakeClientWithList[*v2.CiliumNetworkPolicy, *v2.CiliumNetworkPolicyList]
	Fake *FakeCiliumV2
}

func newFakeCiliumNetworkPolicies(fake *FakeCiliumV2, namespace string) ciliumiov2.CiliumNetworkPolicyInterface {
	return &fakeCiliumNetworkPolicies{
		gentype.NewFakeClientWithList[*v2.CiliumNetworkPolicy, *v2.CiliumNetworkPolicyList](
			fake.Fake,
			namespace,
			v2.SchemeGroupVersion.WithResource("ciliumnetworkpolicies"),
			v2.SchemeGroupVersion.WithKind("CiliumNetworkPolicy"),
			func() *v2.CiliumNetworkPolicy { return &v2.CiliumNetworkPolicy{} },
			func() *v2.CiliumNetworkPolicyList { return &v2.CiliumNetworkPolicyList{} },
			func(dst, src *v2.CiliumNetworkPolicyList) { dst.ListMeta = src.ListMeta },
			func(list *v2.CiliumNetworkPolicyList) []*v2.CiliumNetworkPolicy {
				return gentype.ToPointerSlice(list.Items)
			},
			func(list *v2.CiliumNetworkPolicyList, items []*v2.CiliumNetworkPolicy) {
				list.Items = gentype.FromPointerSlice(items)
			},
		),
		fake,
	}
}
