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,1828 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Code generated by protoc-gen-protobug. DO NOT EDIT.
|
4
|
+
|
5
|
+
# source: google/protobuf/descriptor.proto
|
6
|
+
# syntax: proto2
|
7
|
+
# package: google.protobuf
|
8
|
+
# options:
|
9
|
+
# java_package: "com.google.protobuf"
|
10
|
+
# java_outer_classname: "DescriptorProtos"
|
11
|
+
# optimize_for: SPEED
|
12
|
+
# go_package: "google.golang.org/protobuf/types/descriptorpb"
|
13
|
+
# cc_enable_arenas: true
|
14
|
+
# objc_class_prefix: "GPB"
|
15
|
+
# csharp_namespace: "Google.Protobuf.Reflection"
|
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
|
+
# Author: kenton@google.com (Kenton Varda)
|
48
|
+
# Based on original Protocol Buffers design by
|
49
|
+
# Sanjay Ghemawat, Jeff Dean, and others.
|
50
|
+
#
|
51
|
+
# The messages in this file describe the definitions found in .proto files.
|
52
|
+
# A valid .proto file can be translated directly to a FileDescriptorProto
|
53
|
+
# without any other information (e.g. without reading its imports).
|
54
|
+
|
55
|
+
require "protobug"
|
56
|
+
|
57
|
+
module Google
|
58
|
+
module Protobuf
|
59
|
+
# The protocol compiler can output a FileDescriptorSet containing the .proto
|
60
|
+
# files it parses.
|
61
|
+
class FileDescriptorSet
|
62
|
+
extend Protobug::Message
|
63
|
+
|
64
|
+
self.full_name = "google.protobuf.FileDescriptorSet"
|
65
|
+
|
66
|
+
repeated(
|
67
|
+
1,
|
68
|
+
"file",
|
69
|
+
type: :message,
|
70
|
+
message_type: "google.protobuf.FileDescriptorProto"
|
71
|
+
)
|
72
|
+
end
|
73
|
+
|
74
|
+
# The full set of known editions.
|
75
|
+
class Edition
|
76
|
+
extend Protobug::Enum
|
77
|
+
|
78
|
+
self.full_name = "google.protobuf.Edition"
|
79
|
+
|
80
|
+
# A placeholder for an unknown edition value.
|
81
|
+
EDITION_UNKNOWN = new("EDITION_UNKNOWN", 0).freeze
|
82
|
+
# Legacy syntax "editions". These pre-date editions, but behave much like
|
83
|
+
# distinct editions. These can't be used to specify the edition of proto
|
84
|
+
# files, but feature definitions must supply proto2/proto3 defaults for
|
85
|
+
# backwards compatibility.
|
86
|
+
EDITION_PROTO2 = new("EDITION_PROTO2", 998).freeze
|
87
|
+
EDITION_PROTO3 = new("EDITION_PROTO3", 999).freeze
|
88
|
+
# Editions that have been released. The specific values are arbitrary and
|
89
|
+
# should not be depended on, but they will always be time-ordered for easy
|
90
|
+
# comparison.
|
91
|
+
EDITION_2023 = new("EDITION_2023", 1_000).freeze
|
92
|
+
EDITION_2024 = new("EDITION_2024", 1_001).freeze
|
93
|
+
# Placeholder editions for testing feature resolution. These should not be
|
94
|
+
# used or relyed on outside of tests.
|
95
|
+
EDITION_1_TEST_ONLY = new("EDITION_1_TEST_ONLY", 1).freeze
|
96
|
+
EDITION_2_TEST_ONLY = new("EDITION_2_TEST_ONLY", 2).freeze
|
97
|
+
EDITION_99997_TEST_ONLY = new("EDITION_99997_TEST_ONLY", 99_997).freeze
|
98
|
+
EDITION_99998_TEST_ONLY = new("EDITION_99998_TEST_ONLY", 99_998).freeze
|
99
|
+
EDITION_99999_TEST_ONLY = new("EDITION_99999_TEST_ONLY", 99_999).freeze
|
100
|
+
# Placeholder for specifying unbounded edition support. This should only
|
101
|
+
# ever be used by plugins that can expect to never require any changes to
|
102
|
+
# support a new edition.
|
103
|
+
EDITION_MAX = new("EDITION_MAX", 2_147_483_647).freeze
|
104
|
+
end
|
105
|
+
|
106
|
+
# Describes a complete .proto file.
|
107
|
+
class FileDescriptorProto
|
108
|
+
extend Protobug::Message
|
109
|
+
|
110
|
+
self.full_name = "google.protobuf.FileDescriptorProto"
|
111
|
+
|
112
|
+
optional(
|
113
|
+
1,
|
114
|
+
"name",
|
115
|
+
type: :string
|
116
|
+
) # file name, relative to root of source tree
|
117
|
+
optional(2, "package", type: :string) # e.g. "foo", "foo.bar", etc.
|
118
|
+
# Names of files imported by this file.
|
119
|
+
repeated(3, "dependency", type: :string)
|
120
|
+
# Indexes of the public imported files in the dependency list above.
|
121
|
+
repeated(
|
122
|
+
10,
|
123
|
+
"public_dependency",
|
124
|
+
type: :int32,
|
125
|
+
json_name: "publicDependency"
|
126
|
+
)
|
127
|
+
# Indexes of the weak imported files in the dependency list.
|
128
|
+
# For Google-internal migration only. Do not use.
|
129
|
+
repeated(11, "weak_dependency", type: :int32, json_name: "weakDependency")
|
130
|
+
# All top-level definitions in this file.
|
131
|
+
repeated(
|
132
|
+
4,
|
133
|
+
"message_type",
|
134
|
+
type: :message,
|
135
|
+
message_type: "google.protobuf.DescriptorProto",
|
136
|
+
json_name: "messageType"
|
137
|
+
)
|
138
|
+
repeated(
|
139
|
+
5,
|
140
|
+
"enum_type",
|
141
|
+
type: :message,
|
142
|
+
message_type: "google.protobuf.EnumDescriptorProto",
|
143
|
+
json_name: "enumType"
|
144
|
+
)
|
145
|
+
repeated(
|
146
|
+
6,
|
147
|
+
"service",
|
148
|
+
type: :message,
|
149
|
+
message_type: "google.protobuf.ServiceDescriptorProto"
|
150
|
+
)
|
151
|
+
repeated(
|
152
|
+
7,
|
153
|
+
"extension",
|
154
|
+
type: :message,
|
155
|
+
message_type: "google.protobuf.FieldDescriptorProto"
|
156
|
+
)
|
157
|
+
optional(
|
158
|
+
8,
|
159
|
+
"options",
|
160
|
+
type: :message,
|
161
|
+
message_type: "google.protobuf.FileOptions"
|
162
|
+
)
|
163
|
+
# This field contains optional information about the original source code.
|
164
|
+
# You may safely remove this entire field without harming runtime
|
165
|
+
# functionality of the descriptors -- the information is needed only by
|
166
|
+
# development tools.
|
167
|
+
optional(
|
168
|
+
9,
|
169
|
+
"source_code_info",
|
170
|
+
type: :message,
|
171
|
+
message_type: "google.protobuf.SourceCodeInfo",
|
172
|
+
json_name: "sourceCodeInfo"
|
173
|
+
)
|
174
|
+
# The syntax of the proto file.
|
175
|
+
# The supported values are "proto2", "proto3", and "editions".
|
176
|
+
#
|
177
|
+
# If `edition` is present, this value must be "editions".
|
178
|
+
optional(12, "syntax", type: :string)
|
179
|
+
# The edition of the proto file.
|
180
|
+
optional(14, "edition", type: :enum, enum_type: "google.protobuf.Edition")
|
181
|
+
end
|
182
|
+
|
183
|
+
# Describes a message type.
|
184
|
+
class DescriptorProto
|
185
|
+
extend Protobug::Message
|
186
|
+
|
187
|
+
self.full_name = "google.protobuf.DescriptorProto"
|
188
|
+
|
189
|
+
optional(1, "name", type: :string)
|
190
|
+
repeated(
|
191
|
+
2,
|
192
|
+
"field",
|
193
|
+
type: :message,
|
194
|
+
message_type: "google.protobuf.FieldDescriptorProto"
|
195
|
+
)
|
196
|
+
repeated(
|
197
|
+
6,
|
198
|
+
"extension",
|
199
|
+
type: :message,
|
200
|
+
message_type: "google.protobuf.FieldDescriptorProto"
|
201
|
+
)
|
202
|
+
repeated(
|
203
|
+
3,
|
204
|
+
"nested_type",
|
205
|
+
type: :message,
|
206
|
+
message_type: "google.protobuf.DescriptorProto",
|
207
|
+
json_name: "nestedType"
|
208
|
+
)
|
209
|
+
repeated(
|
210
|
+
4,
|
211
|
+
"enum_type",
|
212
|
+
type: :message,
|
213
|
+
message_type: "google.protobuf.EnumDescriptorProto",
|
214
|
+
json_name: "enumType"
|
215
|
+
)
|
216
|
+
class ExtensionRange
|
217
|
+
extend Protobug::Message
|
218
|
+
|
219
|
+
self.full_name = "google.protobuf.DescriptorProto.ExtensionRange"
|
220
|
+
|
221
|
+
optional(1, "start", type: :int32) # Inclusive.
|
222
|
+
optional(2, "end", type: :int32) # Exclusive.
|
223
|
+
optional(
|
224
|
+
3,
|
225
|
+
"options",
|
226
|
+
type: :message,
|
227
|
+
message_type: "google.protobuf.ExtensionRangeOptions"
|
228
|
+
)
|
229
|
+
end
|
230
|
+
|
231
|
+
repeated(
|
232
|
+
5,
|
233
|
+
"extension_range",
|
234
|
+
type: :message,
|
235
|
+
message_type: "google.protobuf.DescriptorProto.ExtensionRange",
|
236
|
+
json_name: "extensionRange"
|
237
|
+
)
|
238
|
+
repeated(
|
239
|
+
8,
|
240
|
+
"oneof_decl",
|
241
|
+
type: :message,
|
242
|
+
message_type: "google.protobuf.OneofDescriptorProto",
|
243
|
+
json_name: "oneofDecl"
|
244
|
+
)
|
245
|
+
optional(
|
246
|
+
7,
|
247
|
+
"options",
|
248
|
+
type: :message,
|
249
|
+
message_type: "google.protobuf.MessageOptions"
|
250
|
+
)
|
251
|
+
# Range of reserved tag numbers. Reserved tag numbers may not be used by
|
252
|
+
# fields or extension ranges in the same message. Reserved ranges may
|
253
|
+
# not overlap.
|
254
|
+
class ReservedRange
|
255
|
+
extend Protobug::Message
|
256
|
+
|
257
|
+
self.full_name = "google.protobuf.DescriptorProto.ReservedRange"
|
258
|
+
|
259
|
+
optional(1, "start", type: :int32) # Inclusive.
|
260
|
+
optional(2, "end", type: :int32) # Exclusive.
|
261
|
+
end
|
262
|
+
|
263
|
+
repeated(
|
264
|
+
9,
|
265
|
+
"reserved_range",
|
266
|
+
type: :message,
|
267
|
+
message_type: "google.protobuf.DescriptorProto.ReservedRange",
|
268
|
+
json_name: "reservedRange"
|
269
|
+
)
|
270
|
+
# Reserved field names, which may not be used by fields in the same message.
|
271
|
+
# A given name may only be reserved once.
|
272
|
+
repeated(10, "reserved_name", type: :string, json_name: "reservedName")
|
273
|
+
end
|
274
|
+
|
275
|
+
class ExtensionRangeOptions
|
276
|
+
extend Protobug::Message
|
277
|
+
|
278
|
+
self.full_name = "google.protobuf.ExtensionRangeOptions"
|
279
|
+
|
280
|
+
# The parser stores options it doesn't recognize here. See above.
|
281
|
+
repeated(
|
282
|
+
999,
|
283
|
+
"uninterpreted_option",
|
284
|
+
type: :message,
|
285
|
+
message_type: "google.protobuf.UninterpretedOption",
|
286
|
+
json_name: "uninterpretedOption"
|
287
|
+
)
|
288
|
+
class Declaration
|
289
|
+
extend Protobug::Message
|
290
|
+
|
291
|
+
self.full_name = "google.protobuf.ExtensionRangeOptions.Declaration"
|
292
|
+
|
293
|
+
# The extension number declared within the extension range.
|
294
|
+
optional(1, "number", type: :int32)
|
295
|
+
# The fully-qualified name of the extension field. There must be a leading
|
296
|
+
# dot in front of the full name.
|
297
|
+
optional(2, "full_name", type: :string, json_name: "fullName")
|
298
|
+
# The fully-qualified type name of the extension field. Unlike
|
299
|
+
# Metadata.type, Declaration.type must have a leading dot for messages
|
300
|
+
# and enums.
|
301
|
+
optional(3, "type", type: :string)
|
302
|
+
# If true, indicates that the number is reserved in the extension range,
|
303
|
+
# and any extension field with the number will fail to compile. Set this
|
304
|
+
# when a declared extension field is deleted.
|
305
|
+
optional(5, "reserved", type: :bool)
|
306
|
+
# If true, indicates that the extension must be defined as repeated.
|
307
|
+
# Otherwise the extension must be defined as optional.
|
308
|
+
optional(6, "repeated", type: :bool)
|
309
|
+
|
310
|
+
reserved_range(4...5)
|
311
|
+
end
|
312
|
+
|
313
|
+
# For external users: DO NOT USE. We are in the process of open sourcing
|
314
|
+
# extension declaration and executing internal cleanups before it can be
|
315
|
+
# used externally.
|
316
|
+
repeated(
|
317
|
+
2,
|
318
|
+
"declaration",
|
319
|
+
type: :message,
|
320
|
+
message_type: "google.protobuf.ExtensionRangeOptions.Declaration"
|
321
|
+
)
|
322
|
+
# Any features defined in the specific edition.
|
323
|
+
optional(
|
324
|
+
50,
|
325
|
+
"features",
|
326
|
+
type: :message,
|
327
|
+
message_type: "google.protobuf.FeatureSet"
|
328
|
+
)
|
329
|
+
# The verification state of the extension range.
|
330
|
+
class VerificationState
|
331
|
+
extend Protobug::Enum
|
332
|
+
|
333
|
+
self.full_name = "google.protobuf.ExtensionRangeOptions.VerificationState"
|
334
|
+
|
335
|
+
# All the extensions of the range must be declared.
|
336
|
+
DECLARATION = new("DECLARATION", 0).freeze
|
337
|
+
UNVERIFIED = new("UNVERIFIED", 1).freeze
|
338
|
+
end
|
339
|
+
|
340
|
+
# The verification state of the range.
|
341
|
+
# TODO: flip the default to DECLARATION once all empty ranges
|
342
|
+
# are marked as UNVERIFIED.
|
343
|
+
optional(
|
344
|
+
3,
|
345
|
+
"verification",
|
346
|
+
type: :enum,
|
347
|
+
enum_type: "google.protobuf.ExtensionRangeOptions.VerificationState"
|
348
|
+
)
|
349
|
+
end
|
350
|
+
|
351
|
+
# Describes a field within a message.
|
352
|
+
class FieldDescriptorProto
|
353
|
+
extend Protobug::Message
|
354
|
+
|
355
|
+
self.full_name = "google.protobuf.FieldDescriptorProto"
|
356
|
+
|
357
|
+
class Type
|
358
|
+
extend Protobug::Enum
|
359
|
+
|
360
|
+
self.full_name = "google.protobuf.FieldDescriptorProto.Type"
|
361
|
+
|
362
|
+
# 0 is reserved for errors.
|
363
|
+
# Order is weird for historical reasons.
|
364
|
+
TYPE_DOUBLE = new("TYPE_DOUBLE", 1).freeze
|
365
|
+
TYPE_FLOAT = new("TYPE_FLOAT", 2).freeze
|
366
|
+
# Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
|
367
|
+
# negative values are likely.
|
368
|
+
TYPE_INT64 = new("TYPE_INT64", 3).freeze
|
369
|
+
TYPE_UINT64 = new("TYPE_UINT64", 4).freeze
|
370
|
+
# Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
|
371
|
+
# negative values are likely.
|
372
|
+
TYPE_INT32 = new("TYPE_INT32", 5).freeze
|
373
|
+
TYPE_FIXED64 = new("TYPE_FIXED64", 6).freeze
|
374
|
+
TYPE_FIXED32 = new("TYPE_FIXED32", 7).freeze
|
375
|
+
TYPE_BOOL = new("TYPE_BOOL", 8).freeze
|
376
|
+
TYPE_STRING = new("TYPE_STRING", 9).freeze
|
377
|
+
# Tag-delimited aggregate.
|
378
|
+
# Group type is deprecated and not supported after google.protobuf. However, Proto3
|
379
|
+
# implementations should still be able to parse the group wire format and
|
380
|
+
# treat group fields as unknown fields. In Editions, the group wire format
|
381
|
+
# can be enabled via the `message_encoding` feature.
|
382
|
+
TYPE_GROUP = new("TYPE_GROUP", 10).freeze
|
383
|
+
TYPE_MESSAGE = new(
|
384
|
+
"TYPE_MESSAGE",
|
385
|
+
11
|
386
|
+
).freeze # Length-delimited aggregate.
|
387
|
+
# New in version 2.
|
388
|
+
TYPE_BYTES = new("TYPE_BYTES", 12).freeze
|
389
|
+
TYPE_UINT32 = new("TYPE_UINT32", 13).freeze
|
390
|
+
TYPE_ENUM = new("TYPE_ENUM", 14).freeze
|
391
|
+
TYPE_SFIXED32 = new("TYPE_SFIXED32", 15).freeze
|
392
|
+
TYPE_SFIXED64 = new("TYPE_SFIXED64", 16).freeze
|
393
|
+
TYPE_SINT32 = new("TYPE_SINT32", 17).freeze # Uses ZigZag encoding.
|
394
|
+
TYPE_SINT64 = new("TYPE_SINT64", 18).freeze # Uses ZigZag encoding.
|
395
|
+
end
|
396
|
+
|
397
|
+
class Label
|
398
|
+
extend Protobug::Enum
|
399
|
+
|
400
|
+
self.full_name = "google.protobuf.FieldDescriptorProto.Label"
|
401
|
+
|
402
|
+
# 0 is reserved for errors
|
403
|
+
LABEL_OPTIONAL = new("LABEL_OPTIONAL", 1).freeze
|
404
|
+
LABEL_REPEATED = new("LABEL_REPEATED", 3).freeze
|
405
|
+
# The required label is only allowed in google.protobuf. In proto3 and Editions
|
406
|
+
# it's explicitly prohibited. In Editions, the `field_presence` feature
|
407
|
+
# can be used to get this behavior.
|
408
|
+
LABEL_REQUIRED = new("LABEL_REQUIRED", 2).freeze
|
409
|
+
end
|
410
|
+
|
411
|
+
optional(1, "name", type: :string)
|
412
|
+
optional(3, "number", type: :int32)
|
413
|
+
optional(
|
414
|
+
4,
|
415
|
+
"label",
|
416
|
+
type: :enum,
|
417
|
+
enum_type: "google.protobuf.FieldDescriptorProto.Label"
|
418
|
+
)
|
419
|
+
# If type_name is set, this need not be set. If both this and type_name
|
420
|
+
# are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
|
421
|
+
optional(
|
422
|
+
5,
|
423
|
+
"type",
|
424
|
+
type: :enum,
|
425
|
+
enum_type: "google.protobuf.FieldDescriptorProto.Type"
|
426
|
+
)
|
427
|
+
# For message and enum types, this is the name of the type. If the name
|
428
|
+
# starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
|
429
|
+
# rules are used to find the type (i.e. first the nested types within this
|
430
|
+
# message are searched, then within the parent, on up to the root
|
431
|
+
# namespace).
|
432
|
+
optional(6, "type_name", type: :string, json_name: "typeName")
|
433
|
+
# For extensions, this is the name of the type being extended. It is
|
434
|
+
# resolved in the same manner as type_name.
|
435
|
+
optional(2, "extendee", type: :string)
|
436
|
+
# For numeric types, contains the original text representation of the value.
|
437
|
+
# For booleans, "true" or "false".
|
438
|
+
# For strings, contains the default text contents (not escaped in any way).
|
439
|
+
# For bytes, contains the C escaped value. All bytes >= 128 are escaped.
|
440
|
+
optional(7, "default_value", type: :string, json_name: "defaultValue")
|
441
|
+
# If set, gives the index of a oneof in the containing type's oneof_decl
|
442
|
+
# list. This field is a member of that oneof.
|
443
|
+
optional(9, "oneof_index", type: :int32, json_name: "oneofIndex")
|
444
|
+
# JSON name of this field. The value is set by protocol compiler. If the
|
445
|
+
# user has set a "json_name" option on this field, that option's value
|
446
|
+
# will be used. Otherwise, it's deduced from the field's name by converting
|
447
|
+
# it to camelCase.
|
448
|
+
optional(10, "json_name", type: :string, json_name: "jsonName")
|
449
|
+
optional(
|
450
|
+
8,
|
451
|
+
"options",
|
452
|
+
type: :message,
|
453
|
+
message_type: "google.protobuf.FieldOptions"
|
454
|
+
)
|
455
|
+
# If true, this is a proto3 "optional". When a proto3 field is optional, it
|
456
|
+
# tracks presence regardless of field type.
|
457
|
+
#
|
458
|
+
# When proto3_optional is true, this field must belong to a oneof to signal
|
459
|
+
# to old proto3 clients that presence is tracked for this field. This oneof
|
460
|
+
# is known as a "synthetic" oneof, and this field must be its sole member
|
461
|
+
# (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
|
462
|
+
# exist in the descriptor only, and do not generate any API. Synthetic oneofs
|
463
|
+
# must be ordered after all "real" oneofs.
|
464
|
+
#
|
465
|
+
# For message fields, proto3_optional doesn't create any semantic change,
|
466
|
+
# since non-repeated message fields always track presence. However it still
|
467
|
+
# indicates the semantic detail of whether the user wrote "optional" or not.
|
468
|
+
# This can be useful for round-tripping the .proto file. For consistency we
|
469
|
+
# give message fields a synthetic oneof also, even though it is not required
|
470
|
+
# to track presence. This is especially important because the parser can't
|
471
|
+
# tell if a field is a message or an enum, so it must always create a
|
472
|
+
# synthetic oneof.
|
473
|
+
#
|
474
|
+
# Proto2 optional fields do not set this flag, because they already indicate
|
475
|
+
# optional with `LABEL_OPTIONAL`.
|
476
|
+
optional(17, "proto3_optional", type: :bool, json_name: "proto3Optional")
|
477
|
+
end
|
478
|
+
|
479
|
+
# Describes a oneof.
|
480
|
+
class OneofDescriptorProto
|
481
|
+
extend Protobug::Message
|
482
|
+
|
483
|
+
self.full_name = "google.protobuf.OneofDescriptorProto"
|
484
|
+
|
485
|
+
optional(1, "name", type: :string)
|
486
|
+
optional(
|
487
|
+
2,
|
488
|
+
"options",
|
489
|
+
type: :message,
|
490
|
+
message_type: "google.protobuf.OneofOptions"
|
491
|
+
)
|
492
|
+
end
|
493
|
+
|
494
|
+
# Describes an enum type.
|
495
|
+
class EnumDescriptorProto
|
496
|
+
extend Protobug::Message
|
497
|
+
|
498
|
+
self.full_name = "google.protobuf.EnumDescriptorProto"
|
499
|
+
|
500
|
+
optional(1, "name", type: :string)
|
501
|
+
repeated(
|
502
|
+
2,
|
503
|
+
"value",
|
504
|
+
type: :message,
|
505
|
+
message_type: "google.protobuf.EnumValueDescriptorProto"
|
506
|
+
)
|
507
|
+
optional(
|
508
|
+
3,
|
509
|
+
"options",
|
510
|
+
type: :message,
|
511
|
+
message_type: "google.protobuf.EnumOptions"
|
512
|
+
)
|
513
|
+
# Range of reserved numeric values. Reserved values may not be used by
|
514
|
+
# entries in the same enum. Reserved ranges may not overlap.
|
515
|
+
#
|
516
|
+
# Note that this is distinct from DescriptorProto.ReservedRange in that it
|
517
|
+
# is inclusive such that it can appropriately represent the entire int32
|
518
|
+
# domain.
|
519
|
+
class EnumReservedRange
|
520
|
+
extend Protobug::Message
|
521
|
+
|
522
|
+
self.full_name = "google.protobuf.EnumDescriptorProto.EnumReservedRange"
|
523
|
+
|
524
|
+
optional(1, "start", type: :int32) # Inclusive.
|
525
|
+
optional(2, "end", type: :int32) # Inclusive.
|
526
|
+
end
|
527
|
+
|
528
|
+
# Range of reserved numeric values. Reserved numeric values may not be used
|
529
|
+
# by enum values in the same enum declaration. Reserved ranges may not
|
530
|
+
# overlap.
|
531
|
+
repeated(
|
532
|
+
4,
|
533
|
+
"reserved_range",
|
534
|
+
type: :message,
|
535
|
+
message_type: "google.protobuf.EnumDescriptorProto.EnumReservedRange",
|
536
|
+
json_name: "reservedRange"
|
537
|
+
)
|
538
|
+
# Reserved enum value names, which may not be reused. A given name may only
|
539
|
+
# be reserved once.
|
540
|
+
repeated(5, "reserved_name", type: :string, json_name: "reservedName")
|
541
|
+
end
|
542
|
+
|
543
|
+
# Describes a value within an enum.
|
544
|
+
class EnumValueDescriptorProto
|
545
|
+
extend Protobug::Message
|
546
|
+
|
547
|
+
self.full_name = "google.protobuf.EnumValueDescriptorProto"
|
548
|
+
|
549
|
+
optional(1, "name", type: :string)
|
550
|
+
optional(2, "number", type: :int32)
|
551
|
+
optional(
|
552
|
+
3,
|
553
|
+
"options",
|
554
|
+
type: :message,
|
555
|
+
message_type: "google.protobuf.EnumValueOptions"
|
556
|
+
)
|
557
|
+
end
|
558
|
+
|
559
|
+
# Describes a service.
|
560
|
+
class ServiceDescriptorProto
|
561
|
+
extend Protobug::Message
|
562
|
+
|
563
|
+
self.full_name = "google.protobuf.ServiceDescriptorProto"
|
564
|
+
|
565
|
+
optional(1, "name", type: :string)
|
566
|
+
repeated(
|
567
|
+
2,
|
568
|
+
"method",
|
569
|
+
type: :message,
|
570
|
+
message_type: "google.protobuf.MethodDescriptorProto"
|
571
|
+
)
|
572
|
+
optional(
|
573
|
+
3,
|
574
|
+
"options",
|
575
|
+
type: :message,
|
576
|
+
message_type: "google.protobuf.ServiceOptions"
|
577
|
+
)
|
578
|
+
end
|
579
|
+
|
580
|
+
# Describes a method of a service.
|
581
|
+
class MethodDescriptorProto
|
582
|
+
extend Protobug::Message
|
583
|
+
|
584
|
+
self.full_name = "google.protobuf.MethodDescriptorProto"
|
585
|
+
|
586
|
+
optional(1, "name", type: :string)
|
587
|
+
# Input and output type names. These are resolved in the same way as
|
588
|
+
# FieldDescriptorProto.type_name, but must refer to a message type.
|
589
|
+
optional(2, "input_type", type: :string, json_name: "inputType")
|
590
|
+
optional(3, "output_type", type: :string, json_name: "outputType")
|
591
|
+
optional(
|
592
|
+
4,
|
593
|
+
"options",
|
594
|
+
type: :message,
|
595
|
+
message_type: "google.protobuf.MethodOptions"
|
596
|
+
)
|
597
|
+
# Identifies if client streams multiple client messages
|
598
|
+
optional(5, "client_streaming", type: :bool, json_name: "clientStreaming")
|
599
|
+
# Identifies if server streams multiple server messages
|
600
|
+
optional(6, "server_streaming", type: :bool, json_name: "serverStreaming")
|
601
|
+
end
|
602
|
+
|
603
|
+
# ===================================================================
|
604
|
+
# Options
|
605
|
+
|
606
|
+
# Each of the definitions above may have "options" attached. These are
|
607
|
+
# just annotations which may cause code to be generated slightly differently
|
608
|
+
# or may contain hints for code that manipulates protocol messages.
|
609
|
+
#
|
610
|
+
# Clients may define custom options as extensions of the *Options messages.
|
611
|
+
# These extensions may not yet be known at parsing time, so the parser cannot
|
612
|
+
# store the values in them. Instead it stores them in a field in the *Options
|
613
|
+
# message called uninterpreted_option. This field must have the same name
|
614
|
+
# across all *Options messages. We then use this field to populate the
|
615
|
+
# extensions when we build a descriptor, at which point all protos have been
|
616
|
+
# parsed and so all extensions are known.
|
617
|
+
#
|
618
|
+
# Extension numbers for custom options may be chosen as follows:
|
619
|
+
# * For options which will only be used within a single application or
|
620
|
+
# organization, or for experimental options, use field numbers 50000
|
621
|
+
# through 99999. It is up to you to ensure that you do not use the
|
622
|
+
# same number for multiple options.
|
623
|
+
# * For options which will be published and used publicly by multiple
|
624
|
+
# independent entities, e-mail protobuf-global-extension-registry@google.com
|
625
|
+
# to reserve extension numbers. Simply provide your project name (e.g.
|
626
|
+
# Objective-C plugin) and your project website (if available) -- there's no
|
627
|
+
# need to explain how you intend to use them. Usually you only need one
|
628
|
+
# extension number. You can declare multiple options with only one extension
|
629
|
+
# number by putting them in a sub-message. See the Custom Options section of
|
630
|
+
# the docs for examples:
|
631
|
+
# https://developers.google.com/protocol-buffers/docs/proto#options
|
632
|
+
# If this turns out to be popular, a web service will be set up
|
633
|
+
# to automatically assign option numbers.
|
634
|
+
|
635
|
+
class FileOptions
|
636
|
+
extend Protobug::Message
|
637
|
+
|
638
|
+
self.full_name = "google.protobuf.FileOptions"
|
639
|
+
|
640
|
+
# Sets the Java package where classes generated from this .proto will be
|
641
|
+
# placed. By default, the proto package is used, but this is often
|
642
|
+
# inappropriate because proto packages do not normally start with backwards
|
643
|
+
# domain names.
|
644
|
+
optional(1, "java_package", type: :string, json_name: "javaPackage")
|
645
|
+
# Controls the name of the wrapper Java class generated for the .proto file.
|
646
|
+
# That class will always contain the .proto file's getDescriptor() method as
|
647
|
+
# well as any top-level extensions defined in the .proto file.
|
648
|
+
# If java_multiple_files is disabled, then all the other classes from the
|
649
|
+
# .proto file will be nested inside the single wrapper outer class.
|
650
|
+
optional(
|
651
|
+
8,
|
652
|
+
"java_outer_classname",
|
653
|
+
type: :string,
|
654
|
+
json_name: "javaOuterClassname"
|
655
|
+
)
|
656
|
+
# If enabled, then the Java code generator will generate a separate .java
|
657
|
+
# file for each top-level message, enum, and service defined in the .proto
|
658
|
+
# file. Thus, these types will *not* be nested inside the wrapper class
|
659
|
+
# named by java_outer_classname. However, the wrapper class will still be
|
660
|
+
# generated to contain the file's getDescriptor() method as well as any
|
661
|
+
# top-level extensions defined in the file.
|
662
|
+
optional(
|
663
|
+
10,
|
664
|
+
"java_multiple_files",
|
665
|
+
type: :bool,
|
666
|
+
json_name: "javaMultipleFiles"
|
667
|
+
)
|
668
|
+
# This option does nothing.
|
669
|
+
optional(
|
670
|
+
20,
|
671
|
+
"java_generate_equals_and_hash",
|
672
|
+
type: :bool,
|
673
|
+
json_name: "javaGenerateEqualsAndHash"
|
674
|
+
)
|
675
|
+
# If set true, then the Java2 code generator will generate code that
|
676
|
+
# throws an exception whenever an attempt is made to assign a non-UTF-8
|
677
|
+
# byte sequence to a string field.
|
678
|
+
# Message reflection will do the same.
|
679
|
+
# However, an extension field still accepts non-UTF-8 byte sequences.
|
680
|
+
# This option has no effect on when used with the lite runtime.
|
681
|
+
optional(
|
682
|
+
27,
|
683
|
+
"java_string_check_utf8",
|
684
|
+
type: :bool,
|
685
|
+
json_name: "javaStringCheckUtf8"
|
686
|
+
)
|
687
|
+
# Generated classes can be optimized for speed or code size.
|
688
|
+
class OptimizeMode
|
689
|
+
extend Protobug::Enum
|
690
|
+
|
691
|
+
self.full_name = "google.protobuf.FileOptions.OptimizeMode"
|
692
|
+
|
693
|
+
SPEED = new(
|
694
|
+
"SPEED",
|
695
|
+
1
|
696
|
+
).freeze # Generate complete code for parsing, serialization,
|
697
|
+
# etc.
|
698
|
+
CODE_SIZE = new(
|
699
|
+
"CODE_SIZE",
|
700
|
+
2
|
701
|
+
).freeze # Use ReflectionOps to implement these methods.
|
702
|
+
LITE_RUNTIME = new(
|
703
|
+
"LITE_RUNTIME",
|
704
|
+
3
|
705
|
+
).freeze # Generate code using MessageLite and the lite runtime.
|
706
|
+
end
|
707
|
+
|
708
|
+
optional(
|
709
|
+
9,
|
710
|
+
"optimize_for",
|
711
|
+
type: :enum,
|
712
|
+
enum_type: "google.protobuf.FileOptions.OptimizeMode",
|
713
|
+
json_name: "optimizeFor"
|
714
|
+
)
|
715
|
+
# Sets the Go package where structs generated from this .proto will be
|
716
|
+
# placed. If omitted, the Go package will be derived from the following:
|
717
|
+
# - The basename of the package import path, if provided.
|
718
|
+
# - Otherwise, the package statement in the .proto file, if present.
|
719
|
+
# - Otherwise, the basename of the .proto file, without extension.
|
720
|
+
optional(11, "go_package", type: :string, json_name: "goPackage")
|
721
|
+
# Should generic services be generated in each language? "Generic" services
|
722
|
+
# are not specific to any particular RPC system. They are generated by the
|
723
|
+
# main code generators in each language (without additional plugins).
|
724
|
+
# Generic services were the only kind of service generation supported by
|
725
|
+
# early versions of google.protobuf.
|
726
|
+
#
|
727
|
+
# Generic services are now considered deprecated in favor of using plugins
|
728
|
+
# that generate code specific to your particular RPC system. Therefore,
|
729
|
+
# these default to false. Old code which depends on generic services should
|
730
|
+
# explicitly set them to true.
|
731
|
+
optional(
|
732
|
+
16,
|
733
|
+
"cc_generic_services",
|
734
|
+
type: :bool,
|
735
|
+
json_name: "ccGenericServices"
|
736
|
+
)
|
737
|
+
optional(
|
738
|
+
17,
|
739
|
+
"java_generic_services",
|
740
|
+
type: :bool,
|
741
|
+
json_name: "javaGenericServices"
|
742
|
+
)
|
743
|
+
optional(
|
744
|
+
18,
|
745
|
+
"py_generic_services",
|
746
|
+
type: :bool,
|
747
|
+
json_name: "pyGenericServices"
|
748
|
+
)
|
749
|
+
# Is this file deprecated?
|
750
|
+
# Depending on the target platform, this can emit Deprecated annotations
|
751
|
+
# for everything in the file, or it will be completely ignored; in the very
|
752
|
+
# least, this is a formalization for deprecating files.
|
753
|
+
optional(23, "deprecated", type: :bool)
|
754
|
+
# Enables the use of arenas for the proto messages in this file. This applies
|
755
|
+
# only to generated classes for C++.
|
756
|
+
optional(31, "cc_enable_arenas", type: :bool, json_name: "ccEnableArenas")
|
757
|
+
# Sets the objective c class prefix which is prepended to all objective c
|
758
|
+
# generated classes from this .proto. There is no default.
|
759
|
+
optional(
|
760
|
+
36,
|
761
|
+
"objc_class_prefix",
|
762
|
+
type: :string,
|
763
|
+
json_name: "objcClassPrefix"
|
764
|
+
)
|
765
|
+
# Namespace for generated classes; defaults to the package.
|
766
|
+
optional(
|
767
|
+
37,
|
768
|
+
"csharp_namespace",
|
769
|
+
type: :string,
|
770
|
+
json_name: "csharpNamespace"
|
771
|
+
)
|
772
|
+
# By default Swift generators will take the proto package and CamelCase it
|
773
|
+
# replacing '.' with underscore and use that to prefix the types/symbols
|
774
|
+
# defined. When this options is provided, they will use this value instead
|
775
|
+
# to prefix the types/symbols defined.
|
776
|
+
optional(39, "swift_prefix", type: :string, json_name: "swiftPrefix")
|
777
|
+
# Sets the php class prefix which is prepended to all php generated classes
|
778
|
+
# from this .proto. Default is empty.
|
779
|
+
optional(
|
780
|
+
40,
|
781
|
+
"php_class_prefix",
|
782
|
+
type: :string,
|
783
|
+
json_name: "phpClassPrefix"
|
784
|
+
)
|
785
|
+
# Use this option to change the namespace of php generated classes. Default
|
786
|
+
# is empty. When this option is empty, the package name will be used for
|
787
|
+
# determining the namespace.
|
788
|
+
optional(41, "php_namespace", type: :string, json_name: "phpNamespace")
|
789
|
+
# Use this option to change the namespace of php generated metadata classes.
|
790
|
+
# Default is empty. When this option is empty, the proto file name will be
|
791
|
+
# used for determining the namespace.
|
792
|
+
optional(
|
793
|
+
44,
|
794
|
+
"php_metadata_namespace",
|
795
|
+
type: :string,
|
796
|
+
json_name: "phpMetadataNamespace"
|
797
|
+
)
|
798
|
+
# Use this option to change the package of ruby generated classes. Default
|
799
|
+
# is empty. When this option is not set, the package name will be used for
|
800
|
+
# determining the ruby package.
|
801
|
+
optional(45, "ruby_package", type: :string, json_name: "rubyPackage")
|
802
|
+
# Any features defined in the specific edition.
|
803
|
+
optional(
|
804
|
+
50,
|
805
|
+
"features",
|
806
|
+
type: :message,
|
807
|
+
message_type: "google.protobuf.FeatureSet"
|
808
|
+
)
|
809
|
+
# The parser stores options it doesn't recognize here.
|
810
|
+
# See the documentation for the "Options" section above.
|
811
|
+
repeated(
|
812
|
+
999,
|
813
|
+
"uninterpreted_option",
|
814
|
+
type: :message,
|
815
|
+
message_type: "google.protobuf.UninterpretedOption",
|
816
|
+
json_name: "uninterpretedOption"
|
817
|
+
)
|
818
|
+
|
819
|
+
reserved_range(42...43)
|
820
|
+
reserved_range(38...39)
|
821
|
+
end
|
822
|
+
|
823
|
+
class MessageOptions
|
824
|
+
extend Protobug::Message
|
825
|
+
|
826
|
+
self.full_name = "google.protobuf.MessageOptions"
|
827
|
+
|
828
|
+
# Set true to use the old proto1 MessageSet wire format for extensions.
|
829
|
+
# This is provided for backwards-compatibility with the MessageSet wire
|
830
|
+
# format. You should not use this for any other reason: It's less
|
831
|
+
# efficient, has fewer features, and is more complicated.
|
832
|
+
#
|
833
|
+
# The message must be defined exactly as follows:
|
834
|
+
# message Foo {
|
835
|
+
# option message_set_wire_format = true;
|
836
|
+
# extensions 4 to max;
|
837
|
+
# }
|
838
|
+
# Note that the message cannot have any defined fields; MessageSets only
|
839
|
+
# have extensions.
|
840
|
+
#
|
841
|
+
# All extensions of your type must be singular messages; e.g. they cannot
|
842
|
+
# be int32s, enums, or repeated messages.
|
843
|
+
#
|
844
|
+
# Because this is an option, the above two restrictions are not enforced by
|
845
|
+
# the protocol compiler.
|
846
|
+
optional(
|
847
|
+
1,
|
848
|
+
"message_set_wire_format",
|
849
|
+
type: :bool,
|
850
|
+
json_name: "messageSetWireFormat"
|
851
|
+
)
|
852
|
+
# Disables the generation of the standard "descriptor()" accessor, which can
|
853
|
+
# conflict with a field of the same name. This is meant to make migration
|
854
|
+
# from proto1 easier; new code should avoid fields named "descriptor".
|
855
|
+
optional(
|
856
|
+
2,
|
857
|
+
"no_standard_descriptor_accessor",
|
858
|
+
type: :bool,
|
859
|
+
json_name: "noStandardDescriptorAccessor"
|
860
|
+
)
|
861
|
+
# Is this message deprecated?
|
862
|
+
# Depending on the target platform, this can emit Deprecated annotations
|
863
|
+
# for the message, or it will be completely ignored; in the very least,
|
864
|
+
# this is a formalization for deprecating messages.
|
865
|
+
optional(3, "deprecated", type: :bool)
|
866
|
+
# Whether the message is an automatically generated map entry type for the
|
867
|
+
# maps field.
|
868
|
+
#
|
869
|
+
# For maps fields:
|
870
|
+
# map<KeyType, ValueType> map_field = 1;
|
871
|
+
# The parsed descriptor looks like:
|
872
|
+
# message MapFieldEntry {
|
873
|
+
# option map_entry = true;
|
874
|
+
# optional KeyType key = 1;
|
875
|
+
# optional ValueType value = 2;
|
876
|
+
# }
|
877
|
+
# repeated MapFieldEntry map_field = 1;
|
878
|
+
#
|
879
|
+
# Implementations may choose not to generate the map_entry=true message, but
|
880
|
+
# use a native map in the target language to hold the keys and values.
|
881
|
+
# The reflection APIs in such implementations still need to work as
|
882
|
+
# if the field is a repeated message field.
|
883
|
+
#
|
884
|
+
# NOTE: Do not set the option in .proto files. Always use the maps syntax
|
885
|
+
# instead. The option should only be implicitly set by the proto compiler
|
886
|
+
# parser.
|
887
|
+
optional(7, "map_entry", type: :bool, json_name: "mapEntry")
|
888
|
+
# Enable the legacy handling of JSON field name conflicts. This lowercases
|
889
|
+
# and strips underscored from the fields before comparison in proto3 only.
|
890
|
+
# The new behavior takes `json_name` into account and applies to proto2 as
|
891
|
+
# well.
|
892
|
+
#
|
893
|
+
# This should only be used as a temporary measure against broken builds due
|
894
|
+
# to the change in behavior for JSON field name conflicts.
|
895
|
+
#
|
896
|
+
# TODO This is legacy behavior we plan to remove once downstream
|
897
|
+
# teams have had time to migrate.
|
898
|
+
optional(
|
899
|
+
11,
|
900
|
+
"deprecated_legacy_json_field_conflicts",
|
901
|
+
type: :bool,
|
902
|
+
json_name: "deprecatedLegacyJsonFieldConflicts"
|
903
|
+
)
|
904
|
+
# Any features defined in the specific edition.
|
905
|
+
optional(
|
906
|
+
12,
|
907
|
+
"features",
|
908
|
+
type: :message,
|
909
|
+
message_type: "google.protobuf.FeatureSet"
|
910
|
+
)
|
911
|
+
# The parser stores options it doesn't recognize here. See above.
|
912
|
+
repeated(
|
913
|
+
999,
|
914
|
+
"uninterpreted_option",
|
915
|
+
type: :message,
|
916
|
+
message_type: "google.protobuf.UninterpretedOption",
|
917
|
+
json_name: "uninterpretedOption"
|
918
|
+
)
|
919
|
+
|
920
|
+
reserved_range(4...5)
|
921
|
+
reserved_range(5...6)
|
922
|
+
reserved_range(6...7)
|
923
|
+
reserved_range(8...9)
|
924
|
+
reserved_range(9...10)
|
925
|
+
end
|
926
|
+
|
927
|
+
class FieldOptions
|
928
|
+
extend Protobug::Message
|
929
|
+
|
930
|
+
self.full_name = "google.protobuf.FieldOptions"
|
931
|
+
|
932
|
+
# The ctype option instructs the C++ code generator to use a different
|
933
|
+
# representation of the field than it normally would. See the specific
|
934
|
+
# options below. This option is only implemented to support use of
|
935
|
+
# [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
|
936
|
+
# type "bytes" in the open source release -- sorry, we'll try to include
|
937
|
+
# other types in a future version!
|
938
|
+
optional(
|
939
|
+
1,
|
940
|
+
"ctype",
|
941
|
+
type: :enum,
|
942
|
+
enum_type: "google.protobuf.FieldOptions.CType"
|
943
|
+
)
|
944
|
+
class CType
|
945
|
+
extend Protobug::Enum
|
946
|
+
|
947
|
+
self.full_name = "google.protobuf.FieldOptions.CType"
|
948
|
+
|
949
|
+
# Default mode.
|
950
|
+
STRING = new("STRING", 0).freeze
|
951
|
+
# The option [ctype=CORD] may be applied to a non-repeated field of type
|
952
|
+
# "bytes". It indicates that in C++, the data should be stored in a Cord
|
953
|
+
# instead of a string. For very large strings, this may reduce memory
|
954
|
+
# fragmentation. It may also allow better performance when parsing from a
|
955
|
+
# Cord, or when parsing with aliasing enabled, as the parsed Cord may then
|
956
|
+
# alias the original buffer.
|
957
|
+
CORD = new("CORD", 1).freeze
|
958
|
+
STRING_PIECE = new("STRING_PIECE", 2).freeze
|
959
|
+
end
|
960
|
+
|
961
|
+
# The packed option can be enabled for repeated primitive fields to enable
|
962
|
+
# a more efficient representation on the wire. Rather than repeatedly
|
963
|
+
# writing the tag and type for each element, the entire array is encoded as
|
964
|
+
# a single length-delimited blob. In proto3, only explicit setting it to
|
965
|
+
# false will avoid using packed encoding. This option is prohibited in
|
966
|
+
# Editions, but the `repeated_field_encoding` feature can be used to control
|
967
|
+
# the behavior.
|
968
|
+
optional(2, "packed", type: :bool)
|
969
|
+
# The jstype option determines the JavaScript type used for values of the
|
970
|
+
# field. The option is permitted only for 64 bit integral and fixed types
|
971
|
+
# (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
|
972
|
+
# is represented as JavaScript string, which avoids loss of precision that
|
973
|
+
# can happen when a large value is converted to a floating point JavaScript.
|
974
|
+
# Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
|
975
|
+
# use the JavaScript "number" type. The behavior of the default option
|
976
|
+
# JS_NORMAL is implementation dependent.
|
977
|
+
#
|
978
|
+
# This option is an enum to permit additional types to be added, e.g.
|
979
|
+
# goog.math.Integer.
|
980
|
+
optional(
|
981
|
+
6,
|
982
|
+
"jstype",
|
983
|
+
type: :enum,
|
984
|
+
enum_type: "google.protobuf.FieldOptions.JSType"
|
985
|
+
)
|
986
|
+
class JSType
|
987
|
+
extend Protobug::Enum
|
988
|
+
|
989
|
+
self.full_name = "google.protobuf.FieldOptions.JSType"
|
990
|
+
|
991
|
+
# Use the default type.
|
992
|
+
JS_NORMAL = new("JS_NORMAL", 0).freeze
|
993
|
+
# Use JavaScript strings.
|
994
|
+
JS_STRING = new("JS_STRING", 1).freeze
|
995
|
+
# Use JavaScript numbers.
|
996
|
+
JS_NUMBER = new("JS_NUMBER", 2).freeze
|
997
|
+
end
|
998
|
+
|
999
|
+
# Should this field be parsed lazily? Lazy applies only to message-type
|
1000
|
+
# fields. It means that when the outer message is initially parsed, the
|
1001
|
+
# inner message's contents will not be parsed but instead stored in encoded
|
1002
|
+
# form. The inner message will actually be parsed when it is first accessed.
|
1003
|
+
#
|
1004
|
+
# This is only a hint. Implementations are free to choose whether to use
|
1005
|
+
# eager or lazy parsing regardless of the value of this option. However,
|
1006
|
+
# setting this option true suggests that the protocol author believes that
|
1007
|
+
# using lazy parsing on this field is worth the additional bookkeeping
|
1008
|
+
# overhead typically needed to implement it.
|
1009
|
+
#
|
1010
|
+
# This option does not affect the public interface of any generated code;
|
1011
|
+
# all method signatures remain the same. Furthermore, thread-safety of the
|
1012
|
+
# interface is not affected by this option; const methods remain safe to
|
1013
|
+
# call from multiple threads concurrently, while non-const methods continue
|
1014
|
+
# to require exclusive access.
|
1015
|
+
#
|
1016
|
+
# Note that lazy message fields are still eagerly verified to check
|
1017
|
+
# ill-formed wireformat or missing required fields. Calling IsInitialized()
|
1018
|
+
# on the outer message would fail if the inner message has missing required
|
1019
|
+
# fields. Failed verification would result in parsing failure (except when
|
1020
|
+
# uninitialized messages are acceptable).
|
1021
|
+
optional(5, "lazy", type: :bool)
|
1022
|
+
# unverified_lazy does no correctness checks on the byte stream. This should
|
1023
|
+
# only be used where lazy with verification is prohibitive for performance
|
1024
|
+
# reasons.
|
1025
|
+
optional(15, "unverified_lazy", type: :bool, json_name: "unverifiedLazy")
|
1026
|
+
# Is this field deprecated?
|
1027
|
+
# Depending on the target platform, this can emit Deprecated annotations
|
1028
|
+
# for accessors, or it will be completely ignored; in the very least, this
|
1029
|
+
# is a formalization for deprecating fields.
|
1030
|
+
optional(3, "deprecated", type: :bool)
|
1031
|
+
# For Google-internal migration only. Do not use.
|
1032
|
+
optional(10, "weak", type: :bool)
|
1033
|
+
# Indicate that the field value should not be printed out when using debug
|
1034
|
+
# formats, e.g. when the field contains sensitive credentials.
|
1035
|
+
optional(16, "debug_redact", type: :bool, json_name: "debugRedact")
|
1036
|
+
# If set to RETENTION_SOURCE, the option will be omitted from the binary.
|
1037
|
+
# Note: as of January 2023, support for this is in progress and does not yet
|
1038
|
+
# have an effect (b/264593489).
|
1039
|
+
class OptionRetention
|
1040
|
+
extend Protobug::Enum
|
1041
|
+
|
1042
|
+
self.full_name = "google.protobuf.FieldOptions.OptionRetention"
|
1043
|
+
|
1044
|
+
RETENTION_UNKNOWN = new("RETENTION_UNKNOWN", 0).freeze
|
1045
|
+
RETENTION_RUNTIME = new("RETENTION_RUNTIME", 1).freeze
|
1046
|
+
RETENTION_SOURCE = new("RETENTION_SOURCE", 2).freeze
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
optional(
|
1050
|
+
17,
|
1051
|
+
"retention",
|
1052
|
+
type: :enum,
|
1053
|
+
enum_type: "google.protobuf.FieldOptions.OptionRetention"
|
1054
|
+
)
|
1055
|
+
# This indicates the types of entities that the field may apply to when used
|
1056
|
+
# as an option. If it is unset, then the field may be freely used as an
|
1057
|
+
# option on any kind of entity. Note: as of January 2023, support for this is
|
1058
|
+
# in progress and does not yet have an effect (b/264593489).
|
1059
|
+
class OptionTargetType
|
1060
|
+
extend Protobug::Enum
|
1061
|
+
|
1062
|
+
self.full_name = "google.protobuf.FieldOptions.OptionTargetType"
|
1063
|
+
|
1064
|
+
TARGET_TYPE_UNKNOWN = new("TARGET_TYPE_UNKNOWN", 0).freeze
|
1065
|
+
TARGET_TYPE_FILE = new("TARGET_TYPE_FILE", 1).freeze
|
1066
|
+
TARGET_TYPE_EXTENSION_RANGE = new(
|
1067
|
+
"TARGET_TYPE_EXTENSION_RANGE",
|
1068
|
+
2
|
1069
|
+
).freeze
|
1070
|
+
TARGET_TYPE_MESSAGE = new("TARGET_TYPE_MESSAGE", 3).freeze
|
1071
|
+
TARGET_TYPE_FIELD = new("TARGET_TYPE_FIELD", 4).freeze
|
1072
|
+
TARGET_TYPE_ONEOF = new("TARGET_TYPE_ONEOF", 5).freeze
|
1073
|
+
TARGET_TYPE_ENUM = new("TARGET_TYPE_ENUM", 6).freeze
|
1074
|
+
TARGET_TYPE_ENUM_ENTRY = new("TARGET_TYPE_ENUM_ENTRY", 7).freeze
|
1075
|
+
TARGET_TYPE_SERVICE = new("TARGET_TYPE_SERVICE", 8).freeze
|
1076
|
+
TARGET_TYPE_METHOD = new("TARGET_TYPE_METHOD", 9).freeze
|
1077
|
+
end
|
1078
|
+
|
1079
|
+
repeated(
|
1080
|
+
19,
|
1081
|
+
"targets",
|
1082
|
+
type: :enum,
|
1083
|
+
enum_type: "google.protobuf.FieldOptions.OptionTargetType"
|
1084
|
+
)
|
1085
|
+
class EditionDefault
|
1086
|
+
extend Protobug::Message
|
1087
|
+
|
1088
|
+
self.full_name = "google.protobuf.FieldOptions.EditionDefault"
|
1089
|
+
|
1090
|
+
optional(
|
1091
|
+
3,
|
1092
|
+
"edition",
|
1093
|
+
type: :enum,
|
1094
|
+
enum_type: "google.protobuf.Edition"
|
1095
|
+
)
|
1096
|
+
optional(2, "value", type: :string) # Textproto value.
|
1097
|
+
end
|
1098
|
+
|
1099
|
+
repeated(
|
1100
|
+
20,
|
1101
|
+
"edition_defaults",
|
1102
|
+
type: :message,
|
1103
|
+
message_type: "google.protobuf.FieldOptions.EditionDefault",
|
1104
|
+
json_name: "editionDefaults"
|
1105
|
+
)
|
1106
|
+
# Any features defined in the specific edition.
|
1107
|
+
optional(
|
1108
|
+
21,
|
1109
|
+
"features",
|
1110
|
+
type: :message,
|
1111
|
+
message_type: "google.protobuf.FeatureSet"
|
1112
|
+
)
|
1113
|
+
# The parser stores options it doesn't recognize here. See above.
|
1114
|
+
repeated(
|
1115
|
+
999,
|
1116
|
+
"uninterpreted_option",
|
1117
|
+
type: :message,
|
1118
|
+
message_type: "google.protobuf.UninterpretedOption",
|
1119
|
+
json_name: "uninterpretedOption"
|
1120
|
+
)
|
1121
|
+
|
1122
|
+
reserved_range(4...5)
|
1123
|
+
reserved_range(18...19)
|
1124
|
+
end
|
1125
|
+
|
1126
|
+
class OneofOptions
|
1127
|
+
extend Protobug::Message
|
1128
|
+
|
1129
|
+
self.full_name = "google.protobuf.OneofOptions"
|
1130
|
+
|
1131
|
+
# Any features defined in the specific edition.
|
1132
|
+
optional(
|
1133
|
+
1,
|
1134
|
+
"features",
|
1135
|
+
type: :message,
|
1136
|
+
message_type: "google.protobuf.FeatureSet"
|
1137
|
+
)
|
1138
|
+
# The parser stores options it doesn't recognize here. See above.
|
1139
|
+
repeated(
|
1140
|
+
999,
|
1141
|
+
"uninterpreted_option",
|
1142
|
+
type: :message,
|
1143
|
+
message_type: "google.protobuf.UninterpretedOption",
|
1144
|
+
json_name: "uninterpretedOption"
|
1145
|
+
)
|
1146
|
+
end
|
1147
|
+
|
1148
|
+
class EnumOptions
|
1149
|
+
extend Protobug::Message
|
1150
|
+
|
1151
|
+
self.full_name = "google.protobuf.EnumOptions"
|
1152
|
+
|
1153
|
+
# Set this option to true to allow mapping different tag names to the same
|
1154
|
+
# value.
|
1155
|
+
optional(2, "allow_alias", type: :bool, json_name: "allowAlias")
|
1156
|
+
# Is this enum deprecated?
|
1157
|
+
# Depending on the target platform, this can emit Deprecated annotations
|
1158
|
+
# for the enum, or it will be completely ignored; in the very least, this
|
1159
|
+
# is a formalization for deprecating enums.
|
1160
|
+
optional(3, "deprecated", type: :bool)
|
1161
|
+
# Enable the legacy handling of JSON field name conflicts. This lowercases
|
1162
|
+
# and strips underscored from the fields before comparison in proto3 only.
|
1163
|
+
# The new behavior takes `json_name` into account and applies to proto2 as
|
1164
|
+
# well.
|
1165
|
+
# TODO Remove this legacy behavior once downstream teams have
|
1166
|
+
# had time to migrate.
|
1167
|
+
optional(
|
1168
|
+
6,
|
1169
|
+
"deprecated_legacy_json_field_conflicts",
|
1170
|
+
type: :bool,
|
1171
|
+
json_name: "deprecatedLegacyJsonFieldConflicts"
|
1172
|
+
)
|
1173
|
+
# Any features defined in the specific edition.
|
1174
|
+
optional(
|
1175
|
+
7,
|
1176
|
+
"features",
|
1177
|
+
type: :message,
|
1178
|
+
message_type: "google.protobuf.FeatureSet"
|
1179
|
+
)
|
1180
|
+
# The parser stores options it doesn't recognize here. See above.
|
1181
|
+
repeated(
|
1182
|
+
999,
|
1183
|
+
"uninterpreted_option",
|
1184
|
+
type: :message,
|
1185
|
+
message_type: "google.protobuf.UninterpretedOption",
|
1186
|
+
json_name: "uninterpretedOption"
|
1187
|
+
)
|
1188
|
+
|
1189
|
+
reserved_range(5...6)
|
1190
|
+
end
|
1191
|
+
|
1192
|
+
class EnumValueOptions
|
1193
|
+
extend Protobug::Message
|
1194
|
+
|
1195
|
+
self.full_name = "google.protobuf.EnumValueOptions"
|
1196
|
+
|
1197
|
+
# Is this enum value deprecated?
|
1198
|
+
# Depending on the target platform, this can emit Deprecated annotations
|
1199
|
+
# for the enum value, or it will be completely ignored; in the very least,
|
1200
|
+
# this is a formalization for deprecating enum values.
|
1201
|
+
optional(1, "deprecated", type: :bool)
|
1202
|
+
# Any features defined in the specific edition.
|
1203
|
+
optional(
|
1204
|
+
2,
|
1205
|
+
"features",
|
1206
|
+
type: :message,
|
1207
|
+
message_type: "google.protobuf.FeatureSet"
|
1208
|
+
)
|
1209
|
+
# Indicate that fields annotated with this enum value should not be printed
|
1210
|
+
# out when using debug formats, e.g. when the field contains sensitive
|
1211
|
+
# credentials.
|
1212
|
+
optional(3, "debug_redact", type: :bool, json_name: "debugRedact")
|
1213
|
+
# The parser stores options it doesn't recognize here. See above.
|
1214
|
+
repeated(
|
1215
|
+
999,
|
1216
|
+
"uninterpreted_option",
|
1217
|
+
type: :message,
|
1218
|
+
message_type: "google.protobuf.UninterpretedOption",
|
1219
|
+
json_name: "uninterpretedOption"
|
1220
|
+
)
|
1221
|
+
end
|
1222
|
+
|
1223
|
+
class ServiceOptions
|
1224
|
+
extend Protobug::Message
|
1225
|
+
|
1226
|
+
self.full_name = "google.protobuf.ServiceOptions"
|
1227
|
+
|
1228
|
+
# Any features defined in the specific edition.
|
1229
|
+
optional(
|
1230
|
+
34,
|
1231
|
+
"features",
|
1232
|
+
type: :message,
|
1233
|
+
message_type: "google.protobuf.FeatureSet"
|
1234
|
+
)
|
1235
|
+
# Note: Field numbers 1 through 32 are reserved for Google's internal RPC
|
1236
|
+
# framework. We apologize for hoarding these numbers to ourselves, but
|
1237
|
+
# we were already using them long before we decided to release Protocol
|
1238
|
+
# Buffers.
|
1239
|
+
|
1240
|
+
# Is this service deprecated?
|
1241
|
+
# Depending on the target platform, this can emit Deprecated annotations
|
1242
|
+
# for the service, or it will be completely ignored; in the very least,
|
1243
|
+
# this is a formalization for deprecating services.
|
1244
|
+
optional(33, "deprecated", type: :bool)
|
1245
|
+
# The parser stores options it doesn't recognize here. See above.
|
1246
|
+
repeated(
|
1247
|
+
999,
|
1248
|
+
"uninterpreted_option",
|
1249
|
+
type: :message,
|
1250
|
+
message_type: "google.protobuf.UninterpretedOption",
|
1251
|
+
json_name: "uninterpretedOption"
|
1252
|
+
)
|
1253
|
+
end
|
1254
|
+
|
1255
|
+
class MethodOptions
|
1256
|
+
extend Protobug::Message
|
1257
|
+
|
1258
|
+
self.full_name = "google.protobuf.MethodOptions"
|
1259
|
+
|
1260
|
+
# Note: Field numbers 1 through 32 are reserved for Google's internal RPC
|
1261
|
+
# framework. We apologize for hoarding these numbers to ourselves, but
|
1262
|
+
# we were already using them long before we decided to release Protocol
|
1263
|
+
# Buffers.
|
1264
|
+
|
1265
|
+
# Is this method deprecated?
|
1266
|
+
# Depending on the target platform, this can emit Deprecated annotations
|
1267
|
+
# for the method, or it will be completely ignored; in the very least,
|
1268
|
+
# this is a formalization for deprecating methods.
|
1269
|
+
optional(33, "deprecated", type: :bool)
|
1270
|
+
# Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
|
1271
|
+
# or neither? HTTP based RPC implementation may choose GET verb for safe
|
1272
|
+
# methods, and PUT verb for idempotent methods instead of the default POST.
|
1273
|
+
class IdempotencyLevel
|
1274
|
+
extend Protobug::Enum
|
1275
|
+
|
1276
|
+
self.full_name = "google.protobuf.MethodOptions.IdempotencyLevel"
|
1277
|
+
|
1278
|
+
IDEMPOTENCY_UNKNOWN = new("IDEMPOTENCY_UNKNOWN", 0).freeze
|
1279
|
+
NO_SIDE_EFFECTS = new("NO_SIDE_EFFECTS", 1).freeze # implies idempotent
|
1280
|
+
IDEMPOTENT = new(
|
1281
|
+
"IDEMPOTENT",
|
1282
|
+
2
|
1283
|
+
).freeze # idempotent, but may have side effects
|
1284
|
+
end
|
1285
|
+
|
1286
|
+
optional(
|
1287
|
+
34,
|
1288
|
+
"idempotency_level",
|
1289
|
+
type: :enum,
|
1290
|
+
enum_type: "google.protobuf.MethodOptions.IdempotencyLevel",
|
1291
|
+
json_name: "idempotencyLevel"
|
1292
|
+
)
|
1293
|
+
# Any features defined in the specific edition.
|
1294
|
+
optional(
|
1295
|
+
35,
|
1296
|
+
"features",
|
1297
|
+
type: :message,
|
1298
|
+
message_type: "google.protobuf.FeatureSet"
|
1299
|
+
)
|
1300
|
+
# The parser stores options it doesn't recognize here. See above.
|
1301
|
+
repeated(
|
1302
|
+
999,
|
1303
|
+
"uninterpreted_option",
|
1304
|
+
type: :message,
|
1305
|
+
message_type: "google.protobuf.UninterpretedOption",
|
1306
|
+
json_name: "uninterpretedOption"
|
1307
|
+
)
|
1308
|
+
end
|
1309
|
+
|
1310
|
+
# A message representing a option the parser does not recognize. This only
|
1311
|
+
# appears in options protos created by the compiler::Parser class.
|
1312
|
+
# DescriptorPool resolves these when building Descriptor objects. Therefore,
|
1313
|
+
# options protos in descriptor objects (e.g. returned by Descriptor::options(),
|
1314
|
+
# or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
|
1315
|
+
# in them.
|
1316
|
+
class UninterpretedOption
|
1317
|
+
extend Protobug::Message
|
1318
|
+
|
1319
|
+
self.full_name = "google.protobuf.UninterpretedOption"
|
1320
|
+
|
1321
|
+
# The name of the uninterpreted option. Each string represents a segment in
|
1322
|
+
# a dot-separated name. is_extension is true iff a segment represents an
|
1323
|
+
# extension (denoted with parentheses in options specs in .proto files).
|
1324
|
+
# E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
|
1325
|
+
# "foo.(bar.baz).moo".
|
1326
|
+
class NamePart
|
1327
|
+
extend Protobug::Message
|
1328
|
+
|
1329
|
+
self.full_name = "google.protobuf.UninterpretedOption.NamePart"
|
1330
|
+
|
1331
|
+
required(1, "name_part", type: :string, json_name: "namePart")
|
1332
|
+
required(2, "is_extension", type: :bool, json_name: "isExtension")
|
1333
|
+
end
|
1334
|
+
|
1335
|
+
repeated(
|
1336
|
+
2,
|
1337
|
+
"name",
|
1338
|
+
type: :message,
|
1339
|
+
message_type: "google.protobuf.UninterpretedOption.NamePart"
|
1340
|
+
)
|
1341
|
+
# The value of the uninterpreted option, in whatever type the tokenizer
|
1342
|
+
# identified it as during parsing. Exactly one of these should be set.
|
1343
|
+
optional(
|
1344
|
+
3,
|
1345
|
+
"identifier_value",
|
1346
|
+
type: :string,
|
1347
|
+
json_name: "identifierValue"
|
1348
|
+
)
|
1349
|
+
optional(
|
1350
|
+
4,
|
1351
|
+
"positive_int_value",
|
1352
|
+
type: :uint64,
|
1353
|
+
json_name: "positiveIntValue"
|
1354
|
+
)
|
1355
|
+
optional(
|
1356
|
+
5,
|
1357
|
+
"negative_int_value",
|
1358
|
+
type: :int64,
|
1359
|
+
json_name: "negativeIntValue"
|
1360
|
+
)
|
1361
|
+
optional(6, "double_value", type: :double, json_name: "doubleValue")
|
1362
|
+
optional(7, "string_value", type: :bytes, json_name: "stringValue")
|
1363
|
+
optional(8, "aggregate_value", type: :string, json_name: "aggregateValue")
|
1364
|
+
end
|
1365
|
+
|
1366
|
+
# ===================================================================
|
1367
|
+
# Features
|
1368
|
+
|
1369
|
+
# TODO Enums in C++ gencode (and potentially other languages) are
|
1370
|
+
# not well scoped. This means that each of the feature enums below can clash
|
1371
|
+
# with each other. The short names we've chosen maximize call-site
|
1372
|
+
# readability, but leave us very open to this scenario. A future feature will
|
1373
|
+
# be designed and implemented to handle this, hopefully before we ever hit a
|
1374
|
+
# conflict here.
|
1375
|
+
class FeatureSet
|
1376
|
+
extend Protobug::Message
|
1377
|
+
|
1378
|
+
self.full_name = "google.protobuf.FeatureSet"
|
1379
|
+
|
1380
|
+
class FieldPresence
|
1381
|
+
extend Protobug::Enum
|
1382
|
+
|
1383
|
+
self.full_name = "google.protobuf.FeatureSet.FieldPresence"
|
1384
|
+
|
1385
|
+
FIELD_PRESENCE_UNKNOWN = new("FIELD_PRESENCE_UNKNOWN", 0).freeze
|
1386
|
+
EXPLICIT = new("EXPLICIT", 1).freeze
|
1387
|
+
IMPLICIT = new("IMPLICIT", 2).freeze
|
1388
|
+
LEGACY_REQUIRED = new("LEGACY_REQUIRED", 3).freeze
|
1389
|
+
end
|
1390
|
+
|
1391
|
+
optional(
|
1392
|
+
1,
|
1393
|
+
"field_presence",
|
1394
|
+
type: :enum,
|
1395
|
+
enum_type: "google.protobuf.FeatureSet.FieldPresence",
|
1396
|
+
json_name: "fieldPresence"
|
1397
|
+
)
|
1398
|
+
class EnumType
|
1399
|
+
extend Protobug::Enum
|
1400
|
+
|
1401
|
+
self.full_name = "google.protobuf.FeatureSet.EnumType"
|
1402
|
+
|
1403
|
+
ENUM_TYPE_UNKNOWN = new("ENUM_TYPE_UNKNOWN", 0).freeze
|
1404
|
+
OPEN = new("OPEN", 1).freeze
|
1405
|
+
CLOSED = new("CLOSED", 2).freeze
|
1406
|
+
end
|
1407
|
+
|
1408
|
+
optional(
|
1409
|
+
2,
|
1410
|
+
"enum_type",
|
1411
|
+
type: :enum,
|
1412
|
+
enum_type: "google.protobuf.FeatureSet.EnumType",
|
1413
|
+
json_name: "enumType"
|
1414
|
+
)
|
1415
|
+
class RepeatedFieldEncoding
|
1416
|
+
extend Protobug::Enum
|
1417
|
+
|
1418
|
+
self.full_name = "google.protobuf.FeatureSet.RepeatedFieldEncoding"
|
1419
|
+
|
1420
|
+
REPEATED_FIELD_ENCODING_UNKNOWN = new(
|
1421
|
+
"REPEATED_FIELD_ENCODING_UNKNOWN",
|
1422
|
+
0
|
1423
|
+
).freeze
|
1424
|
+
PACKED = new("PACKED", 1).freeze
|
1425
|
+
EXPANDED = new("EXPANDED", 2).freeze
|
1426
|
+
end
|
1427
|
+
|
1428
|
+
optional(
|
1429
|
+
3,
|
1430
|
+
"repeated_field_encoding",
|
1431
|
+
type: :enum,
|
1432
|
+
enum_type: "google.protobuf.FeatureSet.RepeatedFieldEncoding",
|
1433
|
+
json_name: "repeatedFieldEncoding"
|
1434
|
+
)
|
1435
|
+
class Utf8Validation
|
1436
|
+
extend Protobug::Enum
|
1437
|
+
|
1438
|
+
self.full_name = "google.protobuf.FeatureSet.Utf8Validation"
|
1439
|
+
|
1440
|
+
UTF8_VALIDATION_UNKNOWN = new("UTF8_VALIDATION_UNKNOWN", 0).freeze
|
1441
|
+
VERIFY = new("VERIFY", 2).freeze
|
1442
|
+
NONE = new("NONE", 3).freeze
|
1443
|
+
end
|
1444
|
+
|
1445
|
+
optional(
|
1446
|
+
4,
|
1447
|
+
"utf8_validation",
|
1448
|
+
type: :enum,
|
1449
|
+
enum_type: "google.protobuf.FeatureSet.Utf8Validation",
|
1450
|
+
json_name: "utf8Validation"
|
1451
|
+
)
|
1452
|
+
class MessageEncoding
|
1453
|
+
extend Protobug::Enum
|
1454
|
+
|
1455
|
+
self.full_name = "google.protobuf.FeatureSet.MessageEncoding"
|
1456
|
+
|
1457
|
+
MESSAGE_ENCODING_UNKNOWN = new("MESSAGE_ENCODING_UNKNOWN", 0).freeze
|
1458
|
+
LENGTH_PREFIXED = new("LENGTH_PREFIXED", 1).freeze
|
1459
|
+
DELIMITED = new("DELIMITED", 2).freeze
|
1460
|
+
end
|
1461
|
+
|
1462
|
+
optional(
|
1463
|
+
5,
|
1464
|
+
"message_encoding",
|
1465
|
+
type: :enum,
|
1466
|
+
enum_type: "google.protobuf.FeatureSet.MessageEncoding",
|
1467
|
+
json_name: "messageEncoding"
|
1468
|
+
)
|
1469
|
+
class JsonFormat
|
1470
|
+
extend Protobug::Enum
|
1471
|
+
|
1472
|
+
self.full_name = "google.protobuf.FeatureSet.JsonFormat"
|
1473
|
+
|
1474
|
+
JSON_FORMAT_UNKNOWN = new("JSON_FORMAT_UNKNOWN", 0).freeze
|
1475
|
+
ALLOW = new("ALLOW", 1).freeze
|
1476
|
+
LEGACY_BEST_EFFORT = new("LEGACY_BEST_EFFORT", 2).freeze
|
1477
|
+
end
|
1478
|
+
|
1479
|
+
optional(
|
1480
|
+
6,
|
1481
|
+
"json_format",
|
1482
|
+
type: :enum,
|
1483
|
+
enum_type: "google.protobuf.FeatureSet.JsonFormat",
|
1484
|
+
json_name: "jsonFormat"
|
1485
|
+
)
|
1486
|
+
|
1487
|
+
reserved_range(999...1_000)
|
1488
|
+
end
|
1489
|
+
|
1490
|
+
# A compiled specification for the defaults of a set of features. These
|
1491
|
+
# messages are generated from FeatureSet extensions and can be used to seed
|
1492
|
+
# feature resolution. The resolution with this object becomes a simple search
|
1493
|
+
# for the closest matching edition, followed by proto merges.
|
1494
|
+
class FeatureSetDefaults
|
1495
|
+
extend Protobug::Message
|
1496
|
+
|
1497
|
+
self.full_name = "google.protobuf.FeatureSetDefaults"
|
1498
|
+
|
1499
|
+
# A map from every known edition with a unique set of defaults to its
|
1500
|
+
# defaults. Not all editions may be contained here. For a given edition,
|
1501
|
+
# the defaults at the closest matching edition ordered at or before it should
|
1502
|
+
# be used. This field must be in strict ascending order by edition.
|
1503
|
+
class FeatureSetEditionDefault
|
1504
|
+
extend Protobug::Message
|
1505
|
+
|
1506
|
+
self.full_name = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"
|
1507
|
+
|
1508
|
+
optional(
|
1509
|
+
3,
|
1510
|
+
"edition",
|
1511
|
+
type: :enum,
|
1512
|
+
enum_type: "google.protobuf.Edition"
|
1513
|
+
)
|
1514
|
+
optional(
|
1515
|
+
2,
|
1516
|
+
"features",
|
1517
|
+
type: :message,
|
1518
|
+
message_type: "google.protobuf.FeatureSet"
|
1519
|
+
)
|
1520
|
+
end
|
1521
|
+
|
1522
|
+
repeated(
|
1523
|
+
1,
|
1524
|
+
"defaults",
|
1525
|
+
type: :message,
|
1526
|
+
message_type:
|
1527
|
+
"google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"
|
1528
|
+
)
|
1529
|
+
# The minimum supported edition (inclusive) when this was constructed.
|
1530
|
+
# Editions before this will not have defaults.
|
1531
|
+
optional(
|
1532
|
+
4,
|
1533
|
+
"minimum_edition",
|
1534
|
+
type: :enum,
|
1535
|
+
enum_type: "google.protobuf.Edition",
|
1536
|
+
json_name: "minimumEdition"
|
1537
|
+
)
|
1538
|
+
# The maximum known edition (inclusive) when this was constructed. Editions
|
1539
|
+
# after this will not have reliable defaults.
|
1540
|
+
optional(
|
1541
|
+
5,
|
1542
|
+
"maximum_edition",
|
1543
|
+
type: :enum,
|
1544
|
+
enum_type: "google.protobuf.Edition",
|
1545
|
+
json_name: "maximumEdition"
|
1546
|
+
)
|
1547
|
+
end
|
1548
|
+
|
1549
|
+
# ===================================================================
|
1550
|
+
# Optional source code info
|
1551
|
+
|
1552
|
+
# Encapsulates information about the original source file from which a
|
1553
|
+
# FileDescriptorProto was generated.
|
1554
|
+
class SourceCodeInfo
|
1555
|
+
extend Protobug::Message
|
1556
|
+
|
1557
|
+
self.full_name = "google.protobuf.SourceCodeInfo"
|
1558
|
+
|
1559
|
+
# A Location identifies a piece of source code in a .proto file which
|
1560
|
+
# corresponds to a particular definition. This information is intended
|
1561
|
+
# to be useful to IDEs, code indexers, documentation generators, and similar
|
1562
|
+
# tools.
|
1563
|
+
#
|
1564
|
+
# For example, say we have a file like:
|
1565
|
+
# message Foo {
|
1566
|
+
# optional string foo = 1;
|
1567
|
+
# }
|
1568
|
+
# Let's look at just the field definition:
|
1569
|
+
# optional string foo = 1;
|
1570
|
+
# ^ ^^ ^^ ^ ^^^
|
1571
|
+
# a bc de f ghi
|
1572
|
+
# We have the following locations:
|
1573
|
+
# span path represents
|
1574
|
+
# [a,i) [ 4, 0, 2, 0 ] The whole field definition.
|
1575
|
+
# [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
|
1576
|
+
# [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
|
1577
|
+
# [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
|
1578
|
+
# [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
|
1579
|
+
#
|
1580
|
+
# Notes:
|
1581
|
+
# - A location may refer to a repeated field itself (i.e. not to any
|
1582
|
+
# particular index within it). This is used whenever a set of elements are
|
1583
|
+
# logically enclosed in a single code segment. For example, an entire
|
1584
|
+
# extend block (possibly containing multiple extension definitions) will
|
1585
|
+
# have an outer location whose path refers to the "extensions" repeated
|
1586
|
+
# field without an index.
|
1587
|
+
# - Multiple locations may have the same path. This happens when a single
|
1588
|
+
# logical declaration is spread out across multiple places. The most
|
1589
|
+
# obvious example is the "extend" block again -- there may be multiple
|
1590
|
+
# extend blocks in the same scope, each of which will have the same path.
|
1591
|
+
# - A location's span is not always a subset of its parent's span. For
|
1592
|
+
# example, the "extendee" of an extension declaration appears at the
|
1593
|
+
# beginning of the "extend" block and is shared by all extensions within
|
1594
|
+
# the block.
|
1595
|
+
# - Just because a location's span is a subset of some other location's span
|
1596
|
+
# does not mean that it is a descendant. For example, a "group" defines
|
1597
|
+
# both a type and a field in a single declaration. Thus, the locations
|
1598
|
+
# corresponding to the type and field and their components will overlap.
|
1599
|
+
# - Code which tries to interpret locations should probably be designed to
|
1600
|
+
# ignore those that it doesn't understand, as more types of locations could
|
1601
|
+
# be recorded in the future.
|
1602
|
+
repeated(
|
1603
|
+
1,
|
1604
|
+
"location",
|
1605
|
+
type: :message,
|
1606
|
+
message_type: "google.protobuf.SourceCodeInfo.Location"
|
1607
|
+
)
|
1608
|
+
class Location
|
1609
|
+
extend Protobug::Message
|
1610
|
+
|
1611
|
+
self.full_name = "google.protobuf.SourceCodeInfo.Location"
|
1612
|
+
|
1613
|
+
# Identifies which part of the FileDescriptorProto was defined at this
|
1614
|
+
# location.
|
1615
|
+
#
|
1616
|
+
# Each element is a field number or an index. They form a path from
|
1617
|
+
# the root FileDescriptorProto to the place where the definition appears.
|
1618
|
+
# For example, this path:
|
1619
|
+
# [ 4, 3, 2, 7, 1 ]
|
1620
|
+
# refers to:
|
1621
|
+
# file.message_type(3) // 4, 3
|
1622
|
+
# .field(7) // 2, 7
|
1623
|
+
# .name() // 1
|
1624
|
+
# This is because FileDescriptorProto.message_type has field number 4:
|
1625
|
+
# repeated DescriptorProto message_type = 4;
|
1626
|
+
# and DescriptorProto.field has field number 2:
|
1627
|
+
# repeated FieldDescriptorProto field = 2;
|
1628
|
+
# and FieldDescriptorProto.name has field number 1:
|
1629
|
+
# optional string name = 1;
|
1630
|
+
#
|
1631
|
+
# Thus, the above path gives the location of a field name. If we removed
|
1632
|
+
# the last element:
|
1633
|
+
# [ 4, 3, 2, 7 ]
|
1634
|
+
# this path refers to the whole field declaration (from the beginning
|
1635
|
+
# of the label to the terminating semicolon).
|
1636
|
+
repeated(1, "path", type: :int32, packed: true)
|
1637
|
+
# Always has exactly three or four elements: start line, start column,
|
1638
|
+
# end line (optional, otherwise assumed same as start line), end column.
|
1639
|
+
# These are packed into a single field for efficiency. Note that line
|
1640
|
+
# and column numbers are zero-based -- typically you will want to add
|
1641
|
+
# 1 to each before displaying to a user.
|
1642
|
+
repeated(2, "span", type: :int32, packed: true)
|
1643
|
+
# If this SourceCodeInfo represents a complete declaration, these are any
|
1644
|
+
# comments appearing before and after the declaration which appear to be
|
1645
|
+
# attached to the declaration.
|
1646
|
+
#
|
1647
|
+
# A series of line comments appearing on consecutive lines, with no other
|
1648
|
+
# tokens appearing on those lines, will be treated as a single comment.
|
1649
|
+
#
|
1650
|
+
# leading_detached_comments will keep paragraphs of comments that appear
|
1651
|
+
# before (but not connected to) the current element. Each paragraph,
|
1652
|
+
# separated by empty lines, will be one comment element in the repeated
|
1653
|
+
# field.
|
1654
|
+
#
|
1655
|
+
# Only the comment content is provided; comment markers (e.g. //) are
|
1656
|
+
# stripped out. For block comments, leading whitespace and an asterisk
|
1657
|
+
# will be stripped from the beginning of each line other than the first.
|
1658
|
+
# Newlines are included in the output.
|
1659
|
+
#
|
1660
|
+
# Examples:
|
1661
|
+
#
|
1662
|
+
# optional int32 foo = 1; // Comment attached to foo.
|
1663
|
+
# // Comment attached to bar.
|
1664
|
+
# optional int32 bar = 2;
|
1665
|
+
#
|
1666
|
+
# optional string baz = 3;
|
1667
|
+
# // Comment attached to baz.
|
1668
|
+
# // Another line attached to baz.
|
1669
|
+
#
|
1670
|
+
# // Comment attached to moo.
|
1671
|
+
# //
|
1672
|
+
# // Another line attached to moo.
|
1673
|
+
# optional double moo = 4;
|
1674
|
+
#
|
1675
|
+
# // Detached comment for corge. This is not leading or trailing comments
|
1676
|
+
# // to moo or corge because there are blank lines separating it from
|
1677
|
+
# // both.
|
1678
|
+
#
|
1679
|
+
# // Detached comment for corge paragraph 2.
|
1680
|
+
#
|
1681
|
+
# optional string corge = 5;
|
1682
|
+
# /* Block comment attached
|
1683
|
+
# * to corge. Leading asterisks
|
1684
|
+
# * will be removed. */
|
1685
|
+
# /* Block comment attached to
|
1686
|
+
# * grault. */
|
1687
|
+
# optional int32 grault = 6;
|
1688
|
+
#
|
1689
|
+
# // ignored detached comments.
|
1690
|
+
optional(
|
1691
|
+
3,
|
1692
|
+
"leading_comments",
|
1693
|
+
type: :string,
|
1694
|
+
json_name: "leadingComments"
|
1695
|
+
)
|
1696
|
+
optional(
|
1697
|
+
4,
|
1698
|
+
"trailing_comments",
|
1699
|
+
type: :string,
|
1700
|
+
json_name: "trailingComments"
|
1701
|
+
)
|
1702
|
+
repeated(
|
1703
|
+
6,
|
1704
|
+
"leading_detached_comments",
|
1705
|
+
type: :string,
|
1706
|
+
json_name: "leadingDetachedComments"
|
1707
|
+
)
|
1708
|
+
end
|
1709
|
+
end
|
1710
|
+
|
1711
|
+
# Describes the relationship between generated code and its original source
|
1712
|
+
# file. A GeneratedCodeInfo message is associated with only one generated
|
1713
|
+
# source file, but may contain references to different source .proto files.
|
1714
|
+
class GeneratedCodeInfo
|
1715
|
+
extend Protobug::Message
|
1716
|
+
|
1717
|
+
self.full_name = "google.protobuf.GeneratedCodeInfo"
|
1718
|
+
|
1719
|
+
# An Annotation connects some span of text in generated code to an element
|
1720
|
+
# of its generating .proto file.
|
1721
|
+
repeated(
|
1722
|
+
1,
|
1723
|
+
"annotation",
|
1724
|
+
type: :message,
|
1725
|
+
message_type: "google.protobuf.GeneratedCodeInfo.Annotation"
|
1726
|
+
)
|
1727
|
+
class Annotation
|
1728
|
+
extend Protobug::Message
|
1729
|
+
|
1730
|
+
self.full_name = "google.protobuf.GeneratedCodeInfo.Annotation"
|
1731
|
+
|
1732
|
+
# Identifies the element in the original source .proto file. This field
|
1733
|
+
# is formatted the same as SourceCodeInfo.Location.path.
|
1734
|
+
repeated(1, "path", type: :int32, packed: true)
|
1735
|
+
# Identifies the filesystem path to the original source .proto.
|
1736
|
+
optional(2, "source_file", type: :string, json_name: "sourceFile")
|
1737
|
+
# Identifies the starting offset in bytes in the generated code
|
1738
|
+
# that relates to the identified object.
|
1739
|
+
optional(3, "begin", type: :int32)
|
1740
|
+
# Identifies the ending offset in bytes in the generated code that
|
1741
|
+
# relates to the identified object. The end offset should be one past
|
1742
|
+
# the last relevant byte (so the length of the text = end - begin).
|
1743
|
+
optional(4, "end", type: :int32)
|
1744
|
+
# Represents the identified object's effect on the element in the original
|
1745
|
+
# .proto file.
|
1746
|
+
class Semantic
|
1747
|
+
extend Protobug::Enum
|
1748
|
+
|
1749
|
+
self.full_name = "google.protobuf.GeneratedCodeInfo.Annotation.Semantic"
|
1750
|
+
|
1751
|
+
# There is no effect or the effect is indescribable.
|
1752
|
+
NONE = new("NONE", 0).freeze
|
1753
|
+
# The element is set or otherwise mutated.
|
1754
|
+
SET = new("SET", 1).freeze
|
1755
|
+
# An alias to the element is returned.
|
1756
|
+
ALIAS = new("ALIAS", 2).freeze
|
1757
|
+
end
|
1758
|
+
|
1759
|
+
optional(
|
1760
|
+
5,
|
1761
|
+
"semantic",
|
1762
|
+
type: :enum,
|
1763
|
+
enum_type: "google.protobuf.GeneratedCodeInfo.Annotation.Semantic"
|
1764
|
+
)
|
1765
|
+
end
|
1766
|
+
end
|
1767
|
+
|
1768
|
+
def self.register_descriptor_protos(registry)
|
1769
|
+
registry.register(Google::Protobuf::FileDescriptorSet)
|
1770
|
+
registry.register(Google::Protobuf::Edition)
|
1771
|
+
registry.register(Google::Protobuf::FileDescriptorProto)
|
1772
|
+
registry.register(Google::Protobuf::DescriptorProto)
|
1773
|
+
registry.register(Google::Protobuf::DescriptorProto::ExtensionRange)
|
1774
|
+
registry.register(Google::Protobuf::DescriptorProto::ReservedRange)
|
1775
|
+
registry.register(Google::Protobuf::ExtensionRangeOptions)
|
1776
|
+
registry.register(Google::Protobuf::ExtensionRangeOptions::Declaration)
|
1777
|
+
registry.register(
|
1778
|
+
Google::Protobuf::ExtensionRangeOptions::VerificationState
|
1779
|
+
)
|
1780
|
+
registry.register(Google::Protobuf::FieldDescriptorProto)
|
1781
|
+
registry.register(Google::Protobuf::FieldDescriptorProto::Type)
|
1782
|
+
registry.register(Google::Protobuf::FieldDescriptorProto::Label)
|
1783
|
+
registry.register(Google::Protobuf::OneofDescriptorProto)
|
1784
|
+
registry.register(Google::Protobuf::EnumDescriptorProto)
|
1785
|
+
registry.register(
|
1786
|
+
Google::Protobuf::EnumDescriptorProto::EnumReservedRange
|
1787
|
+
)
|
1788
|
+
registry.register(Google::Protobuf::EnumValueDescriptorProto)
|
1789
|
+
registry.register(Google::Protobuf::ServiceDescriptorProto)
|
1790
|
+
registry.register(Google::Protobuf::MethodDescriptorProto)
|
1791
|
+
registry.register(Google::Protobuf::FileOptions)
|
1792
|
+
registry.register(Google::Protobuf::FileOptions::OptimizeMode)
|
1793
|
+
registry.register(Google::Protobuf::MessageOptions)
|
1794
|
+
registry.register(Google::Protobuf::FieldOptions)
|
1795
|
+
registry.register(Google::Protobuf::FieldOptions::CType)
|
1796
|
+
registry.register(Google::Protobuf::FieldOptions::JSType)
|
1797
|
+
registry.register(Google::Protobuf::FieldOptions::OptionRetention)
|
1798
|
+
registry.register(Google::Protobuf::FieldOptions::OptionTargetType)
|
1799
|
+
registry.register(Google::Protobuf::FieldOptions::EditionDefault)
|
1800
|
+
registry.register(Google::Protobuf::OneofOptions)
|
1801
|
+
registry.register(Google::Protobuf::EnumOptions)
|
1802
|
+
registry.register(Google::Protobuf::EnumValueOptions)
|
1803
|
+
registry.register(Google::Protobuf::ServiceOptions)
|
1804
|
+
registry.register(Google::Protobuf::MethodOptions)
|
1805
|
+
registry.register(Google::Protobuf::MethodOptions::IdempotencyLevel)
|
1806
|
+
registry.register(Google::Protobuf::UninterpretedOption)
|
1807
|
+
registry.register(Google::Protobuf::UninterpretedOption::NamePart)
|
1808
|
+
registry.register(Google::Protobuf::FeatureSet)
|
1809
|
+
registry.register(Google::Protobuf::FeatureSet::FieldPresence)
|
1810
|
+
registry.register(Google::Protobuf::FeatureSet::EnumType)
|
1811
|
+
registry.register(Google::Protobuf::FeatureSet::RepeatedFieldEncoding)
|
1812
|
+
registry.register(Google::Protobuf::FeatureSet::Utf8Validation)
|
1813
|
+
registry.register(Google::Protobuf::FeatureSet::MessageEncoding)
|
1814
|
+
registry.register(Google::Protobuf::FeatureSet::JsonFormat)
|
1815
|
+
registry.register(Google::Protobuf::FeatureSetDefaults)
|
1816
|
+
registry.register(
|
1817
|
+
Google::Protobuf::FeatureSetDefaults::FeatureSetEditionDefault
|
1818
|
+
)
|
1819
|
+
registry.register(Google::Protobuf::SourceCodeInfo)
|
1820
|
+
registry.register(Google::Protobuf::SourceCodeInfo::Location)
|
1821
|
+
registry.register(Google::Protobuf::GeneratedCodeInfo)
|
1822
|
+
registry.register(Google::Protobuf::GeneratedCodeInfo::Annotation)
|
1823
|
+
registry.register(
|
1824
|
+
Google::Protobuf::GeneratedCodeInfo::Annotation::Semantic
|
1825
|
+
)
|
1826
|
+
end
|
1827
|
+
end
|
1828
|
+
end
|