// NewForConfig creates a new Clientset for the given config.
774968
func NewForConfig(c *rest.Config) (*Clientset, error) {
	configShallowCopy := *c
	if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
		configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
	}
	var cs Clientset
	var err error
	cs.fluxV1beta1, err = fluxv1beta1.NewForConfig(&configShallowCopy)
	if err != nil {
		return nil, err
	}
	cs.helmV1alpha2, err = helmv1alpha2.NewForConfig(&configShallowCopy)
	if err != nil {
		return nil, err
	}

	cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
	if err != nil {
		return nil, err
	}
	return &cs, nil
}
859499
func New(c rest.Interface) *Clientset {
	var cs Clientset
	cs.exampleV1 = examplev1.New(c)

	cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
	return &cs
}
560731
func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
	if config == nil {
		return nil, errors.New("ns1: the configuration of the DNS provider is nil")
	}

	if config.APIKey == "" {
		return nil, fmt.Errorf("ns1: credentials missing")
	}

	client := rest.NewClient(config.HTTPClient, rest.SetAPIKey(config.APIKey))

	return &DNSProvider{client: client, config: config}, nil
}
1146557
func NewForConfig(c *rest.Config) (*Clientset, error) {
	configShallowCopy := *c
	if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
		configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
	}
	var cs Clientset
	var err error
	cs.metricsV1alpha1, err = metricsv1alpha1.NewForConfig(&configShallowCopy)
	if err != nil {
		return nil, err
	}
	cs.metricsV1beta1, err = metricsv1beta1.NewForConfig(&configShallowCopy)
	if err != nil {
		return nil, err
	}

	cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
	if err != nil {
		return nil, err
	}
	return &cs, nil
}
1037146
func New(c rest.Interface) *Clientset {
	var cs Clientset
	cs.security = securityinternalversion.New(c)

	cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
	return &cs
}
344467
func New(c rest.Interface) *Clientset {
	var cs Clientset
	cs.admissionregistrationV1beta1 = admissionregistrationv1beta1.New(c)
	cs.appsV1 = appsv1.New(c)
	cs.appsV1beta1 = appsv1beta1.New(c)
	cs.appsV1beta2 = appsv1beta2.New(c)
	cs.auditregistrationV1alpha1 = auditregistrationv1alpha1.New(c)
	cs.authenticationV1 = authenticationv1.New(c)
	cs.authenticationV1beta1 = authenticationv1beta1.New(c)
	cs.authorizationV1 = authorizationv1.New(c)
	cs.authorizationV1beta1 = authorizationv1beta1.New(c)
	cs.autoscalingV1 = autoscalingv1.New(c)
	cs.autoscalingV2beta1 = autoscalingv2beta1.New(c)
	cs.autoscalingV2beta2 = autoscalingv2beta2.New(c)
	cs.batchV1 = batchv1.New(c)
	cs.batchV1beta1 = batchv1beta1.New(c)
	cs.batchV2alpha1 = batchv2alpha1.New(c)
	cs.certificatesV1beta1 = certificatesv1beta1.New(c)
	cs.coordinationV1beta1 = coordinationv1beta1.New(c)
	cs.coordinationV1 = coordinationv1.New(c)
	cs.coreV1 = corev1.New(c)
	cs.eventsV1beta1 = eventsv1beta1.New(c)
	cs.extensionsV1beta1 = extensionsv1beta1.New(c)
	cs.networkingV1 = networkingv1.New(c)
	cs.networkingV1beta1 = networkingv1beta1.New(c)
	cs.nodeV1alpha1 = nodev1alpha1.New(c)
	cs.nodeV1beta1 = nodev1beta1.New(c)
	cs.policyV1beta1 = policyv1beta1.New(c)
	cs.rbacV1 = rbacv1.New(c)
	cs.rbacV1beta1 = rbacv1beta1.New(c)
	cs.rbacV1alpha1 = rbacv1alpha1.New(c)
	cs.schedulingV1alpha1 = schedulingv1alpha1.New(c)
	cs.schedulingV1beta1 = schedulingv1beta1.New(c)
	cs.schedulingV1 = schedulingv1.New(c)
	cs.settingsV1alpha1 = settingsv1alpha1.New(c)
	cs.storageV1beta1 = storagev1beta1.New(c)
	cs.storageV1 = storagev1.New(c)
	cs.storageV1alpha1 = storagev1alpha1.New(c)

	cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
	return &cs
}
1021414
func NewForConfig(baseConfig *rest.Config, mapper meta.RESTMapper, availableAPIs AvailableAPIsGetter) CustomMetricsClient {
	return &multiClient{
		clients:       make(map[schema.GroupVersion]CustomMetricsClient),
		availableAPIs: availableAPIs,

		newClient: func(ver schema.GroupVersion) (CustomMetricsClient, error) {
			return NewForVersionForConfig(rest.CopyConfig(baseConfig), mapper, ver)
		},
	}
}
577464
func New(c rest.Interface) *Clientset {
	var cs Clientset
	cs.fluxV1beta1 = fluxv1beta1.New(c)
	cs.helmV1alpha2 = helmv1alpha2.New(c)

	cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
	return &cs
}
924378
func NewClientFromConfig(cfg HTTPClientConfig, name string) (*http.Client, error) {
	rt, err := NewRoundTripperFromConfig(cfg, name)
	if err != nil {
		return nil, err
	}
	return newClient(rt), nil
}
1074540
func New(c rest.Interface) *Clientset {
	var cs Clientset
	cs.smithV1 = smithv1.New(c)

	cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
	return &cs
}
476592
func NewClientFromConfig(cfg *config.Config) (*Client, error) {
	options, err := configToOptions(cfg)
	if err != nil {
		return nil, err
	}
	return DialContext(context.Background(), options...)
}
1356794
func NewConfig() *Config {
	c := new(Config)
	c.Incoming.Port = defaultPort
	return c
}
1286591
func New(c rest.Interface) *Clientset {
	var cs Clientset
	cs.route = routeinternalversion.New(c)

	cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
	return &cs
}
265584
func New(c rest.Interface) *Clientset {
	var cs Clientset
	cs.apiextensions = apiextensionsinternalversion.New(c)

	cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
	return &cs
}
831919
func NewForConfig(inConfig *rest.Config) (Interface, error) {
	config := ConfigFor(inConfig)
	// for serializing the options
	config.GroupVersion = &schema.GroupVersion{}
	config.APIPath = "/if-you-see-this-search-for-the-break"

	restClient, err := rest.RESTClientFor(config)
	if err != nil {
		return nil, err
	}

	return &dynamicClient{client: restClient}, nil
}
231390
func NewForConfig(c *rest.Config) (*ApiregistrationClient, error) {
	config := *c
	if err := setConfigDefaults(&config); err != nil {
		return nil, err
	}
	client, err := rest.RESTClientFor(&config)
	if err != nil {
		return nil, err
	}
	return &ApiregistrationClient{client}, nil
}
780709
func NewConfig() Config {
	return Config{
		MaxConcurrentOpens: DefaultMaxConcurrentOpens,
		MADVWillNeed:       DefaultMADVWillNeed,

		Cache: CacheConfig{
			MaxMemorySize:             toml.Size(DefaultCacheMaxMemorySize),
			SnapshotMemorySize:        toml.Size(DefaultCacheSnapshotMemorySize),
			SnapshotWriteColdDuration: toml.Duration(DefaultCacheSnapshotWriteColdDuration),
		},
		Compaction: CompactionConfig{
			FullWriteColdDuration: toml.Duration(DefaultCompactFullWriteColdDuration),
			Throughput:            toml.Size(DefaultCompactThroughput),
			ThroughputBurst:       toml.Size(DefaultCompactThroughputBurst),
			MaxConcurrent:         DefaultCompactMaxConcurrent,
		},
	}
}