func (c *FakeClusterPodAssignmentRules) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterPodAssignmentRule, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootPatchSubresourceAction(clusterpodassignmentrulesResource, name, pt, data, subresources...), &v1alpha1.ClusterPodAssignmentRule{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha1.ClusterPodAssignmentRule), err
}
Patch applies the patch and returns the patched clusterPodAssignmentRule.
package fake
import (
	v1alpha1 "github.com/domoinc/kube-valet/pkg/apis/assignments/v1alpha1"
	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 FakeClusterPodAssignmentRules struct {
	Fake *FakeAssignmentsV1alpha1
}
var clusterpodassignmentrulesResource = schema.GroupVersionResource{Group: "assignments.kube-valet.io", Version: "v1alpha1", Resource: "clusterpodassignmentrules"}
var clusterpodassignmentrulesKind = schema.GroupVersionKind{Group: "assignments.kube-valet.io", Version: "v1alpha1", Kind: "ClusterPodAssignmentRule"}
func (c *FakeClusterPodAssignmentRules) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterPodAssignmentRule, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootGetAction(clusterpodassignmentrulesResource, name), &v1alpha1.ClusterPodAssignmentRule{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha1.ClusterPodAssignmentRule), err
}
func (c *FakeClusterPodAssignmentRules) List(opts v1.ListOptions) (result *v1alpha1.ClusterPodAssignmentRuleList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootListAction(clusterpodassignmentrulesResource, clusterpodassignmentrulesKind, opts), &v1alpha1.ClusterPodAssignmentRuleList{})
	if obj == nil {
		return nil, err
	}
	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &v1alpha1.ClusterPodAssignmentRuleList{ListMeta: obj.(*v1alpha1.ClusterPodAssignmentRuleList).ListMeta}
	for _, item := range obj.(*v1alpha1.ClusterPodAssignmentRuleList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
func (c *FakeClusterPodAssignmentRules) Watch(opts v1.ListOptions) (watch.Interface, error) {
	return c.Fake.
		InvokesWatch(testing.NewRootWatchAction(clusterpodassignmentrulesResource, opts))
}
func (c *FakeClusterPodAssignmentRules) Create(clusterPodAssignmentRule *v1alpha1.ClusterPodAssignmentRule) (result *v1alpha1.ClusterPodAssignmentRule, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootCreateAction(clusterpodassignmentrulesResource, clusterPodAssignmentRule), &v1alpha1.ClusterPodAssignmentRule{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha1.ClusterPodAssignmentRule), err
}
func (c *FakeClusterPodAssignmentRules) Update(clusterPodAssignmentRule *v1alpha1.ClusterPodAssignmentRule) (result *v1alpha1.ClusterPodAssignmentRule, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootUpdateAction(clusterpodassignmentrulesResource, clusterPodAssignmentRule), &v1alpha1.ClusterPodAssignmentRule{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha1.ClusterPodAssignmentRule), err
}
func (c *FakeClusterPodAssignmentRules) Delete(name string, options *v1.DeleteOptions) error {
	_, err := c.Fake.
		Invokes(testing.NewRootDeleteAction(clusterpodassignmentrulesResource, name), &v1alpha1.ClusterPodAssignmentRule{})
	return err
}
func (c *FakeClusterPodAssignmentRules) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
	action := testing.NewRootDeleteCollectionAction(clusterpodassignmentrulesResource, listOptions)
	_, err := c.Fake.Invokes(action, &v1alpha1.ClusterPodAssignmentRuleList{})
	return err
}