// Copyright (c) 2026 Tigera, Inc. All rights reserved.

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

package fake

import (
	v3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
	projectcalicov3 "github.com/projectcalico/api/pkg/client/applyconfiguration_generated/projectcalico/v3"
	typedprojectcalicov3 "github.com/projectcalico/api/pkg/client/clientset_generated/clientset/typed/projectcalico/v3"
	gentype "k8s.io/client-go/gentype"
)

// fakeBlockAffinities implements BlockAffinityInterface
type fakeBlockAffinities struct {
	*gentype.FakeClientWithListAndApply[*v3.BlockAffinity, *v3.BlockAffinityList, *projectcalicov3.BlockAffinityApplyConfiguration]
	Fake *FakeProjectcalicoV3
}

func newFakeBlockAffinities(fake *FakeProjectcalicoV3) typedprojectcalicov3.BlockAffinityInterface {
	return &fakeBlockAffinities{
		gentype.NewFakeClientWithListAndApply[*v3.BlockAffinity, *v3.BlockAffinityList, *projectcalicov3.BlockAffinityApplyConfiguration](
			fake.Fake,
			"",
			v3.SchemeGroupVersion.WithResource("blockaffinities"),
			v3.SchemeGroupVersion.WithKind("BlockAffinity"),
			func() *v3.BlockAffinity { return &v3.BlockAffinity{} },
			func() *v3.BlockAffinityList { return &v3.BlockAffinityList{} },
			func(dst, src *v3.BlockAffinityList) { dst.ListMeta = src.ListMeta },
			func(list *v3.BlockAffinityList) []*v3.BlockAffinity { return gentype.ToPointerSlice(list.Items) },
			func(list *v3.BlockAffinityList, items []*v3.BlockAffinity) {
				list.Items = gentype.FromPointerSlice(items)
			},
		),
		fake,
	}
}
