// Copyright 2025 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by client-gen. DO NOT EDIT.

package fake

import (
	v1alpha2 "antrea.io/antrea/pkg/apis/crd/v1alpha2"
	crdv1alpha2 "antrea.io/antrea/pkg/client/clientset/versioned/typed/crd/v1alpha2"
	gentype "k8s.io/client-go/gentype"
)

// fakeExternalEntities implements ExternalEntityInterface
type fakeExternalEntities struct {
	*gentype.FakeClientWithList[*v1alpha2.ExternalEntity, *v1alpha2.ExternalEntityList]
	Fake *FakeCrdV1alpha2
}

func newFakeExternalEntities(fake *FakeCrdV1alpha2, namespace string) crdv1alpha2.ExternalEntityInterface {
	return &fakeExternalEntities{
		gentype.NewFakeClientWithList[*v1alpha2.ExternalEntity, *v1alpha2.ExternalEntityList](
			fake.Fake,
			namespace,
			v1alpha2.SchemeGroupVersion.WithResource("externalentities"),
			v1alpha2.SchemeGroupVersion.WithKind("ExternalEntity"),
			func() *v1alpha2.ExternalEntity { return &v1alpha2.ExternalEntity{} },
			func() *v1alpha2.ExternalEntityList { return &v1alpha2.ExternalEntityList{} },
			func(dst, src *v1alpha2.ExternalEntityList) { dst.ListMeta = src.ListMeta },
			func(list *v1alpha2.ExternalEntityList) []*v1alpha2.ExternalEntity {
				return gentype.ToPointerSlice(list.Items)
			},
			func(list *v1alpha2.ExternalEntityList, items []*v1alpha2.ExternalEntity) {
				list.Items = gentype.FromPointerSlice(items)
			},
		),
		fake,
	}
}
