// Code generated by client-gen. DO NOT EDIT.

package v1

import (
	"context"

	v1 "github.com/openshift/api/authorization/v1"
	scheme "github.com/openshift/client-go/authorization/clientset/versioned/scheme"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	rest "k8s.io/client-go/rest"
)

// ResourceAccessReviewsGetter has a method to return a ResourceAccessReviewInterface.
// A group's client should implement this interface.
type ResourceAccessReviewsGetter interface {
	ResourceAccessReviews() ResourceAccessReviewInterface
}

// ResourceAccessReviewInterface has methods to work with ResourceAccessReview resources.
type ResourceAccessReviewInterface interface {
	Create(ctx context.Context, resourceAccessReview *v1.ResourceAccessReview, opts metav1.CreateOptions) (*v1.ResourceAccessReviewResponse, error)

	ResourceAccessReviewExpansion
}

// resourceAccessReviews implements ResourceAccessReviewInterface
type resourceAccessReviews struct {
	client rest.Interface
}

// newResourceAccessReviews returns a ResourceAccessReviews
func newResourceAccessReviews(c *AuthorizationV1Client) *resourceAccessReviews {
	return &resourceAccessReviews{
		client: c.RESTClient(),
	}
}

// Create takes the representation of a resourceAccessReview and creates it.  Returns the server's representation of the resourceAccessReviewResponse, and an error, if there is any.
func (c *resourceAccessReviews) Create(ctx context.Context, resourceAccessReview *v1.ResourceAccessReview, opts metav1.CreateOptions) (result *v1.ResourceAccessReviewResponse, err error) {
	result = &v1.ResourceAccessReviewResponse{}
	err = c.client.Post().
		Resource("resourceaccessreviews").
		VersionedParams(&opts, scheme.ParameterCodec).
		Body(resourceAccessReview).
		Do(ctx).
		Into(result)
	return
}
