aboutsummaryrefslogtreecommitdiff
path: root/examples/addressbook.proto
diff options
context:
space:
mode:
Diffstat (limited to 'examples/addressbook.proto')
-rw-r--r--examples/addressbook.proto17
1 files changed, 10 insertions, 7 deletions
diff --git a/examples/addressbook.proto b/examples/addressbook.proto
index b14829e9..bfdceeaf 100644
--- a/examples/addressbook.proto
+++ b/examples/addressbook.proto
@@ -1,14 +1,17 @@
// See README.txt for information and build instructions.
+syntax = "proto3";
+
package tutorial;
option java_package = "com.example.tutorial";
option java_outer_classname = "AddressBookProtos";
+option csharp_namespace = "Google.Protobuf.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;
@@ -17,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 people = 1;
}