2 Copyright The Kubernetes Authors.
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
17 // Code generated by client-gen. DO NOT EDIT.
22 "k8s.io/apimachinery/pkg/runtime"
23 "k8s.io/apimachinery/pkg/watch"
24 "k8s.io/client-go/discovery"
25 fakediscovery "k8s.io/client-go/discovery/fake"
26 clientset "k8s.io/client-go/kubernetes"
27 admissionregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1"
28 fakeadmissionregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake"
29 admissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1"
30 fakeadmissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake"
31 appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1"
32 fakeappsv1 "k8s.io/client-go/kubernetes/typed/apps/v1/fake"
33 appsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1"
34 fakeappsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake"
35 appsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2"
36 fakeappsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake"
37 auditregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1"
38 fakeauditregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake"
39 authenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1"
40 fakeauthenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1/fake"
41 authenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1"
42 fakeauthenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake"
43 authorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1"
44 fakeauthorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1/fake"
45 authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1"
46 fakeauthorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake"
47 autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
48 fakeautoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake"
49 autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1"
50 fakeautoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake"
51 autoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2"
52 fakeautoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake"
53 batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
54 fakebatchv1 "k8s.io/client-go/kubernetes/typed/batch/v1/fake"
55 batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
56 fakebatchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake"
57 batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
58 fakebatchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake"
59 certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
60 fakecertificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake"
61 coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1"
62 fakecoordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake"
63 corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
64 fakecorev1 "k8s.io/client-go/kubernetes/typed/core/v1/fake"
65 eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
66 fakeeventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1/fake"
67 extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
68 fakeextensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake"
69 networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1"
70 fakenetworkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1/fake"
71 policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1"
72 fakepolicyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake"
73 rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1"
74 fakerbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1/fake"
75 rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
76 fakerbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake"
77 rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
78 fakerbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake"
79 schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1"
80 fakeschedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake"
81 schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1"
82 fakeschedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake"
83 settingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1"
84 fakesettingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake"
85 storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1"
86 fakestoragev1 "k8s.io/client-go/kubernetes/typed/storage/v1/fake"
87 storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1"
88 fakestoragev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake"
89 storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
90 fakestoragev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake"
91 "k8s.io/client-go/testing"
94 // NewSimpleClientset returns a clientset that will respond with the provided objects.
95 // It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
96 // without applying any validations and/or defaults. It shouldn't be considered a replacement
97 // for a real clientset and is mostly useful in simple unit tests.
98 func NewSimpleClientset(objects ...runtime.Object) *Clientset {
99 o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder())
100 for _, obj := range objects {
101 if err := o.Add(obj); err != nil {
107 cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake}
108 cs.AddReactor("*", "*", testing.ObjectReaction(o))
109 cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
110 gvr := action.GetResource()
111 ns := action.GetNamespace()
112 watch, err := o.Watch(gvr, ns)
114 return false, nil, err
116 return true, watch, nil
122 // Clientset implements clientset.Interface. Meant to be embedded into a
123 // struct to get a default implementation. This makes faking out just the method
124 // you want to test easier.
125 type Clientset struct {
127 discovery *fakediscovery.FakeDiscovery
130 func (c *Clientset) Discovery() discovery.DiscoveryInterface {
134 var _ clientset.Interface = &Clientset{}
136 // AdmissionregistrationV1alpha1 retrieves the AdmissionregistrationV1alpha1Client
137 func (c *Clientset) AdmissionregistrationV1alpha1() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface {
138 return &fakeadmissionregistrationv1alpha1.FakeAdmissionregistrationV1alpha1{Fake: &c.Fake}
141 // AdmissionregistrationV1beta1 retrieves the AdmissionregistrationV1beta1Client
142 func (c *Clientset) AdmissionregistrationV1beta1() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface {
143 return &fakeadmissionregistrationv1beta1.FakeAdmissionregistrationV1beta1{Fake: &c.Fake}
146 // Admissionregistration retrieves the AdmissionregistrationV1beta1Client
147 func (c *Clientset) Admissionregistration() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface {
148 return &fakeadmissionregistrationv1beta1.FakeAdmissionregistrationV1beta1{Fake: &c.Fake}
151 // AppsV1beta1 retrieves the AppsV1beta1Client
152 func (c *Clientset) AppsV1beta1() appsv1beta1.AppsV1beta1Interface {
153 return &fakeappsv1beta1.FakeAppsV1beta1{Fake: &c.Fake}
156 // AppsV1beta2 retrieves the AppsV1beta2Client
157 func (c *Clientset) AppsV1beta2() appsv1beta2.AppsV1beta2Interface {
158 return &fakeappsv1beta2.FakeAppsV1beta2{Fake: &c.Fake}
161 // AppsV1 retrieves the AppsV1Client
162 func (c *Clientset) AppsV1() appsv1.AppsV1Interface {
163 return &fakeappsv1.FakeAppsV1{Fake: &c.Fake}
166 // Apps retrieves the AppsV1Client
167 func (c *Clientset) Apps() appsv1.AppsV1Interface {
168 return &fakeappsv1.FakeAppsV1{Fake: &c.Fake}
171 // AuditregistrationV1alpha1 retrieves the AuditregistrationV1alpha1Client
172 func (c *Clientset) AuditregistrationV1alpha1() auditregistrationv1alpha1.AuditregistrationV1alpha1Interface {
173 return &fakeauditregistrationv1alpha1.FakeAuditregistrationV1alpha1{Fake: &c.Fake}
176 // Auditregistration retrieves the AuditregistrationV1alpha1Client
177 func (c *Clientset) Auditregistration() auditregistrationv1alpha1.AuditregistrationV1alpha1Interface {
178 return &fakeauditregistrationv1alpha1.FakeAuditregistrationV1alpha1{Fake: &c.Fake}
181 // AuthenticationV1 retrieves the AuthenticationV1Client
182 func (c *Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface {
183 return &fakeauthenticationv1.FakeAuthenticationV1{Fake: &c.Fake}
186 // Authentication retrieves the AuthenticationV1Client
187 func (c *Clientset) Authentication() authenticationv1.AuthenticationV1Interface {
188 return &fakeauthenticationv1.FakeAuthenticationV1{Fake: &c.Fake}
191 // AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client
192 func (c *Clientset) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface {
193 return &fakeauthenticationv1beta1.FakeAuthenticationV1beta1{Fake: &c.Fake}
196 // AuthorizationV1 retrieves the AuthorizationV1Client
197 func (c *Clientset) AuthorizationV1() authorizationv1.AuthorizationV1Interface {
198 return &fakeauthorizationv1.FakeAuthorizationV1{Fake: &c.Fake}
201 // Authorization retrieves the AuthorizationV1Client
202 func (c *Clientset) Authorization() authorizationv1.AuthorizationV1Interface {
203 return &fakeauthorizationv1.FakeAuthorizationV1{Fake: &c.Fake}
206 // AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client
207 func (c *Clientset) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface {
208 return &fakeauthorizationv1beta1.FakeAuthorizationV1beta1{Fake: &c.Fake}
211 // AutoscalingV1 retrieves the AutoscalingV1Client
212 func (c *Clientset) AutoscalingV1() autoscalingv1.AutoscalingV1Interface {
213 return &fakeautoscalingv1.FakeAutoscalingV1{Fake: &c.Fake}
216 // Autoscaling retrieves the AutoscalingV1Client
217 func (c *Clientset) Autoscaling() autoscalingv1.AutoscalingV1Interface {
218 return &fakeautoscalingv1.FakeAutoscalingV1{Fake: &c.Fake}
221 // AutoscalingV2beta1 retrieves the AutoscalingV2beta1Client
222 func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface {
223 return &fakeautoscalingv2beta1.FakeAutoscalingV2beta1{Fake: &c.Fake}
226 // AutoscalingV2beta2 retrieves the AutoscalingV2beta2Client
227 func (c *Clientset) AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface {
228 return &fakeautoscalingv2beta2.FakeAutoscalingV2beta2{Fake: &c.Fake}
231 // BatchV1 retrieves the BatchV1Client
232 func (c *Clientset) BatchV1() batchv1.BatchV1Interface {
233 return &fakebatchv1.FakeBatchV1{Fake: &c.Fake}
236 // Batch retrieves the BatchV1Client
237 func (c *Clientset) Batch() batchv1.BatchV1Interface {
238 return &fakebatchv1.FakeBatchV1{Fake: &c.Fake}
241 // BatchV1beta1 retrieves the BatchV1beta1Client
242 func (c *Clientset) BatchV1beta1() batchv1beta1.BatchV1beta1Interface {
243 return &fakebatchv1beta1.FakeBatchV1beta1{Fake: &c.Fake}
246 // BatchV2alpha1 retrieves the BatchV2alpha1Client
247 func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface {
248 return &fakebatchv2alpha1.FakeBatchV2alpha1{Fake: &c.Fake}
251 // CertificatesV1beta1 retrieves the CertificatesV1beta1Client
252 func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface {
253 return &fakecertificatesv1beta1.FakeCertificatesV1beta1{Fake: &c.Fake}
256 // Certificates retrieves the CertificatesV1beta1Client
257 func (c *Clientset) Certificates() certificatesv1beta1.CertificatesV1beta1Interface {
258 return &fakecertificatesv1beta1.FakeCertificatesV1beta1{Fake: &c.Fake}
261 // CoordinationV1beta1 retrieves the CoordinationV1beta1Client
262 func (c *Clientset) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface {
263 return &fakecoordinationv1beta1.FakeCoordinationV1beta1{Fake: &c.Fake}
266 // Coordination retrieves the CoordinationV1beta1Client
267 func (c *Clientset) Coordination() coordinationv1beta1.CoordinationV1beta1Interface {
268 return &fakecoordinationv1beta1.FakeCoordinationV1beta1{Fake: &c.Fake}
271 // CoreV1 retrieves the CoreV1Client
272 func (c *Clientset) CoreV1() corev1.CoreV1Interface {
273 return &fakecorev1.FakeCoreV1{Fake: &c.Fake}
276 // Core retrieves the CoreV1Client
277 func (c *Clientset) Core() corev1.CoreV1Interface {
278 return &fakecorev1.FakeCoreV1{Fake: &c.Fake}
281 // EventsV1beta1 retrieves the EventsV1beta1Client
282 func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface {
283 return &fakeeventsv1beta1.FakeEventsV1beta1{Fake: &c.Fake}
286 // Events retrieves the EventsV1beta1Client
287 func (c *Clientset) Events() eventsv1beta1.EventsV1beta1Interface {
288 return &fakeeventsv1beta1.FakeEventsV1beta1{Fake: &c.Fake}
291 // ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client
292 func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface {
293 return &fakeextensionsv1beta1.FakeExtensionsV1beta1{Fake: &c.Fake}
296 // Extensions retrieves the ExtensionsV1beta1Client
297 func (c *Clientset) Extensions() extensionsv1beta1.ExtensionsV1beta1Interface {
298 return &fakeextensionsv1beta1.FakeExtensionsV1beta1{Fake: &c.Fake}
301 // NetworkingV1 retrieves the NetworkingV1Client
302 func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface {
303 return &fakenetworkingv1.FakeNetworkingV1{Fake: &c.Fake}
306 // Networking retrieves the NetworkingV1Client
307 func (c *Clientset) Networking() networkingv1.NetworkingV1Interface {
308 return &fakenetworkingv1.FakeNetworkingV1{Fake: &c.Fake}
311 // PolicyV1beta1 retrieves the PolicyV1beta1Client
312 func (c *Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface {
313 return &fakepolicyv1beta1.FakePolicyV1beta1{Fake: &c.Fake}
316 // Policy retrieves the PolicyV1beta1Client
317 func (c *Clientset) Policy() policyv1beta1.PolicyV1beta1Interface {
318 return &fakepolicyv1beta1.FakePolicyV1beta1{Fake: &c.Fake}
321 // RbacV1 retrieves the RbacV1Client
322 func (c *Clientset) RbacV1() rbacv1.RbacV1Interface {
323 return &fakerbacv1.FakeRbacV1{Fake: &c.Fake}
326 // Rbac retrieves the RbacV1Client
327 func (c *Clientset) Rbac() rbacv1.RbacV1Interface {
328 return &fakerbacv1.FakeRbacV1{Fake: &c.Fake}
331 // RbacV1beta1 retrieves the RbacV1beta1Client
332 func (c *Clientset) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface {
333 return &fakerbacv1beta1.FakeRbacV1beta1{Fake: &c.Fake}
336 // RbacV1alpha1 retrieves the RbacV1alpha1Client
337 func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
338 return &fakerbacv1alpha1.FakeRbacV1alpha1{Fake: &c.Fake}
341 // SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client
342 func (c *Clientset) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface {
343 return &fakeschedulingv1alpha1.FakeSchedulingV1alpha1{Fake: &c.Fake}
346 // SchedulingV1beta1 retrieves the SchedulingV1beta1Client
347 func (c *Clientset) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface {
348 return &fakeschedulingv1beta1.FakeSchedulingV1beta1{Fake: &c.Fake}
351 // Scheduling retrieves the SchedulingV1beta1Client
352 func (c *Clientset) Scheduling() schedulingv1beta1.SchedulingV1beta1Interface {
353 return &fakeschedulingv1beta1.FakeSchedulingV1beta1{Fake: &c.Fake}
356 // SettingsV1alpha1 retrieves the SettingsV1alpha1Client
357 func (c *Clientset) SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface {
358 return &fakesettingsv1alpha1.FakeSettingsV1alpha1{Fake: &c.Fake}
361 // Settings retrieves the SettingsV1alpha1Client
362 func (c *Clientset) Settings() settingsv1alpha1.SettingsV1alpha1Interface {
363 return &fakesettingsv1alpha1.FakeSettingsV1alpha1{Fake: &c.Fake}
366 // StorageV1beta1 retrieves the StorageV1beta1Client
367 func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface {
368 return &fakestoragev1beta1.FakeStorageV1beta1{Fake: &c.Fake}
371 // StorageV1 retrieves the StorageV1Client
372 func (c *Clientset) StorageV1() storagev1.StorageV1Interface {
373 return &fakestoragev1.FakeStorageV1{Fake: &c.Fake}
376 // Storage retrieves the StorageV1Client
377 func (c *Clientset) Storage() storagev1.StorageV1Interface {
378 return &fakestoragev1.FakeStorageV1{Fake: &c.Fake}
381 // StorageV1alpha1 retrieves the StorageV1alpha1Client
382 func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface {
383 return &fakestoragev1alpha1.FakeStorageV1alpha1{Fake: &c.Fake}