Repository: rclone/rclone
File: backend/box/api/types.go (Go)

Code before:
	if e.ContextInfo != nil {
		out += fmt.Sprintf(" (%+v)", e.ContextInfo)
	}
	return out
}

// Check Error satisfies the error interface
var _ error = (*Error)(nil)

// ItemFields are the fields needed for FileInfo
var ItemFields = "type,id,sequence_id,etag,sha1,name,size,created_at,modified_at,content_created_at,content_modified_at,item_status,shared_link,owned_by"

// Types of things in Item/ItemMini
const (
	ItemTypeFolder    = "folder"
	ItemTypeFile      = "file"
	ItemStatusActive  = "active"
	ItemStatusTrashed = "trashed"
	ItemStatusDeleted = "deleted"
)

// ItemMini is a subset of the elements in a full Item returned by some API calls
type ItemMini struct {
	Type       string `json:"type"`
	ID         string `json:"id"`
	SequenceID string `json:"sequence_id"`
	Etag       string `json:"etag"`
	SHA1       string `json:"sha1"`
	Name       string `json:"name"`
}

// Item describes a folder or a file as returned by Get Folder Items and others
type Item struct {
	Type              string   `json:"type"`
	ID                string   `json:"id"`
	SequenceID        string   `json:"sequence_id"`
	Etag              string   `json:"etag"`
	SHA1              string   `json:"sha1"`
	Name              string   `json:"name"`
	Size              float64  `json:"size"` // box returns this in xEyy format for very large numbers - see #2261
	CreatedAt         Time     `json:"created_at"`
	ModifiedAt        Time     `json:"modified_at"`
	ContentCreatedAt  Time     `json:"content_created_at"`
	ContentModifiedAt Time     `json:"content_modified_at"`
	ItemStatus        string   `json:"item_status"` // active, trashed if the file has been moved to the trash, and deleted if the file has been permanently deleted
	Parent            ItemMini `json:"parent"`
	SharedLink        struct {
		URL    string `json:"url,omitempty"`
		Access string `json:"access,omitempty"`
	} `json:"shared_link"`
	OwnedBy struct {

Review comment (suggestion):
Perhaps this should be `int64`? Its defined to be numeric isn't it? You'd decode it like this to tell Go it is an int wrapped in a string.

```go
type ItemMini struct {
    // ...
	SequenceID int64 `json:"sequence_id,string"`
    // ...
}
```

That would then remove all the ParseInt's from the code below.

Code after:
	if e.ContextInfo != nil {
		out += fmt.Sprintf(" (%+v)", e.ContextInfo)
	}
	return out
}

// Check Error satisfies the error interface
var _ error = (*Error)(nil)

// ItemFields are the fields needed for FileInfo
var ItemFields = "type,id,sequence_id,etag,sha1,name,size,created_at,modified_at,content_created_at,content_modified_at,item_status,shared_link,owned_by"

// Types of things in Item/ItemMini
const (
	ItemTypeFolder    = "folder"
	ItemTypeFile      = "file"
	ItemStatusActive  = "active"
	ItemStatusTrashed = "trashed"
	ItemStatusDeleted = "deleted"
)

// ItemMini is a subset of the elements in a full Item returned by some API calls
type ItemMini struct {
	Type       string `json:"type"`
	ID         string `json:"id"`
	SequenceID int64  `json:"sequence_id,string"`
	Etag       string `json:"etag"`
	SHA1       string `json:"sha1"`
	Name       string `json:"name"`
}

// Item describes a folder or a file as returned by Get Folder Items and others
type Item struct {
	Type              string   `json:"type"`
	ID                string   `json:"id"`
	SequenceID        int64    `json:"sequence_id,string"`
	Etag              string   `json:"etag"`
	SHA1              string   `json:"sha1"`
	Name              string   `json:"name"`
	Size              float64  `json:"size"` // box returns this in xEyy format for very large numbers - see #2261
	CreatedAt         Time     `json:"created_at"`
	ModifiedAt        Time     `json:"modified_at"`
	ContentCreatedAt  Time     `json:"content_created_at"`
	ContentModifiedAt Time     `json:"content_modified_at"`
	ItemStatus        string   `json:"item_status"` // active, trashed if the file has been moved to the trash, and deleted if the file has been permanently deleted
	Parent            ItemMini `json:"parent"`
	SharedLink        struct {
		URL    string `json:"url,omitempty"`
		Access string `json:"access,omitempty"`
	} `json:"shared_link"`
	OwnedBy struct {