func (c *namespaces) Finalize(namespace *api.Namespace) (result *api.Namespace, err error) {
	result = &api.Namespace{}
	if len(namespace.ResourceVersion) == 0 {
		err = fmt.Errorf("invalid update object, missing resource version: %v", namespace)
		return
	}
	err = c.r.Put().Resource("namespaces").Name(namespace.Name).SubResource("finalize").Body(namespace).Do().Into(result)
	return
}
Finalize takes the representation of a namespace to update.  Returns the server's representation of the namespace, and an error, if it occurs.
package unversioned
import (
	"fmt"
	"k8s.io/kubernetes/pkg/api"
	"k8s.io/kubernetes/pkg/watch"
)
type NamespacesInterface interface {
	Namespaces() NamespaceInterface
}
type NamespaceInterface interface {
	Create(item *api.Namespace) (*api.Namespace, error)
	Get(name string) (result *api.Namespace, err error)
	List(opts api.ListOptions) (*api.NamespaceList, error)
	Delete(name string) error
	Update(item *api.Namespace) (*api.Namespace, error)
	Watch(opts api.ListOptions) (watch.Interface, error)
	Finalize(item *api.Namespace) (*api.Namespace, error)
	Status(item *api.Namespace) (*api.Namespace, error)
}
type namespaces struct {
	r *Client
}
func newNamespaces(c *Client) *namespaces {
	return &namespaces{r: c}
}
func (c *namespaces) Create(namespace *api.Namespace) (*api.Namespace, error) {
	result := &api.Namespace{}
	err := c.r.Post().Resource("namespaces").Body(namespace).Do().Into(result)
	return result, err
}
func (c *namespaces) List(opts api.ListOptions) (*api.NamespaceList, error) {
	result := &api.NamespaceList{}
	err := c.r.Get().
		Resource("namespaces").
		VersionedParams(&opts, api.ParameterCodec).
		Do().Into(result)
	return result, err
}
func (c *namespaces) Update(namespace *api.Namespace) (result *api.Namespace, err error) {
	result = &api.Namespace{}
	err = c.r.Put().Resource("namespaces").Name(namespace.Name).Body(namespace).Do().Into(result)
	return
}