// 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"
)

// fakeCiliumClusterwideNetworkPolicies implements CiliumClusterwideNetworkPolicyInterface
type fakeCiliumClusterwideNetworkPolicies struct {
	*gentype.FakeClientWithList[*v2.CiliumClusterwideNetworkPolicy, *v2.CiliumClusterwideNetworkPolicyList]
	Fake *FakeCiliumV2
}

func newFakeCiliumClusterwideNetworkPolicies(fake *FakeCiliumV2) ciliumiov2.CiliumClusterwideNetworkPolicyInterface {
	return &fakeCiliumClusterwideNetworkPolicies{
		gentype.NewFakeClientWithList[*v2.CiliumClusterwideNetworkPolicy, *v2.CiliumClusterwideNetworkPolicyList](
			fake.Fake,
			"",
			v2.SchemeGroupVersion.WithResource("ciliumclusterwidenetworkpolicies"),
			v2.SchemeGroupVersion.WithKind("CiliumClusterwideNetworkPolicy"),
			func() *v2.CiliumClusterwideNetworkPolicy { return &v2.CiliumClusterwideNetworkPolicy{} },
			func() *v2.CiliumClusterwideNetworkPolicyList { return &v2.CiliumClusterwideNetworkPolicyList{} },
			func(dst, src *v2.CiliumClusterwideNetworkPolicyList) { dst.ListMeta = src.ListMeta },
			func(list *v2.CiliumClusterwideNetworkPolicyList) []*v2.CiliumClusterwideNetworkPolicy {
				return gentype.ToPointerSlice(list.Items)
			},
			func(list *v2.CiliumClusterwideNetworkPolicyList, items []*v2.CiliumClusterwideNetworkPolicy) {
				list.Items = gentype.FromPointerSlice(items)
			},
		),
		fake,
	}
}
