// Document represents metadata and content of a draft or publication.
message Document {
// Permanent ID of the document.
string id = 1;
// Title of the document.
string title = 2;
// Output only. Author ID of the document.
string author = 4;
// Output only. Account IDs of all the editors of the document.
// Includes the original author as well.
repeated string editors = 11;
// Content of a Document structured in blocks and hierarchy
repeated BlockNode children = 9;
// Output only. Time when document was created.
google.protobuf.Timestamp create_time = 6;
// Output only. Time when document was updated.
google.protobuf.Timestamp update_time = 7;
// Output only. Time when this version was published. Not present in drafts.
google.protobuf.Timestamp publish_time = 8;
// Output only. Current version of the document.
string version = 12;
// Output only. Previous version of the document,
// unless this is the first version.
string previous_version = 13;
}
BlockNode
block
- (Block)
: defines the content of the block and its typechildren
- Array<BlockNode>
: (optional) a set of children blockNodes.Block
id
and text
or ref
. The other properties are irrelevant to the system (the exception is the annotations
).// Content block.
message Block {
// Block ID. Must be unique within the document.
string id = 1;
// Type of the block. Specific to the renderer.
string type = 2;
// Text of the content block.
string text = 3;
// Optional. The hyperlink to an external resource.
// Must be a valid URL.
string ref = 7;
// Arbitrary attributes of the block.
map<string, string> attributes = 4;
// Annotation "layers" of the block.
repeated Annotation annotations = 5;
// Output only. Current revision of the block. It's the ID of the last Change that modified this block.
// Additional information about the Change can be obtained using the Changes service.
string revision = 6;
}
content
and also a list of Blocks as children