func (c *FakeAWSIAMRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *zalandoorgv1.AWSIAMRole, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewPatchSubresourceAction(awsiamrolesResource, c.ns, name, pt, data, subresources...), &zalandoorgv1.AWSIAMRole{})
	if obj == nil {
		return nil, err
	}
	return obj.(*zalandoorgv1.AWSIAMRole), err
}
Patch applies the patch and returns the patched aWSIAMRole.
package fake
import (
	"context"
	zalandoorgv1 "github.com/zalando-incubator/kube-aws-iam-controller/pkg/apis/zalando.org/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 FakeAWSIAMRoles struct {
	Fake *FakeZalandoV1
	ns   string
}
var awsiamrolesResource = schema.GroupVersionResource{Group: "zalando.org", Version: "v1", Resource: "awsiamroles"}
var awsiamrolesKind = schema.GroupVersionKind{Group: "zalando.org", Version: "v1", Kind: "AWSIAMRole"}
func (c *FakeAWSIAMRoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *zalandoorgv1.AWSIAMRole, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(awsiamrolesResource, c.ns, name), &zalandoorgv1.AWSIAMRole{})
	if obj == nil {
		return nil, err
	}
	return obj.(*zalandoorgv1.AWSIAMRole), err
}
func (c *FakeAWSIAMRoles) List(ctx context.Context, opts v1.ListOptions) (result *zalandoorgv1.AWSIAMRoleList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewListAction(awsiamrolesResource, awsiamrolesKind, c.ns, opts), &zalandoorgv1.AWSIAMRoleList{})
	if obj == nil {
		return nil, err
	}
	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &zalandoorgv1.AWSIAMRoleList{ListMeta: obj.(*zalandoorgv1.AWSIAMRoleList).ListMeta}
	for _, item := range obj.(*zalandoorgv1.AWSIAMRoleList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
func (c *FakeAWSIAMRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
	return c.Fake.
		InvokesWatch(testing.NewWatchAction(awsiamrolesResource, c.ns, opts))
}
func (c *FakeAWSIAMRoles) Create(ctx context.Context, aWSIAMRole *zalandoorgv1.AWSIAMRole, opts v1.CreateOptions) (result *zalandoorgv1.AWSIAMRole, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewCreateAction(awsiamrolesResource, c.ns, aWSIAMRole), &zalandoorgv1.AWSIAMRole{})
	if obj == nil {
		return nil, err
	}
	return obj.(*zalandoorgv1.AWSIAMRole), err
}
func (c *FakeAWSIAMRoles) Update(ctx context.Context, aWSIAMRole *zalandoorgv1.AWSIAMRole, opts v1.UpdateOptions) (result *zalandoorgv1.AWSIAMRole, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(awsiamrolesResource, c.ns, aWSIAMRole), &zalandoorgv1.AWSIAMRole{})
	if obj == nil {
		return nil, err
	}
	return obj.(*zalandoorgv1.AWSIAMRole), err
}
func (c *FakeAWSIAMRoles) UpdateStatus(ctx context.Context, aWSIAMRole *zalandoorgv1.AWSIAMRole, opts v1.UpdateOptions) (*zalandoorgv1.AWSIAMRole, error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateSubresourceAction(awsiamrolesResource, "status", c.ns, aWSIAMRole), &zalandoorgv1.AWSIAMRole{})
	if obj == nil {
		return nil, err
	}
	return obj.(*zalandoorgv1.AWSIAMRole), err
}
func (c *FakeAWSIAMRoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
	_, err := c.Fake.
		Invokes(testing.NewDeleteAction(awsiamrolesResource, c.ns, name), &zalandoorgv1.AWSIAMRole{})
	return err
}
func (c *FakeAWSIAMRoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
	action := testing.NewDeleteCollectionAction(awsiamrolesResource, c.ns, listOpts)
	_, err := c.Fake.Invokes(action, &zalandoorgv1.AWSIAMRoleList{})
	return err
}