func (c *FakeClusterNetworks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *danmv1.ClusterNetwork, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootPatchSubresourceAction(clusternetworksResource, name, pt, data, subresources...), &danmv1.ClusterNetwork{})
	if obj == nil {
		return nil, err
	}
	return obj.(*danmv1.ClusterNetwork), err
}
Patch applies the patch and returns the patched clusterNetwork.
package fake
import (
	"context"
	danmv1 "github.com/nokia/danm/crd/apis/danm/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"
)
type FakeClusterNetworks struct {
	Fake *FakeDanmV1
}
var clusternetworksResource = schema.GroupVersionResource{Group: "danm.k8s.io", Version: "v1", Resource: "clusternetworks"}
var clusternetworksKind = schema.GroupVersionKind{Group: "danm.k8s.io", Version: "v1", Kind: "ClusterNetwork"}
func (c *FakeClusterNetworks) Get(ctx context.Context, name string, options v1.GetOptions) (result *danmv1.ClusterNetwork, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootGetAction(clusternetworksResource, name), &danmv1.ClusterNetwork{})
	if obj == nil {
		return nil, err
	}
	return obj.(*danmv1.ClusterNetwork), err
}
func (c *FakeClusterNetworks) List(ctx context.Context, opts v1.ListOptions) (result *danmv1.ClusterNetworkList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootListAction(clusternetworksResource, clusternetworksKind, opts), &danmv1.ClusterNetworkList{})
	if obj == nil {
		return nil, err
	}
	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &danmv1.ClusterNetworkList{ListMeta: obj.(*danmv1.ClusterNetworkList).ListMeta}
	for _, item := range obj.(*danmv1.ClusterNetworkList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
func (c *FakeClusterNetworks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
	return c.Fake.
		InvokesWatch(testing.NewRootWatchAction(clusternetworksResource, opts))
}
func (c *FakeClusterNetworks) Create(ctx context.Context, clusterNetwork *danmv1.ClusterNetwork, opts v1.CreateOptions) (result *danmv1.ClusterNetwork, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootCreateAction(clusternetworksResource, clusterNetwork), &danmv1.ClusterNetwork{})
	if obj == nil {
		return nil, err
	}
	return obj.(*danmv1.ClusterNetwork), err
}
func (c *FakeClusterNetworks) Update(ctx context.Context, clusterNetwork *danmv1.ClusterNetwork, opts v1.UpdateOptions) (result *danmv1.ClusterNetwork, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootUpdateAction(clusternetworksResource, clusterNetwork), &danmv1.ClusterNetwork{})
	if obj == nil {
		return nil, err
	}
	return obj.(*danmv1.ClusterNetwork), err
}
func (c *FakeClusterNetworks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
	_, err := c.Fake.
		Invokes(testing.NewRootDeleteAction(clusternetworksResource, name), &danmv1.ClusterNetwork{})
	return err
}
func (c *FakeClusterNetworks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
	action := testing.NewRootDeleteCollectionAction(clusternetworksResource, listOpts)
	_, err := c.Fake.Invokes(action, &danmv1.ClusterNetworkList{})
	return err
}