diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2015-07-20 14:32:57 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2015-07-20 14:32:57 -0700 |
commit | 69c14071ad58b1dad9e5e52c33140ece139577d0 (patch) | |
tree | ab6a01a7e0c8e6a35fa175c715d36f11cf0d2250 /examples/addressbook.proto | |
parent | aba42edd8c3c5ae4edeebdacd1a3b4192bd5550f (diff) | |
download | protobuf-69c14071ad58b1dad9e5e52c33140ece139577d0.tar.gz protobuf-69c14071ad58b1dad9e5e52c33140ece139577d0.tar.bz2 protobuf-69c14071ad58b1dad9e5e52c33140ece139577d0.zip |
update addressbook.proto to proto3
Diffstat (limited to 'examples/addressbook.proto')
-rw-r--r-- | examples/addressbook.proto | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/addressbook.proto b/examples/addressbook.proto index 91c9ffc4..bbcb0c54 100644 --- a/examples/addressbook.proto +++ b/examples/addressbook.proto @@ -1,6 +1,6 @@ // See README.txt for information and build instructions. -syntax = "proto2"; +syntax = "proto3"; package tutorial; @@ -9,9 +9,9 @@ option java_outer_classname = "AddressBookProtos"; option csharp_namespace = "Google.ProtocolBuffers.Examples.AddressBook"; message Person { - required string name = 1; - required int32 id = 2; // Unique ID number for this person. - optional string email = 3; + string name = 1; + int32 id = 2; // Unique ID number for this person. + string email = 3; enum PhoneType { MOBILE = 0; @@ -20,14 +20,14 @@ message Person { } message PhoneNumber { - required string number = 1; - optional PhoneType type = 2 [default = HOME]; + string number = 1; + PhoneType type = 2; } - repeated PhoneNumber phone = 4; + repeated PhoneNumber phones = 4; } // Our address book file is just one of these. message AddressBook { - repeated Person person = 1; + repeated Person persons = 1; } |