k8s.io/client-go@v0.22.2/kubernetes/clientset.go (about)

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