1ffe3c632Sopenharmony_ci// See README.txt for information and build instructions.
2ffe3c632Sopenharmony_ci//
3ffe3c632Sopenharmony_ci// Note: START and END tags are used in comments to define sections used in
4ffe3c632Sopenharmony_ci// tutorials.  They are not part of the syntax for Protocol Buffers.
5ffe3c632Sopenharmony_ci//
6ffe3c632Sopenharmony_ci// To get an in-depth walkthrough of this file and the related examples, see:
7ffe3c632Sopenharmony_ci// https://developers.google.com/protocol-buffers/docs/tutorials
8ffe3c632Sopenharmony_ci
9ffe3c632Sopenharmony_ci// [START declaration]
10ffe3c632Sopenharmony_cisyntax = "proto3";
11ffe3c632Sopenharmony_cipackage tutorial;
12ffe3c632Sopenharmony_ci
13ffe3c632Sopenharmony_ciimport "google/protobuf/timestamp.proto";
14ffe3c632Sopenharmony_ci// [END declaration]
15ffe3c632Sopenharmony_ci
16ffe3c632Sopenharmony_ci// [START java_declaration]
17ffe3c632Sopenharmony_cioption java_package = "com.example.tutorial";
18ffe3c632Sopenharmony_cioption java_outer_classname = "AddressBookProtos";
19ffe3c632Sopenharmony_ci// [END java_declaration]
20ffe3c632Sopenharmony_ci
21ffe3c632Sopenharmony_ci// [START csharp_declaration]
22ffe3c632Sopenharmony_cioption csharp_namespace = "Google.Protobuf.Examples.AddressBook";
23ffe3c632Sopenharmony_ci// [END csharp_declaration]
24ffe3c632Sopenharmony_ci
25ffe3c632Sopenharmony_ci// [START messages]
26ffe3c632Sopenharmony_cimessage Person {
27ffe3c632Sopenharmony_ci  string name = 1;
28ffe3c632Sopenharmony_ci  int32 id = 2;  // Unique ID number for this person.
29ffe3c632Sopenharmony_ci  string email = 3;
30ffe3c632Sopenharmony_ci
31ffe3c632Sopenharmony_ci  enum PhoneType {
32ffe3c632Sopenharmony_ci    MOBILE = 0;
33ffe3c632Sopenharmony_ci    HOME = 1;
34ffe3c632Sopenharmony_ci    WORK = 2;
35ffe3c632Sopenharmony_ci  }
36ffe3c632Sopenharmony_ci
37ffe3c632Sopenharmony_ci  message PhoneNumber {
38ffe3c632Sopenharmony_ci    string number = 1;
39ffe3c632Sopenharmony_ci    PhoneType type = 2;
40ffe3c632Sopenharmony_ci  }
41ffe3c632Sopenharmony_ci
42ffe3c632Sopenharmony_ci  repeated PhoneNumber phones = 4;
43ffe3c632Sopenharmony_ci
44ffe3c632Sopenharmony_ci  google.protobuf.Timestamp last_updated = 5;
45ffe3c632Sopenharmony_ci}
46ffe3c632Sopenharmony_ci
47ffe3c632Sopenharmony_ci// Our address book file is just one of these.
48ffe3c632Sopenharmony_cimessage AddressBook {
49ffe3c632Sopenharmony_ci  repeated Person people = 1;
50ffe3c632Sopenharmony_ci}
51ffe3c632Sopenharmony_ci// [END messages]
52