forked from googlecodelabs/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tutorial.proto
121 lines (100 loc) · 2.28 KB
/
tutorial.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package tutorial;
message Tutorial {
Title title = 1;
map<string, string> metadata = 2;
repeated Step steps = 3;
};
message Step {
Title title = 1;
map<string, string> metadata = 2;
repeated Content content = 3;
};
message Title {
repeated InlineContent inline_contents = 1;
};
message Content {
oneof content {
InlineContent inline_content = 1;
BlockContent block_content = 2;
}
};
message BlockContent {
oneof content {
Heading heading = 1;
Image image = 2;
InfoBox info_box = 3;
CodeBlock code_block = 4;
Table table = 6;
}
reserved 5;
reserved "horizontal_rule";
};
message Link {
string text = 1;
string location = 2;
};
message InlineContent {
oneof content {
string text = 1;
string strong_text = 2;
string emphasized_text = 3;
string inline_code_text = 4;
Link link = 5;
}
};
message Heading {
repeated InlineContent inline_contents = 1;
int32 level = 2;
};
message Image {
// TODO
};
message InfoBox {
repeated InlineContent inline_contents = 1;
enum Disposition {
UNKNOWN_DISPOSITION = 0;
POSITIVE = 1;
NEGATIVE = 2;
};
Disposition disposition = 2;
};
message CodeBlock {
repeated InlineContent inline_contents = 1;
string code_location = 2;
string language_hint = 3;
};
message ListStep {
repeated Content contents = 1;
};
message List {
repeated ListStep list_steps = 1;
enum ListVariety {
UNKNOWN_VARIETY = 0;
ORDERED = 1;
UNORDERED = 2;
}
ListVariety list_variety = 2;
};
message Table {
repeated TableRow table_rows = 1;
};
message TableRow {
repeated TableCell table_cells = 1;
};
message TableCell {
repeated InlineContent inline_contents = 1;
};