code: func (s *BucketService) UpdateBucket(ctx context.Context, id platform.ID, upd platform.BucketUpdate) (*platform.Bucket, error) {
  	u, err := newURL(s.Addr, bucketIDPath(id))
  	if err != nil {
  		return nil, err
  	}
  
  	bu := newBucketUpdate(&upd)
  	octets, err := json.Marshal(bu)
  	if err != nil {
  		return nil, err
  	}
  
  	req, err := http.NewRequest("PATCH", u.String(), bytes.NewReader(octets))
  	if err != nil {
  		return nil, err
  	}
  
  	req.Header.Set("Content-Type", "application/json")
  	SetToken(s.Token, req)
  
  	hc := newClient(u.Scheme, s.InsecureSkipVerify)
  
  	resp, err := hc.Do(req)
  	if err != nil {
  		return nil, err
  	}
  
  	if err := CheckError(resp, true); err != nil {
  		return nil, err
  	}
  
  	var br bucketResponse
  	if err := json.NewDecoder(resp.Body).Decode(&br); err != nil {
  		return nil, err
  	}
  	defer resp.Body.Close()
  	return br.toPlatform()
  }
docs: // UpdateBucket updates a single bucket with changeset.
  // Returns the new bucket state after update.