1 // SPDX-License-Identifier: Apache-2.0
\r
2 // Copyright (c) 2020 Intel Corporation
\r
3 // Code generated by client-gen. DO NOT EDIT.
\r
8 v1alpha1 "github.com/open-ness/EMCO/src/monitor/pkg/apis/k8splugin/v1alpha1"
\r
10 v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
\r
11 labels "k8s.io/apimachinery/pkg/labels"
\r
12 schema "k8s.io/apimachinery/pkg/runtime/schema"
\r
13 types "k8s.io/apimachinery/pkg/types"
\r
14 watch "k8s.io/apimachinery/pkg/watch"
\r
15 testing "k8s.io/client-go/testing"
\r
18 // FakeResourceBundleStates implements ResourceBundleStateInterface
\r
19 type FakeResourceBundleStates struct {
\r
20 Fake *FakeK8spluginV1alpha1
\r
24 var resourcebundlestatesResource = schema.GroupVersionResource{Group: "k8splugin.io", Version: "v1alpha1", Resource: "resourcebundlestates"}
\r
26 var resourcebundlestatesKind = schema.GroupVersionKind{Group: "k8splugin.io", Version: "v1alpha1", Kind: "ResourceBundleState"}
\r
28 // Get takes name of the resourceBundleState, and returns the corresponding resourceBundleState object, and an error if there is any.
\r
29 func (c *FakeResourceBundleStates) Get(name string, options v1.GetOptions) (result *v1alpha1.ResourceBundleState, err error) {
\r
31 Invokes(testing.NewGetAction(resourcebundlestatesResource, c.ns, name), &v1alpha1.ResourceBundleState{})
\r
36 return obj.(*v1alpha1.ResourceBundleState), err
\r
39 // List takes label and field selectors, and returns the list of ResourceBundleStates that match those selectors.
\r
40 func (c *FakeResourceBundleStates) List(opts v1.ListOptions) (result *v1alpha1.ResourceBundleStateList, err error) {
\r
42 Invokes(testing.NewListAction(resourcebundlestatesResource, resourcebundlestatesKind, c.ns, opts), &v1alpha1.ResourceBundleStateList{})
\r
48 label, _, _ := testing.ExtractFromListOptions(opts)
\r
50 label = labels.Everything()
\r
52 list := &v1alpha1.ResourceBundleStateList{ListMeta: obj.(*v1alpha1.ResourceBundleStateList).ListMeta}
\r
53 for _, item := range obj.(*v1alpha1.ResourceBundleStateList).Items {
\r
54 if label.Matches(labels.Set(item.Labels)) {
\r
55 list.Items = append(list.Items, item)
\r
61 // Watch returns a watch.Interface that watches the requested resourceBundleStates.
\r
62 func (c *FakeResourceBundleStates) Watch(opts v1.ListOptions) (watch.Interface, error) {
\r
64 InvokesWatch(testing.NewWatchAction(resourcebundlestatesResource, c.ns, opts))
\r
68 // Create takes the representation of a resourceBundleState and creates it. Returns the server's representation of the resourceBundleState, and an error, if there is any.
\r
69 func (c *FakeResourceBundleStates) Create(resourceBundleState *v1alpha1.ResourceBundleState) (result *v1alpha1.ResourceBundleState, err error) {
\r
71 Invokes(testing.NewCreateAction(resourcebundlestatesResource, c.ns, resourceBundleState), &v1alpha1.ResourceBundleState{})
\r
76 return obj.(*v1alpha1.ResourceBundleState), err
\r
79 // Update takes the representation of a resourceBundleState and updates it. Returns the server's representation of the resourceBundleState, and an error, if there is any.
\r
80 func (c *FakeResourceBundleStates) Update(resourceBundleState *v1alpha1.ResourceBundleState) (result *v1alpha1.ResourceBundleState, err error) {
\r
82 Invokes(testing.NewUpdateAction(resourcebundlestatesResource, c.ns, resourceBundleState), &v1alpha1.ResourceBundleState{})
\r
87 return obj.(*v1alpha1.ResourceBundleState), err
\r
90 // UpdateStatus was generated because the type contains a Status member.
\r
91 // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
\r
92 func (c *FakeResourceBundleStates) UpdateStatus(resourceBundleState *v1alpha1.ResourceBundleState) (*v1alpha1.ResourceBundleState, error) {
\r
94 Invokes(testing.NewUpdateSubresourceAction(resourcebundlestatesResource, "status", c.ns, resourceBundleState), &v1alpha1.ResourceBundleState{})
\r
99 return obj.(*v1alpha1.ResourceBundleState), err
\r
102 // Delete takes name of the resourceBundleState and deletes it. Returns an error if one occurs.
\r
103 func (c *FakeResourceBundleStates) Delete(name string, options *v1.DeleteOptions) error {
\r
105 Invokes(testing.NewDeleteAction(resourcebundlestatesResource, c.ns, name), &v1alpha1.ResourceBundleState{})
\r
110 // DeleteCollection deletes a collection of objects.
\r
111 func (c *FakeResourceBundleStates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
\r
112 action := testing.NewDeleteCollectionAction(resourcebundlestatesResource, c.ns, listOptions)
\r
114 _, err := c.Fake.Invokes(action, &v1alpha1.ResourceBundleStateList{})
\r
118 // Patch applies the patch and returns the patched resourceBundleState.
\r
119 func (c *FakeResourceBundleStates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ResourceBundleState, err error) {
\r
120 obj, err := c.Fake.
\r
121 Invokes(testing.NewPatchSubresourceAction(resourcebundlestatesResource, c.ns, name, pt, data, subresources...), &v1alpha1.ResourceBundleState{})
\r
126 return obj.(*v1alpha1.ResourceBundleState), err
\r