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

// fakeEndpoints implements EndpointsInterface
type fakeEndpoints struct {
	*gentype.FakeClientWithList[*v1.Endpoints, *v1.EndpointsList]
	Fake *FakeCoreV1
}

func newFakeEndpoints(fake *FakeCoreV1, namespace string) corev1.EndpointsInterface {
	return &fakeEndpoints{
		gentype.NewFakeClientWithList[*v1.Endpoints, *v1.EndpointsList](
			fake.Fake,
			namespace,
			v1.SchemeGroupVersion.WithResource("endpoints"),
			v1.SchemeGroupVersion.WithKind("Endpoints"),
			func() *v1.Endpoints { return &v1.Endpoints{} },
			func() *v1.EndpointsList { return &v1.EndpointsList{} },
			func(dst, src *v1.EndpointsList) { dst.ListMeta = src.ListMeta },
			func(list *v1.EndpointsList) []*v1.Endpoints { return gentype.ToPointerSlice(list.Items) },
			func(list *v1.EndpointsList, items []*v1.Endpoints) { list.Items = gentype.FromPointerSlice(items) },
		),
		fake,
	}
}
