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

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

package fake

import (
	v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1"
	networkingv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1"
	gentype "k8s.io/client-go/gentype"
)

// fakeNetworkPolicies implements NetworkPolicyInterface
type fakeNetworkPolicies struct {
	*gentype.FakeClientWithList[*v1.NetworkPolicy, *v1.NetworkPolicyList]
	Fake *FakeNetworkingV1
}

func newFakeNetworkPolicies(fake *FakeNetworkingV1, namespace string) networkingv1.NetworkPolicyInterface {
	return &fakeNetworkPolicies{
		gentype.NewFakeClientWithList[*v1.NetworkPolicy, *v1.NetworkPolicyList](
			fake.Fake,
			namespace,
			v1.SchemeGroupVersion.WithResource("networkpolicies"),
			v1.SchemeGroupVersion.WithKind("NetworkPolicy"),
			func() *v1.NetworkPolicy { return &v1.NetworkPolicy{} },
			func() *v1.NetworkPolicyList { return &v1.NetworkPolicyList{} },
			func(dst, src *v1.NetworkPolicyList) { dst.ListMeta = src.ListMeta },
			func(list *v1.NetworkPolicyList) []*v1.NetworkPolicy { return gentype.ToPointerSlice(list.Items) },
			func(list *v1.NetworkPolicyList, items []*v1.NetworkPolicy) {
				list.Items = gentype.FromPointerSlice(items)
			},
		),
		fake,
	}
}
