Remove BPA from Makefile
[icn.git] / cmd / bpa-operator / vendor / k8s.io / client-go / kubernetes / typed / admissionregistration / v1beta1 / fake / fake_mutatingwebhookconfiguration.go
1 /*
2 Copyright The Kubernetes Authors.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8     http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 */
16
17 // Code generated by client-gen. DO NOT EDIT.
18
19 package fake
20
21 import (
22         v1beta1 "k8s.io/api/admissionregistration/v1beta1"
23         v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
24         labels "k8s.io/apimachinery/pkg/labels"
25         schema "k8s.io/apimachinery/pkg/runtime/schema"
26         types "k8s.io/apimachinery/pkg/types"
27         watch "k8s.io/apimachinery/pkg/watch"
28         testing "k8s.io/client-go/testing"
29 )
30
31 // FakeMutatingWebhookConfigurations implements MutatingWebhookConfigurationInterface
32 type FakeMutatingWebhookConfigurations struct {
33         Fake *FakeAdmissionregistrationV1beta1
34 }
35
36 var mutatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1beta1", Resource: "mutatingwebhookconfigurations"}
37
38 var mutatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1beta1", Kind: "MutatingWebhookConfiguration"}
39
40 // Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any.
41 func (c *FakeMutatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) {
42         obj, err := c.Fake.
43                 Invokes(testing.NewRootGetAction(mutatingwebhookconfigurationsResource, name), &v1beta1.MutatingWebhookConfiguration{})
44         if obj == nil {
45                 return nil, err
46         }
47         return obj.(*v1beta1.MutatingWebhookConfiguration), err
48 }
49
50 // List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors.
51 func (c *FakeMutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) {
52         obj, err := c.Fake.
53                 Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), &v1beta1.MutatingWebhookConfigurationList{})
54         if obj == nil {
55                 return nil, err
56         }
57
58         label, _, _ := testing.ExtractFromListOptions(opts)
59         if label == nil {
60                 label = labels.Everything()
61         }
62         list := &v1beta1.MutatingWebhookConfigurationList{ListMeta: obj.(*v1beta1.MutatingWebhookConfigurationList).ListMeta}
63         for _, item := range obj.(*v1beta1.MutatingWebhookConfigurationList).Items {
64                 if label.Matches(labels.Set(item.Labels)) {
65                         list.Items = append(list.Items, item)
66                 }
67         }
68         return list, err
69 }
70
71 // Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations.
72 func (c *FakeMutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
73         return c.Fake.
74                 InvokesWatch(testing.NewRootWatchAction(mutatingwebhookconfigurationsResource, opts))
75 }
76
77 // Create takes the representation of a mutatingWebhookConfiguration and creates it.  Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
78 func (c *FakeMutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) {
79         obj, err := c.Fake.
80                 Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1beta1.MutatingWebhookConfiguration{})
81         if obj == nil {
82                 return nil, err
83         }
84         return obj.(*v1beta1.MutatingWebhookConfiguration), err
85 }
86
87 // Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
88 func (c *FakeMutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) {
89         obj, err := c.Fake.
90                 Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1beta1.MutatingWebhookConfiguration{})
91         if obj == nil {
92                 return nil, err
93         }
94         return obj.(*v1beta1.MutatingWebhookConfiguration), err
95 }
96
97 // Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs.
98 func (c *FakeMutatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
99         _, err := c.Fake.
100                 Invokes(testing.NewRootDeleteAction(mutatingwebhookconfigurationsResource, name), &v1beta1.MutatingWebhookConfiguration{})
101         return err
102 }
103
104 // DeleteCollection deletes a collection of objects.
105 func (c *FakeMutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
106         action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOptions)
107
108         _, err := c.Fake.Invokes(action, &v1beta1.MutatingWebhookConfigurationList{})
109         return err
110 }
111
112 // Patch applies the patch and returns the patched mutatingWebhookConfiguration.
113 func (c *FakeMutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) {
114         obj, err := c.Fake.
115                 Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, pt, data, subresources...), &v1beta1.MutatingWebhookConfiguration{})
116         if obj == nil {
117                 return nil, err
118         }
119         return obj.(*v1beta1.MutatingWebhookConfiguration), err
120 }