/*
Copyright 2020 The Flux 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 (
	v2 "github.com/fluxcd/flagger/pkg/apis/apisix/v2"
	apisixv2 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/apisix/v2"
	gentype "k8s.io/client-go/gentype"
)

// fakeApisixRoutes implements ApisixRouteInterface
type fakeApisixRoutes struct {
	*gentype.FakeClientWithList[*v2.ApisixRoute, *v2.ApisixRouteList]
	Fake *FakeApisixV2
}

func newFakeApisixRoutes(fake *FakeApisixV2, namespace string) apisixv2.ApisixRouteInterface {
	return &fakeApisixRoutes{
		gentype.NewFakeClientWithList[*v2.ApisixRoute, *v2.ApisixRouteList](
			fake.Fake,
			namespace,
			v2.SchemeGroupVersion.WithResource("apisixroutes"),
			v2.SchemeGroupVersion.WithKind("ApisixRoute"),
			func() *v2.ApisixRoute { return &v2.ApisixRoute{} },
			func() *v2.ApisixRouteList { return &v2.ApisixRouteList{} },
			func(dst, src *v2.ApisixRouteList) { dst.ListMeta = src.ListMeta },
			func(list *v2.ApisixRouteList) []*v2.ApisixRoute { return gentype.ToPointerSlice(list.Items) },
			func(list *v2.ApisixRouteList, items []*v2.ApisixRoute) { list.Items = gentype.FromPointerSlice(items) },
		),
		fake,
	}
}
