google-protobuf 3.22.0-arm64-darwin
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.
- checksums.yaml +7 -0
- 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 +1280 -0
- data/ext/google/protobuf_c/defs.h +107 -0
- data/ext/google/protobuf_c/extconf.rb +27 -0
- data/ext/google/protobuf_c/map.c +687 -0
- data/ext/google/protobuf_c/map.h +66 -0
- data/ext/google/protobuf_c/message.c +1426 -0
- data/ext/google/protobuf_c/message.h +104 -0
- data/ext/google/protobuf_c/protobuf.c +480 -0
- data/ext/google/protobuf_c/protobuf.h +120 -0
- data/ext/google/protobuf_c/repeated_field.c +657 -0
- data/ext/google/protobuf_c/repeated_field.h +63 -0
- data/ext/google/protobuf_c/ruby-upb.c +13926 -0
- data/ext/google/protobuf_c/ruby-upb.h +10673 -0
- data/ext/google/protobuf_c/third_party/utf8_range/LICENSE +22 -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 +21 -0
- data/ext/google/protobuf_c/wrap_memcpy.c +52 -0
- data/lib/google/2.6/protobuf_c.bundle +0 -0
- data/lib/google/2.7/protobuf_c.bundle +0 -0
- data/lib/google/3.0/protobuf_c.bundle +0 -0
- data/lib/google/3.1/protobuf_c.bundle +0 -0
- data/lib/google/3.2/protobuf_c.bundle +0 -0
- data/lib/google/protobuf/any_pb.rb +19 -0
- data/lib/google/protobuf/api_pb.rb +42 -0
- data/lib/google/protobuf/descriptor_dsl.rb +465 -0
- data/lib/google/protobuf/descriptor_pb.rb +298 -0
- data/lib/google/protobuf/duration_pb.rb +19 -0
- data/lib/google/protobuf/empty_pb.rb +17 -0
- data/lib/google/protobuf/field_mask_pb.rb +18 -0
- data/lib/google/protobuf/message_exts.rb +58 -0
- data/lib/google/protobuf/plugin_pb.rb +50 -0
- data/lib/google/protobuf/repeated_field.rb +201 -0
- data/lib/google/protobuf/source_context_pb.rb +18 -0
- data/lib/google/protobuf/struct_pb.rb +37 -0
- data/lib/google/protobuf/timestamp_pb.rb +19 -0
- data/lib/google/protobuf/type_pb.rb +92 -0
- data/lib/google/protobuf/well_known_types.rb +240 -0
- data/lib/google/protobuf/wrappers_pb.rb +50 -0
- data/lib/google/protobuf.rb +79 -0
- metadata +137 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/protobuf/struct.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
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
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Protobuf
|
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
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/protobuf/timestamp.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
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
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
module Google
|
16
|
+
module Protobuf
|
17
|
+
Timestamp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Timestamp").msgclass
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/protobuf/type.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/protobuf/any_pb'
|
7
|
+
require 'google/protobuf/source_context_pb'
|
8
|
+
|
9
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
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
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
module Google
|
82
|
+
module Protobuf
|
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
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,240 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
# Protocol Buffers - Google's data interchange format
|
3
|
+
# Copyright 2008 Google Inc. All rights reserved.
|
4
|
+
# https://developers.google.com/protocol-buffers/
|
5
|
+
#
|
6
|
+
# Redistribution and use in source and binary forms, with or without
|
7
|
+
# modification, are permitted provided that the following conditions are
|
8
|
+
# met:
|
9
|
+
#
|
10
|
+
# * Redistributions of source code must retain the above copyright
|
11
|
+
# notice, this list of conditions and the following disclaimer.
|
12
|
+
# * Redistributions in binary form must reproduce the above
|
13
|
+
# copyright notice, this list of conditions and the following disclaimer
|
14
|
+
# in the documentation and/or other materials provided with the
|
15
|
+
# distribution.
|
16
|
+
# * Neither the name of Google Inc. nor the names of its
|
17
|
+
# contributors may be used to endorse or promote products derived from
|
18
|
+
# this software without specific prior written permission.
|
19
|
+
#
|
20
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
21
|
+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
22
|
+
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
23
|
+
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
24
|
+
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
25
|
+
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
26
|
+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
27
|
+
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
28
|
+
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
29
|
+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
30
|
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
31
|
+
|
32
|
+
require 'google/protobuf/any_pb'
|
33
|
+
require 'google/protobuf/duration_pb'
|
34
|
+
require 'google/protobuf/field_mask_pb'
|
35
|
+
require 'google/protobuf/struct_pb'
|
36
|
+
require 'google/protobuf/timestamp_pb'
|
37
|
+
|
38
|
+
module Google
|
39
|
+
module Protobuf
|
40
|
+
|
41
|
+
Any.class_eval do
|
42
|
+
def self.pack(msg, type_url_prefix='type.googleapis.com/')
|
43
|
+
any = self.new
|
44
|
+
any.pack(msg, type_url_prefix)
|
45
|
+
any
|
46
|
+
end
|
47
|
+
|
48
|
+
def pack(msg, type_url_prefix='type.googleapis.com/')
|
49
|
+
if type_url_prefix.empty? or type_url_prefix[-1] != '/' then
|
50
|
+
self.type_url = "#{type_url_prefix}/#{msg.class.descriptor.name}"
|
51
|
+
else
|
52
|
+
self.type_url = "#{type_url_prefix}#{msg.class.descriptor.name}"
|
53
|
+
end
|
54
|
+
self.value = msg.to_proto
|
55
|
+
end
|
56
|
+
|
57
|
+
def unpack(klass)
|
58
|
+
if self.is(klass) then
|
59
|
+
klass.decode(self.value)
|
60
|
+
else
|
61
|
+
nil
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def type_name
|
66
|
+
return self.type_url.split("/")[-1]
|
67
|
+
end
|
68
|
+
|
69
|
+
def is(klass)
|
70
|
+
return self.type_name == klass.descriptor.name
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
Timestamp.class_eval do
|
75
|
+
if RUBY_VERSION < "2.5"
|
76
|
+
def to_time
|
77
|
+
Time.at(self.to_f)
|
78
|
+
end
|
79
|
+
else
|
80
|
+
def to_time
|
81
|
+
Time.at(seconds, nanos, :nanosecond)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
def self.from_time(time)
|
86
|
+
new.from_time(time)
|
87
|
+
end
|
88
|
+
|
89
|
+
def from_time(time)
|
90
|
+
self.seconds = time.to_i
|
91
|
+
self.nanos = time.nsec
|
92
|
+
self
|
93
|
+
end
|
94
|
+
|
95
|
+
def to_i
|
96
|
+
self.seconds
|
97
|
+
end
|
98
|
+
|
99
|
+
def to_f
|
100
|
+
self.seconds + (self.nanos.quo(1_000_000_000))
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
Duration.class_eval do
|
105
|
+
def to_f
|
106
|
+
self.seconds + (self.nanos.to_f / 1_000_000_000)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
class UnexpectedStructType < Google::Protobuf::Error; end
|
111
|
+
|
112
|
+
Value.class_eval do
|
113
|
+
def to_ruby(recursive = false)
|
114
|
+
case self.kind
|
115
|
+
when :struct_value
|
116
|
+
if recursive
|
117
|
+
self.struct_value.to_h
|
118
|
+
else
|
119
|
+
self.struct_value
|
120
|
+
end
|
121
|
+
when :list_value
|
122
|
+
if recursive
|
123
|
+
self.list_value.to_a
|
124
|
+
else
|
125
|
+
self.list_value
|
126
|
+
end
|
127
|
+
when :null_value
|
128
|
+
nil
|
129
|
+
when :number_value
|
130
|
+
self.number_value
|
131
|
+
when :string_value
|
132
|
+
self.string_value
|
133
|
+
when :bool_value
|
134
|
+
self.bool_value
|
135
|
+
else
|
136
|
+
raise UnexpectedStructType
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
def self.from_ruby(value)
|
141
|
+
self.new.from_ruby(value)
|
142
|
+
end
|
143
|
+
|
144
|
+
def from_ruby(value)
|
145
|
+
case value
|
146
|
+
when NilClass
|
147
|
+
self.null_value = :NULL_VALUE
|
148
|
+
when Numeric
|
149
|
+
self.number_value = value
|
150
|
+
when String
|
151
|
+
self.string_value = value
|
152
|
+
when TrueClass
|
153
|
+
self.bool_value = true
|
154
|
+
when FalseClass
|
155
|
+
self.bool_value = false
|
156
|
+
when Struct
|
157
|
+
self.struct_value = value
|
158
|
+
when Hash
|
159
|
+
self.struct_value = Struct.from_hash(value)
|
160
|
+
when ListValue
|
161
|
+
self.list_value = value
|
162
|
+
when Array
|
163
|
+
self.list_value = ListValue.from_a(value)
|
164
|
+
else
|
165
|
+
raise UnexpectedStructType
|
166
|
+
end
|
167
|
+
|
168
|
+
self
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
Struct.class_eval do
|
173
|
+
def [](key)
|
174
|
+
self.fields[key].to_ruby
|
175
|
+
rescue NoMethodError
|
176
|
+
nil
|
177
|
+
end
|
178
|
+
|
179
|
+
def []=(key, value)
|
180
|
+
unless key.is_a?(String)
|
181
|
+
raise UnexpectedStructType, "Struct keys must be strings."
|
182
|
+
end
|
183
|
+
self.fields[key] ||= Google::Protobuf::Value.new
|
184
|
+
self.fields[key].from_ruby(value)
|
185
|
+
end
|
186
|
+
|
187
|
+
def to_h
|
188
|
+
ret = {}
|
189
|
+
self.fields.each { |key, val| ret[key] = val.to_ruby(true) }
|
190
|
+
ret
|
191
|
+
end
|
192
|
+
|
193
|
+
def self.from_hash(hash)
|
194
|
+
ret = Struct.new
|
195
|
+
hash.each { |key, val| ret[key] = val }
|
196
|
+
ret
|
197
|
+
end
|
198
|
+
|
199
|
+
def has_key?(key)
|
200
|
+
self.fields.has_key?(key)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
ListValue.class_eval do
|
205
|
+
include Enumerable
|
206
|
+
|
207
|
+
def length
|
208
|
+
self.values.length
|
209
|
+
end
|
210
|
+
|
211
|
+
def [](index)
|
212
|
+
self.values[index].to_ruby
|
213
|
+
end
|
214
|
+
|
215
|
+
def []=(index, value)
|
216
|
+
self.values[index].from_ruby(value)
|
217
|
+
end
|
218
|
+
|
219
|
+
def <<(value)
|
220
|
+
wrapper = Google::Protobuf::Value.new
|
221
|
+
wrapper.from_ruby(value)
|
222
|
+
self.values << wrapper
|
223
|
+
end
|
224
|
+
|
225
|
+
def each
|
226
|
+
self.values.each { |x| yield(x.to_ruby) }
|
227
|
+
end
|
228
|
+
|
229
|
+
def to_a
|
230
|
+
self.values.map { |x| x.to_ruby(true) }
|
231
|
+
end
|
232
|
+
|
233
|
+
def self.from_a(arr)
|
234
|
+
ret = ListValue.new
|
235
|
+
arr.each { |val| ret << val }
|
236
|
+
ret
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/protobuf/wrappers.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("google/protobuf/wrappers.proto", :syntax => :proto3) do
|
8
|
+
add_message "google.protobuf.DoubleValue" do
|
9
|
+
optional :value, :double, 1
|
10
|
+
end
|
11
|
+
add_message "google.protobuf.FloatValue" do
|
12
|
+
optional :value, :float, 1
|
13
|
+
end
|
14
|
+
add_message "google.protobuf.Int64Value" do
|
15
|
+
optional :value, :int64, 1
|
16
|
+
end
|
17
|
+
add_message "google.protobuf.UInt64Value" do
|
18
|
+
optional :value, :uint64, 1
|
19
|
+
end
|
20
|
+
add_message "google.protobuf.Int32Value" do
|
21
|
+
optional :value, :int32, 1
|
22
|
+
end
|
23
|
+
add_message "google.protobuf.UInt32Value" do
|
24
|
+
optional :value, :uint32, 1
|
25
|
+
end
|
26
|
+
add_message "google.protobuf.BoolValue" do
|
27
|
+
optional :value, :bool, 1
|
28
|
+
end
|
29
|
+
add_message "google.protobuf.StringValue" do
|
30
|
+
optional :value, :string, 1
|
31
|
+
end
|
32
|
+
add_message "google.protobuf.BytesValue" do
|
33
|
+
optional :value, :bytes, 1
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
module Google
|
39
|
+
module Protobuf
|
40
|
+
DoubleValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.DoubleValue").msgclass
|
41
|
+
FloatValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FloatValue").msgclass
|
42
|
+
Int64Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Int64Value").msgclass
|
43
|
+
UInt64Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UInt64Value").msgclass
|
44
|
+
Int32Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Int32Value").msgclass
|
45
|
+
UInt32Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UInt32Value").msgclass
|
46
|
+
BoolValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.BoolValue").msgclass
|
47
|
+
StringValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.StringValue").msgclass
|
48
|
+
BytesValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.BytesValue").msgclass
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# Protocol Buffers - Google's data interchange format
|
2
|
+
# Copyright 2008 Google Inc. All rights reserved.
|
3
|
+
# https://developers.google.com/protocol-buffers/
|
4
|
+
#
|
5
|
+
# Redistribution and use in source and binary forms, with or without
|
6
|
+
# modification, are permitted provided that the following conditions are
|
7
|
+
# met:
|
8
|
+
#
|
9
|
+
# * Redistributions of source code must retain the above copyright
|
10
|
+
# notice, this list of conditions and the following disclaimer.
|
11
|
+
# * Redistributions in binary form must reproduce the above
|
12
|
+
# copyright notice, this list of conditions and the following disclaimer
|
13
|
+
# in the documentation and/or other materials provided with the
|
14
|
+
# distribution.
|
15
|
+
# * Neither the name of Google Inc. nor the names of its
|
16
|
+
# contributors may be used to endorse or promote products derived from
|
17
|
+
# this software without specific prior written permission.
|
18
|
+
#
|
19
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
20
|
+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
21
|
+
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
22
|
+
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
23
|
+
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
24
|
+
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
25
|
+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
26
|
+
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
27
|
+
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
28
|
+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
29
|
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
30
|
+
|
31
|
+
# require mixins before we hook them into the java & c code
|
32
|
+
require 'google/protobuf/message_exts'
|
33
|
+
|
34
|
+
# We define these before requiring the platform-specific modules.
|
35
|
+
# That way the module init can grab references to these.
|
36
|
+
module Google
|
37
|
+
module Protobuf
|
38
|
+
class Error < StandardError; end
|
39
|
+
class ParseError < Error; end
|
40
|
+
class TypeError < ::TypeError; end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
if RUBY_PLATFORM == "java"
|
45
|
+
require 'json'
|
46
|
+
require 'google/protobuf_java'
|
47
|
+
else
|
48
|
+
begin
|
49
|
+
require "google/#{RUBY_VERSION.sub(/\.\d+$/, '')}/protobuf_c"
|
50
|
+
rescue LoadError
|
51
|
+
require 'google/protobuf_c'
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
require 'google/protobuf/descriptor_dsl'
|
57
|
+
require 'google/protobuf/repeated_field'
|
58
|
+
|
59
|
+
module Google
|
60
|
+
module Protobuf
|
61
|
+
|
62
|
+
def self.encode(msg, options = {})
|
63
|
+
msg.to_proto(options)
|
64
|
+
end
|
65
|
+
|
66
|
+
def self.encode_json(msg, options = {})
|
67
|
+
msg.to_json(options)
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.decode(klass, proto, options = {})
|
71
|
+
klass.decode(proto, options)
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.decode_json(klass, json, options = {})
|
75
|
+
klass.decode_json(json, options)
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
end
|
metadata
ADDED
@@ -0,0 +1,137 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: google-protobuf
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.22.0
|
5
|
+
platform: arm64-darwin
|
6
|
+
authors:
|
7
|
+
- Protobuf Authors
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-02-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake-compiler-dock
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.2.1
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.2.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake-compiler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.1.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.1.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: test-unit
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 3.0.9
|
51
|
+
type: :development
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - "~>"
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '3.0'
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 3.0.9
|
61
|
+
description: Protocol Buffers are Google's data interchange format.
|
62
|
+
email: protobuf@googlegroups.com
|
63
|
+
executables: []
|
64
|
+
extensions: []
|
65
|
+
extra_rdoc_files: []
|
66
|
+
files:
|
67
|
+
- ext/google/protobuf_c/convert.c
|
68
|
+
- ext/google/protobuf_c/convert.h
|
69
|
+
- ext/google/protobuf_c/defs.c
|
70
|
+
- ext/google/protobuf_c/defs.h
|
71
|
+
- ext/google/protobuf_c/extconf.rb
|
72
|
+
- ext/google/protobuf_c/map.c
|
73
|
+
- ext/google/protobuf_c/map.h
|
74
|
+
- ext/google/protobuf_c/message.c
|
75
|
+
- ext/google/protobuf_c/message.h
|
76
|
+
- ext/google/protobuf_c/protobuf.c
|
77
|
+
- ext/google/protobuf_c/protobuf.h
|
78
|
+
- ext/google/protobuf_c/repeated_field.c
|
79
|
+
- ext/google/protobuf_c/repeated_field.h
|
80
|
+
- ext/google/protobuf_c/ruby-upb.c
|
81
|
+
- ext/google/protobuf_c/ruby-upb.h
|
82
|
+
- ext/google/protobuf_c/third_party/utf8_range/LICENSE
|
83
|
+
- ext/google/protobuf_c/third_party/utf8_range/naive.c
|
84
|
+
- ext/google/protobuf_c/third_party/utf8_range/range2-neon.c
|
85
|
+
- ext/google/protobuf_c/third_party/utf8_range/range2-sse.c
|
86
|
+
- ext/google/protobuf_c/third_party/utf8_range/utf8_range.h
|
87
|
+
- ext/google/protobuf_c/wrap_memcpy.c
|
88
|
+
- lib/google/2.6/protobuf_c.bundle
|
89
|
+
- lib/google/2.7/protobuf_c.bundle
|
90
|
+
- lib/google/3.0/protobuf_c.bundle
|
91
|
+
- lib/google/3.1/protobuf_c.bundle
|
92
|
+
- lib/google/3.2/protobuf_c.bundle
|
93
|
+
- lib/google/protobuf.rb
|
94
|
+
- lib/google/protobuf/any_pb.rb
|
95
|
+
- lib/google/protobuf/api_pb.rb
|
96
|
+
- lib/google/protobuf/descriptor_dsl.rb
|
97
|
+
- lib/google/protobuf/descriptor_pb.rb
|
98
|
+
- lib/google/protobuf/duration_pb.rb
|
99
|
+
- lib/google/protobuf/empty_pb.rb
|
100
|
+
- lib/google/protobuf/field_mask_pb.rb
|
101
|
+
- lib/google/protobuf/message_exts.rb
|
102
|
+
- lib/google/protobuf/plugin_pb.rb
|
103
|
+
- lib/google/protobuf/repeated_field.rb
|
104
|
+
- lib/google/protobuf/source_context_pb.rb
|
105
|
+
- lib/google/protobuf/struct_pb.rb
|
106
|
+
- lib/google/protobuf/timestamp_pb.rb
|
107
|
+
- lib/google/protobuf/type_pb.rb
|
108
|
+
- lib/google/protobuf/well_known_types.rb
|
109
|
+
- lib/google/protobuf/wrappers_pb.rb
|
110
|
+
homepage: https://developers.google.com/protocol-buffers
|
111
|
+
licenses:
|
112
|
+
- BSD-3-Clause
|
113
|
+
metadata:
|
114
|
+
source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v3.22.0/ruby
|
115
|
+
post_install_message:
|
116
|
+
rdoc_options: []
|
117
|
+
require_paths:
|
118
|
+
- lib
|
119
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '2.6'
|
124
|
+
- - "<"
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: 3.3.dev
|
127
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
requirements: []
|
133
|
+
rubygems_version: 3.3.26
|
134
|
+
signing_key:
|
135
|
+
specification_version: 4
|
136
|
+
summary: Protocol Buffers
|
137
|
+
test_files: []
|