code: func (r *V2FormattedResource) UnmarshalJSON(data []byte) error {
  	var ccResource struct {
  		Filename string `json:"fn,omitempty"`
  		Mode     string `json:"mode,omitempty"`
  		SHA1     string `json:"sha1"`
  		Size     int64  `json:"size"`
  	}
  
  	err := cloudcontroller.DecodeJSON(data, &ccResource)
  	if err != nil {
  		return err
  	}
  
  	r.Filename = ccResource.Filename
  	r.Size = ccResource.Size
  	r.SHA1 = ccResource.SHA1
  	mode, err := strconv.ParseUint(ccResource.Mode, 8, 32)
  	if err != nil {
  		return err
  	}
  
  	r.Mode = os.FileMode(mode)
  	return nil
  }
docs: // UnmarshalJSON helps unmarshal a Cloud Controller V2FormattedResource response.