From e127fffea0b682231c55dfb348eed54d19fc625a Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Thu, 12 Jan 2023 00:04:35 -0800 Subject: [PATCH 1/3] Remove deprecated generated clients --- .../client/clientset/deprecated/clientset.go | 110 ----------- .../deprecated/fake/clientset_generated.go | 89 --------- .../client/clientset/deprecated/fake/doc.go | 20 -- .../clientset/deprecated/fake/register.go | 58 ------ .../client/clientset/deprecated/scheme/doc.go | 20 -- .../clientset/deprecated/scheme/register.go | 58 ------ .../apiextensions/v1/apiextensions_client.go | 89 --------- .../v1/customresourcedefinition.go | 181 ------------------ .../deprecated/typed/apiextensions/v1/doc.go | 20 -- .../typed/apiextensions/v1/fake/doc.go | 20 -- .../v1/fake/fake_apiextensions_client.go | 40 ---- .../v1/fake/fake_customresourcedefinition.go | 131 ------------- .../apiextensions/v1/generated_expansion.go | 21 -- .../v1beta1/apiextensions_client.go | 89 --------- .../v1beta1/customresourcedefinition.go | 181 ------------------ .../typed/apiextensions/v1beta1/doc.go | 20 -- .../typed/apiextensions/v1beta1/fake/doc.go | 20 -- .../v1beta1/fake/fake_apiextensions_client.go | 40 ---- .../fake/fake_customresourcedefinition.go | 131 ------------- .../v1beta1/generated_expansion.go | 21 -- .../deprecated/clientset.go | 110 ----------- .../deprecated/fake/clientset_generated.go | 89 --------- .../deprecated/fake/doc.go | 20 -- .../deprecated/fake/register.go | 58 ------ .../deprecated/scheme/doc.go | 20 -- .../deprecated/scheme/register.go | 58 ------ .../v1/apiregistration_client.go | 89 --------- .../typed/apiregistration/v1/apiservice.go | 181 ------------------ .../typed/apiregistration/v1/doc.go | 20 -- .../typed/apiregistration/v1/fake/doc.go | 20 -- .../v1/fake/fake_apiregistration_client.go | 40 ---- .../v1/fake/fake_apiservice.go | 131 ------------- .../apiregistration/v1/generated_expansion.go | 21 -- .../v1beta1/apiregistration_client.go | 89 --------- .../apiregistration/v1beta1/apiservice.go | 181 ------------------ .../typed/apiregistration/v1beta1/doc.go | 20 -- .../typed/apiregistration/v1beta1/fake/doc.go | 20 -- .../fake/fake_apiregistration_client.go | 40 ---- .../v1beta1/fake/fake_apiservice.go | 131 ------------- .../v1beta1/generated_expansion.go | 21 -- .../client/clientset/deprecated/clientset.go | 110 ----------- .../deprecated/fake/clientset_generated.go | 89 --------- .../client/clientset/deprecated/fake/doc.go | 20 -- .../clientset/deprecated/fake/register.go | 58 ------ .../client/clientset/deprecated/scheme/doc.go | 20 -- .../clientset/deprecated/scheme/register.go | 58 ------ .../deprecated/typed/metrics/v1alpha1/doc.go | 20 -- .../typed/metrics/v1alpha1/fake/doc.go | 20 -- .../v1alpha1/fake/fake_metrics_client.go | 44 ----- .../metrics/v1alpha1/fake/fake_nodemetrics.go | 74 ------- .../metrics/v1alpha1/fake/fake_podmetrics.go | 78 -------- .../metrics/v1alpha1/generated_expansion.go | 23 --- .../typed/metrics/v1alpha1/metrics_client.go | 94 --------- .../typed/metrics/v1alpha1/nodemetrics.go | 98 ---------- .../typed/metrics/v1alpha1/podmetrics.go | 103 ---------- .../deprecated/typed/metrics/v1beta1/doc.go | 20 -- .../typed/metrics/v1beta1/fake/doc.go | 20 -- .../v1beta1/fake/fake_metrics_client.go | 44 ----- .../metrics/v1beta1/fake/fake_nodemetrics.go | 74 ------- .../metrics/v1beta1/fake/fake_podmetrics.go | 78 -------- .../metrics/v1beta1/generated_expansion.go | 23 --- .../typed/metrics/v1beta1/metrics_client.go | 94 --------- .../typed/metrics/v1beta1/nodemetrics.go | 98 ---------- .../typed/metrics/v1beta1/podmetrics.go | 103 ---------- 64 files changed, 4181 deletions(-) delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/clientset.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/fake/clientset_generated.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/fake/doc.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/fake/register.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/scheme/doc.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/scheme/register.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/apiextensions_client.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/customresourcedefinition.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/doc.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/fake/doc.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/fake/fake_apiextensions_client.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/fake/fake_customresourcedefinition.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/generated_expansion.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/apiextensions_client.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/customresourcedefinition.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/doc.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/fake/doc.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/fake/fake_apiextensions_client.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go delete mode 100644 staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/generated_expansion.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/clientset.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/fake/clientset_generated.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/fake/doc.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/fake/register.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/scheme/doc.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/scheme/register.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/apiregistration_client.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/apiservice.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/doc.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/fake/doc.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/fake/fake_apiregistration_client.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/fake/fake_apiservice.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/generated_expansion.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/apiregistration_client.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/apiservice.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/doc.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/fake/doc.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/fake/fake_apiregistration_client.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/fake/fake_apiservice.go delete mode 100644 staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/generated_expansion.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/clientset.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/fake/clientset_generated.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/fake/doc.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/fake/register.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/scheme/doc.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/scheme/register.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/doc.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/doc.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/fake_metrics_client.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/fake_nodemetrics.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/fake_podmetrics.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/generated_expansion.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/metrics_client.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/nodemetrics.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/podmetrics.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/doc.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/doc.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/fake_metrics_client.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/fake_nodemetrics.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/fake_podmetrics.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/generated_expansion.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/metrics_client.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/nodemetrics.go delete mode 100644 staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/podmetrics.go diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/clientset.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/clientset.go deleted file mode 100644 index 08f85b765e4..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/clientset.go +++ /dev/null @@ -1,110 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package deprecated - -import ( - "fmt" - - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1" - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - ApiextensionsV1beta1() apiextensionsv1beta1.ApiextensionsV1beta1Interface - ApiextensionsV1() apiextensionsv1.ApiextensionsV1Interface -} - -// Clientset contains the clients for groups. -type Clientset struct { - *discovery.DiscoveryClient - apiextensionsV1beta1 *apiextensionsv1beta1.ApiextensionsV1beta1Client - apiextensionsV1 *apiextensionsv1.ApiextensionsV1Client -} - -// ApiextensionsV1beta1 retrieves the ApiextensionsV1beta1Client -func (c *Clientset) ApiextensionsV1beta1() apiextensionsv1beta1.ApiextensionsV1beta1Interface { - return c.apiextensionsV1beta1 -} - -// ApiextensionsV1 retrieves the ApiextensionsV1Client -func (c *Clientset) ApiextensionsV1() apiextensionsv1.ApiextensionsV1Interface { - return c.apiextensionsV1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - 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") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.apiextensionsV1beta1, err = apiextensionsv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.apiextensionsV1, err = apiextensionsv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - var cs Clientset - cs.apiextensionsV1beta1 = apiextensionsv1beta1.NewForConfigOrDie(c) - cs.apiextensionsV1 = apiextensionsv1.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.apiextensionsV1beta1 = apiextensionsv1beta1.New(c) - cs.apiextensionsV1 = apiextensionsv1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/fake/clientset_generated.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/fake/clientset_generated.go deleted file mode 100644 index a49f1728ecb..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/fake/clientset_generated.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - clientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1" - fakeapiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/fake" - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1" - fakeapiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/fake" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/discovery" - fakediscovery "k8s.io/client-go/discovery/fake" - "k8s.io/client-go/testing" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var _ clientset.Interface = &Clientset{} - -// ApiextensionsV1beta1 retrieves the ApiextensionsV1beta1Client -func (c *Clientset) ApiextensionsV1beta1() apiextensionsv1beta1.ApiextensionsV1beta1Interface { - return &fakeapiextensionsv1beta1.FakeApiextensionsV1beta1{Fake: &c.Fake} -} - -// ApiextensionsV1 retrieves the ApiextensionsV1Client -func (c *Clientset) ApiextensionsV1() apiextensionsv1.ApiextensionsV1Interface { - return &fakeapiextensionsv1.FakeApiextensionsV1{Fake: &c.Fake} -} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/fake/doc.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/fake/doc.go deleted file mode 100644 index 9b99e716709..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/fake/register.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/fake/register.go deleted file mode 100644 index 16dccfca5ab..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/fake/register.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) -var parameterCodec = runtime.NewParameterCodec(scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - apiextensionsv1beta1.AddToScheme, - apiextensionsv1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/scheme/doc.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/scheme/doc.go deleted file mode 100644 index 7dc3756168f..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/scheme/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/scheme/register.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/scheme/register.go deleted file mode 100644 index 25fca99178b..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/scheme/register.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - apiextensionsv1beta1.AddToScheme, - apiextensionsv1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/apiextensions_client.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/apiextensions_client.go deleted file mode 100644 index b39a79a4973..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/apiextensions_client.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - "k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/scheme" - rest "k8s.io/client-go/rest" -) - -type ApiextensionsV1Interface interface { - RESTClient() rest.Interface - CustomResourceDefinitionsGetter -} - -// ApiextensionsV1Client is used to interact with features provided by the apiextensions.k8s.io group. -type ApiextensionsV1Client struct { - restClient rest.Interface -} - -func (c *ApiextensionsV1Client) CustomResourceDefinitions() CustomResourceDefinitionInterface { - return newCustomResourceDefinitions(c) -} - -// NewForConfig creates a new ApiextensionsV1Client for the given config. -func NewForConfig(c *rest.Config) (*ApiextensionsV1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &ApiextensionsV1Client{client}, nil -} - -// NewForConfigOrDie creates a new ApiextensionsV1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ApiextensionsV1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new ApiextensionsV1Client for the given RESTClient. -func New(c rest.Interface) *ApiextensionsV1Client { - return &ApiextensionsV1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *ApiextensionsV1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/customresourcedefinition.go deleted file mode 100644 index dcb447e3b21..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/customresourcedefinition.go +++ /dev/null @@ -1,181 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - "time" - - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - scheme "k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CustomResourceDefinitionsGetter has a method to return a CustomResourceDefinitionInterface. -// A group's client should implement this interface. -type CustomResourceDefinitionsGetter interface { - CustomResourceDefinitions() CustomResourceDefinitionInterface -} - -// CustomResourceDefinitionInterface has methods to work with CustomResourceDefinition resources. -type CustomResourceDefinitionInterface interface { - Create(*v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error) - Update(*v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error) - UpdateStatus(*v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.CustomResourceDefinition, error) - List(opts metav1.ListOptions) (*v1.CustomResourceDefinitionList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CustomResourceDefinition, err error) - CustomResourceDefinitionExpansion -} - -// customResourceDefinitions implements CustomResourceDefinitionInterface -type customResourceDefinitions struct { - client rest.Interface -} - -// newCustomResourceDefinitions returns a CustomResourceDefinitions -func newCustomResourceDefinitions(c *ApiextensionsV1Client) *customResourceDefinitions { - return &customResourceDefinitions{ - client: c.RESTClient(), - } -} - -// Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any. -func (c *customResourceDefinitions) Get(name string, options metav1.GetOptions) (result *v1.CustomResourceDefinition, err error) { - result = &v1.CustomResourceDefinition{} - err = c.client.Get(). - Resource("customresourcedefinitions"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(context.TODO()). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors. -func (c *customResourceDefinitions) List(opts metav1.ListOptions) (result *v1.CustomResourceDefinitionList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.CustomResourceDefinitionList{} - err = c.client.Get(). - Resource("customresourcedefinitions"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(context.TODO()). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested customResourceDefinitions. -func (c *customResourceDefinitions) Watch(opts metav1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("customresourcedefinitions"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(context.TODO()) -} - -// Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *customResourceDefinitions) Create(customResourceDefinition *v1.CustomResourceDefinition) (result *v1.CustomResourceDefinition, err error) { - result = &v1.CustomResourceDefinition{} - err = c.client.Post(). - Resource("customresourcedefinitions"). - Body(customResourceDefinition). - Do(context.TODO()). - Into(result) - return -} - -// Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *customResourceDefinitions) Update(customResourceDefinition *v1.CustomResourceDefinition) (result *v1.CustomResourceDefinition, err error) { - result = &v1.CustomResourceDefinition{} - err = c.client.Put(). - Resource("customresourcedefinitions"). - Name(customResourceDefinition.Name). - Body(customResourceDefinition). - Do(context.TODO()). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *customResourceDefinitions) UpdateStatus(customResourceDefinition *v1.CustomResourceDefinition) (result *v1.CustomResourceDefinition, err error) { - result = &v1.CustomResourceDefinition{} - err = c.client.Put(). - Resource("customresourcedefinitions"). - Name(customResourceDefinition.Name). - SubResource("status"). - Body(customResourceDefinition). - Do(context.TODO()). - Into(result) - return -} - -// Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. -func (c *customResourceDefinitions) Delete(name string, options *metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("customresourcedefinitions"). - Name(name). - Body(options). - Do(context.TODO()). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *customResourceDefinitions) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("customresourcedefinitions"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(context.TODO()). - Error() -} - -// Patch applies the patch and returns the patched customResourceDefinition. -func (c *customResourceDefinitions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CustomResourceDefinition, err error) { - result = &v1.CustomResourceDefinition{} - err = c.client.Patch(pt). - Resource("customresourcedefinitions"). - SubResource(subresources...). - Name(name). - Body(data). - Do(context.TODO()). - Into(result) - return -} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/doc.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/doc.go deleted file mode 100644 index 3af5d054f10..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1 diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/fake/doc.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/fake/doc.go deleted file mode 100644 index 16f44399065..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/fake/fake_apiextensions_client.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/fake/fake_apiextensions_client.go deleted file mode 100644 index 9edec150404..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/fake/fake_apiextensions_client.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeApiextensionsV1 struct { - *testing.Fake -} - -func (c *FakeApiextensionsV1) CustomResourceDefinitions() v1.CustomResourceDefinitionInterface { - return &FakeCustomResourceDefinitions{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeApiextensionsV1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/fake/fake_customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/fake/fake_customresourcedefinition.go deleted file mode 100644 index cb410400508..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/fake/fake_customresourcedefinition.go +++ /dev/null @@ -1,131 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCustomResourceDefinitions implements CustomResourceDefinitionInterface -type FakeCustomResourceDefinitions struct { - Fake *FakeApiextensionsV1 -} - -var customresourcedefinitionsResource = schema.GroupVersionResource{Group: "apiextensions.k8s.io", Version: "v1", Resource: "customresourcedefinitions"} - -var customresourcedefinitionsKind = schema.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1", Kind: "CustomResourceDefinition"} - -// Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any. -func (c *FakeCustomResourceDefinitions) Get(name string, options v1.GetOptions) (result *apiextensionsv1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(customresourcedefinitionsResource, name), &apiextensionsv1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*apiextensionsv1.CustomResourceDefinition), err -} - -// List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors. -func (c *FakeCustomResourceDefinitions) List(opts v1.ListOptions) (result *apiextensionsv1.CustomResourceDefinitionList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(customresourcedefinitionsResource, customresourcedefinitionsKind, opts), &apiextensionsv1.CustomResourceDefinitionList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &apiextensionsv1.CustomResourceDefinitionList{ListMeta: obj.(*apiextensionsv1.CustomResourceDefinitionList).ListMeta} - for _, item := range obj.(*apiextensionsv1.CustomResourceDefinitionList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested customResourceDefinitions. -func (c *FakeCustomResourceDefinitions) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(customresourcedefinitionsResource, opts)) -} - -// Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Create(customResourceDefinition *apiextensionsv1.CustomResourceDefinition) (result *apiextensionsv1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(customresourcedefinitionsResource, customResourceDefinition), &apiextensionsv1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*apiextensionsv1.CustomResourceDefinition), err -} - -// Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Update(customResourceDefinition *apiextensionsv1.CustomResourceDefinition) (result *apiextensionsv1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(customresourcedefinitionsResource, customResourceDefinition), &apiextensionsv1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*apiextensionsv1.CustomResourceDefinition), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCustomResourceDefinitions) UpdateStatus(customResourceDefinition *apiextensionsv1.CustomResourceDefinition) (*apiextensionsv1.CustomResourceDefinition, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(customresourcedefinitionsResource, "status", customResourceDefinition), &apiextensionsv1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*apiextensionsv1.CustomResourceDefinition), err -} - -// Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. -func (c *FakeCustomResourceDefinitions) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(customresourcedefinitionsResource, name), &apiextensionsv1.CustomResourceDefinition{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCustomResourceDefinitions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(customresourcedefinitionsResource, listOptions) - - _, err := c.Fake.Invokes(action, &apiextensionsv1.CustomResourceDefinitionList{}) - return err -} - -// Patch applies the patch and returns the patched customResourceDefinition. -func (c *FakeCustomResourceDefinitions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apiextensionsv1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(customresourcedefinitionsResource, name, pt, data, subresources...), &apiextensionsv1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*apiextensionsv1.CustomResourceDefinition), err -} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/generated_expansion.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/generated_expansion.go deleted file mode 100644 index e594636af9a..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -type CustomResourceDefinitionExpansion interface{} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/apiextensions_client.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/apiextensions_client.go deleted file mode 100644 index 9472a18b221..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/apiextensions_client.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - "k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/scheme" - rest "k8s.io/client-go/rest" -) - -type ApiextensionsV1beta1Interface interface { - RESTClient() rest.Interface - CustomResourceDefinitionsGetter -} - -// ApiextensionsV1beta1Client is used to interact with features provided by the apiextensions.k8s.io group. -type ApiextensionsV1beta1Client struct { - restClient rest.Interface -} - -func (c *ApiextensionsV1beta1Client) CustomResourceDefinitions() CustomResourceDefinitionInterface { - return newCustomResourceDefinitions(c) -} - -// NewForConfig creates a new ApiextensionsV1beta1Client for the given config. -func NewForConfig(c *rest.Config) (*ApiextensionsV1beta1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &ApiextensionsV1beta1Client{client}, nil -} - -// NewForConfigOrDie creates a new ApiextensionsV1beta1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ApiextensionsV1beta1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new ApiextensionsV1beta1Client for the given RESTClient. -func New(c rest.Interface) *ApiextensionsV1beta1Client { - return &ApiextensionsV1beta1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1beta1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *ApiextensionsV1beta1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/customresourcedefinition.go deleted file mode 100644 index c2c8b18d788..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/customresourcedefinition.go +++ /dev/null @@ -1,181 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -import ( - "context" - "time" - - v1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - scheme "k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CustomResourceDefinitionsGetter has a method to return a CustomResourceDefinitionInterface. -// A group's client should implement this interface. -type CustomResourceDefinitionsGetter interface { - CustomResourceDefinitions() CustomResourceDefinitionInterface -} - -// CustomResourceDefinitionInterface has methods to work with CustomResourceDefinition resources. -type CustomResourceDefinitionInterface interface { - Create(*v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error) - Update(*v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error) - UpdateStatus(*v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.CustomResourceDefinition, error) - List(opts v1.ListOptions) (*v1beta1.CustomResourceDefinitionList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) - CustomResourceDefinitionExpansion -} - -// customResourceDefinitions implements CustomResourceDefinitionInterface -type customResourceDefinitions struct { - client rest.Interface -} - -// newCustomResourceDefinitions returns a CustomResourceDefinitions -func newCustomResourceDefinitions(c *ApiextensionsV1beta1Client) *customResourceDefinitions { - return &customResourceDefinitions{ - client: c.RESTClient(), - } -} - -// Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any. -func (c *customResourceDefinitions) Get(name string, options v1.GetOptions) (result *v1beta1.CustomResourceDefinition, err error) { - result = &v1beta1.CustomResourceDefinition{} - err = c.client.Get(). - Resource("customresourcedefinitions"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(context.TODO()). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors. -func (c *customResourceDefinitions) List(opts v1.ListOptions) (result *v1beta1.CustomResourceDefinitionList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1beta1.CustomResourceDefinitionList{} - err = c.client.Get(). - Resource("customresourcedefinitions"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(context.TODO()). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested customResourceDefinitions. -func (c *customResourceDefinitions) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("customresourcedefinitions"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(context.TODO()) -} - -// Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *customResourceDefinitions) Create(customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) { - result = &v1beta1.CustomResourceDefinition{} - err = c.client.Post(). - Resource("customresourcedefinitions"). - Body(customResourceDefinition). - Do(context.TODO()). - Into(result) - return -} - -// Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *customResourceDefinitions) Update(customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) { - result = &v1beta1.CustomResourceDefinition{} - err = c.client.Put(). - Resource("customresourcedefinitions"). - Name(customResourceDefinition.Name). - Body(customResourceDefinition). - Do(context.TODO()). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *customResourceDefinitions) UpdateStatus(customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) { - result = &v1beta1.CustomResourceDefinition{} - err = c.client.Put(). - Resource("customresourcedefinitions"). - Name(customResourceDefinition.Name). - SubResource("status"). - Body(customResourceDefinition). - Do(context.TODO()). - Into(result) - return -} - -// Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. -func (c *customResourceDefinitions) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("customresourcedefinitions"). - Name(name). - Body(options). - Do(context.TODO()). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *customResourceDefinitions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("customresourcedefinitions"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(context.TODO()). - Error() -} - -// Patch applies the patch and returns the patched customResourceDefinition. -func (c *customResourceDefinitions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) { - result = &v1beta1.CustomResourceDefinition{} - err = c.client.Patch(pt). - Resource("customresourcedefinitions"). - SubResource(subresources...). - Name(name). - Body(data). - Do(context.TODO()). - Into(result) - return -} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/doc.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/doc.go deleted file mode 100644 index 771101956f3..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1beta1 diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/fake/doc.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/fake/doc.go deleted file mode 100644 index 16f44399065..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/fake/fake_apiextensions_client.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/fake/fake_apiextensions_client.go deleted file mode 100644 index de86c9368d8..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/fake/fake_apiextensions_client.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1beta1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeApiextensionsV1beta1 struct { - *testing.Fake -} - -func (c *FakeApiextensionsV1beta1) CustomResourceDefinitions() v1beta1.CustomResourceDefinitionInterface { - return &FakeCustomResourceDefinitions{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeApiextensionsV1beta1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go deleted file mode 100644 index bd5ffe4c3c5..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go +++ /dev/null @@ -1,131 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCustomResourceDefinitions implements CustomResourceDefinitionInterface -type FakeCustomResourceDefinitions struct { - Fake *FakeApiextensionsV1beta1 -} - -var customresourcedefinitionsResource = schema.GroupVersionResource{Group: "apiextensions.k8s.io", Version: "v1beta1", Resource: "customresourcedefinitions"} - -var customresourcedefinitionsKind = schema.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1beta1", Kind: "CustomResourceDefinition"} - -// Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any. -func (c *FakeCustomResourceDefinitions) Get(name string, options v1.GetOptions) (result *v1beta1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(customresourcedefinitionsResource, name), &v1beta1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.CustomResourceDefinition), err -} - -// List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors. -func (c *FakeCustomResourceDefinitions) List(opts v1.ListOptions) (result *v1beta1.CustomResourceDefinitionList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(customresourcedefinitionsResource, customresourcedefinitionsKind, opts), &v1beta1.CustomResourceDefinitionList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1beta1.CustomResourceDefinitionList{ListMeta: obj.(*v1beta1.CustomResourceDefinitionList).ListMeta} - for _, item := range obj.(*v1beta1.CustomResourceDefinitionList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested customResourceDefinitions. -func (c *FakeCustomResourceDefinitions) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(customresourcedefinitionsResource, opts)) -} - -// Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Create(customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(customresourcedefinitionsResource, customResourceDefinition), &v1beta1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.CustomResourceDefinition), err -} - -// Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Update(customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(customresourcedefinitionsResource, customResourceDefinition), &v1beta1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.CustomResourceDefinition), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCustomResourceDefinitions) UpdateStatus(customResourceDefinition *v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(customresourcedefinitionsResource, "status", customResourceDefinition), &v1beta1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.CustomResourceDefinition), err -} - -// Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. -func (c *FakeCustomResourceDefinitions) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(customresourcedefinitionsResource, name), &v1beta1.CustomResourceDefinition{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCustomResourceDefinitions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(customresourcedefinitionsResource, listOptions) - - _, err := c.Fake.Invokes(action, &v1beta1.CustomResourceDefinitionList{}) - return err -} - -// Patch applies the patch and returns the patched customResourceDefinition. -func (c *FakeCustomResourceDefinitions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(customresourcedefinitionsResource, name, pt, data, subresources...), &v1beta1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.CustomResourceDefinition), err -} diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/generated_expansion.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/generated_expansion.go deleted file mode 100644 index 2a989d4beaf..00000000000 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/deprecated/typed/apiextensions/v1beta1/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -type CustomResourceDefinitionExpansion interface{} diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/clientset.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/clientset.go deleted file mode 100644 index da2c7e560a9..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/clientset.go +++ /dev/null @@ -1,110 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package deprecated - -import ( - "fmt" - - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" - apiregistrationv1 "k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1" - apiregistrationv1beta1 "k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - ApiregistrationV1beta1() apiregistrationv1beta1.ApiregistrationV1beta1Interface - ApiregistrationV1() apiregistrationv1.ApiregistrationV1Interface -} - -// Clientset contains the clients for groups. -type Clientset struct { - *discovery.DiscoveryClient - apiregistrationV1beta1 *apiregistrationv1beta1.ApiregistrationV1beta1Client - apiregistrationV1 *apiregistrationv1.ApiregistrationV1Client -} - -// ApiregistrationV1beta1 retrieves the ApiregistrationV1beta1Client -func (c *Clientset) ApiregistrationV1beta1() apiregistrationv1beta1.ApiregistrationV1beta1Interface { - return c.apiregistrationV1beta1 -} - -// ApiregistrationV1 retrieves the ApiregistrationV1Client -func (c *Clientset) ApiregistrationV1() apiregistrationv1.ApiregistrationV1Interface { - return c.apiregistrationV1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - 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") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.apiregistrationV1beta1, err = apiregistrationv1beta1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.apiregistrationV1, err = apiregistrationv1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - var cs Clientset - cs.apiregistrationV1beta1 = apiregistrationv1beta1.NewForConfigOrDie(c) - cs.apiregistrationV1 = apiregistrationv1.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.apiregistrationV1beta1 = apiregistrationv1beta1.New(c) - cs.apiregistrationV1 = apiregistrationv1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/fake/clientset_generated.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/fake/clientset_generated.go deleted file mode 100644 index a505722a9f2..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/fake/clientset_generated.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/discovery" - fakediscovery "k8s.io/client-go/discovery/fake" - "k8s.io/client-go/testing" - clientset "k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated" - apiregistrationv1 "k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1" - fakeapiregistrationv1 "k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/fake" - apiregistrationv1beta1 "k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1" - fakeapiregistrationv1beta1 "k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/fake" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var _ clientset.Interface = &Clientset{} - -// ApiregistrationV1beta1 retrieves the ApiregistrationV1beta1Client -func (c *Clientset) ApiregistrationV1beta1() apiregistrationv1beta1.ApiregistrationV1beta1Interface { - return &fakeapiregistrationv1beta1.FakeApiregistrationV1beta1{Fake: &c.Fake} -} - -// ApiregistrationV1 retrieves the ApiregistrationV1Client -func (c *Clientset) ApiregistrationV1() apiregistrationv1.ApiregistrationV1Interface { - return &fakeapiregistrationv1.FakeApiregistrationV1{Fake: &c.Fake} -} diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/fake/doc.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/fake/doc.go deleted file mode 100644 index 9b99e716709..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/fake/register.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/fake/register.go deleted file mode 100644 index 3d8761b6d60..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/fake/register.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" - apiregistrationv1beta1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) -var parameterCodec = runtime.NewParameterCodec(scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - apiregistrationv1beta1.AddToScheme, - apiregistrationv1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/scheme/doc.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/scheme/doc.go deleted file mode 100644 index 7dc3756168f..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/scheme/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/scheme/register.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/scheme/register.go deleted file mode 100644 index a4ef5421d07..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/scheme/register.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" - apiregistrationv1beta1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - apiregistrationv1beta1.AddToScheme, - apiregistrationv1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/apiregistration_client.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/apiregistration_client.go deleted file mode 100644 index e53f806c638..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/apiregistration_client.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - rest "k8s.io/client-go/rest" - v1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" - "k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/scheme" -) - -type ApiregistrationV1Interface interface { - RESTClient() rest.Interface - APIServicesGetter -} - -// ApiregistrationV1Client is used to interact with features provided by the apiregistration.k8s.io group. -type ApiregistrationV1Client struct { - restClient rest.Interface -} - -func (c *ApiregistrationV1Client) APIServices() APIServiceInterface { - return newAPIServices(c) -} - -// NewForConfig creates a new ApiregistrationV1Client for the given config. -func NewForConfig(c *rest.Config) (*ApiregistrationV1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &ApiregistrationV1Client{client}, nil -} - -// NewForConfigOrDie creates a new ApiregistrationV1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ApiregistrationV1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new ApiregistrationV1Client for the given RESTClient. -func New(c rest.Interface) *ApiregistrationV1Client { - return &ApiregistrationV1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *ApiregistrationV1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/apiservice.go deleted file mode 100644 index da3a6457bca..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/apiservice.go +++ /dev/null @@ -1,181 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - v1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" - scheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/scheme" -) - -// APIServicesGetter has a method to return a APIServiceInterface. -// A group's client should implement this interface. -type APIServicesGetter interface { - APIServices() APIServiceInterface -} - -// APIServiceInterface has methods to work with APIService resources. -type APIServiceInterface interface { - Create(*v1.APIService) (*v1.APIService, error) - Update(*v1.APIService) (*v1.APIService, error) - UpdateStatus(*v1.APIService) (*v1.APIService, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(name string, options metav1.GetOptions) (*v1.APIService, error) - List(opts metav1.ListOptions) (*v1.APIServiceList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.APIService, err error) - APIServiceExpansion -} - -// aPIServices implements APIServiceInterface -type aPIServices struct { - client rest.Interface -} - -// newAPIServices returns a APIServices -func newAPIServices(c *ApiregistrationV1Client) *aPIServices { - return &aPIServices{ - client: c.RESTClient(), - } -} - -// Get takes name of the aPIService, and returns the corresponding aPIService object, and an error if there is any. -func (c *aPIServices) Get(name string, options metav1.GetOptions) (result *v1.APIService, err error) { - result = &v1.APIService{} - err = c.client.Get(). - Resource("apiservices"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(context.TODO()). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of APIServices that match those selectors. -func (c *aPIServices) List(opts metav1.ListOptions) (result *v1.APIServiceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.APIServiceList{} - err = c.client.Get(). - Resource("apiservices"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(context.TODO()). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested aPIServices. -func (c *aPIServices) Watch(opts metav1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("apiservices"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(context.TODO()) -} - -// Create takes the representation of a aPIService and creates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *aPIServices) Create(aPIService *v1.APIService) (result *v1.APIService, err error) { - result = &v1.APIService{} - err = c.client.Post(). - Resource("apiservices"). - Body(aPIService). - Do(context.TODO()). - Into(result) - return -} - -// Update takes the representation of a aPIService and updates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *aPIServices) Update(aPIService *v1.APIService) (result *v1.APIService, err error) { - result = &v1.APIService{} - err = c.client.Put(). - Resource("apiservices"). - Name(aPIService.Name). - Body(aPIService). - Do(context.TODO()). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *aPIServices) UpdateStatus(aPIService *v1.APIService) (result *v1.APIService, err error) { - result = &v1.APIService{} - err = c.client.Put(). - Resource("apiservices"). - Name(aPIService.Name). - SubResource("status"). - Body(aPIService). - Do(context.TODO()). - Into(result) - return -} - -// Delete takes name of the aPIService and deletes it. Returns an error if one occurs. -func (c *aPIServices) Delete(name string, options *metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("apiservices"). - Name(name). - Body(options). - Do(context.TODO()). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *aPIServices) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("apiservices"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(context.TODO()). - Error() -} - -// Patch applies the patch and returns the patched aPIService. -func (c *aPIServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.APIService, err error) { - result = &v1.APIService{} - err = c.client.Patch(pt). - Resource("apiservices"). - SubResource(subresources...). - Name(name). - Body(data). - Do(context.TODO()). - Into(result) - return -} diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/doc.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/doc.go deleted file mode 100644 index 3af5d054f10..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1 diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/fake/doc.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/fake/doc.go deleted file mode 100644 index 16f44399065..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/fake/fake_apiregistration_client.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/fake/fake_apiregistration_client.go deleted file mode 100644 index 71f9b7c2a02..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/fake/fake_apiregistration_client.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - v1 "k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1" -) - -type FakeApiregistrationV1 struct { - *testing.Fake -} - -func (c *FakeApiregistrationV1) APIServices() v1.APIServiceInterface { - return &FakeAPIServices{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeApiregistrationV1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/fake/fake_apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/fake/fake_apiservice.go deleted file mode 100644 index c184bf7e0d5..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/fake/fake_apiservice.go +++ /dev/null @@ -1,131 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" -) - -// FakeAPIServices implements APIServiceInterface -type FakeAPIServices struct { - Fake *FakeApiregistrationV1 -} - -var apiservicesResource = schema.GroupVersionResource{Group: "apiregistration.k8s.io", Version: "v1", Resource: "apiservices"} - -var apiservicesKind = schema.GroupVersionKind{Group: "apiregistration.k8s.io", Version: "v1", Kind: "APIService"} - -// Get takes name of the aPIService, and returns the corresponding aPIService object, and an error if there is any. -func (c *FakeAPIServices) Get(name string, options v1.GetOptions) (result *apiregistrationv1.APIService, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(apiservicesResource, name), &apiregistrationv1.APIService{}) - if obj == nil { - return nil, err - } - return obj.(*apiregistrationv1.APIService), err -} - -// List takes label and field selectors, and returns the list of APIServices that match those selectors. -func (c *FakeAPIServices) List(opts v1.ListOptions) (result *apiregistrationv1.APIServiceList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(apiservicesResource, apiservicesKind, opts), &apiregistrationv1.APIServiceList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &apiregistrationv1.APIServiceList{ListMeta: obj.(*apiregistrationv1.APIServiceList).ListMeta} - for _, item := range obj.(*apiregistrationv1.APIServiceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested aPIServices. -func (c *FakeAPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(apiservicesResource, opts)) -} - -// Create takes the representation of a aPIService and creates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *FakeAPIServices) Create(aPIService *apiregistrationv1.APIService) (result *apiregistrationv1.APIService, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(apiservicesResource, aPIService), &apiregistrationv1.APIService{}) - if obj == nil { - return nil, err - } - return obj.(*apiregistrationv1.APIService), err -} - -// Update takes the representation of a aPIService and updates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *FakeAPIServices) Update(aPIService *apiregistrationv1.APIService) (result *apiregistrationv1.APIService, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(apiservicesResource, aPIService), &apiregistrationv1.APIService{}) - if obj == nil { - return nil, err - } - return obj.(*apiregistrationv1.APIService), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeAPIServices) UpdateStatus(aPIService *apiregistrationv1.APIService) (*apiregistrationv1.APIService, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(apiservicesResource, "status", aPIService), &apiregistrationv1.APIService{}) - if obj == nil { - return nil, err - } - return obj.(*apiregistrationv1.APIService), err -} - -// Delete takes name of the aPIService and deletes it. Returns an error if one occurs. -func (c *FakeAPIServices) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(apiservicesResource, name), &apiregistrationv1.APIService{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeAPIServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(apiservicesResource, listOptions) - - _, err := c.Fake.Invokes(action, &apiregistrationv1.APIServiceList{}) - return err -} - -// Patch applies the patch and returns the patched aPIService. -func (c *FakeAPIServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apiregistrationv1.APIService, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(apiservicesResource, name, pt, data, subresources...), &apiregistrationv1.APIService{}) - if obj == nil { - return nil, err - } - return obj.(*apiregistrationv1.APIService), err -} diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/generated_expansion.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/generated_expansion.go deleted file mode 100644 index 87aa187160e..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -type APIServiceExpansion interface{} diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/apiregistration_client.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/apiregistration_client.go deleted file mode 100644 index 6e76f91db61..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/apiregistration_client.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -import ( - rest "k8s.io/client-go/rest" - v1beta1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" - "k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/scheme" -) - -type ApiregistrationV1beta1Interface interface { - RESTClient() rest.Interface - APIServicesGetter -} - -// ApiregistrationV1beta1Client is used to interact with features provided by the apiregistration.k8s.io group. -type ApiregistrationV1beta1Client struct { - restClient rest.Interface -} - -func (c *ApiregistrationV1beta1Client) APIServices() APIServiceInterface { - return newAPIServices(c) -} - -// NewForConfig creates a new ApiregistrationV1beta1Client for the given config. -func NewForConfig(c *rest.Config) (*ApiregistrationV1beta1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &ApiregistrationV1beta1Client{client}, nil -} - -// NewForConfigOrDie creates a new ApiregistrationV1beta1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ApiregistrationV1beta1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new ApiregistrationV1beta1Client for the given RESTClient. -func New(c rest.Interface) *ApiregistrationV1beta1Client { - return &ApiregistrationV1beta1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1beta1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *ApiregistrationV1beta1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/apiservice.go deleted file mode 100644 index b92b246e1f6..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/apiservice.go +++ /dev/null @@ -1,181 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -import ( - "context" - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - v1beta1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" - scheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/scheme" -) - -// APIServicesGetter has a method to return a APIServiceInterface. -// A group's client should implement this interface. -type APIServicesGetter interface { - APIServices() APIServiceInterface -} - -// APIServiceInterface has methods to work with APIService resources. -type APIServiceInterface interface { - Create(*v1beta1.APIService) (*v1beta1.APIService, error) - Update(*v1beta1.APIService) (*v1beta1.APIService, error) - UpdateStatus(*v1beta1.APIService) (*v1beta1.APIService, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1beta1.APIService, error) - List(opts v1.ListOptions) (*v1beta1.APIServiceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.APIService, err error) - APIServiceExpansion -} - -// aPIServices implements APIServiceInterface -type aPIServices struct { - client rest.Interface -} - -// newAPIServices returns a APIServices -func newAPIServices(c *ApiregistrationV1beta1Client) *aPIServices { - return &aPIServices{ - client: c.RESTClient(), - } -} - -// Get takes name of the aPIService, and returns the corresponding aPIService object, and an error if there is any. -func (c *aPIServices) Get(name string, options v1.GetOptions) (result *v1beta1.APIService, err error) { - result = &v1beta1.APIService{} - err = c.client.Get(). - Resource("apiservices"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(context.TODO()). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of APIServices that match those selectors. -func (c *aPIServices) List(opts v1.ListOptions) (result *v1beta1.APIServiceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1beta1.APIServiceList{} - err = c.client.Get(). - Resource("apiservices"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(context.TODO()). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested aPIServices. -func (c *aPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("apiservices"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(context.TODO()) -} - -// Create takes the representation of a aPIService and creates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *aPIServices) Create(aPIService *v1beta1.APIService) (result *v1beta1.APIService, err error) { - result = &v1beta1.APIService{} - err = c.client.Post(). - Resource("apiservices"). - Body(aPIService). - Do(context.TODO()). - Into(result) - return -} - -// Update takes the representation of a aPIService and updates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *aPIServices) Update(aPIService *v1beta1.APIService) (result *v1beta1.APIService, err error) { - result = &v1beta1.APIService{} - err = c.client.Put(). - Resource("apiservices"). - Name(aPIService.Name). - Body(aPIService). - Do(context.TODO()). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *aPIServices) UpdateStatus(aPIService *v1beta1.APIService) (result *v1beta1.APIService, err error) { - result = &v1beta1.APIService{} - err = c.client.Put(). - Resource("apiservices"). - Name(aPIService.Name). - SubResource("status"). - Body(aPIService). - Do(context.TODO()). - Into(result) - return -} - -// Delete takes name of the aPIService and deletes it. Returns an error if one occurs. -func (c *aPIServices) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("apiservices"). - Name(name). - Body(options). - Do(context.TODO()). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *aPIServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("apiservices"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(context.TODO()). - Error() -} - -// Patch applies the patch and returns the patched aPIService. -func (c *aPIServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.APIService, err error) { - result = &v1beta1.APIService{} - err = c.client.Patch(pt). - Resource("apiservices"). - SubResource(subresources...). - Name(name). - Body(data). - Do(context.TODO()). - Into(result) - return -} diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/doc.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/doc.go deleted file mode 100644 index 771101956f3..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1beta1 diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/fake/doc.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/fake/doc.go deleted file mode 100644 index 16f44399065..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/fake/fake_apiregistration_client.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/fake/fake_apiregistration_client.go deleted file mode 100644 index c042937f178..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/fake/fake_apiregistration_client.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - v1beta1 "k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1" -) - -type FakeApiregistrationV1beta1 struct { - *testing.Fake -} - -func (c *FakeApiregistrationV1beta1) APIServices() v1beta1.APIServiceInterface { - return &FakeAPIServices{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeApiregistrationV1beta1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/fake/fake_apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/fake/fake_apiservice.go deleted file mode 100644 index 9f702ea6e08..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/fake/fake_apiservice.go +++ /dev/null @@ -1,131 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - v1beta1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" -) - -// FakeAPIServices implements APIServiceInterface -type FakeAPIServices struct { - Fake *FakeApiregistrationV1beta1 -} - -var apiservicesResource = schema.GroupVersionResource{Group: "apiregistration.k8s.io", Version: "v1beta1", Resource: "apiservices"} - -var apiservicesKind = schema.GroupVersionKind{Group: "apiregistration.k8s.io", Version: "v1beta1", Kind: "APIService"} - -// Get takes name of the aPIService, and returns the corresponding aPIService object, and an error if there is any. -func (c *FakeAPIServices) Get(name string, options v1.GetOptions) (result *v1beta1.APIService, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(apiservicesResource, name), &v1beta1.APIService{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.APIService), err -} - -// List takes label and field selectors, and returns the list of APIServices that match those selectors. -func (c *FakeAPIServices) List(opts v1.ListOptions) (result *v1beta1.APIServiceList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(apiservicesResource, apiservicesKind, opts), &v1beta1.APIServiceList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1beta1.APIServiceList{ListMeta: obj.(*v1beta1.APIServiceList).ListMeta} - for _, item := range obj.(*v1beta1.APIServiceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested aPIServices. -func (c *FakeAPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(apiservicesResource, opts)) -} - -// Create takes the representation of a aPIService and creates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *FakeAPIServices) Create(aPIService *v1beta1.APIService) (result *v1beta1.APIService, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(apiservicesResource, aPIService), &v1beta1.APIService{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.APIService), err -} - -// Update takes the representation of a aPIService and updates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *FakeAPIServices) Update(aPIService *v1beta1.APIService) (result *v1beta1.APIService, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(apiservicesResource, aPIService), &v1beta1.APIService{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.APIService), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeAPIServices) UpdateStatus(aPIService *v1beta1.APIService) (*v1beta1.APIService, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(apiservicesResource, "status", aPIService), &v1beta1.APIService{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.APIService), err -} - -// Delete takes name of the aPIService and deletes it. Returns an error if one occurs. -func (c *FakeAPIServices) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(apiservicesResource, name), &v1beta1.APIService{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeAPIServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(apiservicesResource, listOptions) - - _, err := c.Fake.Invokes(action, &v1beta1.APIServiceList{}) - return err -} - -// Patch applies the patch and returns the patched aPIService. -func (c *FakeAPIServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.APIService, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(apiservicesResource, name, pt, data, subresources...), &v1beta1.APIService{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.APIService), err -} diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/generated_expansion.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/generated_expansion.go deleted file mode 100644 index e9108c5c835..00000000000 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/deprecated/typed/apiregistration/v1beta1/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -type APIServiceExpansion interface{} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/clientset.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/clientset.go deleted file mode 100644 index bb46f112055..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/clientset.go +++ /dev/null @@ -1,110 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package deprecated - -import ( - "fmt" - - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" - metricsv1alpha1 "k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1" - metricsv1beta1 "k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - MetricsV1alpha1() metricsv1alpha1.MetricsV1alpha1Interface - MetricsV1beta1() metricsv1beta1.MetricsV1beta1Interface -} - -// Clientset contains the clients for groups. -type Clientset struct { - *discovery.DiscoveryClient - metricsV1alpha1 *metricsv1alpha1.MetricsV1alpha1Client - metricsV1beta1 *metricsv1beta1.MetricsV1beta1Client -} - -// MetricsV1alpha1 retrieves the MetricsV1alpha1Client -func (c *Clientset) MetricsV1alpha1() metricsv1alpha1.MetricsV1alpha1Interface { - return c.metricsV1alpha1 -} - -// MetricsV1beta1 retrieves the MetricsV1beta1Client -func (c *Clientset) MetricsV1beta1() metricsv1beta1.MetricsV1beta1Interface { - return c.metricsV1beta1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - 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") - } - 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 -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - var cs Clientset - cs.metricsV1alpha1 = metricsv1alpha1.NewForConfigOrDie(c) - cs.metricsV1beta1 = metricsv1beta1.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.metricsV1alpha1 = metricsv1alpha1.New(c) - cs.metricsV1beta1 = metricsv1beta1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/fake/clientset_generated.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/fake/clientset_generated.go deleted file mode 100644 index 35b380cb67e..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/fake/clientset_generated.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/discovery" - fakediscovery "k8s.io/client-go/discovery/fake" - "k8s.io/client-go/testing" - clientset "k8s.io/metrics/pkg/client/clientset/deprecated" - metricsv1alpha1 "k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1" - fakemetricsv1alpha1 "k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake" - metricsv1beta1 "k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1" - fakemetricsv1beta1 "k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var _ clientset.Interface = &Clientset{} - -// MetricsV1alpha1 retrieves the MetricsV1alpha1Client -func (c *Clientset) MetricsV1alpha1() metricsv1alpha1.MetricsV1alpha1Interface { - return &fakemetricsv1alpha1.FakeMetricsV1alpha1{Fake: &c.Fake} -} - -// MetricsV1beta1 retrieves the MetricsV1beta1Client -func (c *Clientset) MetricsV1beta1() metricsv1beta1.MetricsV1beta1Interface { - return &fakemetricsv1beta1.FakeMetricsV1beta1{Fake: &c.Fake} -} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/fake/doc.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/fake/doc.go deleted file mode 100644 index 9b99e716709..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/fake/register.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/fake/register.go deleted file mode 100644 index dfc7b93d59b..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/fake/register.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - metricsv1alpha1 "k8s.io/metrics/pkg/apis/metrics/v1alpha1" - metricsv1beta1 "k8s.io/metrics/pkg/apis/metrics/v1beta1" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) -var parameterCodec = runtime.NewParameterCodec(scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - metricsv1alpha1.AddToScheme, - metricsv1beta1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/scheme/doc.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/scheme/doc.go deleted file mode 100644 index 7dc3756168f..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/scheme/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/scheme/register.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/scheme/register.go deleted file mode 100644 index a92b020a9ff..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/scheme/register.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - metricsv1alpha1 "k8s.io/metrics/pkg/apis/metrics/v1alpha1" - metricsv1beta1 "k8s.io/metrics/pkg/apis/metrics/v1beta1" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - metricsv1alpha1.AddToScheme, - metricsv1beta1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/doc.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/doc.go deleted file mode 100644 index df51baa4d4c..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/doc.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/doc.go deleted file mode 100644 index 16f44399065..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/fake_metrics_client.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/fake_metrics_client.go deleted file mode 100644 index 27406102e77..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/fake_metrics_client.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - v1alpha1 "k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1" -) - -type FakeMetricsV1alpha1 struct { - *testing.Fake -} - -func (c *FakeMetricsV1alpha1) NodeMetricses() v1alpha1.NodeMetricsInterface { - return &FakeNodeMetricses{c} -} - -func (c *FakeMetricsV1alpha1) PodMetricses(namespace string) v1alpha1.PodMetricsInterface { - return &FakePodMetricses{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeMetricsV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/fake_nodemetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/fake_nodemetrics.go deleted file mode 100644 index 51b967c2289..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/fake_nodemetrics.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - v1alpha1 "k8s.io/metrics/pkg/apis/metrics/v1alpha1" -) - -// FakeNodeMetricses implements NodeMetricsInterface -type FakeNodeMetricses struct { - Fake *FakeMetricsV1alpha1 -} - -var nodemetricsesResource = schema.GroupVersionResource{Group: "metrics.k8s.io", Version: "v1alpha1", Resource: "nodes"} - -var nodemetricsesKind = schema.GroupVersionKind{Group: "metrics.k8s.io", Version: "v1alpha1", Kind: "NodeMetrics"} - -// Get takes name of the nodeMetrics, and returns the corresponding nodeMetrics object, and an error if there is any. -func (c *FakeNodeMetricses) Get(name string, options v1.GetOptions) (result *v1alpha1.NodeMetrics, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(nodemetricsesResource, name), &v1alpha1.NodeMetrics{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.NodeMetrics), err -} - -// List takes label and field selectors, and returns the list of NodeMetricses that match those selectors. -func (c *FakeNodeMetricses) List(opts v1.ListOptions) (result *v1alpha1.NodeMetricsList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(nodemetricsesResource, nodemetricsesKind, opts), &v1alpha1.NodeMetricsList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.NodeMetricsList{ListMeta: obj.(*v1alpha1.NodeMetricsList).ListMeta} - for _, item := range obj.(*v1alpha1.NodeMetricsList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested nodeMetricses. -func (c *FakeNodeMetricses) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(nodemetricsesResource, opts)) -} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/fake_podmetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/fake_podmetrics.go deleted file mode 100644 index 923669400fb..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/fake/fake_podmetrics.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - v1alpha1 "k8s.io/metrics/pkg/apis/metrics/v1alpha1" -) - -// FakePodMetricses implements PodMetricsInterface -type FakePodMetricses struct { - Fake *FakeMetricsV1alpha1 - ns string -} - -var podmetricsesResource = schema.GroupVersionResource{Group: "metrics.k8s.io", Version: "v1alpha1", Resource: "pods"} - -var podmetricsesKind = schema.GroupVersionKind{Group: "metrics.k8s.io", Version: "v1alpha1", Kind: "PodMetrics"} - -// Get takes name of the podMetrics, and returns the corresponding podMetrics object, and an error if there is any. -func (c *FakePodMetricses) Get(name string, options v1.GetOptions) (result *v1alpha1.PodMetrics, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(podmetricsesResource, c.ns, name), &v1alpha1.PodMetrics{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodMetrics), err -} - -// List takes label and field selectors, and returns the list of PodMetricses that match those selectors. -func (c *FakePodMetricses) List(opts v1.ListOptions) (result *v1alpha1.PodMetricsList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(podmetricsesResource, podmetricsesKind, c.ns, opts), &v1alpha1.PodMetricsList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.PodMetricsList{ListMeta: obj.(*v1alpha1.PodMetricsList).ListMeta} - for _, item := range obj.(*v1alpha1.PodMetricsList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested podMetricses. -func (c *FakePodMetricses) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(podmetricsesResource, c.ns, opts)) - -} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/generated_expansion.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/generated_expansion.go deleted file mode 100644 index e8fc33bbb14..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type NodeMetricsExpansion interface{} - -type PodMetricsExpansion interface{} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/metrics_client.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/metrics_client.go deleted file mode 100644 index 99cf7a3574b..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/metrics_client.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - rest "k8s.io/client-go/rest" - v1alpha1 "k8s.io/metrics/pkg/apis/metrics/v1alpha1" - "k8s.io/metrics/pkg/client/clientset/deprecated/scheme" -) - -type MetricsV1alpha1Interface interface { - RESTClient() rest.Interface - NodeMetricsesGetter - PodMetricsesGetter -} - -// MetricsV1alpha1Client is used to interact with features provided by the metrics.k8s.io group. -type MetricsV1alpha1Client struct { - restClient rest.Interface -} - -func (c *MetricsV1alpha1Client) NodeMetricses() NodeMetricsInterface { - return newNodeMetricses(c) -} - -func (c *MetricsV1alpha1Client) PodMetricses(namespace string) PodMetricsInterface { - return newPodMetricses(c, namespace) -} - -// NewForConfig creates a new MetricsV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*MetricsV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &MetricsV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new MetricsV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *MetricsV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new MetricsV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *MetricsV1alpha1Client { - return &MetricsV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *MetricsV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/nodemetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/nodemetrics.go deleted file mode 100644 index 4631411465e..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/nodemetrics.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - v1alpha1 "k8s.io/metrics/pkg/apis/metrics/v1alpha1" - scheme "k8s.io/metrics/pkg/client/clientset/deprecated/scheme" -) - -// NodeMetricsesGetter has a method to return a NodeMetricsInterface. -// A group's client should implement this interface. -type NodeMetricsesGetter interface { - NodeMetricses() NodeMetricsInterface -} - -// NodeMetricsInterface has methods to work with NodeMetrics resources. -type NodeMetricsInterface interface { - Get(name string, options v1.GetOptions) (*v1alpha1.NodeMetrics, error) - List(opts v1.ListOptions) (*v1alpha1.NodeMetricsList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - NodeMetricsExpansion -} - -// nodeMetricses implements NodeMetricsInterface -type nodeMetricses struct { - client rest.Interface -} - -// newNodeMetricses returns a NodeMetricses -func newNodeMetricses(c *MetricsV1alpha1Client) *nodeMetricses { - return &nodeMetricses{ - client: c.RESTClient(), - } -} - -// Get takes name of the nodeMetrics, and returns the corresponding nodeMetrics object, and an error if there is any. -func (c *nodeMetricses) Get(name string, options v1.GetOptions) (result *v1alpha1.NodeMetrics, err error) { - result = &v1alpha1.NodeMetrics{} - err = c.client.Get(). - Resource("nodes"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(context.TODO()). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of NodeMetricses that match those selectors. -func (c *nodeMetricses) List(opts v1.ListOptions) (result *v1alpha1.NodeMetricsList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.NodeMetricsList{} - err = c.client.Get(). - Resource("nodes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(context.TODO()). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested nodeMetricses. -func (c *nodeMetricses) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("nodes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(context.TODO()) -} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/podmetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/podmetrics.go deleted file mode 100644 index 6cac99ebe0c..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1alpha1/podmetrics.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - v1alpha1 "k8s.io/metrics/pkg/apis/metrics/v1alpha1" - scheme "k8s.io/metrics/pkg/client/clientset/deprecated/scheme" -) - -// PodMetricsesGetter has a method to return a PodMetricsInterface. -// A group's client should implement this interface. -type PodMetricsesGetter interface { - PodMetricses(namespace string) PodMetricsInterface -} - -// PodMetricsInterface has methods to work with PodMetrics resources. -type PodMetricsInterface interface { - Get(name string, options v1.GetOptions) (*v1alpha1.PodMetrics, error) - List(opts v1.ListOptions) (*v1alpha1.PodMetricsList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - PodMetricsExpansion -} - -// podMetricses implements PodMetricsInterface -type podMetricses struct { - client rest.Interface - ns string -} - -// newPodMetricses returns a PodMetricses -func newPodMetricses(c *MetricsV1alpha1Client, namespace string) *podMetricses { - return &podMetricses{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the podMetrics, and returns the corresponding podMetrics object, and an error if there is any. -func (c *podMetricses) Get(name string, options v1.GetOptions) (result *v1alpha1.PodMetrics, err error) { - result = &v1alpha1.PodMetrics{} - err = c.client.Get(). - Namespace(c.ns). - Resource("pods"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(context.TODO()). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of PodMetricses that match those selectors. -func (c *podMetricses) List(opts v1.ListOptions) (result *v1alpha1.PodMetricsList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.PodMetricsList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("pods"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(context.TODO()). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested podMetricses. -func (c *podMetricses) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("pods"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(context.TODO()) -} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/doc.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/doc.go deleted file mode 100644 index 771101956f3..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1beta1 diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/doc.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/doc.go deleted file mode 100644 index 16f44399065..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/fake_metrics_client.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/fake_metrics_client.go deleted file mode 100644 index ef56d612701..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/fake_metrics_client.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - v1beta1 "k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1" -) - -type FakeMetricsV1beta1 struct { - *testing.Fake -} - -func (c *FakeMetricsV1beta1) NodeMetricses() v1beta1.NodeMetricsInterface { - return &FakeNodeMetricses{c} -} - -func (c *FakeMetricsV1beta1) PodMetricses(namespace string) v1beta1.PodMetricsInterface { - return &FakePodMetricses{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeMetricsV1beta1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/fake_nodemetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/fake_nodemetrics.go deleted file mode 100644 index cf7c5b92ef4..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/fake_nodemetrics.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - v1beta1 "k8s.io/metrics/pkg/apis/metrics/v1beta1" -) - -// FakeNodeMetricses implements NodeMetricsInterface -type FakeNodeMetricses struct { - Fake *FakeMetricsV1beta1 -} - -var nodemetricsesResource = schema.GroupVersionResource{Group: "metrics.k8s.io", Version: "v1beta1", Resource: "nodes"} - -var nodemetricsesKind = schema.GroupVersionKind{Group: "metrics.k8s.io", Version: "v1beta1", Kind: "NodeMetrics"} - -// Get takes name of the nodeMetrics, and returns the corresponding nodeMetrics object, and an error if there is any. -func (c *FakeNodeMetricses) Get(name string, options v1.GetOptions) (result *v1beta1.NodeMetrics, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(nodemetricsesResource, name), &v1beta1.NodeMetrics{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.NodeMetrics), err -} - -// List takes label and field selectors, and returns the list of NodeMetricses that match those selectors. -func (c *FakeNodeMetricses) List(opts v1.ListOptions) (result *v1beta1.NodeMetricsList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(nodemetricsesResource, nodemetricsesKind, opts), &v1beta1.NodeMetricsList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1beta1.NodeMetricsList{ListMeta: obj.(*v1beta1.NodeMetricsList).ListMeta} - for _, item := range obj.(*v1beta1.NodeMetricsList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested nodeMetricses. -func (c *FakeNodeMetricses) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(nodemetricsesResource, opts)) -} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/fake_podmetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/fake_podmetrics.go deleted file mode 100644 index 0c7e07324b2..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/fake/fake_podmetrics.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - v1beta1 "k8s.io/metrics/pkg/apis/metrics/v1beta1" -) - -// FakePodMetricses implements PodMetricsInterface -type FakePodMetricses struct { - Fake *FakeMetricsV1beta1 - ns string -} - -var podmetricsesResource = schema.GroupVersionResource{Group: "metrics.k8s.io", Version: "v1beta1", Resource: "pods"} - -var podmetricsesKind = schema.GroupVersionKind{Group: "metrics.k8s.io", Version: "v1beta1", Kind: "PodMetrics"} - -// Get takes name of the podMetrics, and returns the corresponding podMetrics object, and an error if there is any. -func (c *FakePodMetricses) Get(name string, options v1.GetOptions) (result *v1beta1.PodMetrics, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(podmetricsesResource, c.ns, name), &v1beta1.PodMetrics{}) - - if obj == nil { - return nil, err - } - return obj.(*v1beta1.PodMetrics), err -} - -// List takes label and field selectors, and returns the list of PodMetricses that match those selectors. -func (c *FakePodMetricses) List(opts v1.ListOptions) (result *v1beta1.PodMetricsList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(podmetricsesResource, podmetricsesKind, c.ns, opts), &v1beta1.PodMetricsList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1beta1.PodMetricsList{ListMeta: obj.(*v1beta1.PodMetricsList).ListMeta} - for _, item := range obj.(*v1beta1.PodMetricsList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested podMetricses. -func (c *FakePodMetricses) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(podmetricsesResource, c.ns, opts)) - -} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/generated_expansion.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/generated_expansion.go deleted file mode 100644 index a89ca3c780d..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/generated_expansion.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -type NodeMetricsExpansion interface{} - -type PodMetricsExpansion interface{} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/metrics_client.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/metrics_client.go deleted file mode 100644 index 5c68643bcbb..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/metrics_client.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -import ( - rest "k8s.io/client-go/rest" - v1beta1 "k8s.io/metrics/pkg/apis/metrics/v1beta1" - "k8s.io/metrics/pkg/client/clientset/deprecated/scheme" -) - -type MetricsV1beta1Interface interface { - RESTClient() rest.Interface - NodeMetricsesGetter - PodMetricsesGetter -} - -// MetricsV1beta1Client is used to interact with features provided by the metrics.k8s.io group. -type MetricsV1beta1Client struct { - restClient rest.Interface -} - -func (c *MetricsV1beta1Client) NodeMetricses() NodeMetricsInterface { - return newNodeMetricses(c) -} - -func (c *MetricsV1beta1Client) PodMetricses(namespace string) PodMetricsInterface { - return newPodMetricses(c, namespace) -} - -// NewForConfig creates a new MetricsV1beta1Client for the given config. -func NewForConfig(c *rest.Config) (*MetricsV1beta1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &MetricsV1beta1Client{client}, nil -} - -// NewForConfigOrDie creates a new MetricsV1beta1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *MetricsV1beta1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new MetricsV1beta1Client for the given RESTClient. -func New(c rest.Interface) *MetricsV1beta1Client { - return &MetricsV1beta1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1beta1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *MetricsV1beta1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/nodemetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/nodemetrics.go deleted file mode 100644 index a0b04851e5c..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/nodemetrics.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -import ( - "context" - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - v1beta1 "k8s.io/metrics/pkg/apis/metrics/v1beta1" - scheme "k8s.io/metrics/pkg/client/clientset/deprecated/scheme" -) - -// NodeMetricsesGetter has a method to return a NodeMetricsInterface. -// A group's client should implement this interface. -type NodeMetricsesGetter interface { - NodeMetricses() NodeMetricsInterface -} - -// NodeMetricsInterface has methods to work with NodeMetrics resources. -type NodeMetricsInterface interface { - Get(name string, options v1.GetOptions) (*v1beta1.NodeMetrics, error) - List(opts v1.ListOptions) (*v1beta1.NodeMetricsList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - NodeMetricsExpansion -} - -// nodeMetricses implements NodeMetricsInterface -type nodeMetricses struct { - client rest.Interface -} - -// newNodeMetricses returns a NodeMetricses -func newNodeMetricses(c *MetricsV1beta1Client) *nodeMetricses { - return &nodeMetricses{ - client: c.RESTClient(), - } -} - -// Get takes name of the nodeMetrics, and returns the corresponding nodeMetrics object, and an error if there is any. -func (c *nodeMetricses) Get(name string, options v1.GetOptions) (result *v1beta1.NodeMetrics, err error) { - result = &v1beta1.NodeMetrics{} - err = c.client.Get(). - Resource("nodes"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(context.TODO()). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of NodeMetricses that match those selectors. -func (c *nodeMetricses) List(opts v1.ListOptions) (result *v1beta1.NodeMetricsList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1beta1.NodeMetricsList{} - err = c.client.Get(). - Resource("nodes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(context.TODO()). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested nodeMetricses. -func (c *nodeMetricses) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("nodes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(context.TODO()) -} diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/podmetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/podmetrics.go deleted file mode 100644 index f4d8785b65b..00000000000 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/deprecated/typed/metrics/v1beta1/podmetrics.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -import ( - "context" - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - v1beta1 "k8s.io/metrics/pkg/apis/metrics/v1beta1" - scheme "k8s.io/metrics/pkg/client/clientset/deprecated/scheme" -) - -// PodMetricsesGetter has a method to return a PodMetricsInterface. -// A group's client should implement this interface. -type PodMetricsesGetter interface { - PodMetricses(namespace string) PodMetricsInterface -} - -// PodMetricsInterface has methods to work with PodMetrics resources. -type PodMetricsInterface interface { - Get(name string, options v1.GetOptions) (*v1beta1.PodMetrics, error) - List(opts v1.ListOptions) (*v1beta1.PodMetricsList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - PodMetricsExpansion -} - -// podMetricses implements PodMetricsInterface -type podMetricses struct { - client rest.Interface - ns string -} - -// newPodMetricses returns a PodMetricses -func newPodMetricses(c *MetricsV1beta1Client, namespace string) *podMetricses { - return &podMetricses{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the podMetrics, and returns the corresponding podMetrics object, and an error if there is any. -func (c *podMetricses) Get(name string, options v1.GetOptions) (result *v1beta1.PodMetrics, err error) { - result = &v1beta1.PodMetrics{} - err = c.client.Get(). - Namespace(c.ns). - Resource("pods"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(context.TODO()). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of PodMetricses that match those selectors. -func (c *podMetricses) List(opts v1.ListOptions) (result *v1beta1.PodMetricsList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1beta1.PodMetricsList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("pods"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(context.TODO()). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested podMetricses. -func (c *podMetricses) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("pods"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(context.TODO()) -} From 37ca6b0fac3c118c9cb0619a07a2fe40e567f6d1 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sat, 14 Jan 2023 17:20:06 -0800 Subject: [PATCH 2/3] Remove obsolete generated applyconfigs These are not regenerated by any input. --- .../v1alpha1/admissionpolicyspec.go | 75 --------- .../v1alpha1/paramsource.go | 48 ------ .../admissionregistration/v1alpha1/rule.go | 76 ---------- .../v1alpha1/rulewithoperations.go | 85 ----------- .../admissionregistration/v1beta1/rule.go | 76 ---------- .../v1beta1/rulewithoperations.go | 85 ----------- .../autoscaling/v2/podresourcemetricsource.go | 52 ------- .../meta/v1/groupversionkind.go | 57 ------- .../applyconfigurations/meta/v1/listmeta.go | 66 -------- .../applyconfigurations/meta/v1/status.go | 142 ------------------ .../meta/v1/statuscause.go | 61 -------- .../meta/v1/statusdetails.go | 93 ------------ 12 files changed, 916 deletions(-) delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/admissionpolicyspec.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/paramsource.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/rule.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/rulewithoperations.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/rule.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/rulewithoperations.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podresourcemetricsource.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/meta/v1/groupversionkind.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/meta/v1/listmeta.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/meta/v1/status.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/meta/v1/statuscause.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/meta/v1/statusdetails.go diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/admissionpolicyspec.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/admissionpolicyspec.go deleted file mode 100644 index 4936110fbdc..00000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/admissionpolicyspec.go +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" -) - -// AdmissionPolicySpecApplyConfiguration represents an declarative configuration of the AdmissionPolicySpec type for use -// with apply. -type AdmissionPolicySpecApplyConfiguration struct { - ParamSource *ParamSourceApplyConfiguration `json:"paramSource,omitempty"` - MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"` - Validations []ValidationApplyConfiguration `json:"validations,omitempty"` - FailurePolicy *admissionregistrationv1alpha1.FailurePolicyType `json:"failurePolicy,omitempty"` -} - -// AdmissionPolicySpecApplyConfiguration constructs an declarative configuration of the AdmissionPolicySpec type for use with -// apply. -func AdmissionPolicySpec() *AdmissionPolicySpecApplyConfiguration { - return &AdmissionPolicySpecApplyConfiguration{} -} - -// WithParamSource sets the ParamSource field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ParamSource field is set to the value of the last call. -func (b *AdmissionPolicySpecApplyConfiguration) WithParamSource(value *ParamSourceApplyConfiguration) *AdmissionPolicySpecApplyConfiguration { - b.ParamSource = value - return b -} - -// WithMatchResources sets the MatchResources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MatchResources field is set to the value of the last call. -func (b *AdmissionPolicySpecApplyConfiguration) WithMatchResources(value *MatchResourcesApplyConfiguration) *AdmissionPolicySpecApplyConfiguration { - b.MatchResources = value - return b -} - -// WithValidations adds the given value to the Validations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Validations field. -func (b *AdmissionPolicySpecApplyConfiguration) WithValidations(values ...*ValidationApplyConfiguration) *AdmissionPolicySpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithValidations") - } - b.Validations = append(b.Validations, *values[i]) - } - return b -} - -// WithFailurePolicy sets the FailurePolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FailurePolicy field is set to the value of the last call. -func (b *AdmissionPolicySpecApplyConfiguration) WithFailurePolicy(value admissionregistrationv1alpha1.FailurePolicyType) *AdmissionPolicySpecApplyConfiguration { - b.FailurePolicy = &value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/paramsource.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/paramsource.go deleted file mode 100644 index a7a5a6af833..00000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/paramsource.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// ParamSourceApplyConfiguration represents an declarative configuration of the ParamSource type for use -// with apply. -type ParamSourceApplyConfiguration struct { - APIVersion *string `json:"apiVersion,omitempty"` - Kind *string `json:"kind,omitempty"` -} - -// ParamSourceApplyConfiguration constructs an declarative configuration of the ParamSource type for use with -// apply. -func ParamSource() *ParamSourceApplyConfiguration { - return &ParamSourceApplyConfiguration{} -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ParamSourceApplyConfiguration) WithAPIVersion(value string) *ParamSourceApplyConfiguration { - b.APIVersion = &value - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ParamSourceApplyConfiguration) WithKind(value string) *ParamSourceApplyConfiguration { - b.Kind = &value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/rule.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/rule.go deleted file mode 100644 index 313de9d5f55..00000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/rule.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" -) - -// RuleApplyConfiguration represents an declarative configuration of the Rule type for use -// with apply. -type RuleApplyConfiguration struct { - APIGroups []string `json:"apiGroups,omitempty"` - APIVersions []string `json:"apiVersions,omitempty"` - Resources []string `json:"resources,omitempty"` - Scope *v1alpha1.ScopeType `json:"scope,omitempty"` -} - -// RuleApplyConfiguration constructs an declarative configuration of the Rule type for use with -// apply. -func Rule() *RuleApplyConfiguration { - return &RuleApplyConfiguration{} -} - -// WithAPIGroups adds the given value to the APIGroups field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIGroups field. -func (b *RuleApplyConfiguration) WithAPIGroups(values ...string) *RuleApplyConfiguration { - for i := range values { - b.APIGroups = append(b.APIGroups, values[i]) - } - return b -} - -// WithAPIVersions adds the given value to the APIVersions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIVersions field. -func (b *RuleApplyConfiguration) WithAPIVersions(values ...string) *RuleApplyConfiguration { - for i := range values { - b.APIVersions = append(b.APIVersions, values[i]) - } - return b -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *RuleApplyConfiguration) WithResources(values ...string) *RuleApplyConfiguration { - for i := range values { - b.Resources = append(b.Resources, values[i]) - } - return b -} - -// WithScope sets the Scope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scope field is set to the value of the last call. -func (b *RuleApplyConfiguration) WithScope(value v1alpha1.ScopeType) *RuleApplyConfiguration { - b.Scope = &value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/rulewithoperations.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/rulewithoperations.go deleted file mode 100644 index 112f4826b68..00000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/rulewithoperations.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/api/admissionregistration/v1" - admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" -) - -// RuleWithOperationsApplyConfiguration represents an declarative configuration of the RuleWithOperations type for use -// with apply. -type RuleWithOperationsApplyConfiguration struct { - Operations []v1.OperationType `json:"operations,omitempty"` - admissionregistrationv1.RuleApplyConfiguration `json:",inline"` -} - -// RuleWithOperationsApplyConfiguration constructs an declarative configuration of the RuleWithOperations type for use with -// apply. -func RuleWithOperations() *RuleWithOperationsApplyConfiguration { - return &RuleWithOperationsApplyConfiguration{} -} - -// WithOperations adds the given value to the Operations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Operations field. -func (b *RuleWithOperationsApplyConfiguration) WithOperations(values ...v1.OperationType) *RuleWithOperationsApplyConfiguration { - for i := range values { - b.Operations = append(b.Operations, values[i]) - } - return b -} - -// WithAPIGroups adds the given value to the APIGroups field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIGroups field. -func (b *RuleWithOperationsApplyConfiguration) WithAPIGroups(values ...string) *RuleWithOperationsApplyConfiguration { - for i := range values { - b.APIGroups = append(b.APIGroups, values[i]) - } - return b -} - -// WithAPIVersions adds the given value to the APIVersions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIVersions field. -func (b *RuleWithOperationsApplyConfiguration) WithAPIVersions(values ...string) *RuleWithOperationsApplyConfiguration { - for i := range values { - b.APIVersions = append(b.APIVersions, values[i]) - } - return b -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *RuleWithOperationsApplyConfiguration) WithResources(values ...string) *RuleWithOperationsApplyConfiguration { - for i := range values { - b.Resources = append(b.Resources, values[i]) - } - return b -} - -// WithScope sets the Scope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scope field is set to the value of the last call. -func (b *RuleWithOperationsApplyConfiguration) WithScope(value v1.ScopeType) *RuleWithOperationsApplyConfiguration { - b.Scope = &value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/rule.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/rule.go deleted file mode 100644 index 21151b99809..00000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/rule.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1beta1 "k8s.io/api/admissionregistration/v1beta1" -) - -// RuleApplyConfiguration represents an declarative configuration of the Rule type for use -// with apply. -type RuleApplyConfiguration struct { - APIGroups []string `json:"apiGroups,omitempty"` - APIVersions []string `json:"apiVersions,omitempty"` - Resources []string `json:"resources,omitempty"` - Scope *v1beta1.ScopeType `json:"scope,omitempty"` -} - -// RuleApplyConfiguration constructs an declarative configuration of the Rule type for use with -// apply. -func Rule() *RuleApplyConfiguration { - return &RuleApplyConfiguration{} -} - -// WithAPIGroups adds the given value to the APIGroups field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIGroups field. -func (b *RuleApplyConfiguration) WithAPIGroups(values ...string) *RuleApplyConfiguration { - for i := range values { - b.APIGroups = append(b.APIGroups, values[i]) - } - return b -} - -// WithAPIVersions adds the given value to the APIVersions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIVersions field. -func (b *RuleApplyConfiguration) WithAPIVersions(values ...string) *RuleApplyConfiguration { - for i := range values { - b.APIVersions = append(b.APIVersions, values[i]) - } - return b -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *RuleApplyConfiguration) WithResources(values ...string) *RuleApplyConfiguration { - for i := range values { - b.Resources = append(b.Resources, values[i]) - } - return b -} - -// WithScope sets the Scope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scope field is set to the value of the last call. -func (b *RuleApplyConfiguration) WithScope(value v1beta1.ScopeType) *RuleApplyConfiguration { - b.Scope = &value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/rulewithoperations.go b/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/rulewithoperations.go deleted file mode 100644 index 0fd5dd34db0..00000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/rulewithoperations.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1 "k8s.io/api/admissionregistration/v1" - admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" -) - -// RuleWithOperationsApplyConfiguration represents an declarative configuration of the RuleWithOperations type for use -// with apply. -type RuleWithOperationsApplyConfiguration struct { - Operations []v1.OperationType `json:"operations,omitempty"` - admissionregistrationv1.RuleApplyConfiguration `json:",inline"` -} - -// RuleWithOperationsApplyConfiguration constructs an declarative configuration of the RuleWithOperations type for use with -// apply. -func RuleWithOperations() *RuleWithOperationsApplyConfiguration { - return &RuleWithOperationsApplyConfiguration{} -} - -// WithOperations adds the given value to the Operations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Operations field. -func (b *RuleWithOperationsApplyConfiguration) WithOperations(values ...v1.OperationType) *RuleWithOperationsApplyConfiguration { - for i := range values { - b.Operations = append(b.Operations, values[i]) - } - return b -} - -// WithAPIGroups adds the given value to the APIGroups field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIGroups field. -func (b *RuleWithOperationsApplyConfiguration) WithAPIGroups(values ...string) *RuleWithOperationsApplyConfiguration { - for i := range values { - b.APIGroups = append(b.APIGroups, values[i]) - } - return b -} - -// WithAPIVersions adds the given value to the APIVersions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIVersions field. -func (b *RuleWithOperationsApplyConfiguration) WithAPIVersions(values ...string) *RuleWithOperationsApplyConfiguration { - for i := range values { - b.APIVersions = append(b.APIVersions, values[i]) - } - return b -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *RuleWithOperationsApplyConfiguration) WithResources(values ...string) *RuleWithOperationsApplyConfiguration { - for i := range values { - b.Resources = append(b.Resources, values[i]) - } - return b -} - -// WithScope sets the Scope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scope field is set to the value of the last call. -func (b *RuleWithOperationsApplyConfiguration) WithScope(value v1.ScopeType) *RuleWithOperationsApplyConfiguration { - b.Scope = &value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podresourcemetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podresourcemetricsource.go deleted file mode 100644 index 86601cc48a8..00000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podresourcemetricsource.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v2 - -import ( - v1 "k8s.io/api/core/v1" -) - -// PodResourceMetricSourceApplyConfiguration represents an declarative configuration of the PodResourceMetricSource type for use -// with apply. -type PodResourceMetricSourceApplyConfiguration struct { - Name *v1.ResourceName `json:"name,omitempty"` - Target *MetricTargetApplyConfiguration `json:"target,omitempty"` -} - -// PodResourceMetricSourceApplyConfiguration constructs an declarative configuration of the PodResourceMetricSource type for use with -// apply. -func PodResourceMetricSource() *PodResourceMetricSourceApplyConfiguration { - return &PodResourceMetricSourceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *PodResourceMetricSourceApplyConfiguration) WithName(value v1.ResourceName) *PodResourceMetricSourceApplyConfiguration { - b.Name = &value - return b -} - -// WithTarget sets the Target field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Target field is set to the value of the last call. -func (b *PodResourceMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *PodResourceMetricSourceApplyConfiguration { - b.Target = value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/groupversionkind.go b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/groupversionkind.go deleted file mode 100644 index f400e516493..00000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/groupversionkind.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// GroupVersionKindApplyConfiguration represents an declarative configuration of the GroupVersionKind type for use -// with apply. -type GroupVersionKindApplyConfiguration struct { - Group *string `json:"group,omitempty"` - Version *string `json:"version,omitempty"` - Kind *string `json:"kind,omitempty"` -} - -// GroupVersionKindApplyConfiguration constructs an declarative configuration of the GroupVersionKind type for use with -// apply. -func GroupVersionKind() *GroupVersionKindApplyConfiguration { - return &GroupVersionKindApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *GroupVersionKindApplyConfiguration) WithGroup(value string) *GroupVersionKindApplyConfiguration { - b.Group = &value - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *GroupVersionKindApplyConfiguration) WithVersion(value string) *GroupVersionKindApplyConfiguration { - b.Version = &value - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *GroupVersionKindApplyConfiguration) WithKind(value string) *GroupVersionKindApplyConfiguration { - b.Kind = &value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/listmeta.go b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/listmeta.go deleted file mode 100644 index 5cadee3353f..00000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/listmeta.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ListMetaApplyConfiguration represents an declarative configuration of the ListMeta type for use -// with apply. -type ListMetaApplyConfiguration struct { - SelfLink *string `json:"selfLink,omitempty"` - ResourceVersion *string `json:"resourceVersion,omitempty"` - Continue *string `json:"continue,omitempty"` - RemainingItemCount *int64 `json:"remainingItemCount,omitempty"` -} - -// ListMetaApplyConfiguration constructs an declarative configuration of the ListMeta type for use with -// apply. -func ListMeta() *ListMetaApplyConfiguration { - return &ListMetaApplyConfiguration{} -} - -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *ListMetaApplyConfiguration) WithSelfLink(value string) *ListMetaApplyConfiguration { - b.SelfLink = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ListMetaApplyConfiguration) WithResourceVersion(value string) *ListMetaApplyConfiguration { - b.ResourceVersion = &value - return b -} - -// WithContinue sets the Continue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Continue field is set to the value of the last call. -func (b *ListMetaApplyConfiguration) WithContinue(value string) *ListMetaApplyConfiguration { - b.Continue = &value - return b -} - -// WithRemainingItemCount sets the RemainingItemCount field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RemainingItemCount field is set to the value of the last call. -func (b *ListMetaApplyConfiguration) WithRemainingItemCount(value int64) *ListMetaApplyConfiguration { - b.RemainingItemCount = &value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/status.go b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/status.go deleted file mode 100644 index 7db432089ef..00000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/status.go +++ /dev/null @@ -1,142 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// StatusApplyConfiguration represents an declarative configuration of the Status type for use -// with apply. -type StatusApplyConfiguration struct { - TypeMetaApplyConfiguration `json:",inline"` - *ListMetaApplyConfiguration `json:"metadata,omitempty"` - Status *string `json:"status,omitempty"` - Message *string `json:"message,omitempty"` - Reason *metav1.StatusReason `json:"reason,omitempty"` - Details *StatusDetailsApplyConfiguration `json:"details,omitempty"` - Code *int32 `json:"code,omitempty"` -} - -// StatusApplyConfiguration constructs an declarative configuration of the Status type for use with -// apply. -func Status() *StatusApplyConfiguration { - b := &StatusApplyConfiguration{} - b.WithKind("Status") - b.WithAPIVersion("meta.k8s.io/v1") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *StatusApplyConfiguration) WithKind(value string) *StatusApplyConfiguration { - b.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *StatusApplyConfiguration) WithAPIVersion(value string) *StatusApplyConfiguration { - b.APIVersion = &value - return b -} - -// WithSelfLink sets the SelfLink field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SelfLink field is set to the value of the last call. -func (b *StatusApplyConfiguration) WithSelfLink(value string) *StatusApplyConfiguration { - b.ensureListMetaApplyConfigurationExists() - b.SelfLink = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *StatusApplyConfiguration) WithResourceVersion(value string) *StatusApplyConfiguration { - b.ensureListMetaApplyConfigurationExists() - b.ResourceVersion = &value - return b -} - -// WithContinue sets the Continue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Continue field is set to the value of the last call. -func (b *StatusApplyConfiguration) WithContinue(value string) *StatusApplyConfiguration { - b.ensureListMetaApplyConfigurationExists() - b.Continue = &value - return b -} - -// WithRemainingItemCount sets the RemainingItemCount field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RemainingItemCount field is set to the value of the last call. -func (b *StatusApplyConfiguration) WithRemainingItemCount(value int64) *StatusApplyConfiguration { - b.ensureListMetaApplyConfigurationExists() - b.RemainingItemCount = &value - return b -} - -func (b *StatusApplyConfiguration) ensureListMetaApplyConfigurationExists() { - if b.ListMetaApplyConfiguration == nil { - b.ListMetaApplyConfiguration = &ListMetaApplyConfiguration{} - } -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *StatusApplyConfiguration) WithStatus(value string) *StatusApplyConfiguration { - b.Status = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *StatusApplyConfiguration) WithMessage(value string) *StatusApplyConfiguration { - b.Message = &value - return b -} - -// WithReason sets the Reason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Reason field is set to the value of the last call. -func (b *StatusApplyConfiguration) WithReason(value metav1.StatusReason) *StatusApplyConfiguration { - b.Reason = &value - return b -} - -// WithDetails sets the Details field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Details field is set to the value of the last call. -func (b *StatusApplyConfiguration) WithDetails(value *StatusDetailsApplyConfiguration) *StatusApplyConfiguration { - b.Details = value - return b -} - -// WithCode sets the Code field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Code field is set to the value of the last call. -func (b *StatusApplyConfiguration) WithCode(value int32) *StatusApplyConfiguration { - b.Code = &value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/statuscause.go b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/statuscause.go deleted file mode 100644 index 7f05bca498d..00000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/statuscause.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// StatusCauseApplyConfiguration represents an declarative configuration of the StatusCause type for use -// with apply. -type StatusCauseApplyConfiguration struct { - Type *v1.CauseType `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` - Field *string `json:"field,omitempty"` -} - -// StatusCauseApplyConfiguration constructs an declarative configuration of the StatusCause type for use with -// apply. -func StatusCause() *StatusCauseApplyConfiguration { - return &StatusCauseApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *StatusCauseApplyConfiguration) WithType(value v1.CauseType) *StatusCauseApplyConfiguration { - b.Type = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *StatusCauseApplyConfiguration) WithMessage(value string) *StatusCauseApplyConfiguration { - b.Message = &value - return b -} - -// WithField sets the Field field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Field field is set to the value of the last call. -func (b *StatusCauseApplyConfiguration) WithField(value string) *StatusCauseApplyConfiguration { - b.Field = &value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/statusdetails.go b/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/statusdetails.go deleted file mode 100644 index a7dbaa1b26e..00000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/meta/v1/statusdetails.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - types "k8s.io/apimachinery/pkg/types" -) - -// StatusDetailsApplyConfiguration represents an declarative configuration of the StatusDetails type for use -// with apply. -type StatusDetailsApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Group *string `json:"group,omitempty"` - Kind *string `json:"kind,omitempty"` - UID *types.UID `json:"uid,omitempty"` - Causes []StatusCauseApplyConfiguration `json:"causes,omitempty"` - RetryAfterSeconds *int32 `json:"retryAfterSeconds,omitempty"` -} - -// StatusDetailsApplyConfiguration constructs an declarative configuration of the StatusDetails type for use with -// apply. -func StatusDetails() *StatusDetailsApplyConfiguration { - return &StatusDetailsApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *StatusDetailsApplyConfiguration) WithName(value string) *StatusDetailsApplyConfiguration { - b.Name = &value - return b -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *StatusDetailsApplyConfiguration) WithGroup(value string) *StatusDetailsApplyConfiguration { - b.Group = &value - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *StatusDetailsApplyConfiguration) WithKind(value string) *StatusDetailsApplyConfiguration { - b.Kind = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *StatusDetailsApplyConfiguration) WithUID(value types.UID) *StatusDetailsApplyConfiguration { - b.UID = &value - return b -} - -// WithCauses adds the given value to the Causes field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Causes field. -func (b *StatusDetailsApplyConfiguration) WithCauses(values ...*StatusCauseApplyConfiguration) *StatusDetailsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithCauses") - } - b.Causes = append(b.Causes, *values[i]) - } - return b -} - -// WithRetryAfterSeconds sets the RetryAfterSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RetryAfterSeconds field is set to the value of the last call. -func (b *StatusDetailsApplyConfiguration) WithRetryAfterSeconds(value int32) *StatusDetailsApplyConfiguration { - b.RetryAfterSeconds = &value - return b -} From dc88f34ce30eb98285f7f30e391b135e842cdbc2 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sat, 14 Jan 2023 17:54:12 -0800 Subject: [PATCH 3/3] Remove obsolete generated listers These are not regenerated by any input. The OWNERS files were the last things left for these 2 directories --- .../client-go/listers/authentication/OWNERS | 8 -- .../authentication/v1/expansion_generated.go | 23 ----- .../listers/authentication/v1/tokenreview.go | 65 ------------- .../v1beta1/expansion_generated.go | 23 ----- .../authentication/v1beta1/tokenreview.go | 65 ------------- .../client-go/listers/authorization/OWNERS | 8 -- .../authorization/v1/expansion_generated.go | 39 -------- .../v1/localsubjectaccessreview.go | 94 ------------------- .../v1/selfsubjectaccessreview.go | 65 ------------- .../v1/selfsubjectrulesreview.go | 65 ------------- .../authorization/v1/subjectaccessreview.go | 65 ------------- .../v1beta1/expansion_generated.go | 39 -------- .../v1beta1/localsubjectaccessreview.go | 94 ------------------- .../v1beta1/selfsubjectaccessreview.go | 65 ------------- .../v1beta1/selfsubjectrulesreview.go | 65 ------------- .../v1beta1/subjectaccessreview.go | 65 ------------- 16 files changed, 848 deletions(-) delete mode 100644 staging/src/k8s.io/client-go/listers/authentication/OWNERS delete mode 100644 staging/src/k8s.io/client-go/listers/authentication/v1/expansion_generated.go delete mode 100644 staging/src/k8s.io/client-go/listers/authentication/v1/tokenreview.go delete mode 100644 staging/src/k8s.io/client-go/listers/authentication/v1beta1/expansion_generated.go delete mode 100644 staging/src/k8s.io/client-go/listers/authentication/v1beta1/tokenreview.go delete mode 100644 staging/src/k8s.io/client-go/listers/authorization/OWNERS delete mode 100644 staging/src/k8s.io/client-go/listers/authorization/v1/expansion_generated.go delete mode 100644 staging/src/k8s.io/client-go/listers/authorization/v1/localsubjectaccessreview.go delete mode 100644 staging/src/k8s.io/client-go/listers/authorization/v1/selfsubjectaccessreview.go delete mode 100644 staging/src/k8s.io/client-go/listers/authorization/v1/selfsubjectrulesreview.go delete mode 100644 staging/src/k8s.io/client-go/listers/authorization/v1/subjectaccessreview.go delete mode 100644 staging/src/k8s.io/client-go/listers/authorization/v1beta1/expansion_generated.go delete mode 100644 staging/src/k8s.io/client-go/listers/authorization/v1beta1/localsubjectaccessreview.go delete mode 100644 staging/src/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectaccessreview.go delete mode 100644 staging/src/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectrulesreview.go delete mode 100644 staging/src/k8s.io/client-go/listers/authorization/v1beta1/subjectaccessreview.go diff --git a/staging/src/k8s.io/client-go/listers/authentication/OWNERS b/staging/src/k8s.io/client-go/listers/authentication/OWNERS deleted file mode 100644 index c4ea6463df4..00000000000 --- a/staging/src/k8s.io/client-go/listers/authentication/OWNERS +++ /dev/null @@ -1,8 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners - -approvers: - - sig-auth-authenticators-approvers -reviewers: - - sig-auth-authenticators-reviewers -labels: - - sig/auth diff --git a/staging/src/k8s.io/client-go/listers/authentication/v1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/authentication/v1/expansion_generated.go deleted file mode 100644 index a8d097f40a8..00000000000 --- a/staging/src/k8s.io/client-go/listers/authentication/v1/expansion_generated.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -// TokenReviewListerExpansion allows custom methods to be added to -// TokenReviewLister. -type TokenReviewListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/authentication/v1/tokenreview.go b/staging/src/k8s.io/client-go/listers/authentication/v1/tokenreview.go deleted file mode 100644 index 5bb907c0c4a..00000000000 --- a/staging/src/k8s.io/client-go/listers/authentication/v1/tokenreview.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "k8s.io/api/authentication/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// TokenReviewLister helps list TokenReviews. -type TokenReviewLister interface { - // List lists all TokenReviews in the indexer. - List(selector labels.Selector) (ret []*v1.TokenReview, err error) - // Get retrieves the TokenReview from the index for a given name. - Get(name string) (*v1.TokenReview, error) - TokenReviewListerExpansion -} - -// tokenReviewLister implements the TokenReviewLister interface. -type tokenReviewLister struct { - indexer cache.Indexer -} - -// NewTokenReviewLister returns a new TokenReviewLister. -func NewTokenReviewLister(indexer cache.Indexer) TokenReviewLister { - return &tokenReviewLister{indexer: indexer} -} - -// List lists all TokenReviews in the indexer. -func (s *tokenReviewLister) List(selector labels.Selector) (ret []*v1.TokenReview, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.TokenReview)) - }) - return ret, err -} - -// Get retrieves the TokenReview from the index for a given name. -func (s *tokenReviewLister) Get(name string) (*v1.TokenReview, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("tokenreview"), name) - } - return obj.(*v1.TokenReview), nil -} diff --git a/staging/src/k8s.io/client-go/listers/authentication/v1beta1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/authentication/v1beta1/expansion_generated.go deleted file mode 100644 index 82192059d0a..00000000000 --- a/staging/src/k8s.io/client-go/listers/authentication/v1beta1/expansion_generated.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta1 - -// TokenReviewListerExpansion allows custom methods to be added to -// TokenReviewLister. -type TokenReviewListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/authentication/v1beta1/tokenreview.go b/staging/src/k8s.io/client-go/listers/authentication/v1beta1/tokenreview.go deleted file mode 100644 index 148bcae78c1..00000000000 --- a/staging/src/k8s.io/client-go/listers/authentication/v1beta1/tokenreview.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1beta1 "k8s.io/api/authentication/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// TokenReviewLister helps list TokenReviews. -type TokenReviewLister interface { - // List lists all TokenReviews in the indexer. - List(selector labels.Selector) (ret []*v1beta1.TokenReview, err error) - // Get retrieves the TokenReview from the index for a given name. - Get(name string) (*v1beta1.TokenReview, error) - TokenReviewListerExpansion -} - -// tokenReviewLister implements the TokenReviewLister interface. -type tokenReviewLister struct { - indexer cache.Indexer -} - -// NewTokenReviewLister returns a new TokenReviewLister. -func NewTokenReviewLister(indexer cache.Indexer) TokenReviewLister { - return &tokenReviewLister{indexer: indexer} -} - -// List lists all TokenReviews in the indexer. -func (s *tokenReviewLister) List(selector labels.Selector) (ret []*v1beta1.TokenReview, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.TokenReview)) - }) - return ret, err -} - -// Get retrieves the TokenReview from the index for a given name. -func (s *tokenReviewLister) Get(name string) (*v1beta1.TokenReview, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta1.Resource("tokenreview"), name) - } - return obj.(*v1beta1.TokenReview), nil -} diff --git a/staging/src/k8s.io/client-go/listers/authorization/OWNERS b/staging/src/k8s.io/client-go/listers/authorization/OWNERS deleted file mode 100644 index 55d3fb23c07..00000000000 --- a/staging/src/k8s.io/client-go/listers/authorization/OWNERS +++ /dev/null @@ -1,8 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners - -approvers: - - sig-auth-authorizers-approvers -reviewers: - - sig-auth-authorizers-reviewers -labels: - - sig/auth diff --git a/staging/src/k8s.io/client-go/listers/authorization/v1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/authorization/v1/expansion_generated.go deleted file mode 100644 index af91939fb2a..00000000000 --- a/staging/src/k8s.io/client-go/listers/authorization/v1/expansion_generated.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -// LocalSubjectAccessReviewListerExpansion allows custom methods to be added to -// LocalSubjectAccessReviewLister. -type LocalSubjectAccessReviewListerExpansion interface{} - -// LocalSubjectAccessReviewNamespaceListerExpansion allows custom methods to be added to -// LocalSubjectAccessReviewNamespaceLister. -type LocalSubjectAccessReviewNamespaceListerExpansion interface{} - -// SelfSubjectAccessReviewListerExpansion allows custom methods to be added to -// SelfSubjectAccessReviewLister. -type SelfSubjectAccessReviewListerExpansion interface{} - -// SelfSubjectRulesReviewListerExpansion allows custom methods to be added to -// SelfSubjectRulesReviewLister. -type SelfSubjectRulesReviewListerExpansion interface{} - -// SubjectAccessReviewListerExpansion allows custom methods to be added to -// SubjectAccessReviewLister. -type SubjectAccessReviewListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/authorization/v1/localsubjectaccessreview.go b/staging/src/k8s.io/client-go/listers/authorization/v1/localsubjectaccessreview.go deleted file mode 100644 index e064c94c1d6..00000000000 --- a/staging/src/k8s.io/client-go/listers/authorization/v1/localsubjectaccessreview.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "k8s.io/api/authorization/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// LocalSubjectAccessReviewLister helps list LocalSubjectAccessReviews. -type LocalSubjectAccessReviewLister interface { - // List lists all LocalSubjectAccessReviews in the indexer. - List(selector labels.Selector) (ret []*v1.LocalSubjectAccessReview, err error) - // LocalSubjectAccessReviews returns an object that can list and get LocalSubjectAccessReviews. - LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewNamespaceLister - LocalSubjectAccessReviewListerExpansion -} - -// localSubjectAccessReviewLister implements the LocalSubjectAccessReviewLister interface. -type localSubjectAccessReviewLister struct { - indexer cache.Indexer -} - -// NewLocalSubjectAccessReviewLister returns a new LocalSubjectAccessReviewLister. -func NewLocalSubjectAccessReviewLister(indexer cache.Indexer) LocalSubjectAccessReviewLister { - return &localSubjectAccessReviewLister{indexer: indexer} -} - -// List lists all LocalSubjectAccessReviews in the indexer. -func (s *localSubjectAccessReviewLister) List(selector labels.Selector) (ret []*v1.LocalSubjectAccessReview, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.LocalSubjectAccessReview)) - }) - return ret, err -} - -// LocalSubjectAccessReviews returns an object that can list and get LocalSubjectAccessReviews. -func (s *localSubjectAccessReviewLister) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewNamespaceLister { - return localSubjectAccessReviewNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// LocalSubjectAccessReviewNamespaceLister helps list and get LocalSubjectAccessReviews. -type LocalSubjectAccessReviewNamespaceLister interface { - // List lists all LocalSubjectAccessReviews in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.LocalSubjectAccessReview, err error) - // Get retrieves the LocalSubjectAccessReview from the indexer for a given namespace and name. - Get(name string) (*v1.LocalSubjectAccessReview, error) - LocalSubjectAccessReviewNamespaceListerExpansion -} - -// localSubjectAccessReviewNamespaceLister implements the LocalSubjectAccessReviewNamespaceLister -// interface. -type localSubjectAccessReviewNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all LocalSubjectAccessReviews in the indexer for a given namespace. -func (s localSubjectAccessReviewNamespaceLister) List(selector labels.Selector) (ret []*v1.LocalSubjectAccessReview, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.LocalSubjectAccessReview)) - }) - return ret, err -} - -// Get retrieves the LocalSubjectAccessReview from the indexer for a given namespace and name. -func (s localSubjectAccessReviewNamespaceLister) Get(name string) (*v1.LocalSubjectAccessReview, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("localsubjectaccessreview"), name) - } - return obj.(*v1.LocalSubjectAccessReview), nil -} diff --git a/staging/src/k8s.io/client-go/listers/authorization/v1/selfsubjectaccessreview.go b/staging/src/k8s.io/client-go/listers/authorization/v1/selfsubjectaccessreview.go deleted file mode 100644 index f89bc1dde24..00000000000 --- a/staging/src/k8s.io/client-go/listers/authorization/v1/selfsubjectaccessreview.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "k8s.io/api/authorization/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// SelfSubjectAccessReviewLister helps list SelfSubjectAccessReviews. -type SelfSubjectAccessReviewLister interface { - // List lists all SelfSubjectAccessReviews in the indexer. - List(selector labels.Selector) (ret []*v1.SelfSubjectAccessReview, err error) - // Get retrieves the SelfSubjectAccessReview from the index for a given name. - Get(name string) (*v1.SelfSubjectAccessReview, error) - SelfSubjectAccessReviewListerExpansion -} - -// selfSubjectAccessReviewLister implements the SelfSubjectAccessReviewLister interface. -type selfSubjectAccessReviewLister struct { - indexer cache.Indexer -} - -// NewSelfSubjectAccessReviewLister returns a new SelfSubjectAccessReviewLister. -func NewSelfSubjectAccessReviewLister(indexer cache.Indexer) SelfSubjectAccessReviewLister { - return &selfSubjectAccessReviewLister{indexer: indexer} -} - -// List lists all SelfSubjectAccessReviews in the indexer. -func (s *selfSubjectAccessReviewLister) List(selector labels.Selector) (ret []*v1.SelfSubjectAccessReview, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.SelfSubjectAccessReview)) - }) - return ret, err -} - -// Get retrieves the SelfSubjectAccessReview from the index for a given name. -func (s *selfSubjectAccessReviewLister) Get(name string) (*v1.SelfSubjectAccessReview, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("selfsubjectaccessreview"), name) - } - return obj.(*v1.SelfSubjectAccessReview), nil -} diff --git a/staging/src/k8s.io/client-go/listers/authorization/v1/selfsubjectrulesreview.go b/staging/src/k8s.io/client-go/listers/authorization/v1/selfsubjectrulesreview.go deleted file mode 100644 index c65b5f84d0d..00000000000 --- a/staging/src/k8s.io/client-go/listers/authorization/v1/selfsubjectrulesreview.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "k8s.io/api/authorization/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// SelfSubjectRulesReviewLister helps list SelfSubjectRulesReviews. -type SelfSubjectRulesReviewLister interface { - // List lists all SelfSubjectRulesReviews in the indexer. - List(selector labels.Selector) (ret []*v1.SelfSubjectRulesReview, err error) - // Get retrieves the SelfSubjectRulesReview from the index for a given name. - Get(name string) (*v1.SelfSubjectRulesReview, error) - SelfSubjectRulesReviewListerExpansion -} - -// selfSubjectRulesReviewLister implements the SelfSubjectRulesReviewLister interface. -type selfSubjectRulesReviewLister struct { - indexer cache.Indexer -} - -// NewSelfSubjectRulesReviewLister returns a new SelfSubjectRulesReviewLister. -func NewSelfSubjectRulesReviewLister(indexer cache.Indexer) SelfSubjectRulesReviewLister { - return &selfSubjectRulesReviewLister{indexer: indexer} -} - -// List lists all SelfSubjectRulesReviews in the indexer. -func (s *selfSubjectRulesReviewLister) List(selector labels.Selector) (ret []*v1.SelfSubjectRulesReview, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.SelfSubjectRulesReview)) - }) - return ret, err -} - -// Get retrieves the SelfSubjectRulesReview from the index for a given name. -func (s *selfSubjectRulesReviewLister) Get(name string) (*v1.SelfSubjectRulesReview, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("selfsubjectrulesreview"), name) - } - return obj.(*v1.SelfSubjectRulesReview), nil -} diff --git a/staging/src/k8s.io/client-go/listers/authorization/v1/subjectaccessreview.go b/staging/src/k8s.io/client-go/listers/authorization/v1/subjectaccessreview.go deleted file mode 100644 index 0d6c29b39f5..00000000000 --- a/staging/src/k8s.io/client-go/listers/authorization/v1/subjectaccessreview.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "k8s.io/api/authorization/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// SubjectAccessReviewLister helps list SubjectAccessReviews. -type SubjectAccessReviewLister interface { - // List lists all SubjectAccessReviews in the indexer. - List(selector labels.Selector) (ret []*v1.SubjectAccessReview, err error) - // Get retrieves the SubjectAccessReview from the index for a given name. - Get(name string) (*v1.SubjectAccessReview, error) - SubjectAccessReviewListerExpansion -} - -// subjectAccessReviewLister implements the SubjectAccessReviewLister interface. -type subjectAccessReviewLister struct { - indexer cache.Indexer -} - -// NewSubjectAccessReviewLister returns a new SubjectAccessReviewLister. -func NewSubjectAccessReviewLister(indexer cache.Indexer) SubjectAccessReviewLister { - return &subjectAccessReviewLister{indexer: indexer} -} - -// List lists all SubjectAccessReviews in the indexer. -func (s *subjectAccessReviewLister) List(selector labels.Selector) (ret []*v1.SubjectAccessReview, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.SubjectAccessReview)) - }) - return ret, err -} - -// Get retrieves the SubjectAccessReview from the index for a given name. -func (s *subjectAccessReviewLister) Get(name string) (*v1.SubjectAccessReview, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("subjectaccessreview"), name) - } - return obj.(*v1.SubjectAccessReview), nil -} diff --git a/staging/src/k8s.io/client-go/listers/authorization/v1beta1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/authorization/v1beta1/expansion_generated.go deleted file mode 100644 index 24b06185edc..00000000000 --- a/staging/src/k8s.io/client-go/listers/authorization/v1beta1/expansion_generated.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta1 - -// LocalSubjectAccessReviewListerExpansion allows custom methods to be added to -// LocalSubjectAccessReviewLister. -type LocalSubjectAccessReviewListerExpansion interface{} - -// LocalSubjectAccessReviewNamespaceListerExpansion allows custom methods to be added to -// LocalSubjectAccessReviewNamespaceLister. -type LocalSubjectAccessReviewNamespaceListerExpansion interface{} - -// SelfSubjectAccessReviewListerExpansion allows custom methods to be added to -// SelfSubjectAccessReviewLister. -type SelfSubjectAccessReviewListerExpansion interface{} - -// SelfSubjectRulesReviewListerExpansion allows custom methods to be added to -// SelfSubjectRulesReviewLister. -type SelfSubjectRulesReviewListerExpansion interface{} - -// SubjectAccessReviewListerExpansion allows custom methods to be added to -// SubjectAccessReviewLister. -type SubjectAccessReviewListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/authorization/v1beta1/localsubjectaccessreview.go b/staging/src/k8s.io/client-go/listers/authorization/v1beta1/localsubjectaccessreview.go deleted file mode 100644 index 4eb8158a3f1..00000000000 --- a/staging/src/k8s.io/client-go/listers/authorization/v1beta1/localsubjectaccessreview.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1beta1 "k8s.io/api/authorization/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// LocalSubjectAccessReviewLister helps list LocalSubjectAccessReviews. -type LocalSubjectAccessReviewLister interface { - // List lists all LocalSubjectAccessReviews in the indexer. - List(selector labels.Selector) (ret []*v1beta1.LocalSubjectAccessReview, err error) - // LocalSubjectAccessReviews returns an object that can list and get LocalSubjectAccessReviews. - LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewNamespaceLister - LocalSubjectAccessReviewListerExpansion -} - -// localSubjectAccessReviewLister implements the LocalSubjectAccessReviewLister interface. -type localSubjectAccessReviewLister struct { - indexer cache.Indexer -} - -// NewLocalSubjectAccessReviewLister returns a new LocalSubjectAccessReviewLister. -func NewLocalSubjectAccessReviewLister(indexer cache.Indexer) LocalSubjectAccessReviewLister { - return &localSubjectAccessReviewLister{indexer: indexer} -} - -// List lists all LocalSubjectAccessReviews in the indexer. -func (s *localSubjectAccessReviewLister) List(selector labels.Selector) (ret []*v1beta1.LocalSubjectAccessReview, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.LocalSubjectAccessReview)) - }) - return ret, err -} - -// LocalSubjectAccessReviews returns an object that can list and get LocalSubjectAccessReviews. -func (s *localSubjectAccessReviewLister) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewNamespaceLister { - return localSubjectAccessReviewNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// LocalSubjectAccessReviewNamespaceLister helps list and get LocalSubjectAccessReviews. -type LocalSubjectAccessReviewNamespaceLister interface { - // List lists all LocalSubjectAccessReviews in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1beta1.LocalSubjectAccessReview, err error) - // Get retrieves the LocalSubjectAccessReview from the indexer for a given namespace and name. - Get(name string) (*v1beta1.LocalSubjectAccessReview, error) - LocalSubjectAccessReviewNamespaceListerExpansion -} - -// localSubjectAccessReviewNamespaceLister implements the LocalSubjectAccessReviewNamespaceLister -// interface. -type localSubjectAccessReviewNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all LocalSubjectAccessReviews in the indexer for a given namespace. -func (s localSubjectAccessReviewNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.LocalSubjectAccessReview, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.LocalSubjectAccessReview)) - }) - return ret, err -} - -// Get retrieves the LocalSubjectAccessReview from the indexer for a given namespace and name. -func (s localSubjectAccessReviewNamespaceLister) Get(name string) (*v1beta1.LocalSubjectAccessReview, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta1.Resource("localsubjectaccessreview"), name) - } - return obj.(*v1beta1.LocalSubjectAccessReview), nil -} diff --git a/staging/src/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectaccessreview.go b/staging/src/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectaccessreview.go deleted file mode 100644 index 4736ccdd564..00000000000 --- a/staging/src/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectaccessreview.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1beta1 "k8s.io/api/authorization/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// SelfSubjectAccessReviewLister helps list SelfSubjectAccessReviews. -type SelfSubjectAccessReviewLister interface { - // List lists all SelfSubjectAccessReviews in the indexer. - List(selector labels.Selector) (ret []*v1beta1.SelfSubjectAccessReview, err error) - // Get retrieves the SelfSubjectAccessReview from the index for a given name. - Get(name string) (*v1beta1.SelfSubjectAccessReview, error) - SelfSubjectAccessReviewListerExpansion -} - -// selfSubjectAccessReviewLister implements the SelfSubjectAccessReviewLister interface. -type selfSubjectAccessReviewLister struct { - indexer cache.Indexer -} - -// NewSelfSubjectAccessReviewLister returns a new SelfSubjectAccessReviewLister. -func NewSelfSubjectAccessReviewLister(indexer cache.Indexer) SelfSubjectAccessReviewLister { - return &selfSubjectAccessReviewLister{indexer: indexer} -} - -// List lists all SelfSubjectAccessReviews in the indexer. -func (s *selfSubjectAccessReviewLister) List(selector labels.Selector) (ret []*v1beta1.SelfSubjectAccessReview, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.SelfSubjectAccessReview)) - }) - return ret, err -} - -// Get retrieves the SelfSubjectAccessReview from the index for a given name. -func (s *selfSubjectAccessReviewLister) Get(name string) (*v1beta1.SelfSubjectAccessReview, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta1.Resource("selfsubjectaccessreview"), name) - } - return obj.(*v1beta1.SelfSubjectAccessReview), nil -} diff --git a/staging/src/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectrulesreview.go b/staging/src/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectrulesreview.go deleted file mode 100644 index 4e47abc3a97..00000000000 --- a/staging/src/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectrulesreview.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1beta1 "k8s.io/api/authorization/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// SelfSubjectRulesReviewLister helps list SelfSubjectRulesReviews. -type SelfSubjectRulesReviewLister interface { - // List lists all SelfSubjectRulesReviews in the indexer. - List(selector labels.Selector) (ret []*v1beta1.SelfSubjectRulesReview, err error) - // Get retrieves the SelfSubjectRulesReview from the index for a given name. - Get(name string) (*v1beta1.SelfSubjectRulesReview, error) - SelfSubjectRulesReviewListerExpansion -} - -// selfSubjectRulesReviewLister implements the SelfSubjectRulesReviewLister interface. -type selfSubjectRulesReviewLister struct { - indexer cache.Indexer -} - -// NewSelfSubjectRulesReviewLister returns a new SelfSubjectRulesReviewLister. -func NewSelfSubjectRulesReviewLister(indexer cache.Indexer) SelfSubjectRulesReviewLister { - return &selfSubjectRulesReviewLister{indexer: indexer} -} - -// List lists all SelfSubjectRulesReviews in the indexer. -func (s *selfSubjectRulesReviewLister) List(selector labels.Selector) (ret []*v1beta1.SelfSubjectRulesReview, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.SelfSubjectRulesReview)) - }) - return ret, err -} - -// Get retrieves the SelfSubjectRulesReview from the index for a given name. -func (s *selfSubjectRulesReviewLister) Get(name string) (*v1beta1.SelfSubjectRulesReview, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta1.Resource("selfsubjectrulesreview"), name) - } - return obj.(*v1beta1.SelfSubjectRulesReview), nil -} diff --git a/staging/src/k8s.io/client-go/listers/authorization/v1beta1/subjectaccessreview.go b/staging/src/k8s.io/client-go/listers/authorization/v1beta1/subjectaccessreview.go deleted file mode 100644 index 5782b4f23a0..00000000000 --- a/staging/src/k8s.io/client-go/listers/authorization/v1beta1/subjectaccessreview.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1beta1 "k8s.io/api/authorization/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// SubjectAccessReviewLister helps list SubjectAccessReviews. -type SubjectAccessReviewLister interface { - // List lists all SubjectAccessReviews in the indexer. - List(selector labels.Selector) (ret []*v1beta1.SubjectAccessReview, err error) - // Get retrieves the SubjectAccessReview from the index for a given name. - Get(name string) (*v1beta1.SubjectAccessReview, error) - SubjectAccessReviewListerExpansion -} - -// subjectAccessReviewLister implements the SubjectAccessReviewLister interface. -type subjectAccessReviewLister struct { - indexer cache.Indexer -} - -// NewSubjectAccessReviewLister returns a new SubjectAccessReviewLister. -func NewSubjectAccessReviewLister(indexer cache.Indexer) SubjectAccessReviewLister { - return &subjectAccessReviewLister{indexer: indexer} -} - -// List lists all SubjectAccessReviews in the indexer. -func (s *subjectAccessReviewLister) List(selector labels.Selector) (ret []*v1beta1.SubjectAccessReview, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.SubjectAccessReview)) - }) - return ret, err -} - -// Get retrieves the SubjectAccessReview from the index for a given name. -func (s *subjectAccessReviewLister) Get(name string) (*v1beta1.SubjectAccessReview, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta1.Resource("subjectaccessreview"), name) - } - return obj.(*v1beta1.SubjectAccessReview), nil -}