/
jsonTest.proto
162 lines (132 loc) · 3.23 KB
/
jsonTest.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
syntax = "proto2";
package com.google.cloud.bigquery.storage.test;
message ComplexRoot {
optional int64 test_int = 1;
repeated string test_string = 2;
required bytes test_bytes = 3;
optional bool test_bool = 4;
repeated double test_double = 5;
required int32 test_date = 6;
optional int64 test_datetime = 7;
repeated int64 test_datetime_str = 8;
required ComplexLvl1 complex_lvl1 = 9;
required
ComplexLvl2 complex_lvl2 = 10;
optional bytes test_numeric = 11;
optional string test_geo = 12;
optional int64 test_timestamp = 13;
optional int64 test_time = 14;
optional int64 test_time_str = 15;
repeated bytes test_numeric_repeated = 16;
optional bytes test_numeric_str = 17;
optional bytes test_bignumeric = 18;
repeated bytes test_bignumeric_str = 19;
optional string test_interval = 20;
repeated string test_json = 21;
}
message CasingComplex {
optional int64 test_int = 1;
repeated string test_string = 2;
required bytes test_bytes = 3;
optional bool test_bool = 4;
repeated double test_double = 5;
required int32 test_date = 6;
required OptionTest option_test = 7;
}
message ComplexLvl1 {
optional int64 test_int = 1;
required ComplexLvl2 complex_lvl2 = 2;
}
message ComplexLvl2 {
optional int64 test_int = 1;
}
message ObjectType {
optional ComplexLvl2 test_field_type = 1;
}
message RepeatedType {
repeated int64 test_field_type = 1;
}
message OptionTest {
optional int64 test_optional = 1;
required int64 test_required = 2;
repeated int64 test_repeated = 3;
}
message ReuseRoot {
optional ReuseLvl1 reuse_lvl1 = 1;
optional ReuseLvl1 reuse_lvl1_1 = 2;
optional ReuseLvl1 reuse_lvl1_2 = 3;
}
message ReuseLvl1 {
optional int64 test_int = 1;
optional ReuseLvl2 reuse_lvl2 = 2;
}
message ReuseLvl2 {
optional int64 test_int = 1;
}
message RepeatedInt64 {
repeated int64 test_repeated = 1;
}
message RepeatedInt32 {
repeated int32 test_repeated = 1;
}
message RepeatedDouble {
repeated double test_repeated = 1;
}
message RepeatedString {
repeated string test_repeated = 1;
}
message RepeatedBool {
repeated bool test_repeated = 1;
}
message RepeatedBytes {
repeated bytes test_repeated = 1;
}
message RepeatedObject {
repeated ComplexLvl2 test_repeated = 1;
}
message TestInt64 {
optional int64 byte = 1;
optional int64 short = 2;
optional int64 int = 3;
optional int64 long = 4;
}
message TestInt32 {
optional int32 byte = 1;
optional int32 short = 2;
optional int32 int = 3;
}
message TestDouble {
optional double double = 1;
optional double float = 2;
}
message NestedRepeated {
repeated int64 int = 1;
repeated double double = 2;
optional RepeatedString repeated_string = 3;
}
message TestRequired {
optional double optional_double = 1;
required double required_double = 2;
}
message TestRepeatedIsOptional {
optional double required_double = 1;
repeated double repeated_double = 2;
}
message TopLevelMismatch {
optional double mismatch_double = 1;
}
message TestDatetime {
optional int64 datetime = 1;
}
message TestTime {
repeated int64 time = 1;
}
message TestNumeric {
optional bytes numeric = 1;
}
message TestBignumeric {
repeated bytes bignumeric = 1;
}
message TestMixedCaseFieldNames {
required string foobar = 1;
}