clientset.go 25 KB

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