• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto3";
2
3package tensorflow.test;
4
5message TestAllTypes {
6  message NestedMessage {
7    message DoubleNestedMessage {
8      string optional_string = 1;
9    }
10
11    int32 optional_int32 = 1;
12    repeated int32 repeated_int32 = 2;
13    DoubleNestedMessage msg = 3;
14    int64 optional_int64 = 4;
15  }
16
17  enum NestedEnum {
18    ZERO = 0;
19    FOO = 1;
20    BAR = 2;
21    BAZ = 3;
22    NEG = -1;  // Intentionally negative.
23  }
24
25  // Singular
26  int32 optional_int32 = 1000;  // use large tag to test output order.
27  int64 optional_int64 = 2;
28  uint32 optional_uint32 = 3;
29  uint64 optional_uint64 = 999;  // use large tag to test output order.
30  sint32 optional_sint32 = 5;
31  sint64 optional_sint64 = 6;
32  fixed32 optional_fixed32 = 7;
33  fixed64 optional_fixed64 = 8;
34  sfixed32 optional_sfixed32 = 9;
35  sfixed64 optional_sfixed64 = 10;
36  float optional_float = 11;
37  double optional_double = 12;
38  bool optional_bool = 13;
39  string optional_string = 14;
40  bytes optional_bytes = 15;
41
42  NestedMessage optional_nested_message = 18;
43  ForeignMessage optional_foreign_message = 19;
44
45  NestedEnum optional_nested_enum = 21;
46  ForeignEnum optional_foreign_enum = 22;
47
48  string optional_cord = 25;
49
50  // Repeated
51  repeated int32 repeated_int32 = 31;
52  repeated int64 repeated_int64 = 32;
53  repeated uint32 repeated_uint32 = 33;
54  repeated uint64 repeated_uint64 = 34;
55  repeated sint32 repeated_sint32 = 35;
56  repeated sint64 repeated_sint64 = 36;
57  repeated fixed32 repeated_fixed32 = 37;
58  repeated fixed64 repeated_fixed64 = 38;
59  repeated sfixed32 repeated_sfixed32 = 39;
60  repeated sfixed64 repeated_sfixed64 = 40;
61  repeated float repeated_float = 41;
62  repeated double repeated_double = 42;
63  repeated bool repeated_bool = 43;
64  repeated string repeated_string = 44;
65  repeated bytes repeated_bytes = 45;
66
67  repeated NestedMessage repeated_nested_message = 48;
68  repeated NestedEnum repeated_nested_enum = 51;
69
70  repeated string repeated_cord = 55;
71
72  oneof oneof_field {
73    uint32 oneof_uint32 = 111;
74    NestedMessage oneof_nested_message = 112;
75    string oneof_string = 113;
76    bytes oneof_bytes = 114;
77    NestedEnum oneof_enum = 100;
78  }
79
80  map<string, NestedMessage> map_string_to_message = 58;
81  map<int32, NestedMessage> map_int32_to_message = 59;
82  map<int64, NestedMessage> map_int64_to_message = 60;
83  map<bool, NestedMessage> map_bool_to_message = 61;
84  map<string, int64> map_string_to_int64 = 62;
85  map<int64, string> map_int64_to_string = 63;
86  map<string, NestedMessage> another_map_string_to_message = 65;
87
88  repeated int64 packed_repeated_int64 = 64 [packed = true];
89}
90
91// A recursive message.
92message NestedTestAllTypes {
93  NestedTestAllTypes child = 1;
94  TestAllTypes payload = 2;
95
96  map<string, int64> map_string_to_int64 = 3;
97}
98
99message ForeignMessage {
100  int32 c = 1;
101}
102
103enum ForeignEnum {
104  FOREIGN_ZERO = 0;
105  FOREIGN_FOO = 4;
106  FOREIGN_BAR = 5;
107  FOREIGN_BAZ = 6;
108}
109
110message TestEmptyMessage {
111}
112