aboutsummaryrefslogtreecommitdiff
path: root/examples/example.proto
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example.proto')
-rw-r--r--examples/example.proto31
1 files changed, 31 insertions, 0 deletions
diff --git a/examples/example.proto b/examples/example.proto
new file mode 100644
index 0000000..e77f36c
--- /dev/null
+++ b/examples/example.proto
@@ -0,0 +1,31 @@
+syntax = "proto2";
+
+message SomethingWithUINTs {
+ optional uint32 id = 1;
+ optional uint32 ip_address = 2;
+ optional uint32 port_num = 3;
+}
+
+message SomethingMore {
+ enum Errors {
+ SUCCESS = 200;
+ ERROR_BAD_REQUEST = 400;
+ ERROR_NOT_FOUND = 404;
+ ERROR_SERVER_ERROR = 500;
+ ERROR_SERVICE_UNAVAILABLE = 503;
+ }
+ optional Errors error_code = 1;
+ optional SomethingWithUINTs uints = 2;
+}
+
+message EvenMore {
+ enum SomeEnum {
+ FIRST = 0xFE;
+ SECOND = 0xFF;
+ }
+ required SomeEnum enum_value = 1;
+ repeated SomethingWithUINTs uints = 2;
+ required bytes name=3;
+ required bytes value=4;
+ optional string s=5;
+}