| 1 |
<!DOCTYPE html> |
| 2 |
<html><head> |
| 3 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| 4 |
<title>highlight.proto</title> |
| 5 |
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (Protobuf) - Theme (Breeze Light)"/> |
| 6 |
</head><body style="background-color:#ffffff;color:#1f1c1b"><pre> |
| 7 |
syntax = <span style="color:#bf0303;">"proto2"</span>; |
| 8 |
|
| 9 |
<span style="font-weight:bold;">package</span> example; |
| 10 |
|
| 11 |
<span style="font-weight:bold;">message</span> Object { |
| 12 |
<span style="font-weight:bold;">required</span> <span style="color:#0057ae;">string</span> name = <span style="color:#b08000;">1</span>; |
| 13 |
<span style="font-weight:bold;">required</span> <span style="color:#0057ae;">int32</span> identifier = <span style="color:#b08000;">2</span>; |
| 14 |
<span style="font-weight:bold;">optional</span> <span style="color:#0057ae;">string</span> address = <span style="color:#b08000;">3</span>; |
| 15 |
|
| 16 |
<span style="font-weight:bold;">enum</span> ObjectType { |
| 17 |
LOCAL = <span style="color:#b08000;">0</span>; |
| 18 |
REMOTE = <span style="color:#b08000;">1</span>; |
| 19 |
NEITHER = <span style="color:#b08000;">2</span>; |
| 20 |
} |
| 21 |
|
| 22 |
<span style="font-weight:bold;">message</span> ObjectData { |
| 23 |
<span style="font-weight:bold;">required</span> <span style="color:#0057ae;">string</span> number = <span style="color:#b08000;">1</span>; |
| 24 |
<span style="font-weight:bold;">optional</span> ObjectType type = <span style="color:#b08000;">2</span> [<span style="font-weight:bold;">default</span> = NEITHER]; |
| 25 |
} |
| 26 |
|
| 27 |
<span style="font-weight:bold;">repeated</span> ObjectData dataList = <span style="color:#b08000;">4</span>; |
| 28 |
} |
| 29 |
|
| 30 |
<span style="font-weight:bold;">message</span> ObjectList { |
| 31 |
<span style="font-weight:bold;">repeated</span> Object object = <span style="color:#b08000;">1</span>; |
| 32 |
} |
| 33 |
</pre></body></html> |