func (c *roles) Create(role *v1beta1.Role) (result *v1beta1.Role, err error) {
	result = &v1beta1.Role{}
	err = c.client.Post().
		Namespace(c.ns).
		Resource("roles").
		Body(role).
		Do().
		Into(result)
	return
}
Create takes the representation of a role and creates it.  Returns the server's representation of the role, and an error, if there is any.
package v1beta1
import (
	v1beta1 "k8s.io/api/rbac/v1beta1"
	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(*v1beta1.Role) (*v1beta1.Role, error)
	Update(*v1beta1.Role) (*v1beta1.Role, error)
	Delete(name string, options *v1.DeleteOptions) error
	DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
	Get(name string, options v1.GetOptions) (*v1beta1.Role, error)
	List(opts v1.ListOptions) (*v1beta1.RoleList, error)
	Watch(opts v1.ListOptions) (watch.Interface, error)
	Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error)
	RoleExpansion
}
type roles struct {
	client rest.Interface
	ns     string
}
func newRoles(c *RbacV1beta1Client, namespace string) *roles {
	return &roles{
		client: c.RESTClient(),
		ns:     namespace,
	}
}
func (c *roles) Get(name string, options v1.GetOptions) (result *v1beta1.Role, err error) {
	result = &v1beta1.Role{}
	err = c.client.Get().
		Namespace(c.ns).
		Resource("roles").
		Name(name).
		VersionedParams(&options, scheme.ParameterCodec).
		Do().
		Into(result)
	return
}
func (c *roles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err error) {
	result = &v1beta1.RoleList{}
	err = c.client.Get().
		Namespace(c.ns).
		Resource("roles").
		VersionedParams(&opts, scheme.ParameterCodec).
		Do().
		Into(result)
	return
}
func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
	opts.Watch = true
	return c.client.Get().
		Namespace(c.ns).
		Resource("roles").
		VersionedParams(&opts, scheme.ParameterCodec).
		Watch()
}