protobug_well_known_protos 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/google/protobuf/any_pb.rb +185 -0
- data/lib/google/protobuf/any_well_known.rb +48 -0
- data/lib/google/protobuf/api_pb.rb +286 -0
- data/lib/google/protobuf/descriptor_pb.rb +1828 -0
- data/lib/google/protobuf/duration_pb.rb +133 -0
- data/lib/google/protobuf/duration_well_known.rb +52 -0
- data/lib/google/protobuf/empty_pb.rb +68 -0
- data/lib/google/protobuf/field_mask_pb.rb +265 -0
- data/lib/google/protobuf/field_mask_well_known.rb +33 -0
- data/lib/google/protobuf/source_context_pb.rb +72 -0
- data/lib/google/protobuf/struct_pb.rb +185 -0
- data/lib/google/protobuf/struct_well_known.rb +193 -0
- data/lib/google/protobuf/timestamp_pb.rb +162 -0
- data/lib/google/protobuf/timestamp_well_known.rb +71 -0
- data/lib/google/protobuf/type_pb.rb +346 -0
- data/lib/google/protobuf/wrappers_pb.rb +183 -0
- data/lib/google/protobuf/wrappers_well_known.rb +25 -0
- data/lib/protobug_well_known_protos.rb +15 -0
- metadata +77 -0
@@ -0,0 +1,346 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Code generated by protoc-gen-protobug. DO NOT EDIT.
|
4
|
+
|
5
|
+
# source: google/protobuf/type.proto
|
6
|
+
# syntax: proto3
|
7
|
+
# package: google.protobuf
|
8
|
+
# options:
|
9
|
+
# java_package: "com.google.protobuf"
|
10
|
+
# java_outer_classname: "TypeProto"
|
11
|
+
# java_multiple_files: true
|
12
|
+
# go_package: "google.golang.org/protobuf/types/known/typepb"
|
13
|
+
# cc_enable_arenas: true
|
14
|
+
# objc_class_prefix: "GPB"
|
15
|
+
# csharp_namespace: "Google.Protobuf.WellKnownTypes"
|
16
|
+
|
17
|
+
# Protocol Buffers - Google's data interchange format
|
18
|
+
# Copyright 2008 Google Inc. All rights reserved.
|
19
|
+
# https://developers.google.com/protocol-buffers/
|
20
|
+
#
|
21
|
+
# Redistribution and use in source and binary forms, with or without
|
22
|
+
# modification, are permitted provided that the following conditions are
|
23
|
+
# met:
|
24
|
+
#
|
25
|
+
# * Redistributions of source code must retain the above copyright
|
26
|
+
# notice, this list of conditions and the following disclaimer.
|
27
|
+
# * Redistributions in binary form must reproduce the above
|
28
|
+
# copyright notice, this list of conditions and the following disclaimer
|
29
|
+
# in the documentation and/or other materials provided with the
|
30
|
+
# distribution.
|
31
|
+
# * Neither the name of Google Inc. nor the names of its
|
32
|
+
# contributors may be used to endorse or promote products derived from
|
33
|
+
# this software without specific prior written permission.
|
34
|
+
#
|
35
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
36
|
+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
37
|
+
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
38
|
+
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
39
|
+
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
40
|
+
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
41
|
+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
42
|
+
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
43
|
+
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
44
|
+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
45
|
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
46
|
+
|
47
|
+
require "protobug"
|
48
|
+
|
49
|
+
require_relative "any_pb"
|
50
|
+
require_relative "source_context_pb"
|
51
|
+
|
52
|
+
module Google
|
53
|
+
module Protobuf
|
54
|
+
# A protocol buffer message type.
|
55
|
+
class Type
|
56
|
+
extend Protobug::Message
|
57
|
+
|
58
|
+
self.full_name = "google.protobuf.Type"
|
59
|
+
|
60
|
+
# The fully qualified message name.
|
61
|
+
optional(1, "name", type: :string, proto3_optional: false)
|
62
|
+
# The list of fields.
|
63
|
+
repeated(
|
64
|
+
2,
|
65
|
+
"fields",
|
66
|
+
type: :message,
|
67
|
+
message_type: "google.protobuf.Field"
|
68
|
+
)
|
69
|
+
# The list of types appearing in `oneof` definitions in this type.
|
70
|
+
repeated(3, "oneofs", type: :string)
|
71
|
+
# The protocol buffer options.
|
72
|
+
repeated(
|
73
|
+
4,
|
74
|
+
"options",
|
75
|
+
type: :message,
|
76
|
+
message_type: "google.protobuf.Option"
|
77
|
+
)
|
78
|
+
# The source context.
|
79
|
+
optional(
|
80
|
+
5,
|
81
|
+
"source_context",
|
82
|
+
type: :message,
|
83
|
+
message_type: "google.protobuf.SourceContext",
|
84
|
+
json_name: "sourceContext",
|
85
|
+
proto3_optional: false
|
86
|
+
)
|
87
|
+
# The source syntax.
|
88
|
+
optional(
|
89
|
+
6,
|
90
|
+
"syntax",
|
91
|
+
type: :enum,
|
92
|
+
enum_type: "google.protobuf.Syntax",
|
93
|
+
proto3_optional: false
|
94
|
+
)
|
95
|
+
# The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
96
|
+
optional(7, "edition", type: :string, proto3_optional: false)
|
97
|
+
end
|
98
|
+
|
99
|
+
# A single field of a message type.
|
100
|
+
class Field
|
101
|
+
extend Protobug::Message
|
102
|
+
|
103
|
+
self.full_name = "google.protobuf.Field"
|
104
|
+
|
105
|
+
# Basic field types.
|
106
|
+
class Kind
|
107
|
+
extend Protobug::Enum
|
108
|
+
|
109
|
+
self.full_name = "google.protobuf.Field.Kind"
|
110
|
+
|
111
|
+
# Field type unknown.
|
112
|
+
TYPE_UNKNOWN = new("TYPE_UNKNOWN", 0).freeze
|
113
|
+
# Field type double.
|
114
|
+
TYPE_DOUBLE = new("TYPE_DOUBLE", 1).freeze
|
115
|
+
# Field type float.
|
116
|
+
TYPE_FLOAT = new("TYPE_FLOAT", 2).freeze
|
117
|
+
# Field type int64.
|
118
|
+
TYPE_INT64 = new("TYPE_INT64", 3).freeze
|
119
|
+
# Field type uint64.
|
120
|
+
TYPE_UINT64 = new("TYPE_UINT64", 4).freeze
|
121
|
+
# Field type int32.
|
122
|
+
TYPE_INT32 = new("TYPE_INT32", 5).freeze
|
123
|
+
# Field type fixed64.
|
124
|
+
TYPE_FIXED64 = new("TYPE_FIXED64", 6).freeze
|
125
|
+
# Field type fixed32.
|
126
|
+
TYPE_FIXED32 = new("TYPE_FIXED32", 7).freeze
|
127
|
+
# Field type bool.
|
128
|
+
TYPE_BOOL = new("TYPE_BOOL", 8).freeze
|
129
|
+
# Field type string.
|
130
|
+
TYPE_STRING = new("TYPE_STRING", 9).freeze
|
131
|
+
# Field type group. Proto2 syntax only, and deprecated.
|
132
|
+
TYPE_GROUP = new("TYPE_GROUP", 10).freeze
|
133
|
+
# Field type message.
|
134
|
+
TYPE_MESSAGE = new("TYPE_MESSAGE", 11).freeze
|
135
|
+
# Field type bytes.
|
136
|
+
TYPE_BYTES = new("TYPE_BYTES", 12).freeze
|
137
|
+
# Field type uint32.
|
138
|
+
TYPE_UINT32 = new("TYPE_UINT32", 13).freeze
|
139
|
+
# Field type enum.
|
140
|
+
TYPE_ENUM = new("TYPE_ENUM", 14).freeze
|
141
|
+
# Field type sfixed32.
|
142
|
+
TYPE_SFIXED32 = new("TYPE_SFIXED32", 15).freeze
|
143
|
+
# Field type sfixed64.
|
144
|
+
TYPE_SFIXED64 = new("TYPE_SFIXED64", 16).freeze
|
145
|
+
# Field type sint32.
|
146
|
+
TYPE_SINT32 = new("TYPE_SINT32", 17).freeze
|
147
|
+
# Field type sint64.
|
148
|
+
TYPE_SINT64 = new("TYPE_SINT64", 18).freeze
|
149
|
+
end
|
150
|
+
|
151
|
+
# Whether a field is optional, required, or repeated.
|
152
|
+
class Cardinality
|
153
|
+
extend Protobug::Enum
|
154
|
+
|
155
|
+
self.full_name = "google.protobuf.Field.Cardinality"
|
156
|
+
|
157
|
+
# For fields with unknown cardinality.
|
158
|
+
CARDINALITY_UNKNOWN = new("CARDINALITY_UNKNOWN", 0).freeze
|
159
|
+
# For optional fields.
|
160
|
+
CARDINALITY_OPTIONAL = new("CARDINALITY_OPTIONAL", 1).freeze
|
161
|
+
# For required fields. Proto2 syntax only.
|
162
|
+
CARDINALITY_REQUIRED = new("CARDINALITY_REQUIRED", 2).freeze
|
163
|
+
# For repeated fields.
|
164
|
+
CARDINALITY_REPEATED = new("CARDINALITY_REPEATED", 3).freeze
|
165
|
+
end
|
166
|
+
|
167
|
+
# The field type.
|
168
|
+
optional(
|
169
|
+
1,
|
170
|
+
"kind",
|
171
|
+
type: :enum,
|
172
|
+
enum_type: "google.protobuf.Field.Kind",
|
173
|
+
proto3_optional: false
|
174
|
+
)
|
175
|
+
# The field cardinality.
|
176
|
+
optional(
|
177
|
+
2,
|
178
|
+
"cardinality",
|
179
|
+
type: :enum,
|
180
|
+
enum_type: "google.protobuf.Field.Cardinality",
|
181
|
+
proto3_optional: false
|
182
|
+
)
|
183
|
+
# The field number.
|
184
|
+
optional(3, "number", type: :int32, proto3_optional: false)
|
185
|
+
# The field name.
|
186
|
+
optional(4, "name", type: :string, proto3_optional: false)
|
187
|
+
# The field type URL, without the scheme, for message or enumeration
|
188
|
+
# types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
|
189
|
+
optional(
|
190
|
+
6,
|
191
|
+
"type_url",
|
192
|
+
type: :string,
|
193
|
+
json_name: "typeUrl",
|
194
|
+
proto3_optional: false
|
195
|
+
)
|
196
|
+
# The index of the field type in `Type.oneofs`, for message or enumeration
|
197
|
+
# types. The first type has index 1; zero means the type is not in the list.
|
198
|
+
optional(
|
199
|
+
7,
|
200
|
+
"oneof_index",
|
201
|
+
type: :int32,
|
202
|
+
json_name: "oneofIndex",
|
203
|
+
proto3_optional: false
|
204
|
+
)
|
205
|
+
# Whether to use alternative packed wire representation.
|
206
|
+
optional(8, "packed", type: :bool, proto3_optional: false)
|
207
|
+
# The protocol buffer options.
|
208
|
+
repeated(
|
209
|
+
9,
|
210
|
+
"options",
|
211
|
+
type: :message,
|
212
|
+
message_type: "google.protobuf.Option"
|
213
|
+
)
|
214
|
+
# The field JSON name.
|
215
|
+
optional(
|
216
|
+
10,
|
217
|
+
"json_name",
|
218
|
+
type: :string,
|
219
|
+
json_name: "jsonName",
|
220
|
+
proto3_optional: false
|
221
|
+
)
|
222
|
+
# The string value of the default value of this field. Proto2 syntax only.
|
223
|
+
optional(
|
224
|
+
11,
|
225
|
+
"default_value",
|
226
|
+
type: :string,
|
227
|
+
json_name: "defaultValue",
|
228
|
+
proto3_optional: false
|
229
|
+
)
|
230
|
+
end
|
231
|
+
|
232
|
+
# Enum type definition.
|
233
|
+
class Enum
|
234
|
+
extend Protobug::Message
|
235
|
+
|
236
|
+
self.full_name = "google.protobuf.Enum"
|
237
|
+
|
238
|
+
# Enum type name.
|
239
|
+
optional(1, "name", type: :string, proto3_optional: false)
|
240
|
+
# Enum value definitions.
|
241
|
+
repeated(
|
242
|
+
2,
|
243
|
+
"enumvalue",
|
244
|
+
type: :message,
|
245
|
+
message_type: "google.protobuf.EnumValue"
|
246
|
+
)
|
247
|
+
# Protocol buffer options.
|
248
|
+
repeated(
|
249
|
+
3,
|
250
|
+
"options",
|
251
|
+
type: :message,
|
252
|
+
message_type: "google.protobuf.Option"
|
253
|
+
)
|
254
|
+
# The source context.
|
255
|
+
optional(
|
256
|
+
4,
|
257
|
+
"source_context",
|
258
|
+
type: :message,
|
259
|
+
message_type: "google.protobuf.SourceContext",
|
260
|
+
json_name: "sourceContext",
|
261
|
+
proto3_optional: false
|
262
|
+
)
|
263
|
+
# The source syntax.
|
264
|
+
optional(
|
265
|
+
5,
|
266
|
+
"syntax",
|
267
|
+
type: :enum,
|
268
|
+
enum_type: "google.protobuf.Syntax",
|
269
|
+
proto3_optional: false
|
270
|
+
)
|
271
|
+
# The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
272
|
+
optional(6, "edition", type: :string, proto3_optional: false)
|
273
|
+
end
|
274
|
+
|
275
|
+
# Enum value definition.
|
276
|
+
class EnumValue
|
277
|
+
extend Protobug::Message
|
278
|
+
|
279
|
+
self.full_name = "google.protobuf.EnumValue"
|
280
|
+
|
281
|
+
# Enum value name.
|
282
|
+
optional(1, "name", type: :string, proto3_optional: false)
|
283
|
+
# Enum value number.
|
284
|
+
optional(2, "number", type: :int32, proto3_optional: false)
|
285
|
+
# Protocol buffer options.
|
286
|
+
repeated(
|
287
|
+
3,
|
288
|
+
"options",
|
289
|
+
type: :message,
|
290
|
+
message_type: "google.protobuf.Option"
|
291
|
+
)
|
292
|
+
end
|
293
|
+
|
294
|
+
# A protocol buffer option, which can be attached to a message, field,
|
295
|
+
# enumeration, etc.
|
296
|
+
class Option
|
297
|
+
extend Protobug::Message
|
298
|
+
|
299
|
+
self.full_name = "google.protobuf.Option"
|
300
|
+
|
301
|
+
# The option's name. For protobuf built-in options (options defined in
|
302
|
+
# descriptor.proto), this is the short name. For example, `"map_entry"`.
|
303
|
+
# For custom options, it should be the fully-qualified name. For example,
|
304
|
+
# `"google.api.http"`.
|
305
|
+
optional(1, "name", type: :string, proto3_optional: false)
|
306
|
+
# The option's value packed in an Any message. If the value is a primitive,
|
307
|
+
# the corresponding wrapper type defined in google/protobuf/wrappers.proto
|
308
|
+
# should be used. If the value is an enum, it should be stored as an int32
|
309
|
+
# value using the google.protobuf.Int32Value type.
|
310
|
+
optional(
|
311
|
+
2,
|
312
|
+
"value",
|
313
|
+
type: :message,
|
314
|
+
message_type: "google.protobuf.Any",
|
315
|
+
proto3_optional: false
|
316
|
+
)
|
317
|
+
end
|
318
|
+
|
319
|
+
# The syntax in which a protocol buffer element is defined.
|
320
|
+
class Syntax
|
321
|
+
extend Protobug::Enum
|
322
|
+
|
323
|
+
self.full_name = "google.protobuf.Syntax"
|
324
|
+
|
325
|
+
# Syntax `proto2`.
|
326
|
+
SYNTAX_PROTO2 = new("SYNTAX_PROTO2", 0).freeze
|
327
|
+
# Syntax `proto3`.
|
328
|
+
SYNTAX_PROTO3 = new("SYNTAX_PROTO3", 1).freeze
|
329
|
+
# Syntax `editions`.
|
330
|
+
SYNTAX_EDITIONS = new("SYNTAX_EDITIONS", 2).freeze
|
331
|
+
end
|
332
|
+
|
333
|
+
def self.register_type_protos(registry)
|
334
|
+
Google::Protobuf.register_any_protos(registry)
|
335
|
+
Google::Protobuf.register_source_context_protos(registry)
|
336
|
+
registry.register(Google::Protobuf::Type)
|
337
|
+
registry.register(Google::Protobuf::Field)
|
338
|
+
registry.register(Google::Protobuf::Field::Kind)
|
339
|
+
registry.register(Google::Protobuf::Field::Cardinality)
|
340
|
+
registry.register(Google::Protobuf::Enum)
|
341
|
+
registry.register(Google::Protobuf::EnumValue)
|
342
|
+
registry.register(Google::Protobuf::Option)
|
343
|
+
registry.register(Google::Protobuf::Syntax)
|
344
|
+
end
|
345
|
+
end
|
346
|
+
end
|
@@ -0,0 +1,183 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Code generated by protoc-gen-protobug. DO NOT EDIT.
|
4
|
+
|
5
|
+
# source: google/protobuf/wrappers.proto
|
6
|
+
# syntax: proto3
|
7
|
+
# package: google.protobuf
|
8
|
+
# options:
|
9
|
+
# java_package: "com.google.protobuf"
|
10
|
+
# java_outer_classname: "WrappersProto"
|
11
|
+
# java_multiple_files: true
|
12
|
+
# go_package: "google.golang.org/protobuf/types/known/wrapperspb"
|
13
|
+
# cc_enable_arenas: true
|
14
|
+
# objc_class_prefix: "GPB"
|
15
|
+
# csharp_namespace: "Google.Protobuf.WellKnownTypes"
|
16
|
+
|
17
|
+
# Protocol Buffers - Google's data interchange format
|
18
|
+
# Copyright 2008 Google Inc. All rights reserved.
|
19
|
+
# https://developers.google.com/protocol-buffers/
|
20
|
+
#
|
21
|
+
# Redistribution and use in source and binary forms, with or without
|
22
|
+
# modification, are permitted provided that the following conditions are
|
23
|
+
# met:
|
24
|
+
#
|
25
|
+
# * Redistributions of source code must retain the above copyright
|
26
|
+
# notice, this list of conditions and the following disclaimer.
|
27
|
+
# * Redistributions in binary form must reproduce the above
|
28
|
+
# copyright notice, this list of conditions and the following disclaimer
|
29
|
+
# in the documentation and/or other materials provided with the
|
30
|
+
# distribution.
|
31
|
+
# * Neither the name of Google Inc. nor the names of its
|
32
|
+
# contributors may be used to endorse or promote products derived from
|
33
|
+
# this software without specific prior written permission.
|
34
|
+
#
|
35
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
36
|
+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
37
|
+
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
38
|
+
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
39
|
+
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
40
|
+
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
41
|
+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
42
|
+
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
43
|
+
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
44
|
+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
45
|
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
46
|
+
#
|
47
|
+
# Wrappers for primitive (non-message) types. These types are useful
|
48
|
+
# for embedding primitives in the `google.protobuf.Any` type and for places
|
49
|
+
# where we need to distinguish between the absence of a primitive
|
50
|
+
# typed field and its default value.
|
51
|
+
#
|
52
|
+
# These wrappers have no meaningful use within repeated fields as they lack
|
53
|
+
# the ability to detect presence on individual elements.
|
54
|
+
# These wrappers have no meaningful use within a map or a oneof since
|
55
|
+
# individual entries of a map or fields of a oneof can already detect presence.
|
56
|
+
|
57
|
+
require "protobug"
|
58
|
+
|
59
|
+
module Google
|
60
|
+
module Protobuf
|
61
|
+
# Wrapper message for `double`.
|
62
|
+
#
|
63
|
+
# The JSON representation for `DoubleValue` is JSON number.
|
64
|
+
class DoubleValue
|
65
|
+
extend Protobug::Message
|
66
|
+
|
67
|
+
self.full_name = "google.protobuf.DoubleValue"
|
68
|
+
|
69
|
+
# The double value.
|
70
|
+
optional(1, "value", type: :double, proto3_optional: false)
|
71
|
+
end
|
72
|
+
|
73
|
+
# Wrapper message for `float`.
|
74
|
+
#
|
75
|
+
# The JSON representation for `FloatValue` is JSON number.
|
76
|
+
class FloatValue
|
77
|
+
extend Protobug::Message
|
78
|
+
|
79
|
+
self.full_name = "google.protobuf.FloatValue"
|
80
|
+
|
81
|
+
# The float value.
|
82
|
+
optional(1, "value", type: :float, proto3_optional: false)
|
83
|
+
end
|
84
|
+
|
85
|
+
# Wrapper message for `int64`.
|
86
|
+
#
|
87
|
+
# The JSON representation for `Int64Value` is JSON string.
|
88
|
+
class Int64Value
|
89
|
+
extend Protobug::Message
|
90
|
+
|
91
|
+
self.full_name = "google.protobuf.Int64Value"
|
92
|
+
|
93
|
+
# The int64 value.
|
94
|
+
optional(1, "value", type: :int64, proto3_optional: false)
|
95
|
+
end
|
96
|
+
|
97
|
+
# Wrapper message for `uint64`.
|
98
|
+
#
|
99
|
+
# The JSON representation for `UInt64Value` is JSON string.
|
100
|
+
class UInt64Value
|
101
|
+
extend Protobug::Message
|
102
|
+
|
103
|
+
self.full_name = "google.protobuf.UInt64Value"
|
104
|
+
|
105
|
+
# The uint64 value.
|
106
|
+
optional(1, "value", type: :uint64, proto3_optional: false)
|
107
|
+
end
|
108
|
+
|
109
|
+
# Wrapper message for `int32`.
|
110
|
+
#
|
111
|
+
# The JSON representation for `Int32Value` is JSON number.
|
112
|
+
class Int32Value
|
113
|
+
extend Protobug::Message
|
114
|
+
|
115
|
+
self.full_name = "google.protobuf.Int32Value"
|
116
|
+
|
117
|
+
# The int32 value.
|
118
|
+
optional(1, "value", type: :int32, proto3_optional: false)
|
119
|
+
end
|
120
|
+
|
121
|
+
# Wrapper message for `uint32`.
|
122
|
+
#
|
123
|
+
# The JSON representation for `UInt32Value` is JSON number.
|
124
|
+
class UInt32Value
|
125
|
+
extend Protobug::Message
|
126
|
+
|
127
|
+
self.full_name = "google.protobuf.UInt32Value"
|
128
|
+
|
129
|
+
# The uint32 value.
|
130
|
+
optional(1, "value", type: :uint32, proto3_optional: false)
|
131
|
+
end
|
132
|
+
|
133
|
+
# Wrapper message for `bool`.
|
134
|
+
#
|
135
|
+
# The JSON representation for `BoolValue` is JSON `true` and `false`.
|
136
|
+
class BoolValue
|
137
|
+
extend Protobug::Message
|
138
|
+
|
139
|
+
self.full_name = "google.protobuf.BoolValue"
|
140
|
+
|
141
|
+
# The bool value.
|
142
|
+
optional(1, "value", type: :bool, proto3_optional: false)
|
143
|
+
end
|
144
|
+
|
145
|
+
# Wrapper message for `string`.
|
146
|
+
#
|
147
|
+
# The JSON representation for `StringValue` is JSON string.
|
148
|
+
class StringValue
|
149
|
+
extend Protobug::Message
|
150
|
+
|
151
|
+
self.full_name = "google.protobuf.StringValue"
|
152
|
+
|
153
|
+
# The string value.
|
154
|
+
optional(1, "value", type: :string, proto3_optional: false)
|
155
|
+
end
|
156
|
+
|
157
|
+
# Wrapper message for `bytes`.
|
158
|
+
#
|
159
|
+
# The JSON representation for `BytesValue` is JSON string.
|
160
|
+
class BytesValue
|
161
|
+
extend Protobug::Message
|
162
|
+
|
163
|
+
self.full_name = "google.protobuf.BytesValue"
|
164
|
+
|
165
|
+
# The bytes value.
|
166
|
+
optional(1, "value", type: :bytes, proto3_optional: false)
|
167
|
+
end
|
168
|
+
|
169
|
+
def self.register_wrappers_protos(registry)
|
170
|
+
registry.register(Google::Protobuf::DoubleValue)
|
171
|
+
registry.register(Google::Protobuf::FloatValue)
|
172
|
+
registry.register(Google::Protobuf::Int64Value)
|
173
|
+
registry.register(Google::Protobuf::UInt64Value)
|
174
|
+
registry.register(Google::Protobuf::Int32Value)
|
175
|
+
registry.register(Google::Protobuf::UInt32Value)
|
176
|
+
registry.register(Google::Protobuf::BoolValue)
|
177
|
+
registry.register(Google::Protobuf::StringValue)
|
178
|
+
registry.register(Google::Protobuf::BytesValue)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
require_relative "wrappers_well_known"
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
Google::Protobuf.module_eval do
|
4
|
+
%i[DoubleValue FloatValue
|
5
|
+
Int64Value UInt64Value
|
6
|
+
Int32Value UInt32Value
|
7
|
+
BoolValue
|
8
|
+
StringValue BytesValue]
|
9
|
+
.each do |const|
|
10
|
+
klass = const_get(const)
|
11
|
+
klass.class_eval do
|
12
|
+
def self.decode_json_hash(json, registry:, ignore_unknown_fields: false)
|
13
|
+
return Protobug::UNSET if json.nil?
|
14
|
+
|
15
|
+
json = { "value" => json }
|
16
|
+
super
|
17
|
+
end
|
18
|
+
|
19
|
+
def as_json(print_unknown_fields: false)
|
20
|
+
field = self.class.fields_by_name.fetch("value")
|
21
|
+
field.send(:json_encode_one, value, print_unknown_fields: print_unknown_fields)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "protobug"
|
4
|
+
|
5
|
+
require_relative "google/protobuf/any_pb"
|
6
|
+
require_relative "google/protobuf/api_pb"
|
7
|
+
require_relative "google/protobuf/descriptor_pb"
|
8
|
+
require_relative "google/protobuf/duration_pb"
|
9
|
+
require_relative "google/protobuf/empty_pb"
|
10
|
+
require_relative "google/protobuf/field_mask_pb"
|
11
|
+
require_relative "google/protobuf/source_context_pb"
|
12
|
+
require_relative "google/protobuf/struct_pb"
|
13
|
+
require_relative "google/protobuf/timestamp_pb"
|
14
|
+
require_relative "google/protobuf/type_pb"
|
15
|
+
require_relative "google/protobuf/wrappers_pb"
|
metadata
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: protobug_well_known_protos
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Samuel Giddins
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-04-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: protobug
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.0
|
27
|
+
description:
|
28
|
+
email:
|
29
|
+
- segiddins@segiddins.me
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- lib/google/protobuf/any_pb.rb
|
35
|
+
- lib/google/protobuf/any_well_known.rb
|
36
|
+
- lib/google/protobuf/api_pb.rb
|
37
|
+
- lib/google/protobuf/descriptor_pb.rb
|
38
|
+
- lib/google/protobuf/duration_pb.rb
|
39
|
+
- lib/google/protobuf/duration_well_known.rb
|
40
|
+
- lib/google/protobuf/empty_pb.rb
|
41
|
+
- lib/google/protobuf/field_mask_pb.rb
|
42
|
+
- lib/google/protobuf/field_mask_well_known.rb
|
43
|
+
- lib/google/protobuf/source_context_pb.rb
|
44
|
+
- lib/google/protobuf/struct_pb.rb
|
45
|
+
- lib/google/protobuf/struct_well_known.rb
|
46
|
+
- lib/google/protobuf/timestamp_pb.rb
|
47
|
+
- lib/google/protobuf/timestamp_well_known.rb
|
48
|
+
- lib/google/protobuf/type_pb.rb
|
49
|
+
- lib/google/protobuf/wrappers_pb.rb
|
50
|
+
- lib/google/protobuf/wrappers_well_known.rb
|
51
|
+
- lib/protobug_well_known_protos.rb
|
52
|
+
homepage: https://github.com/segiddins/protobug/blob/v0.1.0/gen/protobug_well_known_protos
|
53
|
+
licenses:
|
54
|
+
- Unlicense
|
55
|
+
metadata:
|
56
|
+
rubygems_mfa_required: 'true'
|
57
|
+
post_install_message:
|
58
|
+
rdoc_options: []
|
59
|
+
require_paths:
|
60
|
+
- lib
|
61
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: 3.0.0
|
66
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
requirements: []
|
72
|
+
rubygems_version: 3.5.9
|
73
|
+
signing_key:
|
74
|
+
specification_version: 4
|
75
|
+
summary: Compiled protos for protobug from https://github.com/protocolbuffers/protobuf
|
76
|
+
(well_known_protos)
|
77
|
+
test_files: []
|