google-protobuf 3.0.0 → 3.20.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of google-protobuf might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/ext/google/protobuf_c/convert.c +361 -0
- data/ext/google/protobuf_c/convert.h +75 -0
- data/ext/google/protobuf_c/defs.c +760 -1243
- data/ext/google/protobuf_c/defs.h +107 -0
- data/ext/google/protobuf_c/extconf.rb +22 -4
- data/ext/google/protobuf_c/map.c +342 -450
- data/ext/google/protobuf_c/map.h +66 -0
- data/ext/google/protobuf_c/message.c +1108 -284
- data/ext/google/protobuf_c/message.h +104 -0
- data/ext/google/protobuf_c/protobuf.c +416 -51
- data/ext/google/protobuf_c/protobuf.h +53 -472
- data/ext/google/protobuf_c/repeated_field.c +318 -317
- data/ext/google/protobuf_c/repeated_field.h +63 -0
- data/ext/google/protobuf_c/ruby-upb.c +11115 -0
- data/ext/google/protobuf_c/ruby-upb.h +5612 -0
- data/ext/google/protobuf_c/third_party/utf8_range/LICENSE +21 -0
- data/ext/google/protobuf_c/third_party/utf8_range/naive.c +92 -0
- data/ext/google/protobuf_c/third_party/utf8_range/range2-neon.c +157 -0
- data/ext/google/protobuf_c/third_party/utf8_range/range2-sse.c +170 -0
- data/ext/google/protobuf_c/third_party/utf8_range/utf8_range.h +9 -0
- data/ext/google/protobuf_c/wrap_memcpy.c +52 -0
- data/lib/google/protobuf/any_pb.rb +6 -4
- data/lib/google/protobuf/api_pb.rb +27 -24
- data/lib/google/protobuf/descriptor_dsl.rb +465 -0
- data/lib/google/protobuf/descriptor_pb.rb +269 -0
- data/lib/google/protobuf/duration_pb.rb +6 -4
- data/lib/google/protobuf/empty_pb.rb +4 -2
- data/lib/google/protobuf/field_mask_pb.rb +5 -3
- data/lib/google/protobuf/message_exts.rb +4 -4
- data/lib/google/protobuf/repeated_field.rb +4 -4
- data/lib/google/protobuf/source_context_pb.rb +5 -3
- data/lib/google/protobuf/struct_pb.rb +23 -21
- data/lib/google/protobuf/timestamp_pb.rb +6 -4
- data/lib/google/protobuf/type_pb.rb +77 -74
- data/lib/google/protobuf/well_known_types.rb +240 -0
- data/lib/google/protobuf/wrappers_pb.rb +37 -35
- data/lib/google/protobuf.rb +12 -9
- data/tests/basic.rb +489 -1001
- data/tests/generated_code_test.rb +6 -2
- data/tests/stress.rb +1 -1
- metadata +39 -34
- data/ext/google/protobuf_c/encode_decode.c +0 -1264
- data/ext/google/protobuf_c/storage.c +0 -893
- data/ext/google/protobuf_c/upb.c +0 -12812
- data/ext/google/protobuf_c/upb.h +0 -8569
@@ -0,0 +1,269 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/protobuf/descriptor.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
descriptor_data = File.binread(__FILE__).split("\n__END__\n", 2)[1]
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.add_serialized_file(descriptor_data)
|
8
|
+
|
9
|
+
module Google
|
10
|
+
module Protobuf
|
11
|
+
FileDescriptorSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FileDescriptorSet").msgclass
|
12
|
+
FileDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FileDescriptorProto").msgclass
|
13
|
+
DescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.DescriptorProto").msgclass
|
14
|
+
DescriptorProto::ExtensionRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.DescriptorProto.ExtensionRange").msgclass
|
15
|
+
DescriptorProto::ReservedRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.DescriptorProto.ReservedRange").msgclass
|
16
|
+
ExtensionRangeOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ExtensionRangeOptions").msgclass
|
17
|
+
FieldDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldDescriptorProto").msgclass
|
18
|
+
FieldDescriptorProto::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldDescriptorProto.Type").enummodule
|
19
|
+
FieldDescriptorProto::Label = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldDescriptorProto.Label").enummodule
|
20
|
+
OneofDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.OneofDescriptorProto").msgclass
|
21
|
+
EnumDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumDescriptorProto").msgclass
|
22
|
+
EnumDescriptorProto::EnumReservedRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumDescriptorProto.EnumReservedRange").msgclass
|
23
|
+
EnumValueDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumValueDescriptorProto").msgclass
|
24
|
+
ServiceDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ServiceDescriptorProto").msgclass
|
25
|
+
MethodDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.MethodDescriptorProto").msgclass
|
26
|
+
FileOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FileOptions").msgclass
|
27
|
+
FileOptions::OptimizeMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FileOptions.OptimizeMode").enummodule
|
28
|
+
MessageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.MessageOptions").msgclass
|
29
|
+
FieldOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldOptions").msgclass
|
30
|
+
FieldOptions::CType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldOptions.CType").enummodule
|
31
|
+
FieldOptions::JSType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldOptions.JSType").enummodule
|
32
|
+
OneofOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.OneofOptions").msgclass
|
33
|
+
EnumOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumOptions").msgclass
|
34
|
+
EnumValueOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumValueOptions").msgclass
|
35
|
+
ServiceOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ServiceOptions").msgclass
|
36
|
+
MethodOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.MethodOptions").msgclass
|
37
|
+
MethodOptions::IdempotencyLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.MethodOptions.IdempotencyLevel").enummodule
|
38
|
+
UninterpretedOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UninterpretedOption").msgclass
|
39
|
+
UninterpretedOption::NamePart = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UninterpretedOption.NamePart").msgclass
|
40
|
+
SourceCodeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.SourceCodeInfo").msgclass
|
41
|
+
SourceCodeInfo::Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.SourceCodeInfo.Location").msgclass
|
42
|
+
GeneratedCodeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.GeneratedCodeInfo").msgclass
|
43
|
+
GeneratedCodeInfo::Annotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.GeneratedCodeInfo.Annotation").msgclass
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
__END__
|
48
|
+
|
49
|
+
google/protobuf/descriptor.protogoogle.protobuf"G
|
50
|
+
FileDescriptorSet2
|
51
|
+
file (2$.google.protobuf.FileDescriptorProto"�
|
52
|
+
FileDescriptorProto
|
53
|
+
name (
|
54
|
+
package (
|
55
|
+
|
56
|
+
dependency (
|
57
|
+
public_dependency
|
58
|
+
(
|
59
|
+
weak_dependency (6
|
60
|
+
message_type (2 .google.protobuf.DescriptorProto7
|
61
|
+
enum_type (2$.google.protobuf.EnumDescriptorProto8
|
62
|
+
service (2'.google.protobuf.ServiceDescriptorProto8
|
63
|
+
extension (2%.google.protobuf.FieldDescriptorProto-
|
64
|
+
options (2.google.protobuf.FileOptions9
|
65
|
+
source_code_info (2.google.protobuf.SourceCodeInfo
|
66
|
+
syntax ( "�
|
67
|
+
DescriptorProto
|
68
|
+
name ( 4
|
69
|
+
field (2%.google.protobuf.FieldDescriptorProto8
|
70
|
+
extension (2%.google.protobuf.FieldDescriptorProto5
|
71
|
+
nested_type (2 .google.protobuf.DescriptorProto7
|
72
|
+
enum_type (2$.google.protobuf.EnumDescriptorProtoH
|
73
|
+
extension_range (2/.google.protobuf.DescriptorProto.ExtensionRange9
|
74
|
+
|
75
|
+
oneof_decl (2%.google.protobuf.OneofDescriptorProto0
|
76
|
+
options (2.google.protobuf.MessageOptionsF
|
77
|
+
reserved_range (2..google.protobuf.DescriptorProto.ReservedRange
|
78
|
+
|
79
|
+
( e
|
80
|
+
ExtensionRange
|
81
|
+
start (
|
82
|
+
end (7
|
83
|
+
options (2&.google.protobuf.ExtensionRangeOptions+
|
84
|
+
|
85
|
+
start (
|
86
|
+
end ("g
|
87
|
+
ExtensionRangeOptionsC
|
88
|
+
uninterpreted_option� (2$.google.protobuf.UninterpretedOption* �����"�
|
89
|
+
FieldDescriptorProto
|
90
|
+
name (
|
91
|
+
number (:
|
92
|
+
label (2+.google.protobuf.FieldDescriptorProto.Label8
|
93
|
+
type (2*.google.protobuf.FieldDescriptorProto.Type
|
94
|
+
type_name (
|
95
|
+
extendee (
|
96
|
+
|
97
|
+
oneof_index (
|
98
|
+
json_name
|
99
|
+
( .
|
100
|
+
options (2.google.protobuf.FieldOptions
|
101
|
+
proto3_optional ("�
|
102
|
+
Type
|
103
|
+
TYPE_DOUBLE
|
104
|
+
|
105
|
+
TYPE_FLOAT
|
106
|
+
|
107
|
+
TYPE_INT64
|
108
|
+
TYPE_UINT64
|
109
|
+
|
110
|
+
TYPE_INT32
|
111
|
+
TYPE_FIXED64
|
112
|
+
TYPE_FIXED32
|
113
|
+
TYPE_BOOL
|
114
|
+
TYPE_STRING
|
115
|
+
|
116
|
+
TYPE_GROUP
|
117
|
+
|
118
|
+
TYPE_MESSAGE
|
119
|
+
|
120
|
+
TYPE_BYTES
|
121
|
+
TYPE_UINT32
|
122
|
+
TYPE_ENUM
|
123
|
+
|
124
|
+
|
125
|
+
TYPE_SINT32
|
126
|
+
TYPE_SINT64"C
|
127
|
+
Label
|
128
|
+
LABEL_OPTIONAL
|
129
|
+
LABEL_REQUIRED
|
130
|
+
LABEL_REPEATED"T
|
131
|
+
OneofDescriptorProto
|
132
|
+
name ( .
|
133
|
+
options (2.google.protobuf.OneofOptions"�
|
134
|
+
EnumDescriptorProto
|
135
|
+
name ( 8
|
136
|
+
value (2).google.protobuf.EnumValueDescriptorProto-
|
137
|
+
options (2.google.protobuf.EnumOptionsN
|
138
|
+
reserved_range (26.google.protobuf.EnumDescriptorProto.EnumReservedRange
|
139
|
+
|
140
|
+
EnumReservedRange
|
141
|
+
start (
|
142
|
+
end ("l
|
143
|
+
EnumValueDescriptorProto
|
144
|
+
name (
|
145
|
+
number (2
|
146
|
+
options (2!.google.protobuf.EnumValueOptions"�
|
147
|
+
ServiceDescriptorProto
|
148
|
+
name ( 6
|
149
|
+
method (2&.google.protobuf.MethodDescriptorProto0
|
150
|
+
options (2.google.protobuf.ServiceOptions"�
|
151
|
+
MethodDescriptorProto
|
152
|
+
name (
|
153
|
+
|
154
|
+
input_type (
|
155
|
+
output_type ( /
|
156
|
+
options (2.google.protobuf.MethodOptions
|
157
|
+
client_streaming (:false
|
158
|
+
server_streaming (:false"�
|
159
|
+
FileOptions
|
160
|
+
java_package (
|
161
|
+
java_outer_classname ( "
|
162
|
+
java_multiple_files
|
163
|
+
(:false)
|
164
|
+
java_generate_equals_and_hash (B%
|
165
|
+
java_string_check_utf8 (:falseF
|
166
|
+
optimize_for (2).google.protobuf.FileOptions.OptimizeMode:SPEED
|
167
|
+
|
168
|
+
go_package ( "
|
169
|
+
cc_generic_services (:false$
|
170
|
+
java_generic_services (:false"
|
171
|
+
py_generic_services (:false#
|
172
|
+
php_generic_services* (:false
|
173
|
+
|
174
|
+
deprecated (:false
|
175
|
+
cc_enable_arenas (:true
|
176
|
+
objc_class_prefix$ (
|
177
|
+
csharp_namespace% (
|
178
|
+
swift_prefix' (
|
179
|
+
php_class_prefix( (
|
180
|
+
|
181
|
+
php_metadata_namespace, (
|
182
|
+
ruby_package- ( C
|
183
|
+
uninterpreted_option� (2$.google.protobuf.UninterpretedOption":
|
184
|
+
OptimizeMode
|
185
|
+
SPEED
|
186
|
+
CODE_SIZE
|
187
|
+
LITE_RUNTIME* �����J&'"�
|
188
|
+
MessageOptions&
|
189
|
+
message_set_wire_format (:false.
|
190
|
+
no_standard_descriptor_accessor (:false
|
191
|
+
|
192
|
+
deprecated (:false
|
193
|
+
map_entry (C
|
194
|
+
uninterpreted_option� (2$.google.protobuf.UninterpretedOption* �����JJJJ J
|
195
|
+
"�
|
196
|
+
FieldOptions:
|
197
|
+
ctype (2#.google.protobuf.FieldOptions.CType:STRING
|
198
|
+
packed (?
|
199
|
+
jstype (2$.google.protobuf.FieldOptions.JSType: JS_NORMAL
|
200
|
+
lazy (:false
|
201
|
+
unverified_lazy (:false
|
202
|
+
|
203
|
+
deprecated (:false
|
204
|
+
weak
|
205
|
+
(:falseC
|
206
|
+
uninterpreted_option� (2$.google.protobuf.UninterpretedOption"/
|
207
|
+
CType
|
208
|
+
|
209
|
+
STRING
|
210
|
+
CORD
|
211
|
+
STRING_PIECE"5
|
212
|
+
JSType
|
213
|
+
JS_NORMAL
|
214
|
+
JS_STRING
|
215
|
+
JS_NUMBER* �����J"^
|
216
|
+
OneofOptionsC
|
217
|
+
uninterpreted_option� (2$.google.protobuf.UninterpretedOption* �����"�
|
218
|
+
EnumOptions
|
219
|
+
allow_alias (
|
220
|
+
|
221
|
+
deprecated (:falseC
|
222
|
+
uninterpreted_option� (2$.google.protobuf.UninterpretedOption* �����J"}
|
223
|
+
EnumValueOptions
|
224
|
+
|
225
|
+
deprecated (:falseC
|
226
|
+
uninterpreted_option� (2$.google.protobuf.UninterpretedOption* �����"{
|
227
|
+
ServiceOptions
|
228
|
+
|
229
|
+
deprecated! (:falseC
|
230
|
+
uninterpreted_option� (2$.google.protobuf.UninterpretedOption* �����"�
|
231
|
+
|
232
|
+
|
233
|
+
deprecated! (:false_
|
234
|
+
idempotency_level" (2/.google.protobuf.MethodOptions.IdempotencyLevel:IDEMPOTENCY_UNKNOWNC
|
235
|
+
uninterpreted_option� (2$.google.protobuf.UninterpretedOption"P
|
236
|
+
IdempotencyLevel
|
237
|
+
IDEMPOTENCY_UNKNOWN
|
238
|
+
NO_SIDE_EFFECTS
|
239
|
+
|
240
|
+
IDEMPOTENT* �����"�
|
241
|
+
UninterpretedOption;
|
242
|
+
name (2-.google.protobuf.UninterpretedOption.NamePart
|
243
|
+
identifier_value (
|
244
|
+
positive_int_value (
|
245
|
+
negative_int_value (
|
246
|
+
double_value (
|
247
|
+
string_value (
|
248
|
+
aggregate_value ( 3
|
249
|
+
NamePart
|
250
|
+
name_part (
|
251
|
+
is_extension ("�
|
252
|
+
SourceCodeInfo:
|
253
|
+
location (2(.google.protobuf.SourceCodeInfo.Location�
|
254
|
+
Location
|
255
|
+
path (B
|
256
|
+
span (B
|
257
|
+
leading_comments (
|
258
|
+
trailing_comments ( !
|
259
|
+
leading_detached_comments ( "�
|
260
|
+
GeneratedCodeInfoA
|
261
|
+
|
262
|
+
annotation (2-.google.protobuf.GeneratedCodeInfo.AnnotationO
|
263
|
+
|
264
|
+
Annotation
|
265
|
+
path (B
|
266
|
+
source_file (
|
267
|
+
begin (
|
268
|
+
end (B~
|
269
|
+
com.google.protobufBDescriptorProtosHZ-google.golang.org/protobuf/types/descriptorpb��GPB�Google.Protobuf.Reflection
|
@@ -4,14 +4,16 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
add_file("google/protobuf/duration.proto", :syntax => :proto3) do
|
8
|
+
add_message "google.protobuf.Duration" do
|
9
|
+
optional :seconds, :int64, 1
|
10
|
+
optional :nanos, :int32, 2
|
11
|
+
end
|
10
12
|
end
|
11
13
|
end
|
12
14
|
|
13
15
|
module Google
|
14
16
|
module Protobuf
|
15
|
-
Duration = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Duration").msgclass
|
17
|
+
Duration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Duration").msgclass
|
16
18
|
end
|
17
19
|
end
|
@@ -4,12 +4,14 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
|
7
|
+
add_file("google/protobuf/empty.proto", :syntax => :proto3) do
|
8
|
+
add_message "google.protobuf.Empty" do
|
9
|
+
end
|
8
10
|
end
|
9
11
|
end
|
10
12
|
|
11
13
|
module Google
|
12
14
|
module Protobuf
|
13
|
-
Empty = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Empty").msgclass
|
15
|
+
Empty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Empty").msgclass
|
14
16
|
end
|
15
17
|
end
|
@@ -4,13 +4,15 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
|
8
|
-
|
7
|
+
add_file("google/protobuf/field_mask.proto", :syntax => :proto3) do
|
8
|
+
add_message "google.protobuf.FieldMask" do
|
9
|
+
repeated :paths, :string, 1
|
10
|
+
end
|
9
11
|
end
|
10
12
|
end
|
11
13
|
|
12
14
|
module Google
|
13
15
|
module Protobuf
|
14
|
-
FieldMask = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldMask").msgclass
|
16
|
+
FieldMask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldMask").msgclass
|
15
17
|
end
|
16
18
|
end
|
@@ -40,12 +40,12 @@ module Google
|
|
40
40
|
module ClassMethods
|
41
41
|
end
|
42
42
|
|
43
|
-
def to_json
|
44
|
-
self.class.encode_json(self)
|
43
|
+
def to_json(options = {})
|
44
|
+
self.class.encode_json(self, options)
|
45
45
|
end
|
46
46
|
|
47
|
-
def to_proto
|
48
|
-
self.class.encode(self)
|
47
|
+
def to_proto(options = {})
|
48
|
+
self.class.encode(self, options)
|
49
49
|
end
|
50
50
|
|
51
51
|
end
|
@@ -74,12 +74,12 @@ module Google
|
|
74
74
|
:include?, :index, :inspect, :join,
|
75
75
|
:pack, :permutation, :product, :pretty_print, :pretty_print_cycle,
|
76
76
|
:rassoc, :repeated_combination, :repeated_permutation, :reverse,
|
77
|
-
:rindex, :rotate, :sample, :shuffle, :shelljoin,
|
77
|
+
:rindex, :rotate, :sample, :shuffle, :shelljoin,
|
78
78
|
:to_s, :transpose, :uniq, :|
|
79
79
|
|
80
80
|
|
81
81
|
def first(n=nil)
|
82
|
-
n ? self[0
|
82
|
+
n ? self[0...n] : self[0]
|
83
83
|
end
|
84
84
|
|
85
85
|
|
@@ -150,12 +150,12 @@ module Google
|
|
150
150
|
end
|
151
151
|
|
152
152
|
|
153
|
-
%w(delete delete_at
|
153
|
+
%w(delete delete_at shift slice! unshift).each do |method_name|
|
154
154
|
define_array_wrapper_method(method_name)
|
155
155
|
end
|
156
156
|
|
157
157
|
|
158
|
-
%w(collect! compact! fill flatten! insert reverse!
|
158
|
+
%w(collect! compact! delete_if fill flatten! insert reverse!
|
159
159
|
rotate! select! shuffle! sort! sort_by! uniq!).each do |method_name|
|
160
160
|
define_array_wrapper_with_result_method(method_name)
|
161
161
|
end
|
@@ -4,13 +4,15 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
|
8
|
-
|
7
|
+
add_file("google/protobuf/source_context.proto", :syntax => :proto3) do
|
8
|
+
add_message "google.protobuf.SourceContext" do
|
9
|
+
optional :file_name, :string, 1
|
10
|
+
end
|
9
11
|
end
|
10
12
|
end
|
11
13
|
|
12
14
|
module Google
|
13
15
|
module Protobuf
|
14
|
-
SourceContext = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.SourceContext").msgclass
|
16
|
+
SourceContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.SourceContext").msgclass
|
15
17
|
end
|
16
18
|
end
|
@@ -4,32 +4,34 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
7
|
+
add_file("google/protobuf/struct.proto", :syntax => :proto3) do
|
8
|
+
add_message "google.protobuf.Struct" do
|
9
|
+
map :fields, :string, :message, 1, "google.protobuf.Value"
|
10
|
+
end
|
11
|
+
add_message "google.protobuf.Value" do
|
12
|
+
oneof :kind do
|
13
|
+
optional :null_value, :enum, 1, "google.protobuf.NullValue"
|
14
|
+
optional :number_value, :double, 2
|
15
|
+
optional :string_value, :string, 3
|
16
|
+
optional :bool_value, :bool, 4
|
17
|
+
optional :struct_value, :message, 5, "google.protobuf.Struct"
|
18
|
+
optional :list_value, :message, 6, "google.protobuf.ListValue"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
add_message "google.protobuf.ListValue" do
|
22
|
+
repeated :values, :message, 1, "google.protobuf.Value"
|
23
|
+
end
|
24
|
+
add_enum "google.protobuf.NullValue" do
|
25
|
+
value :NULL_VALUE, 0
|
18
26
|
end
|
19
|
-
end
|
20
|
-
add_message "google.protobuf.ListValue" do
|
21
|
-
repeated :values, :message, 1, "google.protobuf.Value"
|
22
|
-
end
|
23
|
-
add_enum "google.protobuf.NullValue" do
|
24
|
-
value :NULL_VALUE, 0
|
25
27
|
end
|
26
28
|
end
|
27
29
|
|
28
30
|
module Google
|
29
31
|
module Protobuf
|
30
|
-
Struct = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Struct").msgclass
|
31
|
-
Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Value").msgclass
|
32
|
-
ListValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ListValue").msgclass
|
33
|
-
NullValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.NullValue").enummodule
|
32
|
+
Struct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Struct").msgclass
|
33
|
+
Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Value").msgclass
|
34
|
+
ListValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ListValue").msgclass
|
35
|
+
NullValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.NullValue").enummodule
|
34
36
|
end
|
35
37
|
end
|
@@ -4,14 +4,16 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
add_file("google/protobuf/timestamp.proto", :syntax => :proto3) do
|
8
|
+
add_message "google.protobuf.Timestamp" do
|
9
|
+
optional :seconds, :int64, 1
|
10
|
+
optional :nanos, :int32, 2
|
11
|
+
end
|
10
12
|
end
|
11
13
|
end
|
12
14
|
|
13
15
|
module Google
|
14
16
|
module Protobuf
|
15
|
-
Timestamp = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Timestamp").msgclass
|
17
|
+
Timestamp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Timestamp").msgclass
|
16
18
|
end
|
17
19
|
end
|
@@ -5,85 +5,88 @@ require 'google/protobuf'
|
|
5
5
|
|
6
6
|
require 'google/protobuf/any_pb'
|
7
7
|
require 'google/protobuf/source_context_pb'
|
8
|
+
|
8
9
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
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
|
-
|
10
|
+
add_file("google/protobuf/type.proto", :syntax => :proto3) do
|
11
|
+
add_message "google.protobuf.Type" do
|
12
|
+
optional :name, :string, 1
|
13
|
+
repeated :fields, :message, 2, "google.protobuf.Field"
|
14
|
+
repeated :oneofs, :string, 3
|
15
|
+
repeated :options, :message, 4, "google.protobuf.Option"
|
16
|
+
optional :source_context, :message, 5, "google.protobuf.SourceContext"
|
17
|
+
optional :syntax, :enum, 6, "google.protobuf.Syntax"
|
18
|
+
end
|
19
|
+
add_message "google.protobuf.Field" do
|
20
|
+
optional :kind, :enum, 1, "google.protobuf.Field.Kind"
|
21
|
+
optional :cardinality, :enum, 2, "google.protobuf.Field.Cardinality"
|
22
|
+
optional :number, :int32, 3
|
23
|
+
optional :name, :string, 4
|
24
|
+
optional :type_url, :string, 6
|
25
|
+
optional :oneof_index, :int32, 7
|
26
|
+
optional :packed, :bool, 8
|
27
|
+
repeated :options, :message, 9, "google.protobuf.Option"
|
28
|
+
optional :json_name, :string, 10
|
29
|
+
optional :default_value, :string, 11
|
30
|
+
end
|
31
|
+
add_enum "google.protobuf.Field.Kind" do
|
32
|
+
value :TYPE_UNKNOWN, 0
|
33
|
+
value :TYPE_DOUBLE, 1
|
34
|
+
value :TYPE_FLOAT, 2
|
35
|
+
value :TYPE_INT64, 3
|
36
|
+
value :TYPE_UINT64, 4
|
37
|
+
value :TYPE_INT32, 5
|
38
|
+
value :TYPE_FIXED64, 6
|
39
|
+
value :TYPE_FIXED32, 7
|
40
|
+
value :TYPE_BOOL, 8
|
41
|
+
value :TYPE_STRING, 9
|
42
|
+
value :TYPE_GROUP, 10
|
43
|
+
value :TYPE_MESSAGE, 11
|
44
|
+
value :TYPE_BYTES, 12
|
45
|
+
value :TYPE_UINT32, 13
|
46
|
+
value :TYPE_ENUM, 14
|
47
|
+
value :TYPE_SFIXED32, 15
|
48
|
+
value :TYPE_SFIXED64, 16
|
49
|
+
value :TYPE_SINT32, 17
|
50
|
+
value :TYPE_SINT64, 18
|
51
|
+
end
|
52
|
+
add_enum "google.protobuf.Field.Cardinality" do
|
53
|
+
value :CARDINALITY_UNKNOWN, 0
|
54
|
+
value :CARDINALITY_OPTIONAL, 1
|
55
|
+
value :CARDINALITY_REQUIRED, 2
|
56
|
+
value :CARDINALITY_REPEATED, 3
|
57
|
+
end
|
58
|
+
add_message "google.protobuf.Enum" do
|
59
|
+
optional :name, :string, 1
|
60
|
+
repeated :enumvalue, :message, 2, "google.protobuf.EnumValue"
|
61
|
+
repeated :options, :message, 3, "google.protobuf.Option"
|
62
|
+
optional :source_context, :message, 4, "google.protobuf.SourceContext"
|
63
|
+
optional :syntax, :enum, 5, "google.protobuf.Syntax"
|
64
|
+
end
|
65
|
+
add_message "google.protobuf.EnumValue" do
|
66
|
+
optional :name, :string, 1
|
67
|
+
optional :number, :int32, 2
|
68
|
+
repeated :options, :message, 3, "google.protobuf.Option"
|
69
|
+
end
|
70
|
+
add_message "google.protobuf.Option" do
|
71
|
+
optional :name, :string, 1
|
72
|
+
optional :value, :message, 2, "google.protobuf.Any"
|
73
|
+
end
|
74
|
+
add_enum "google.protobuf.Syntax" do
|
75
|
+
value :SYNTAX_PROTO2, 0
|
76
|
+
value :SYNTAX_PROTO3, 1
|
77
|
+
end
|
75
78
|
end
|
76
79
|
end
|
77
80
|
|
78
81
|
module Google
|
79
82
|
module Protobuf
|
80
|
-
Type = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Type").msgclass
|
81
|
-
Field = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field").msgclass
|
82
|
-
Field::Kind = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field.Kind").enummodule
|
83
|
-
Field::Cardinality = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field.Cardinality").enummodule
|
84
|
-
Enum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Enum").msgclass
|
85
|
-
EnumValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumValue").msgclass
|
86
|
-
Option = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Option").msgclass
|
87
|
-
Syntax = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Syntax").enummodule
|
83
|
+
Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Type").msgclass
|
84
|
+
Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field").msgclass
|
85
|
+
Field::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field.Kind").enummodule
|
86
|
+
Field::Cardinality = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field.Cardinality").enummodule
|
87
|
+
Enum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Enum").msgclass
|
88
|
+
EnumValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumValue").msgclass
|
89
|
+
Option = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Option").msgclass
|
90
|
+
Syntax = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Syntax").enummodule
|
88
91
|
end
|
89
92
|
end
|