// 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/core/v1"
	corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1"
	gentype "k8s.io/client-go/gentype"
)

// fakeNamespaces implements NamespaceInterface
type fakeNamespaces struct {
	*gentype.FakeClientWithList[*v1.Namespace, *v1.NamespaceList]
	Fake *FakeCoreV1
}

func newFakeNamespaces(fake *FakeCoreV1) corev1.NamespaceInterface {
	return &fakeNamespaces{
		gentype.NewFakeClientWithList[*v1.Namespace, *v1.NamespaceList](
			fake.Fake,
			"",
			v1.SchemeGroupVersion.WithResource("namespaces"),
			v1.SchemeGroupVersion.WithKind("Namespace"),
			func() *v1.Namespace { return &v1.Namespace{} },
			func() *v1.NamespaceList { return &v1.NamespaceList{} },
			func(dst, src *v1.NamespaceList) { dst.ListMeta = src.ListMeta },
			func(list *v1.NamespaceList) []*v1.Namespace { return gentype.ToPointerSlice(list.Items) },
			func(list *v1.NamespaceList, items []*v1.Namespace) { list.Items = gentype.FromPointerSlice(items) },
		),
		fake,
	}
}
