clientset.go 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685
  1. /*
  2. Copyright The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // Code generated by client-gen. DO NOT EDIT.
  14. package kubernetes
  15. import (
  16. "fmt"
  17. discovery "k8s.io/client-go/discovery"
  18. admissionregistrationv1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1"
  19. admissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1"
  20. internalv1alpha1 "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1"
  21. appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1"
  22. appsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1"
  23. appsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2"
  24. authenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1"
  25. authenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1"
  26. authorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1"
  27. authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1"
  28. autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
  29. autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1"
  30. autoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2"
  31. batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
  32. batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
  33. certificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1"
  34. certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
  35. coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1"
  36. coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1"
  37. corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
  38. discoveryv1 "k8s.io/client-go/kubernetes/typed/discovery/v1"
  39. discoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1"
  40. eventsv1 "k8s.io/client-go/kubernetes/typed/events/v1"
  41. eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
  42. extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
  43. flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1"
  44. flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1"
  45. networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1"
  46. networkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1"
  47. nodev1 "k8s.io/client-go/kubernetes/typed/node/v1"
  48. nodev1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1"
  49. nodev1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1"
  50. policyv1 "k8s.io/client-go/kubernetes/typed/policy/v1"
  51. policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1"
  52. rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1"
  53. rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
  54. rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
  55. schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1"
  56. schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1"
  57. schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1"
  58. storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1"
  59. storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1"
  60. storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
  61. rest "k8s.io/client-go/rest"
  62. flowcontrol "k8s.io/client-go/util/flowcontrol"
  63. )
  64. type Interface interface {
  65. Discovery() discovery.DiscoveryInterface
  66. AdmissionregistrationV1() admissionregistrationv1.AdmissionregistrationV1Interface
  67. AdmissionregistrationV1beta1() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface
  68. InternalV1alpha1() internalv1alpha1.InternalV1alpha1Interface
  69. AppsV1() appsv1.AppsV1Interface
  70. AppsV1beta1() appsv1beta1.AppsV1beta1Interface
  71. AppsV1beta2() appsv1beta2.AppsV1beta2Interface
  72. AuthenticationV1() authenticationv1.AuthenticationV1Interface
  73. AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface
  74. AuthorizationV1() authorizationv1.AuthorizationV1Interface
  75. AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface
  76. AutoscalingV1() autoscalingv1.AutoscalingV1Interface
  77. AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface
  78. AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface
  79. BatchV1() batchv1.BatchV1Interface
  80. BatchV1beta1() batchv1beta1.BatchV1beta1Interface
  81. CertificatesV1() certificatesv1.CertificatesV1Interface
  82. CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface
  83. CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface
  84. CoordinationV1() coordinationv1.CoordinationV1Interface
  85. CoreV1() corev1.CoreV1Interface
  86. DiscoveryV1() discoveryv1.DiscoveryV1Interface
  87. DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface
  88. EventsV1() eventsv1.EventsV1Interface
  89. EventsV1beta1() eventsv1beta1.EventsV1beta1Interface
  90. ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
  91. FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface
  92. FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface
  93. NetworkingV1() networkingv1.NetworkingV1Interface
  94. NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface
  95. NodeV1() nodev1.NodeV1Interface
  96. NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface
  97. NodeV1beta1() nodev1beta1.NodeV1beta1Interface
  98. PolicyV1() policyv1.PolicyV1Interface
  99. PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface
  100. RbacV1() rbacv1.RbacV1Interface
  101. RbacV1beta1() rbacv1beta1.RbacV1beta1Interface
  102. RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface
  103. SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface
  104. SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface
  105. SchedulingV1() schedulingv1.SchedulingV1Interface
  106. StorageV1beta1() storagev1beta1.StorageV1beta1Interface
  107. StorageV1() storagev1.StorageV1Interface
  108. StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface
  109. }
  110. // Clientset contains the clients for groups. Each group has exactly one
  111. // version included in a Clientset.
  112. type Clientset struct {
  113. *discovery.DiscoveryClient
  114. admissionregistrationV1 *admissionregistrationv1.AdmissionregistrationV1Client
  115. admissionregistrationV1beta1 *admissionregistrationv1beta1.AdmissionregistrationV1beta1Client
  116. internalV1alpha1 *internalv1alpha1.InternalV1alpha1Client
  117. appsV1 *appsv1.AppsV1Client
  118. appsV1beta1 *appsv1beta1.AppsV1beta1Client
  119. appsV1beta2 *appsv1beta2.AppsV1beta2Client
  120. authenticationV1 *authenticationv1.AuthenticationV1Client
  121. authenticationV1beta1 *authenticationv1beta1.AuthenticationV1beta1Client
  122. authorizationV1 *authorizationv1.AuthorizationV1Client
  123. authorizationV1beta1 *authorizationv1beta1.AuthorizationV1beta1Client
  124. autoscalingV1 *autoscalingv1.AutoscalingV1Client
  125. autoscalingV2beta1 *autoscalingv2beta1.AutoscalingV2beta1Client
  126. autoscalingV2beta2 *autoscalingv2beta2.AutoscalingV2beta2Client
  127. batchV1 *batchv1.BatchV1Client
  128. batchV1beta1 *batchv1beta1.BatchV1beta1Client
  129. certificatesV1 *certificatesv1.CertificatesV1Client
  130. certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client
  131. coordinationV1beta1 *coordinationv1beta1.CoordinationV1beta1Client
  132. coordinationV1 *coordinationv1.CoordinationV1Client
  133. coreV1 *corev1.CoreV1Client
  134. discoveryV1 *discoveryv1.DiscoveryV1Client
  135. discoveryV1beta1 *discoveryv1beta1.DiscoveryV1beta1Client
  136. eventsV1 *eventsv1.EventsV1Client
  137. eventsV1beta1 *eventsv1beta1.EventsV1beta1Client
  138. extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client
  139. flowcontrolV1alpha1 *flowcontrolv1alpha1.FlowcontrolV1alpha1Client
  140. flowcontrolV1beta1 *flowcontrolv1beta1.FlowcontrolV1beta1Client
  141. networkingV1 *networkingv1.NetworkingV1Client
  142. networkingV1beta1 *networkingv1beta1.NetworkingV1beta1Client
  143. nodeV1 *nodev1.NodeV1Client
  144. nodeV1alpha1 *nodev1alpha1.NodeV1alpha1Client
  145. nodeV1beta1 *nodev1beta1.NodeV1beta1Client
  146. policyV1 *policyv1.PolicyV1Client
  147. policyV1beta1 *policyv1beta1.PolicyV1beta1Client
  148. rbacV1 *rbacv1.RbacV1Client
  149. rbacV1beta1 *rbacv1beta1.RbacV1beta1Client
  150. rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client
  151. schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client
  152. schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1Client
  153. schedulingV1 *schedulingv1.SchedulingV1Client
  154. storageV1beta1 *storagev1beta1.StorageV1beta1Client
  155. storageV1 *storagev1.StorageV1Client
  156. storageV1alpha1 *storagev1alpha1.StorageV1alpha1Client
  157. }
  158. // AdmissionregistrationV1 retrieves the AdmissionregistrationV1Client
  159. func (c *Clientset) AdmissionregistrationV1() admissionregistrationv1.AdmissionregistrationV1Interface {
  160. return c.admissionregistrationV1
  161. }
  162. // AdmissionregistrationV1beta1 retrieves the AdmissionregistrationV1beta1Client
  163. func (c *Clientset) AdmissionregistrationV1beta1() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface {
  164. return c.admissionregistrationV1beta1
  165. }
  166. // InternalV1alpha1 retrieves the InternalV1alpha1Client
  167. func (c *Clientset) InternalV1alpha1() internalv1alpha1.InternalV1alpha1Interface {
  168. return c.internalV1alpha1
  169. }
  170. // AppsV1 retrieves the AppsV1Client
  171. func (c *Clientset) AppsV1() appsv1.AppsV1Interface {
  172. return c.appsV1
  173. }
  174. // AppsV1beta1 retrieves the AppsV1beta1Client
  175. func (c *Clientset) AppsV1beta1() appsv1beta1.AppsV1beta1Interface {
  176. return c.appsV1beta1
  177. }
  178. // AppsV1beta2 retrieves the AppsV1beta2Client
  179. func (c *Clientset) AppsV1beta2() appsv1beta2.AppsV1beta2Interface {
  180. return c.appsV1beta2
  181. }
  182. // AuthenticationV1 retrieves the AuthenticationV1Client
  183. func (c *Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface {
  184. return c.authenticationV1
  185. }
  186. // AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client
  187. func (c *Clientset) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface {
  188. return c.authenticationV1beta1
  189. }
  190. // AuthorizationV1 retrieves the AuthorizationV1Client
  191. func (c *Clientset) AuthorizationV1() authorizationv1.AuthorizationV1Interface {
  192. return c.authorizationV1
  193. }
  194. // AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client
  195. func (c *Clientset) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface {
  196. return c.authorizationV1beta1
  197. }
  198. // AutoscalingV1 retrieves the AutoscalingV1Client
  199. func (c *Clientset) AutoscalingV1() autoscalingv1.AutoscalingV1Interface {
  200. return c.autoscalingV1
  201. }
  202. // AutoscalingV2beta1 retrieves the AutoscalingV2beta1Client
  203. func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface {
  204. return c.autoscalingV2beta1
  205. }
  206. // AutoscalingV2beta2 retrieves the AutoscalingV2beta2Client
  207. func (c *Clientset) AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface {
  208. return c.autoscalingV2beta2
  209. }
  210. // BatchV1 retrieves the BatchV1Client
  211. func (c *Clientset) BatchV1() batchv1.BatchV1Interface {
  212. return c.batchV1
  213. }
  214. // BatchV1beta1 retrieves the BatchV1beta1Client
  215. func (c *Clientset) BatchV1beta1() batchv1beta1.BatchV1beta1Interface {
  216. return c.batchV1beta1
  217. }
  218. // CertificatesV1 retrieves the CertificatesV1Client
  219. func (c *Clientset) CertificatesV1() certificatesv1.CertificatesV1Interface {
  220. return c.certificatesV1
  221. }
  222. // CertificatesV1beta1 retrieves the CertificatesV1beta1Client
  223. func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface {
  224. return c.certificatesV1beta1
  225. }
  226. // CoordinationV1beta1 retrieves the CoordinationV1beta1Client
  227. func (c *Clientset) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface {
  228. return c.coordinationV1beta1
  229. }
  230. // CoordinationV1 retrieves the CoordinationV1Client
  231. func (c *Clientset) CoordinationV1() coordinationv1.CoordinationV1Interface {
  232. return c.coordinationV1
  233. }
  234. // CoreV1 retrieves the CoreV1Client
  235. func (c *Clientset) CoreV1() corev1.CoreV1Interface {
  236. return c.coreV1
  237. }
  238. // DiscoveryV1 retrieves the DiscoveryV1Client
  239. func (c *Clientset) DiscoveryV1() discoveryv1.DiscoveryV1Interface {
  240. return c.discoveryV1
  241. }
  242. // DiscoveryV1beta1 retrieves the DiscoveryV1beta1Client
  243. func (c *Clientset) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface {
  244. return c.discoveryV1beta1
  245. }
  246. // EventsV1 retrieves the EventsV1Client
  247. func (c *Clientset) EventsV1() eventsv1.EventsV1Interface {
  248. return c.eventsV1
  249. }
  250. // EventsV1beta1 retrieves the EventsV1beta1Client
  251. func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface {
  252. return c.eventsV1beta1
  253. }
  254. // ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client
  255. func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface {
  256. return c.extensionsV1beta1
  257. }
  258. // FlowcontrolV1alpha1 retrieves the FlowcontrolV1alpha1Client
  259. func (c *Clientset) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface {
  260. return c.flowcontrolV1alpha1
  261. }
  262. // FlowcontrolV1beta1 retrieves the FlowcontrolV1beta1Client
  263. func (c *Clientset) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface {
  264. return c.flowcontrolV1beta1
  265. }
  266. // NetworkingV1 retrieves the NetworkingV1Client
  267. func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface {
  268. return c.networkingV1
  269. }
  270. // NetworkingV1beta1 retrieves the NetworkingV1beta1Client
  271. func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface {
  272. return c.networkingV1beta1
  273. }
  274. // NodeV1 retrieves the NodeV1Client
  275. func (c *Clientset) NodeV1() nodev1.NodeV1Interface {
  276. return c.nodeV1
  277. }
  278. // NodeV1alpha1 retrieves the NodeV1alpha1Client
  279. func (c *Clientset) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface {
  280. return c.nodeV1alpha1
  281. }
  282. // NodeV1beta1 retrieves the NodeV1beta1Client
  283. func (c *Clientset) NodeV1beta1() nodev1beta1.NodeV1beta1Interface {
  284. return c.nodeV1beta1
  285. }
  286. // PolicyV1 retrieves the PolicyV1Client
  287. func (c *Clientset) PolicyV1() policyv1.PolicyV1Interface {
  288. return c.policyV1
  289. }
  290. // PolicyV1beta1 retrieves the PolicyV1beta1Client
  291. func (c *Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface {
  292. return c.policyV1beta1
  293. }
  294. // RbacV1 retrieves the RbacV1Client
  295. func (c *Clientset) RbacV1() rbacv1.RbacV1Interface {
  296. return c.rbacV1
  297. }
  298. // RbacV1beta1 retrieves the RbacV1beta1Client
  299. func (c *Clientset) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface {
  300. return c.rbacV1beta1
  301. }
  302. // RbacV1alpha1 retrieves the RbacV1alpha1Client
  303. func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
  304. return c.rbacV1alpha1
  305. }
  306. // SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client
  307. func (c *Clientset) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface {
  308. return c.schedulingV1alpha1
  309. }
  310. // SchedulingV1beta1 retrieves the SchedulingV1beta1Client
  311. func (c *Clientset) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface {
  312. return c.schedulingV1beta1
  313. }
  314. // SchedulingV1 retrieves the SchedulingV1Client
  315. func (c *Clientset) SchedulingV1() schedulingv1.SchedulingV1Interface {
  316. return c.schedulingV1
  317. }
  318. // StorageV1beta1 retrieves the StorageV1beta1Client
  319. func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface {
  320. return c.storageV1beta1
  321. }
  322. // StorageV1 retrieves the StorageV1Client
  323. func (c *Clientset) StorageV1() storagev1.StorageV1Interface {
  324. return c.storageV1
  325. }
  326. // StorageV1alpha1 retrieves the StorageV1alpha1Client
  327. func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface {
  328. return c.storageV1alpha1
  329. }
  330. // Discovery retrieves the DiscoveryClient
  331. func (c *Clientset) Discovery() discovery.DiscoveryInterface {
  332. if c == nil {
  333. return nil
  334. }
  335. return c.DiscoveryClient
  336. }
  337. // NewForConfig creates a new Clientset for the given config.
  338. // If config's RateLimiter is not set and QPS and Burst are acceptable,
  339. // NewForConfig will generate a rate-limiter in configShallowCopy.
  340. func NewForConfig(c *rest.Config) (*Clientset, error) {
  341. configShallowCopy := *c
  342. if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
  343. if configShallowCopy.Burst <= 0 {
  344. return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0")
  345. }
  346. configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
  347. }
  348. var cs Clientset
  349. var err error
  350. cs.admissionregistrationV1, err = admissionregistrationv1.NewForConfig(&configShallowCopy)
  351. if err != nil {
  352. return nil, err
  353. }
  354. cs.admissionregistrationV1beta1, err = admissionregistrationv1beta1.NewForConfig(&configShallowCopy)
  355. if err != nil {
  356. return nil, err
  357. }
  358. cs.internalV1alpha1, err = internalv1alpha1.NewForConfig(&configShallowCopy)
  359. if err != nil {
  360. return nil, err
  361. }
  362. cs.appsV1, err = appsv1.NewForConfig(&configShallowCopy)
  363. if err != nil {
  364. return nil, err
  365. }
  366. cs.appsV1beta1, err = appsv1beta1.NewForConfig(&configShallowCopy)
  367. if err != nil {
  368. return nil, err
  369. }
  370. cs.appsV1beta2, err = appsv1beta2.NewForConfig(&configShallowCopy)
  371. if err != nil {
  372. return nil, err
  373. }
  374. cs.authenticationV1, err = authenticationv1.NewForConfig(&configShallowCopy)
  375. if err != nil {
  376. return nil, err
  377. }
  378. cs.authenticationV1beta1, err = authenticationv1beta1.NewForConfig(&configShallowCopy)
  379. if err != nil {
  380. return nil, err
  381. }
  382. cs.authorizationV1, err = authorizationv1.NewForConfig(&configShallowCopy)
  383. if err != nil {
  384. return nil, err
  385. }
  386. cs.authorizationV1beta1, err = authorizationv1beta1.NewForConfig(&configShallowCopy)
  387. if err != nil {
  388. return nil, err
  389. }
  390. cs.autoscalingV1, err = autoscalingv1.NewForConfig(&configShallowCopy)
  391. if err != nil {
  392. return nil, err
  393. }
  394. cs.autoscalingV2beta1, err = autoscalingv2beta1.NewForConfig(&configShallowCopy)
  395. if err != nil {
  396. return nil, err
  397. }
  398. cs.autoscalingV2beta2, err = autoscalingv2beta2.NewForConfig(&configShallowCopy)
  399. if err != nil {
  400. return nil, err
  401. }
  402. cs.batchV1, err = batchv1.NewForConfig(&configShallowCopy)
  403. if err != nil {
  404. return nil, err
  405. }
  406. cs.batchV1beta1, err = batchv1beta1.NewForConfig(&configShallowCopy)
  407. if err != nil {
  408. return nil, err
  409. }
  410. cs.certificatesV1, err = certificatesv1.NewForConfig(&configShallowCopy)
  411. if err != nil {
  412. return nil, err
  413. }
  414. cs.certificatesV1beta1, err = certificatesv1beta1.NewForConfig(&configShallowCopy)
  415. if err != nil {
  416. return nil, err
  417. }
  418. cs.coordinationV1beta1, err = coordinationv1beta1.NewForConfig(&configShallowCopy)
  419. if err != nil {
  420. return nil, err
  421. }
  422. cs.coordinationV1, err = coordinationv1.NewForConfig(&configShallowCopy)
  423. if err != nil {
  424. return nil, err
  425. }
  426. cs.coreV1, err = corev1.NewForConfig(&configShallowCopy)
  427. if err != nil {
  428. return nil, err
  429. }
  430. cs.discoveryV1, err = discoveryv1.NewForConfig(&configShallowCopy)
  431. if err != nil {
  432. return nil, err
  433. }
  434. cs.discoveryV1beta1, err = discoveryv1beta1.NewForConfig(&configShallowCopy)
  435. if err != nil {
  436. return nil, err
  437. }
  438. cs.eventsV1, err = eventsv1.NewForConfig(&configShallowCopy)
  439. if err != nil {
  440. return nil, err
  441. }
  442. cs.eventsV1beta1, err = eventsv1beta1.NewForConfig(&configShallowCopy)
  443. if err != nil {
  444. return nil, err
  445. }
  446. cs.extensionsV1beta1, err = extensionsv1beta1.NewForConfig(&configShallowCopy)
  447. if err != nil {
  448. return nil, err
  449. }
  450. cs.flowcontrolV1alpha1, err = flowcontrolv1alpha1.NewForConfig(&configShallowCopy)
  451. if err != nil {
  452. return nil, err
  453. }
  454. cs.flowcontrolV1beta1, err = flowcontrolv1beta1.NewForConfig(&configShallowCopy)
  455. if err != nil {
  456. return nil, err
  457. }
  458. cs.networkingV1, err = networkingv1.NewForConfig(&configShallowCopy)
  459. if err != nil {
  460. return nil, err
  461. }
  462. cs.networkingV1beta1, err = networkingv1beta1.NewForConfig(&configShallowCopy)
  463. if err != nil {
  464. return nil, err
  465. }
  466. cs.nodeV1, err = nodev1.NewForConfig(&configShallowCopy)
  467. if err != nil {
  468. return nil, err
  469. }
  470. cs.nodeV1alpha1, err = nodev1alpha1.NewForConfig(&configShallowCopy)
  471. if err != nil {
  472. return nil, err
  473. }
  474. cs.nodeV1beta1, err = nodev1beta1.NewForConfig(&configShallowCopy)
  475. if err != nil {
  476. return nil, err
  477. }
  478. cs.policyV1, err = policyv1.NewForConfig(&configShallowCopy)
  479. if err != nil {
  480. return nil, err
  481. }
  482. cs.policyV1beta1, err = policyv1beta1.NewForConfig(&configShallowCopy)
  483. if err != nil {
  484. return nil, err
  485. }
  486. cs.rbacV1, err = rbacv1.NewForConfig(&configShallowCopy)
  487. if err != nil {
  488. return nil, err
  489. }
  490. cs.rbacV1beta1, err = rbacv1beta1.NewForConfig(&configShallowCopy)
  491. if err != nil {
  492. return nil, err
  493. }
  494. cs.rbacV1alpha1, err = rbacv1alpha1.NewForConfig(&configShallowCopy)
  495. if err != nil {
  496. return nil, err
  497. }
  498. cs.schedulingV1alpha1, err = schedulingv1alpha1.NewForConfig(&configShallowCopy)
  499. if err != nil {
  500. return nil, err
  501. }
  502. cs.schedulingV1beta1, err = schedulingv1beta1.NewForConfig(&configShallowCopy)
  503. if err != nil {
  504. return nil, err
  505. }
  506. cs.schedulingV1, err = schedulingv1.NewForConfig(&configShallowCopy)
  507. if err != nil {
  508. return nil, err
  509. }
  510. cs.storageV1beta1, err = storagev1beta1.NewForConfig(&configShallowCopy)
  511. if err != nil {
  512. return nil, err
  513. }
  514. cs.storageV1, err = storagev1.NewForConfig(&configShallowCopy)
  515. if err != nil {
  516. return nil, err
  517. }
  518. cs.storageV1alpha1, err = storagev1alpha1.NewForConfig(&configShallowCopy)
  519. if err != nil {
  520. return nil, err
  521. }
  522. cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
  523. if err != nil {
  524. return nil, err
  525. }
  526. return &cs, nil
  527. }
  528. // NewForConfigOrDie creates a new Clientset for the given config and
  529. // panics if there is an error in the config.
  530. func NewForConfigOrDie(c *rest.Config) *Clientset {
  531. var cs Clientset
  532. cs.admissionregistrationV1 = admissionregistrationv1.NewForConfigOrDie(c)
  533. cs.admissionregistrationV1beta1 = admissionregistrationv1beta1.NewForConfigOrDie(c)
  534. cs.internalV1alpha1 = internalv1alpha1.NewForConfigOrDie(c)
  535. cs.appsV1 = appsv1.NewForConfigOrDie(c)
  536. cs.appsV1beta1 = appsv1beta1.NewForConfigOrDie(c)
  537. cs.appsV1beta2 = appsv1beta2.NewForConfigOrDie(c)
  538. cs.authenticationV1 = authenticationv1.NewForConfigOrDie(c)
  539. cs.authenticationV1beta1 = authenticationv1beta1.NewForConfigOrDie(c)
  540. cs.authorizationV1 = authorizationv1.NewForConfigOrDie(c)
  541. cs.authorizationV1beta1 = authorizationv1beta1.NewForConfigOrDie(c)
  542. cs.autoscalingV1 = autoscalingv1.NewForConfigOrDie(c)
  543. cs.autoscalingV2beta1 = autoscalingv2beta1.NewForConfigOrDie(c)
  544. cs.autoscalingV2beta2 = autoscalingv2beta2.NewForConfigOrDie(c)
  545. cs.batchV1 = batchv1.NewForConfigOrDie(c)
  546. cs.batchV1beta1 = batchv1beta1.NewForConfigOrDie(c)
  547. cs.certificatesV1 = certificatesv1.NewForConfigOrDie(c)
  548. cs.certificatesV1beta1 = certificatesv1beta1.NewForConfigOrDie(c)
  549. cs.coordinationV1beta1 = coordinationv1beta1.NewForConfigOrDie(c)
  550. cs.coordinationV1 = coordinationv1.NewForConfigOrDie(c)
  551. cs.coreV1 = corev1.NewForConfigOrDie(c)
  552. cs.discoveryV1 = discoveryv1.NewForConfigOrDie(c)
  553. cs.discoveryV1beta1 = discoveryv1beta1.NewForConfigOrDie(c)
  554. cs.eventsV1 = eventsv1.NewForConfigOrDie(c)
  555. cs.eventsV1beta1 = eventsv1beta1.NewForConfigOrDie(c)
  556. cs.extensionsV1beta1 = extensionsv1beta1.NewForConfigOrDie(c)
  557. cs.flowcontrolV1alpha1 = flowcontrolv1alpha1.NewForConfigOrDie(c)
  558. cs.flowcontrolV1beta1 = flowcontrolv1beta1.NewForConfigOrDie(c)
  559. cs.networkingV1 = networkingv1.NewForConfigOrDie(c)
  560. cs.networkingV1beta1 = networkingv1beta1.NewForConfigOrDie(c)
  561. cs.nodeV1 = nodev1.NewForConfigOrDie(c)
  562. cs.nodeV1alpha1 = nodev1alpha1.NewForConfigOrDie(c)
  563. cs.nodeV1beta1 = nodev1beta1.NewForConfigOrDie(c)
  564. cs.policyV1 = policyv1.NewForConfigOrDie(c)
  565. cs.policyV1beta1 = policyv1beta1.NewForConfigOrDie(c)
  566. cs.rbacV1 = rbacv1.NewForConfigOrDie(c)
  567. cs.rbacV1beta1 = rbacv1beta1.NewForConfigOrDie(c)
  568. cs.rbacV1alpha1 = rbacv1alpha1.NewForConfigOrDie(c)
  569. cs.schedulingV1alpha1 = schedulingv1alpha1.NewForConfigOrDie(c)
  570. cs.schedulingV1beta1 = schedulingv1beta1.NewForConfigOrDie(c)
  571. cs.schedulingV1 = schedulingv1.NewForConfigOrDie(c)
  572. cs.storageV1beta1 = storagev1beta1.NewForConfigOrDie(c)
  573. cs.storageV1 = storagev1.NewForConfigOrDie(c)
  574. cs.storageV1alpha1 = storagev1alpha1.NewForConfigOrDie(c)
  575. cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
  576. return &cs
  577. }
  578. // New creates a new Clientset for the given RESTClient.
  579. func New(c rest.Interface) *Clientset {
  580. var cs Clientset
  581. cs.admissionregistrationV1 = admissionregistrationv1.New(c)
  582. cs.admissionregistrationV1beta1 = admissionregistrationv1beta1.New(c)
  583. cs.internalV1alpha1 = internalv1alpha1.New(c)
  584. cs.appsV1 = appsv1.New(c)
  585. cs.appsV1beta1 = appsv1beta1.New(c)
  586. cs.appsV1beta2 = appsv1beta2.New(c)
  587. cs.authenticationV1 = authenticationv1.New(c)
  588. cs.authenticationV1beta1 = authenticationv1beta1.New(c)
  589. cs.authorizationV1 = authorizationv1.New(c)
  590. cs.authorizationV1beta1 = authorizationv1beta1.New(c)
  591. cs.autoscalingV1 = autoscalingv1.New(c)
  592. cs.autoscalingV2beta1 = autoscalingv2beta1.New(c)
  593. cs.autoscalingV2beta2 = autoscalingv2beta2.New(c)
  594. cs.batchV1 = batchv1.New(c)
  595. cs.batchV1beta1 = batchv1beta1.New(c)
  596. cs.certificatesV1 = certificatesv1.New(c)
  597. cs.certificatesV1beta1 = certificatesv1beta1.New(c)
  598. cs.coordinationV1beta1 = coordinationv1beta1.New(c)
  599. cs.coordinationV1 = coordinationv1.New(c)
  600. cs.coreV1 = corev1.New(c)
  601. cs.discoveryV1 = discoveryv1.New(c)
  602. cs.discoveryV1beta1 = discoveryv1beta1.New(c)
  603. cs.eventsV1 = eventsv1.New(c)
  604. cs.eventsV1beta1 = eventsv1beta1.New(c)
  605. cs.extensionsV1beta1 = extensionsv1beta1.New(c)
  606. cs.flowcontrolV1alpha1 = flowcontrolv1alpha1.New(c)
  607. cs.flowcontrolV1beta1 = flowcontrolv1beta1.New(c)
  608. cs.networkingV1 = networkingv1.New(c)
  609. cs.networkingV1beta1 = networkingv1beta1.New(c)
  610. cs.nodeV1 = nodev1.New(c)
  611. cs.nodeV1alpha1 = nodev1alpha1.New(c)
  612. cs.nodeV1beta1 = nodev1beta1.New(c)
  613. cs.policyV1 = policyv1.New(c)
  614. cs.policyV1beta1 = policyv1beta1.New(c)
  615. cs.rbacV1 = rbacv1.New(c)
  616. cs.rbacV1beta1 = rbacv1beta1.New(c)
  617. cs.rbacV1alpha1 = rbacv1alpha1.New(c)
  618. cs.schedulingV1alpha1 = schedulingv1alpha1.New(c)
  619. cs.schedulingV1beta1 = schedulingv1beta1.New(c)
  620. cs.schedulingV1 = schedulingv1.New(c)
  621. cs.storageV1beta1 = storagev1beta1.New(c)
  622. cs.storageV1 = storagev1.New(c)
  623. cs.storageV1alpha1 = storagev1alpha1.New(c)
  624. cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
  625. return &cs
  626. }