func (api *API) UpdateQuota(conf QuotaConfig) error {
	var (
		values = url.Values{}
		errs   []error
	)
	if conf.UID == "" {
		return errors.New("UID field is required")
	}
	if conf.QuotaType == "" {
		return errors.New("QuotaType field is required")
	}
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return errs[0]
	}
	values.Add("format", "json")
	_, _, err := api.call("PUT", "/user", values, true, "quota")
	return err
}
UpdateQuota updates user's quotas

!! caps:	users=write !!

@UID
@Quota [user,bucket]
package radosAPI
import (
	"encoding/json"
	"errors"
	"net/url"
	"time"
	"fmt"
	"github.com/QuentinPerez/go-encodeUrl"
)
type UsageConfig struct {
	UID         string     `url:"uid,ifStringIsNotEmpty"`      
	Start       *time.Time `url:"start,ifTimeIsNotNilCeph"`    
	End         *time.Time `url:"end,ifTimeIsNotNilCeph"`      
	ShowEntries bool       `url:"show-entries,ifBoolIsFalse"`  
	ShowSummary bool       `url:"show-summary,ifBoolIsFalse"`  
	RemoveAll   bool       `url:"remove-all,ifBoolIsTrue"`     
}
func (api *API) GetUsage(conf UsageConfig) (*Usage, error) {
	var (
		ret    = &Usage{}
		values = url.Values{}
		errs   []error
	)
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return nil, errs[0]
	}
	values.Add("format", "json")
	body, _, err := api.call("GET", "/usage", values, true)
	if err != nil {
		return nil, err
	}
	if err = json.Unmarshal(body, &ret); err != nil {
		return nil, err
	}
	return ret, nil
}
func (api *API) DeleteUsage(conf UsageConfig) error {
	var (
		values = url.Values{}
		errs   []error
	)
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return errs[0]
	}
	values.Add("format", "json")
	_, _, err := api.call("DELETE", "/usage", values, true)
	return err
}
func (api *API) GetUser(uid ...string) (*User, error) {
	ret := &User{}
	values := url.Values{}
	values.Add("format", "json")
	if len(uid) != 0 {
		values.Add("uid", uid[0])
	}
	body, _, err := api.call("GET", "/user", values, true)
	if err != nil {
		return nil, err
	}
	if err = json.Unmarshal(body, &ret); err != nil {
		return nil, err
	}
	return ret, nil
}
func (api *API) GetUIDs() ([]string, error) {
	var ret []string
	values := url.Values{}
	values.Add("format", "json")
	body, _, err := api.call("GET", "/metadata/user", values, true)
	if err != nil {
		return ret, err
	}
	if err = json.Unmarshal(body, &ret); err != nil {
		return ret, err
	}
	return ret, nil
}
func (api *API) GetUsers() ([]*User, error) {
	var ret []*User
	uids, err := api.GetUIDs()
	if err != nil {
		return ret, err
	}
	ret = make([]*User, len(uids))
	for idx, uid := range uids {
		ret[idx], err = api.GetUser(uid)
		if err != nil {
			return ret, err
		}
	}
	return ret, nil
}
type UserConfig struct {
	UID         string `url:"uid,ifStringIsNotEmpty"`           
	DisplayName string `url:"display-name,ifStringIsNotEmpty"`  
	Email       string `url:"email,ifStringIsNotEmpty"`         
	KeyType     string `url:"key-type,ifStringIsNotEmpty"`      
	AccessKey   string `url:"access-key,ifStringIsNotEmpty"`    
	SecretKey   string `url:"secret-key,ifStringIsNotEmpty"`    
	UserCaps    string `url:"user-caps,ifStringIsNotEmpty"`     
	MaxBuckets  *int   `url:"max-buckets,itoaIfNotNil"`         
	GenerateKey bool   `url:"generate-key,ifBoolIsTrue"`        
	Suspended   bool   `url:"suspended,ifBoolIsTrue"`           
	PurgeData   bool   `url:"purge-data,ifBoolIsTrue"`          
}
func (api *API) CreateUser(conf UserConfig) (*User, error) {
	if conf.UID == "" {
		return nil, errors.New("UID field is required")
	}
	if conf.DisplayName == "" {
		return nil, errors.New("DisplayName field is required")
	}
	var (
		ret    = &User{}
		values = url.Values{}
		errs   []error
	)
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return nil, errs[0]
	}
	values.Add("format", "json")
	body, _, err := api.call("PUT", "/user", values, true)
	if err != nil {
		return nil, err
	}
	if err = json.Unmarshal(body, &ret); err != nil {
		return nil, err
	}
	return ret, nil
}
func (api *API) UpdateUser(conf UserConfig) (*User, error) {
	if conf.UID == "" {
		return nil, errors.New("UID field is required")
	}
	var (
		ret    = &User{}
		values = url.Values{}
		errs   []error
	)
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return nil, errs[0]
	}
	values.Add("format", "json")
	body, _, err := api.call("POST", "/user", values, true)
	if err != nil {
		return nil, err
	}
	if err = json.Unmarshal(body, &ret); err != nil {
		return nil, err
	}
	return ret, nil
}
func (api *API) RemoveUser(conf UserConfig) error {
	if conf.UID == "" {
		return errors.New("UID field is required")
	}
	var (
		values = url.Values{}
		errs   []error
	)
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return errs[0]
	}
	values.Add("format", "json")
	_, _, err := api.call("DELETE", "/user", values, true)
	return err
}
type SubUserConfig struct {
	UID            string `url:"uid,ifStringIsNotEmpty"`         
	SubUser        string `url:"subuser,ifStringIsNotEmpty"`     
	KeyType        string `url:"key-type,ifStringIsNotEmpty"`    
	Access         string `url:"access,ifStringIsNotEmpty"`      
	Secret         string `url:"secret,ifStringIsNotEmpty"`      
	SecretKey      string `url:"secret-key,ifStringIsNotEmpty"`  
	GenerateSecret bool   `url:"generate-secret,ifBoolIsTrue"`   
	PurgeKeys      bool   `url:"purge-keys,ifBoolIsTrue"`        
}
func (api *API) CreateSubUser(conf SubUserConfig) (*SubUsers, error) {
	if conf.UID == "" {
		return nil, errors.New("UID field is required")
	}
	var (
		ret    = &SubUsers{}
		values = url.Values{}
		errs   []error
	)
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return nil, errs[0]
	}
	values.Add("format", "json")
	body, _, err := api.call("PUT", "/user", values, true, "subuser")
	if err != nil {
		return nil, err
	}
	if err = json.Unmarshal(body, &ret); err != nil {
		return nil, err
	}
	return ret, nil
}
func (api *API) UpdateSubUser(conf SubUserConfig) (*SubUsers, error) {
	if conf.UID == "" {
		return nil, errors.New("UID field is required")
	}
	if conf.SubUser == "" {
		return nil, errors.New("SubUser field is required")
	}
	var (
		ret    = &SubUsers{}
		values = url.Values{}
		errs   []error
	)
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return nil, errs[0]
	}
	values.Add("format", "json")
	body, _, err := api.call("POST", "/user", values, true, "subuser")
	if err != nil {
		return nil, err
	}
	if err = json.Unmarshal(body, &ret); err != nil {
		return nil, err
	}
	return ret, nil
}
func (api *API) RemoveSubUser(conf SubUserConfig) error {
	if conf.UID == "" {
		return errors.New("UID field is required")
	}
	if conf.SubUser == "" {
		return errors.New("SubUser field is required")
	}
	var (
		values = url.Values{}
		errs   []error
	)
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return errs[0]
	}
	values.Add("format", "json")
	_, _, err := api.call("DELETE", "/user", values, true, "subuser")
	return err
}
type KeyConfig struct {
	UID            string `url:"uid,ifStringIsNotEmpty"`         
	SubUser        string `url:"subuser,ifStringIsNotEmpty"`     
	KeyType        string `url:"key-type,ifStringIsNotEmpty"`    
	AccessKey      string `url:"access-key,ifStringIsNotEmpty"`  
	SecretKey      string `url:"secret-key,ifStringIsNotEmpty"`  
	GenerateSecret bool   `url:"generate-secret,ifBoolIsTrue"`   
}
func (api *API) CreateKey(conf KeyConfig) (*KeysDefinition, error) {
	if conf.UID == "" {
		return nil, errors.New("UID field is required")
	}
	var (
		ret    = &KeysDefinition{}
		values = url.Values{}
		errs   []error
	)
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return nil, errs[0]
	}
	values.Add("format", "json")
	body, _, err := api.call("PUT", "/user", values, true, "key")
	if err != nil {
		return nil, err
	}
	if err = json.Unmarshal(body, &ret); err != nil {
		return nil, err
	}
	return ret, nil
}
func (api *API) RemoveKey(conf KeyConfig) error {
	if conf.AccessKey == "" {
		return errors.New("AccessKey field is required")
	}
	var (
		values = url.Values{}
		errs   []error
	)
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return errs[0]
	}
	values.Add("format", "json")
	_, _, err := api.call("DELETE", "/user", values, true, "key")
	return err
}
type BucketConfig struct {
	Bucket       string `url:"bucket,ifStringIsNotEmpty"`   
	UID          string `url:"uid,ifStringIsNotEmpty"`      
	Stats        bool   `url:"stats,ifBoolIsTrue"`          
	CheckObjects bool   `url:"check-objects,ifBoolIsTrue"`  
	Fix          bool   `url:"fix,ifBoolIsTrue"`            
	PurgeObjects bool   `url:"purge-objects,ifBoolIsTrue"`  
	Object       string `url:"object,ifStringIsNotEmpty"`   
}
func (api *API) GetBucket(conf BucketConfig) (Buckets, error) {
	var (
		ret     = Buckets{}
		values  = url.Values{}
		errs    []error
		variant interface{}
	)
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return nil, errs[0]
	}
	values.Add("format", "json")
	body, _, err := api.call("GET", "/bucket", values, true)
	if err != nil {
		return nil, err
	}
	if err = json.Unmarshal(body, &variant); err != nil {
		return nil, err
	}
	if tab, ok := variant.([]interface{}); ok {
		add := Bucket{}
		for _, v := range tab {
			if name, ok := v.(string); ok {
				if add.Name != "" {
					ret = append(ret, add)
					add = Bucket{}
				}
				add.Name = name
			} else {
				js, errMarshal := json.Marshal(v)
				if errMarshal != nil {
					return nil, errMarshal
				}
				if add.Stats != nil {
					ret = append(ret, add)
					add = Bucket{}
				}
				add.Stats = new(Stats)
				err = json.Unmarshal(js, add.Stats)
				if err != nil {
					return nil, err
				}
			}
		}
		ret = append(ret, add)
	} else {
		add := Bucket{}
		add.Stats = new(Stats)
		err = json.Unmarshal(body, add.Stats)
		if err != nil {
			return nil, err
		}
		ret = append(ret, add)
	}
	return ret, nil
}
func (api *API) RemoveBucket(conf BucketConfig) error {
	var (
		values = url.Values{}
		errs   []error
	)
	if conf.Bucket == "" {
		return errors.New("Bucket field is required")
	}
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return errs[0]
	}
	values.Add("format", "json")
	_, _, err := api.call("DELETE", "/bucket", values, true)
	return err
}
func (api *API) UnlinkBucket(conf BucketConfig) error {
	var (
		values = url.Values{}
		errs   []error
	)
	if conf.Bucket == "" {
		return errors.New("Bucket field is required")
	}
	if conf.UID == "" {
		return errors.New("UID field is required")
	}
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return errs[0]
	}
	values.Add("format", "json")
	_, _, err := api.call("POST", "/bucket", values, true)
	return err
}
func (api *API) CheckBucket(conf BucketConfig) (string, error) {
	var (
		values = url.Values{}
		errs   []error
	)
	if conf.Bucket == "" {
		return "", errors.New("Bucket field is required")
	}
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return "", errs[0]
	}
	values.Add("format", "json")
	body, _, err := api.call("GET", "/bucket", values, true, "index")
	return string(body), err
}
func (api *API) LinkBucket(conf BucketConfig) error {
	var (
		values = url.Values{}
		errs   []error
	)
	return fmt.Errorf("LinkBucket not implemented yet")
	if conf.Bucket == "" {
		return errors.New("Bucket field is required")
	}
	if conf.UID == "" {
		return errors.New("UID field is required")
	}
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return errs[0]
	}
	values.Add("format", "json")
	body, _, err := api.call("PUT", "/bucket", values, true)
	_ = body
	return err
}
func (api *API) RemoveObject(conf BucketConfig) error {
	var (
		values = url.Values{}
		errs   []error
	)
	if conf.Bucket == "" {
		return errors.New("Bucket field is required")
	}
	if conf.Object == "" {
		return errors.New("Object field is required")
	}
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return errs[0]
	}
	values.Add("format", "json")
	_, _, err := api.call("DELETE", "/bucket", values, true, "object")
	return err
}
func (api *API) GetBucketPolicy(conf BucketConfig) (*Policy, error) {
	var (
		ret    = &Policy{}
		values = url.Values{}
		errs   []error
	)
	if conf.Bucket == "" {
		return nil, errors.New("Bucket field is required")
	}
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return nil, errs[0]
	}
	values.Add("format", "json")
	body, _, err := api.call("GET", "/bucket", values, true, "policy")
	if err = json.Unmarshal(body, &ret); err != nil {
		return nil, err
	}
	return ret, err
}
func (api *API) GetObjectPolicy(conf BucketConfig) (*Policy, error) {
	var (
		ret    = &Policy{}
		values = url.Values{}
		errs   []error
	)
	if conf.Bucket == "" {
		return nil, errors.New("Bucket field is required")
	}
	if conf.Object == "" {
		return nil, errors.New("Object field is required")
	}
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return nil, errs[0]
	}
	values.Add("format", "json")
	body, _, err := api.call("GET", "/bucket", values, true, "policy")
	if err = json.Unmarshal(body, &ret); err != nil {
		return nil, err
	}
	return ret, err
}
type QuotaConfig struct {
	UID        string `url:"uid,ifStringIsNotEmpty"`          
	Bucket     string `url:"bucket,ifStringIsNotEmpty"`       
	MaxObjects string `url:"max-objects,ifStringIsNotEmpty"`  
	MaxSizeKB  string `url:"max-size-kb,ifStringIsNotEmpty"`  
	Enabled    string `url:"enabled,ifStringIsNotEmpty"`      
	QuotaType  string `url:"quota-type,ifStringIsNotEmpty"`   
}
func (api *API) GetQuotas(conf QuotaConfig) (*Quotas, error) {
	var (
		ret    = &Quotas{}
		values = url.Values{}
		errs   []error
	)
	if conf.UID == "" {
		return nil, errors.New("UID field is required")
	}
	values, errs = encurl.Translate(conf)
	if len(errs) > 0 {
		return nil, errs[0]
	}
	values.Add("format", "json")
	body, _, err := api.call("GET", "/user", values, true, "quota")
	if err = json.Unmarshal(body, &ret); err != nil {
		return nil, err
	}
	return ret, err
}