2021-01-13 00:35:30 +01:00
|
|
|
package model
|
|
|
|
|
2021-01-13 01:44:50 +01:00
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
"io"
|
|
|
|
)
|
|
|
|
|
2021-02-17 20:29:20 +01:00
|
|
|
// Sharing is sharing information for a root block
|
|
|
|
// swagger:model
|
2021-01-13 00:35:30 +01:00
|
|
|
type Sharing struct {
|
2021-02-17 20:29:20 +01:00
|
|
|
// ID of the root block
|
|
|
|
// required: true
|
|
|
|
ID string `json:"id"`
|
|
|
|
|
|
|
|
// Is sharing enabled
|
|
|
|
// required: true
|
|
|
|
Enabled bool `json:"enabled"`
|
|
|
|
|
|
|
|
// Access token
|
|
|
|
// required: true
|
|
|
|
Token string `json:"token"`
|
|
|
|
|
|
|
|
// ID of the user who last modified this
|
|
|
|
// required: true
|
2021-01-13 00:35:30 +01:00
|
|
|
ModifiedBy string `json:"modifiedBy"`
|
2021-02-17 20:29:20 +01:00
|
|
|
|
|
|
|
// Updated time
|
|
|
|
// required: true
|
|
|
|
UpdateAt int64 `json:"update_at,omitempty"`
|
2021-01-13 00:35:30 +01:00
|
|
|
}
|
2021-01-13 01:44:50 +01:00
|
|
|
|
|
|
|
func SharingFromJSON(data io.Reader) Sharing {
|
|
|
|
var sharing Sharing
|
|
|
|
json.NewDecoder(data).Decode(&sharing)
|
|
|
|
return sharing
|
|
|
|
}
|