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

// fakeCiliumEndpoints implements CiliumEndpointInterface
type fakeCiliumEndpoints struct {
	*gentype.FakeClientWithList[*v2.CiliumEndpoint, *v2.CiliumEndpointList]
	Fake *FakeCiliumV2
}

func newFakeCiliumEndpoints(fake *FakeCiliumV2, namespace string) ciliumiov2.CiliumEndpointInterface {
	return &fakeCiliumEndpoints{
		gentype.NewFakeClientWithList[*v2.CiliumEndpoint, *v2.CiliumEndpointList](
			fake.Fake,
			namespace,
			v2.SchemeGroupVersion.WithResource("ciliumendpoints"),
			v2.SchemeGroupVersion.WithKind("CiliumEndpoint"),
			func() *v2.CiliumEndpoint { return &v2.CiliumEndpoint{} },
			func() *v2.CiliumEndpointList { return &v2.CiliumEndpointList{} },
			func(dst, src *v2.CiliumEndpointList) { dst.ListMeta = src.ListMeta },
			func(list *v2.CiliumEndpointList) []*v2.CiliumEndpoint { return gentype.ToPointerSlice(list.Items) },
			func(list *v2.CiliumEndpointList, items []*v2.CiliumEndpoint) {
				list.Items = gentype.FromPointerSlice(items)
			},
		),
		fake,
	}
}
