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

// fakeServices implements ServiceInterface
type fakeServices struct {
	*gentype.FakeClientWithList[*v1.Service, *v1.ServiceList]
	Fake *FakeCoreV1
}

func newFakeServices(fake *FakeCoreV1, namespace string) corev1.ServiceInterface {
	return &fakeServices{
		gentype.NewFakeClientWithList[*v1.Service, *v1.ServiceList](
			fake.Fake,
			namespace,
			v1.SchemeGroupVersion.WithResource("services"),
			v1.SchemeGroupVersion.WithKind("Service"),
			func() *v1.Service { return &v1.Service{} },
			func() *v1.ServiceList { return &v1.ServiceList{} },
			func(dst, src *v1.ServiceList) { dst.ListMeta = src.ListMeta },
			func(list *v1.ServiceList) []*v1.Service { return gentype.ToPointerSlice(list.Items) },
			func(list *v1.ServiceList, items []*v1.Service) { list.Items = gentype.FromPointerSlice(items) },
		),
		fake,
	}
}
