func (c *FakeClusters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha4.Cluster, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, pt, data, subresources...), &v1alpha4.Cluster{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha4.Cluster), err
}
Patch applies the patch and returns the patched cluster.
package fake
import (
	"context"
	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"
	v1alpha4 "sigs.k8s.io/cluster-api-provider-nested/virtualcluster/experiment/pkg/apis/cluster/v1alpha4"
)
type FakeClusters struct {
	Fake *FakeClusterV1alpha4
	ns   string
}
var clustersResource = schema.GroupVersionResource{Group: "cluster.x-k8s.io", Version: "v1alpha4", Resource: "clusters"}
var clustersKind = schema.GroupVersionKind{Group: "cluster.x-k8s.io", Version: "v1alpha4", Kind: "Cluster"}
func (c *FakeClusters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha4.Cluster, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(clustersResource, c.ns, name), &v1alpha4.Cluster{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha4.Cluster), err
}
func (c *FakeClusters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha4.ClusterList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewListAction(clustersResource, clustersKind, c.ns, opts), &v1alpha4.ClusterList{})
	if obj == nil {
		return nil, err
	}
	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &v1alpha4.ClusterList{ListMeta: obj.(*v1alpha4.ClusterList).ListMeta}
	for _, item := range obj.(*v1alpha4.ClusterList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
func (c *FakeClusters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
	return c.Fake.
		InvokesWatch(testing.NewWatchAction(clustersResource, c.ns, opts))
}
func (c *FakeClusters) Create(ctx context.Context, cluster *v1alpha4.Cluster, opts v1.CreateOptions) (result *v1alpha4.Cluster, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewCreateAction(clustersResource, c.ns, cluster), &v1alpha4.Cluster{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha4.Cluster), err
}
func (c *FakeClusters) Update(ctx context.Context, cluster *v1alpha4.Cluster, opts v1.UpdateOptions) (result *v1alpha4.Cluster, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(clustersResource, c.ns, cluster), &v1alpha4.Cluster{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha4.Cluster), err
}
func (c *FakeClusters) UpdateStatus(ctx context.Context, cluster *v1alpha4.Cluster, opts v1.UpdateOptions) (*v1alpha4.Cluster, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(clustersResource, "status", c.ns, cluster), &v1alpha4.Cluster{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha4.Cluster), err
}
func (c *FakeClusters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
	_, err := c.Fake.
		Invokes(testing.NewDeleteAction(clustersResource, c.ns, name), &v1alpha4.Cluster{})
	return err
}
func (c *FakeClusters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
	action := testing.NewDeleteCollectionAction(clustersResource, c.ns, listOpts)
	_, err := c.Fake.Invokes(action, &v1alpha4.ClusterList{})
	return err
}