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()) -}