google-protobuf 3.2.0.2-java → 3.19.0.rc.2-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of google-protobuf might be problematic. Click here for more details.

@@ -0,0 +1,266 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/protobuf/descriptor.proto
3
+
4
+ descriptor_data = File.binread(__FILE__).split("\n__END__\n", 2)[1]
5
+ Google::Protobuf::DescriptorPool.generated_pool.add_serialized_file(descriptor_data)
6
+
7
+ module Google
8
+ module Protobuf
9
+ FileDescriptorSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FileDescriptorSet").msgclass
10
+ FileDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FileDescriptorProto").msgclass
11
+ DescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.DescriptorProto").msgclass
12
+ DescriptorProto::ExtensionRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.DescriptorProto.ExtensionRange").msgclass
13
+ DescriptorProto::ReservedRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.DescriptorProto.ReservedRange").msgclass
14
+ ExtensionRangeOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ExtensionRangeOptions").msgclass
15
+ FieldDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldDescriptorProto").msgclass
16
+ FieldDescriptorProto::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldDescriptorProto.Type").enummodule
17
+ FieldDescriptorProto::Label = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldDescriptorProto.Label").enummodule
18
+ OneofDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.OneofDescriptorProto").msgclass
19
+ EnumDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumDescriptorProto").msgclass
20
+ EnumDescriptorProto::EnumReservedRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumDescriptorProto.EnumReservedRange").msgclass
21
+ EnumValueDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumValueDescriptorProto").msgclass
22
+ ServiceDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ServiceDescriptorProto").msgclass
23
+ MethodDescriptorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.MethodDescriptorProto").msgclass
24
+ FileOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FileOptions").msgclass
25
+ FileOptions::OptimizeMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FileOptions.OptimizeMode").enummodule
26
+ MessageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.MessageOptions").msgclass
27
+ FieldOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldOptions").msgclass
28
+ FieldOptions::CType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldOptions.CType").enummodule
29
+ FieldOptions::JSType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldOptions.JSType").enummodule
30
+ OneofOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.OneofOptions").msgclass
31
+ EnumOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumOptions").msgclass
32
+ EnumValueOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumValueOptions").msgclass
33
+ ServiceOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ServiceOptions").msgclass
34
+ MethodOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.MethodOptions").msgclass
35
+ MethodOptions::IdempotencyLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.MethodOptions.IdempotencyLevel").enummodule
36
+ UninterpretedOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UninterpretedOption").msgclass
37
+ UninterpretedOption::NamePart = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UninterpretedOption.NamePart").msgclass
38
+ SourceCodeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.SourceCodeInfo").msgclass
39
+ SourceCodeInfo::Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.SourceCodeInfo.Location").msgclass
40
+ GeneratedCodeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.GeneratedCodeInfo").msgclass
41
+ GeneratedCodeInfo::Annotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.GeneratedCodeInfo.Annotation").msgclass
42
+ end
43
+ end
44
+
45
+ __END__
46
+
47
+ google/protobuf/descriptor.protogoogle.protobuf"G
48
+ FileDescriptorSet2
49
+ file ( 2$.google.protobuf.FileDescriptorProto"�
50
+ FileDescriptorProto
51
+ name ( 
52
+ package ( 
53
+
54
+ dependency ( 
55
+ public_dependency
56
+ (
57
+ weak_dependency (6
58
+ message_type ( 2 .google.protobuf.DescriptorProto7
59
+ enum_type ( 2$.google.protobuf.EnumDescriptorProto8
60
+ service ( 2'.google.protobuf.ServiceDescriptorProto8
61
+ extension ( 2%.google.protobuf.FieldDescriptorProto-
62
+ options ( 2.google.protobuf.FileOptions9
63
+ source_code_info ( 2.google.protobuf.SourceCodeInfo
64
+ syntax ( "�
65
+ DescriptorProto
66
+ name ( 4
67
+ field ( 2%.google.protobuf.FieldDescriptorProto8
68
+ extension ( 2%.google.protobuf.FieldDescriptorProto5
69
+ nested_type ( 2 .google.protobuf.DescriptorProto7
70
+ enum_type ( 2$.google.protobuf.EnumDescriptorProtoH
71
+ extension_range ( 2/.google.protobuf.DescriptorProto.ExtensionRange9
72
+
73
+ oneof_decl ( 2%.google.protobuf.OneofDescriptorProto0
74
+ options ( 2.google.protobuf.MessageOptionsF
75
+ reserved_range ( 2..google.protobuf.DescriptorProto.ReservedRange
76
+
77
+ ( e
78
+ ExtensionRange
79
+ start (
80
+ end (7
81
+ options ( 2&.google.protobuf.ExtensionRangeOptions+
82
+
83
+ start (
84
+ end ("g
85
+ ExtensionRangeOptionsC
86
+ uninterpreted_option� ( 2$.google.protobuf.UninterpretedOption* �����"�
87
+ FieldDescriptorProto
88
+ name ( 
89
+ number (:
90
+ label (2+.google.protobuf.FieldDescriptorProto.Label8
91
+ type (2*.google.protobuf.FieldDescriptorProto.Type
92
+ type_name ( 
93
+ extendee ( 
94
+
95
+ oneof_index (
96
+ json_name
97
+ ( .
98
+ options ( 2.google.protobuf.FieldOptions
99
+ proto3_optional ("�
100
+ Type
101
+ TYPE_DOUBLE
102
+
103
+ TYPE_FLOAT
104
+
105
+ TYPE_INT64
106
+ TYPE_UINT64
107
+
108
+ TYPE_INT32
109
+ TYPE_FIXED64
110
+ TYPE_FIXED32
111
+ TYPE_BOOL
112
+ TYPE_STRING 
113
+
114
+ TYPE_GROUP
115
+ 
116
+ TYPE_MESSAGE 
117
+
118
+ TYPE_BYTES 
119
+ TYPE_UINT32
120
+ TYPE_ENUM
121
+
122
+
123
+ TYPE_SINT32
124
+ TYPE_SINT64"C
125
+ Label
126
+ LABEL_OPTIONAL
127
+ LABEL_REQUIRED
128
+ LABEL_REPEATED"T
129
+ OneofDescriptorProto
130
+ name ( .
131
+ options ( 2.google.protobuf.OneofOptions"�
132
+ EnumDescriptorProto
133
+ name ( 8
134
+ value ( 2).google.protobuf.EnumValueDescriptorProto-
135
+ options ( 2.google.protobuf.EnumOptionsN
136
+ reserved_range ( 26.google.protobuf.EnumDescriptorProto.EnumReservedRange
137
+
138
+ EnumReservedRange
139
+ start (
140
+ end ("l
141
+ EnumValueDescriptorProto
142
+ name ( 
143
+ number (2
144
+ options ( 2!.google.protobuf.EnumValueOptions"�
145
+ ServiceDescriptorProto
146
+ name ( 6
147
+ method ( 2&.google.protobuf.MethodDescriptorProto0
148
+ options ( 2.google.protobuf.ServiceOptions"�
149
+ MethodDescriptorProto
150
+ name ( 
151
+
152
+ input_type ( 
153
+ output_type ( /
154
+ options ( 2.google.protobuf.MethodOptions
155
+ client_streaming (:false
156
+ server_streaming (:false"�
157
+ FileOptions
158
+ java_package ( 
159
+ java_outer_classname ( "
160
+ java_multiple_files
161
+ (:false)
162
+ java_generate_equals_and_hash (B%
163
+ java_string_check_utf8 (:falseF
164
+ optimize_for (2).google.protobuf.FileOptions.OptimizeMode:SPEED
165
+
166
+ go_package ( "
167
+ cc_generic_services (:false$
168
+ java_generic_services (:false"
169
+ py_generic_services (:false#
170
+ php_generic_services* (:false
171
+
172
+ deprecated (:false
173
+ cc_enable_arenas (:true
174
+ objc_class_prefix$ ( 
175
+ csharp_namespace% ( 
176
+ swift_prefix' ( 
177
+ php_class_prefix( ( 
178
+
179
+ php_metadata_namespace, ( 
180
+ ruby_package- ( C
181
+ uninterpreted_option� ( 2$.google.protobuf.UninterpretedOption":
182
+ OptimizeMode
183
+ SPEED
184
+ CODE_SIZE
185
+ LITE_RUNTIME* �����J&'"�
186
+ MessageOptions&
187
+ message_set_wire_format (:false.
188
+ no_standard_descriptor_accessor (:false
189
+
190
+ deprecated (:false
191
+ map_entry (C
192
+ uninterpreted_option� ( 2$.google.protobuf.UninterpretedOption* �����JJJJ J 
193
+ "�
194
+ FieldOptions:
195
+ ctype (2#.google.protobuf.FieldOptions.CType:STRING
196
+ packed (?
197
+ jstype (2$.google.protobuf.FieldOptions.JSType: JS_NORMAL
198
+ lazy (:false
199
+
200
+ deprecated (:false
201
+ weak
202
+ (:falseC
203
+ uninterpreted_option� ( 2$.google.protobuf.UninterpretedOption"/
204
+ CType
205
+
206
+ STRING
207
+ CORD
208
+ STRING_PIECE"5
209
+ JSType
210
+ JS_NORMAL
211
+ JS_STRING
212
+ JS_NUMBER* �����J"^
213
+ OneofOptionsC
214
+ uninterpreted_option� ( 2$.google.protobuf.UninterpretedOption* �����"�
215
+ EnumOptions
216
+ allow_alias (
217
+
218
+ deprecated (:falseC
219
+ uninterpreted_option� ( 2$.google.protobuf.UninterpretedOption* �����J"}
220
+ EnumValueOptions
221
+
222
+ deprecated (:falseC
223
+ uninterpreted_option� ( 2$.google.protobuf.UninterpretedOption* �����"{
224
+ ServiceOptions
225
+
226
+ deprecated! (:falseC
227
+ uninterpreted_option� ( 2$.google.protobuf.UninterpretedOption* �����"�
228
+
229
+
230
+ deprecated! (:false_
231
+ idempotency_level" (2/.google.protobuf.MethodOptions.IdempotencyLevel:IDEMPOTENCY_UNKNOWNC
232
+ uninterpreted_option� ( 2$.google.protobuf.UninterpretedOption"P
233
+ IdempotencyLevel
234
+ IDEMPOTENCY_UNKNOWN
235
+ NO_SIDE_EFFECTS
236
+
237
+ IDEMPOTENT* �����"�
238
+ UninterpretedOption;
239
+ name ( 2-.google.protobuf.UninterpretedOption.NamePart
240
+ identifier_value ( 
241
+ positive_int_value (
242
+ negative_int_value (
243
+ double_value (
244
+ string_value ( 
245
+ aggregate_value ( 3
246
+ NamePart
247
+ name_part ( 
248
+ is_extension ("�
249
+ SourceCodeInfo:
250
+ location ( 2(.google.protobuf.SourceCodeInfo.Location�
251
+ Location
252
+ path (B
253
+ span (B
254
+ leading_comments ( 
255
+ trailing_comments ( !
256
+ leading_detached_comments ( "�
257
+ GeneratedCodeInfoA
258
+
259
+ annotation ( 2-.google.protobuf.GeneratedCodeInfo.AnnotationO
260
+
261
+ Annotation
262
+ path (B
263
+ source_file ( 
264
+ begin (
265
+ end (B~
266
+ 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
- add_message "google.protobuf.Duration" do
8
- optional :seconds, :int64, 1
9
- optional :nanos, :int32, 2
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
- add_message "google.protobuf.Empty" do
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
- add_message "google.protobuf.FieldMask" do
8
- repeated :paths, :string, 1
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,8 +40,8 @@ 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
47
  def to_proto
@@ -79,7 +79,7 @@ module Google
79
79
 
80
80
 
81
81
  def first(n=nil)
82
- n ? self[0..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 delete_if shift slice! unshift).each do |method_name|
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
- add_message "google.protobuf.SourceContext" do
8
- optional :file_name, :string, 1
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
- add_message "google.protobuf.Struct" do
8
- map :fields, :string, :message, 1, "google.protobuf.Value"
9
- end
10
- add_message "google.protobuf.Value" do
11
- oneof :kind do
12
- optional :null_value, :enum, 1, "google.protobuf.NullValue"
13
- optional :number_value, :double, 2
14
- optional :string_value, :string, 3
15
- optional :bool_value, :bool, 4
16
- optional :struct_value, :message, 5, "google.protobuf.Struct"
17
- optional :list_value, :message, 6, "google.protobuf.ListValue"
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
- add_message "google.protobuf.Timestamp" do
8
- optional :seconds, :int64, 1
9
- optional :nanos, :int32, 2
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
@@ -1,89 +1,91 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/protobuf/type.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/protobuf/any_pb'
7
5
  require 'google/protobuf/source_context_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_message "google.protobuf.Type" do
10
- optional :name, :string, 1
11
- repeated :fields, :message, 2, "google.protobuf.Field"
12
- repeated :oneofs, :string, 3
13
- repeated :options, :message, 4, "google.protobuf.Option"
14
- optional :source_context, :message, 5, "google.protobuf.SourceContext"
15
- optional :syntax, :enum, 6, "google.protobuf.Syntax"
16
- end
17
- add_message "google.protobuf.Field" do
18
- optional :kind, :enum, 1, "google.protobuf.Field.Kind"
19
- optional :cardinality, :enum, 2, "google.protobuf.Field.Cardinality"
20
- optional :number, :int32, 3
21
- optional :name, :string, 4
22
- optional :type_url, :string, 6
23
- optional :oneof_index, :int32, 7
24
- optional :packed, :bool, 8
25
- repeated :options, :message, 9, "google.protobuf.Option"
26
- optional :json_name, :string, 10
27
- optional :default_value, :string, 11
28
- end
29
- add_enum "google.protobuf.Field.Kind" do
30
- value :TYPE_UNKNOWN, 0
31
- value :TYPE_DOUBLE, 1
32
- value :TYPE_FLOAT, 2
33
- value :TYPE_INT64, 3
34
- value :TYPE_UINT64, 4
35
- value :TYPE_INT32, 5
36
- value :TYPE_FIXED64, 6
37
- value :TYPE_FIXED32, 7
38
- value :TYPE_BOOL, 8
39
- value :TYPE_STRING, 9
40
- value :TYPE_GROUP, 10
41
- value :TYPE_MESSAGE, 11
42
- value :TYPE_BYTES, 12
43
- value :TYPE_UINT32, 13
44
- value :TYPE_ENUM, 14
45
- value :TYPE_SFIXED32, 15
46
- value :TYPE_SFIXED64, 16
47
- value :TYPE_SINT32, 17
48
- value :TYPE_SINT64, 18
49
- end
50
- add_enum "google.protobuf.Field.Cardinality" do
51
- value :CARDINALITY_UNKNOWN, 0
52
- value :CARDINALITY_OPTIONAL, 1
53
- value :CARDINALITY_REQUIRED, 2
54
- value :CARDINALITY_REPEATED, 3
55
- end
56
- add_message "google.protobuf.Enum" do
57
- optional :name, :string, 1
58
- repeated :enumvalue, :message, 2, "google.protobuf.EnumValue"
59
- repeated :options, :message, 3, "google.protobuf.Option"
60
- optional :source_context, :message, 4, "google.protobuf.SourceContext"
61
- optional :syntax, :enum, 5, "google.protobuf.Syntax"
62
- end
63
- add_message "google.protobuf.EnumValue" do
64
- optional :name, :string, 1
65
- optional :number, :int32, 2
66
- repeated :options, :message, 3, "google.protobuf.Option"
67
- end
68
- add_message "google.protobuf.Option" do
69
- optional :name, :string, 1
70
- optional :value, :message, 2, "google.protobuf.Any"
71
- end
72
- add_enum "google.protobuf.Syntax" do
73
- value :SYNTAX_PROTO2, 0
74
- value :SYNTAX_PROTO3, 1
9
+ add_file("google/protobuf/type.proto", :syntax => :proto3) do
10
+ add_message "google.protobuf.Type" do
11
+ optional :name, :string, 1
12
+ repeated :fields, :message, 2, "google.protobuf.Field"
13
+ repeated :oneofs, :string, 3
14
+ repeated :options, :message, 4, "google.protobuf.Option"
15
+ optional :source_context, :message, 5, "google.protobuf.SourceContext"
16
+ optional :syntax, :enum, 6, "google.protobuf.Syntax"
17
+ end
18
+ add_message "google.protobuf.Field" do
19
+ optional :kind, :enum, 1, "google.protobuf.Field.Kind"
20
+ optional :cardinality, :enum, 2, "google.protobuf.Field.Cardinality"
21
+ optional :number, :int32, 3
22
+ optional :name, :string, 4
23
+ optional :type_url, :string, 6
24
+ optional :oneof_index, :int32, 7
25
+ optional :packed, :bool, 8
26
+ repeated :options, :message, 9, "google.protobuf.Option"
27
+ optional :json_name, :string, 10
28
+ optional :default_value, :string, 11
29
+ end
30
+ add_enum "google.protobuf.Field.Kind" do
31
+ value :TYPE_UNKNOWN, 0
32
+ value :TYPE_DOUBLE, 1
33
+ value :TYPE_FLOAT, 2
34
+ value :TYPE_INT64, 3
35
+ value :TYPE_UINT64, 4
36
+ value :TYPE_INT32, 5
37
+ value :TYPE_FIXED64, 6
38
+ value :TYPE_FIXED32, 7
39
+ value :TYPE_BOOL, 8
40
+ value :TYPE_STRING, 9
41
+ value :TYPE_GROUP, 10
42
+ value :TYPE_MESSAGE, 11
43
+ value :TYPE_BYTES, 12
44
+ value :TYPE_UINT32, 13
45
+ value :TYPE_ENUM, 14
46
+ value :TYPE_SFIXED32, 15
47
+ value :TYPE_SFIXED64, 16
48
+ value :TYPE_SINT32, 17
49
+ value :TYPE_SINT64, 18
50
+ end
51
+ add_enum "google.protobuf.Field.Cardinality" do
52
+ value :CARDINALITY_UNKNOWN, 0
53
+ value :CARDINALITY_OPTIONAL, 1
54
+ value :CARDINALITY_REQUIRED, 2
55
+ value :CARDINALITY_REPEATED, 3
56
+ end
57
+ add_message "google.protobuf.Enum" do
58
+ optional :name, :string, 1
59
+ repeated :enumvalue, :message, 2, "google.protobuf.EnumValue"
60
+ repeated :options, :message, 3, "google.protobuf.Option"
61
+ optional :source_context, :message, 4, "google.protobuf.SourceContext"
62
+ optional :syntax, :enum, 5, "google.protobuf.Syntax"
63
+ end
64
+ add_message "google.protobuf.EnumValue" do
65
+ optional :name, :string, 1
66
+ optional :number, :int32, 2
67
+ repeated :options, :message, 3, "google.protobuf.Option"
68
+ end
69
+ add_message "google.protobuf.Option" do
70
+ optional :name, :string, 1
71
+ optional :value, :message, 2, "google.protobuf.Any"
72
+ end
73
+ add_enum "google.protobuf.Syntax" do
74
+ value :SYNTAX_PROTO2, 0
75
+ value :SYNTAX_PROTO3, 1
76
+ end
75
77
  end
76
78
  end
77
79
 
78
80
  module Google
79
81
  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
82
+ Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Type").msgclass
83
+ Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field").msgclass
84
+ Field::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field.Kind").enummodule
85
+ Field::Cardinality = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field.Cardinality").enummodule
86
+ Enum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Enum").msgclass
87
+ EnumValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumValue").msgclass
88
+ Option = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Option").msgclass
89
+ Syntax = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Syntax").enummodule
88
90
  end
89
91
  end