func (c *roles) Get(name string, options v1.GetOptions) (result *v1alpha1.Role, err error) {
	result = &v1alpha1.Role{}
	err = c.client.Get().
		Namespace(c.ns).
		Resource("roles").
		Name(name).
		VersionedParams(&options, scheme.ParameterCodec).
		Do().
		Into(result)
	return
}
Get takes name of the role, and returns the corresponding role object, and an error if there is any.
package v1alpha1
import (
	v1alpha1 "k8s.io/api/rbac/v1alpha1"
	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	types "k8s.io/apimachinery/pkg/types"
	watch "k8s.io/apimachinery/pkg/watch"
	scheme "k8s.io/client-go/kubernetes/scheme"
	rest "k8s.io/client-go/rest"
)
type RolesGetter interface {
	Roles(namespace string) RoleInterface
}
type RoleInterface interface {
	Create(*v1alpha1.Role) (*v1alpha1.Role, error)
	Update(*v1alpha1.Role) (*v1alpha1.Role, error)
	Delete(name string, options *v1.DeleteOptions) error
	DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
	Get(name string, options v1.GetOptions) (*v1alpha1.Role, error)
	List(opts v1.ListOptions) (*v1alpha1.RoleList, error)
	Watch(opts v1.ListOptions) (watch.Interface, error)
	Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error)
	RoleExpansion
}
type roles struct {
	client rest.Interface
	ns     string
}
func newRoles(c *RbacV1alpha1Client, namespace string) *roles {
	return &roles{
		client: c.RESTClient(),
		ns:     namespace,
	}
}