// Copyright (c) 2026 Tigera, Inc. All rights reserved.

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

package fake

import (
	v3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
	projectcalicov3 "github.com/projectcalico/api/pkg/client/clientset_generated/clientset/typed/projectcalico/v3"
	gentype "k8s.io/client-go/gentype"
)

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

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