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

// fakeEndpointSlices implements EndpointSliceInterface
type fakeEndpointSlices struct {
	*gentype.FakeClientWithList[*v1.EndpointSlice, *v1.EndpointSliceList]
	Fake *FakeDiscoveryV1
}

func newFakeEndpointSlices(fake *FakeDiscoveryV1, namespace string) discoveryv1.EndpointSliceInterface {
	return &fakeEndpointSlices{
		gentype.NewFakeClientWithList[*v1.EndpointSlice, *v1.EndpointSliceList](
			fake.Fake,
			namespace,
			v1.SchemeGroupVersion.WithResource("endpointslices"),
			v1.SchemeGroupVersion.WithKind("EndpointSlice"),
			func() *v1.EndpointSlice { return &v1.EndpointSlice{} },
			func() *v1.EndpointSliceList { return &v1.EndpointSliceList{} },
			func(dst, src *v1.EndpointSliceList) { dst.ListMeta = src.ListMeta },
			func(list *v1.EndpointSliceList) []*v1.EndpointSlice { return gentype.ToPointerSlice(list.Items) },
			func(list *v1.EndpointSliceList, items []*v1.EndpointSlice) {
				list.Items = gentype.FromPointerSlice(items)
			},
		),
		fake,
	}
}
