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

// fakeCiliumExternalWorkloads implements CiliumExternalWorkloadInterface
type fakeCiliumExternalWorkloads struct {
	*gentype.FakeClientWithList[*v2.CiliumExternalWorkload, *v2.CiliumExternalWorkloadList]
	Fake *FakeCiliumV2
}

func newFakeCiliumExternalWorkloads(fake *FakeCiliumV2) ciliumiov2.CiliumExternalWorkloadInterface {
	return &fakeCiliumExternalWorkloads{
		gentype.NewFakeClientWithList[*v2.CiliumExternalWorkload, *v2.CiliumExternalWorkloadList](
			fake.Fake,
			"",
			v2.SchemeGroupVersion.WithResource("ciliumexternalworkloads"),
			v2.SchemeGroupVersion.WithKind("CiliumExternalWorkload"),
			func() *v2.CiliumExternalWorkload { return &v2.CiliumExternalWorkload{} },
			func() *v2.CiliumExternalWorkloadList { return &v2.CiliumExternalWorkloadList{} },
			func(dst, src *v2.CiliumExternalWorkloadList) { dst.ListMeta = src.ListMeta },
			func(list *v2.CiliumExternalWorkloadList) []*v2.CiliumExternalWorkload {
				return gentype.ToPointerSlice(list.Items)
			},
			func(list *v2.CiliumExternalWorkloadList, items []*v2.CiliumExternalWorkload) {
				list.Items = gentype.FromPointerSlice(items)
			},
		),
		fake,
	}
}
