grpc-tools 1.41.0 → 1.59.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/x86-linux/google/protobuf/any.proto +7 -3
- data/bin/x86-linux/google/protobuf/api.proto +2 -3
- data/bin/x86-linux/google/protobuf/compiler/plugin.proto +12 -4
- data/bin/x86-linux/google/protobuf/descriptor.proto +274 -28
- data/bin/x86-linux/google/protobuf/duration.proto +1 -2
- data/bin/x86-linux/google/protobuf/empty.proto +1 -2
- data/bin/x86-linux/google/protobuf/field_mask.proto +1 -1
- data/bin/x86-linux/google/protobuf/source_context.proto +1 -1
- data/bin/x86-linux/google/protobuf/struct.proto +4 -4
- data/bin/x86-linux/google/protobuf/timestamp.proto +2 -5
- data/bin/x86-linux/google/protobuf/type.proto +7 -1
- data/bin/x86-linux/google/protobuf/wrappers.proto +2 -2
- data/bin/x86-linux/grpc_ruby_plugin +0 -0
- data/bin/x86-linux/protoc +0 -0
- data/bin/x86-windows/google/protobuf/any.proto +7 -3
- data/bin/x86-windows/google/protobuf/api.proto +2 -3
- data/bin/x86-windows/google/protobuf/compiler/plugin.proto +12 -4
- data/bin/x86-windows/google/protobuf/descriptor.proto +274 -28
- data/bin/x86-windows/google/protobuf/duration.proto +1 -2
- data/bin/x86-windows/google/protobuf/empty.proto +1 -2
- data/bin/x86-windows/google/protobuf/field_mask.proto +1 -1
- data/bin/x86-windows/google/protobuf/source_context.proto +1 -1
- data/bin/x86-windows/google/protobuf/struct.proto +4 -4
- data/bin/x86-windows/google/protobuf/timestamp.proto +2 -5
- data/bin/x86-windows/google/protobuf/type.proto +7 -1
- data/bin/x86-windows/google/protobuf/wrappers.proto +2 -2
- data/bin/x86-windows/grpc_ruby_plugin.exe +0 -0
- data/bin/x86-windows/protoc.exe +0 -0
- data/bin/x86_64-linux/google/protobuf/any.proto +7 -3
- data/bin/x86_64-linux/google/protobuf/api.proto +2 -3
- data/bin/x86_64-linux/google/protobuf/compiler/plugin.proto +12 -4
- data/bin/x86_64-linux/google/protobuf/descriptor.proto +274 -28
- data/bin/x86_64-linux/google/protobuf/duration.proto +1 -2
- data/bin/x86_64-linux/google/protobuf/empty.proto +1 -2
- data/bin/x86_64-linux/google/protobuf/field_mask.proto +1 -1
- data/bin/x86_64-linux/google/protobuf/source_context.proto +1 -1
- data/bin/x86_64-linux/google/protobuf/struct.proto +4 -4
- data/bin/x86_64-linux/google/protobuf/timestamp.proto +2 -5
- data/bin/x86_64-linux/google/protobuf/type.proto +7 -1
- data/bin/x86_64-linux/google/protobuf/wrappers.proto +2 -2
- data/bin/x86_64-linux/grpc_ruby_plugin +0 -0
- data/bin/x86_64-linux/protoc +0 -0
- data/bin/x86_64-macos/google/protobuf/any.proto +7 -3
- data/bin/x86_64-macos/google/protobuf/api.proto +2 -3
- data/bin/x86_64-macos/google/protobuf/compiler/plugin.proto +12 -4
- data/bin/x86_64-macos/google/protobuf/descriptor.proto +274 -28
- data/bin/x86_64-macos/google/protobuf/duration.proto +1 -2
- data/bin/x86_64-macos/google/protobuf/empty.proto +1 -2
- data/bin/x86_64-macos/google/protobuf/field_mask.proto +1 -1
- data/bin/x86_64-macos/google/protobuf/source_context.proto +1 -1
- data/bin/x86_64-macos/google/protobuf/struct.proto +4 -4
- data/bin/x86_64-macos/google/protobuf/timestamp.proto +2 -5
- data/bin/x86_64-macos/google/protobuf/type.proto +7 -1
- data/bin/x86_64-macos/google/protobuf/wrappers.proto +2 -2
- data/bin/x86_64-macos/grpc_ruby_plugin +0 -0
- data/bin/x86_64-macos/protoc +0 -0
- data/bin/x86_64-windows/google/protobuf/any.proto +7 -3
- data/bin/x86_64-windows/google/protobuf/api.proto +2 -3
- data/bin/x86_64-windows/google/protobuf/compiler/plugin.proto +12 -4
- data/bin/x86_64-windows/google/protobuf/descriptor.proto +274 -28
- data/bin/x86_64-windows/google/protobuf/duration.proto +1 -2
- data/bin/x86_64-windows/google/protobuf/empty.proto +1 -2
- data/bin/x86_64-windows/google/protobuf/field_mask.proto +1 -1
- data/bin/x86_64-windows/google/protobuf/source_context.proto +1 -1
- data/bin/x86_64-windows/google/protobuf/struct.proto +4 -4
- data/bin/x86_64-windows/google/protobuf/timestamp.proto +2 -5
- data/bin/x86_64-windows/google/protobuf/type.proto +7 -1
- data/bin/x86_64-windows/google/protobuf/wrappers.proto +2 -2
- data/bin/x86_64-windows/grpc_ruby_plugin.exe +0 -0
- data/bin/x86_64-windows/protoc.exe +0 -0
- data/platform_check.rb +1 -1
- data/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7328915ff0b816bede4daa67a18a798bba523115c7a94382eb0c88085094f6ba
|
4
|
+
data.tar.gz: 2c6443f491ab1447866e6044966f0350f55ca9e879bc771600623d393d636889
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7b83fb4464db40d5392f003ee9bb14736215724e065cbe2582d186dc8b0af305a5a4cbe8ebd512d271f87330739e49f03c15c9dca67b7107cdae594591c17da
|
7
|
+
data.tar.gz: 75f97891f3487981a8de2bb11b8a1f982c30c0fa80629f59ee200dddb321556e3eda49fd6a275fc7fd56959c9c51e49376f6505da9d5e076ea9f85d3bf2bcc40
|
@@ -32,12 +32,12 @@ syntax = "proto3";
|
|
32
32
|
|
33
33
|
package google.protobuf;
|
34
34
|
|
35
|
-
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
36
35
|
option go_package = "google.golang.org/protobuf/types/known/anypb";
|
37
36
|
option java_package = "com.google.protobuf";
|
38
37
|
option java_outer_classname = "AnyProto";
|
39
38
|
option java_multiple_files = true;
|
40
39
|
option objc_class_prefix = "GPB";
|
40
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
41
41
|
|
42
42
|
// `Any` contains an arbitrary serialized protocol buffer message along with a
|
43
43
|
// URL that describes the type of the serialized message.
|
@@ -63,6 +63,10 @@ option objc_class_prefix = "GPB";
|
|
63
63
|
// if (any.is(Foo.class)) {
|
64
64
|
// foo = any.unpack(Foo.class);
|
65
65
|
// }
|
66
|
+
// // or ...
|
67
|
+
// if (any.isSameTypeAs(Foo.getDefaultInstance())) {
|
68
|
+
// foo = any.unpack(Foo.getDefaultInstance());
|
69
|
+
// }
|
66
70
|
//
|
67
71
|
// Example 3: Pack and unpack a message in Python.
|
68
72
|
//
|
@@ -93,7 +97,6 @@ option objc_class_prefix = "GPB";
|
|
93
97
|
// in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
94
98
|
// name "y.z".
|
95
99
|
//
|
96
|
-
//
|
97
100
|
// JSON
|
98
101
|
// ====
|
99
102
|
// The JSON representation of an `Any` value uses the regular
|
@@ -146,7 +149,8 @@ message Any {
|
|
146
149
|
//
|
147
150
|
// Note: this functionality is not currently available in the official
|
148
151
|
// protobuf release, and it is not used for type URLs beginning with
|
149
|
-
// type.googleapis.com.
|
152
|
+
// type.googleapis.com. As of May 2023, there are no widely used type server
|
153
|
+
// implementations and no plans to implement one.
|
150
154
|
//
|
151
155
|
// Schemes other than `http`, `https` (or the empty scheme) might be
|
152
156
|
// used with implementation specific semantics.
|
@@ -35,11 +35,11 @@ package google.protobuf;
|
|
35
35
|
import "google/protobuf/source_context.proto";
|
36
36
|
import "google/protobuf/type.proto";
|
37
37
|
|
38
|
-
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
39
38
|
option java_package = "com.google.protobuf";
|
40
39
|
option java_outer_classname = "ApiProto";
|
41
40
|
option java_multiple_files = true;
|
42
41
|
option objc_class_prefix = "GPB";
|
42
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
43
43
|
option go_package = "google.golang.org/protobuf/types/known/apipb";
|
44
44
|
|
45
45
|
// Api is a light-weight descriptor for an API Interface.
|
@@ -82,7 +82,6 @@ message Api {
|
|
82
82
|
// be omitted. Zero major versions must only be used for
|
83
83
|
// experimental, non-GA interfaces.
|
84
84
|
//
|
85
|
-
//
|
86
85
|
string version = 4;
|
87
86
|
|
88
87
|
// Source context for the protocol buffer service represented by this
|
@@ -167,7 +166,7 @@ message Method {
|
|
167
166
|
// The mixin construct implies that all methods in `AccessControl` are
|
168
167
|
// also declared with same name and request/response types in
|
169
168
|
// `Storage`. A documentation generator or annotation processor will
|
170
|
-
// see the effective `Storage.GetAcl` method after
|
169
|
+
// see the effective `Storage.GetAcl` method after inherting
|
171
170
|
// documentation and annotations as follows:
|
172
171
|
//
|
173
172
|
// service Storage {
|
@@ -30,9 +30,6 @@
|
|
30
30
|
|
31
31
|
// Author: kenton@google.com (Kenton Varda)
|
32
32
|
//
|
33
|
-
// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to
|
34
|
-
// change.
|
35
|
-
//
|
36
33
|
// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
|
37
34
|
// just a program that reads a CodeGeneratorRequest from stdin and writes a
|
38
35
|
// CodeGeneratorResponse to stdout.
|
@@ -50,6 +47,7 @@ package google.protobuf.compiler;
|
|
50
47
|
option java_package = "com.google.protobuf.compiler";
|
51
48
|
option java_outer_classname = "PluginProtos";
|
52
49
|
|
50
|
+
option csharp_namespace = "Google.Protobuf.Compiler";
|
53
51
|
option go_package = "google.golang.org/protobuf/types/pluginpb";
|
54
52
|
|
55
53
|
import "google/protobuf/descriptor.proto";
|
@@ -78,6 +76,11 @@ message CodeGeneratorRequest {
|
|
78
76
|
// they import. The files will appear in topological order, so each file
|
79
77
|
// appears before any file that imports it.
|
80
78
|
//
|
79
|
+
// Note: the files listed in files_to_generate will include runtime-retention
|
80
|
+
// options only, but all other files will include source-retention options.
|
81
|
+
// The source_file_descriptors field below is available in case you need
|
82
|
+
// source-retention options for files_to_generate.
|
83
|
+
//
|
81
84
|
// protoc guarantees that all proto_files will be written after
|
82
85
|
// the fields above, even though this is not technically guaranteed by the
|
83
86
|
// protobuf wire format. This theoretically could allow a plugin to stream
|
@@ -90,9 +93,13 @@ message CodeGeneratorRequest {
|
|
90
93
|
// fully qualified.
|
91
94
|
repeated FileDescriptorProto proto_file = 15;
|
92
95
|
|
96
|
+
// File descriptors with all options, including source-retention options.
|
97
|
+
// These descriptors are only provided for the files listed in
|
98
|
+
// files_to_generate.
|
99
|
+
repeated FileDescriptorProto source_file_descriptors = 17;
|
100
|
+
|
93
101
|
// The version number of protocol compiler.
|
94
102
|
optional Version compiler_version = 3;
|
95
|
-
|
96
103
|
}
|
97
104
|
|
98
105
|
// The plugin writes an encoded CodeGeneratorResponse to stdout.
|
@@ -115,6 +122,7 @@ message CodeGeneratorResponse {
|
|
115
122
|
enum Feature {
|
116
123
|
FEATURE_NONE = 0;
|
117
124
|
FEATURE_PROTO3_OPTIONAL = 1;
|
125
|
+
FEATURE_SUPPORTS_EDITIONS = 2;
|
118
126
|
}
|
119
127
|
|
120
128
|
// Represents a single generated file.
|
@@ -36,7 +36,6 @@
|
|
36
36
|
// A valid .proto file can be translated directly to a FileDescriptorProto
|
37
37
|
// without any other information (e.g. without reading its imports).
|
38
38
|
|
39
|
-
|
40
39
|
syntax = "proto2";
|
41
40
|
|
42
41
|
package google.protobuf;
|
@@ -86,8 +85,13 @@ message FileDescriptorProto {
|
|
86
85
|
optional SourceCodeInfo source_code_info = 9;
|
87
86
|
|
88
87
|
// The syntax of the proto file.
|
89
|
-
// The supported values are "proto2" and "
|
88
|
+
// The supported values are "proto2", "proto3", and "editions".
|
89
|
+
//
|
90
|
+
// If `edition` is present, this value must be "editions".
|
90
91
|
optional string syntax = 12;
|
92
|
+
|
93
|
+
// The edition of the proto file, which is an opaque string.
|
94
|
+
optional string edition = 13;
|
91
95
|
}
|
92
96
|
|
93
97
|
// Describes a message type.
|
@@ -129,6 +133,50 @@ message ExtensionRangeOptions {
|
|
129
133
|
// The parser stores options it doesn't recognize here. See above.
|
130
134
|
repeated UninterpretedOption uninterpreted_option = 999;
|
131
135
|
|
136
|
+
message Declaration {
|
137
|
+
// The extension number declared within the extension range.
|
138
|
+
optional int32 number = 1;
|
139
|
+
|
140
|
+
// The fully-qualified name of the extension field. There must be a leading
|
141
|
+
// dot in front of the full name.
|
142
|
+
optional string full_name = 2;
|
143
|
+
|
144
|
+
// The fully-qualified type name of the extension field. Unlike
|
145
|
+
// Metadata.type, Declaration.type must have a leading dot for messages
|
146
|
+
// and enums.
|
147
|
+
optional string type = 3;
|
148
|
+
|
149
|
+
// If true, indicates that the number is reserved in the extension range,
|
150
|
+
// and any extension field with the number will fail to compile. Set this
|
151
|
+
// when a declared extension field is deleted.
|
152
|
+
optional bool reserved = 5;
|
153
|
+
|
154
|
+
// If true, indicates that the extension must be defined as repeated.
|
155
|
+
// Otherwise the extension must be defined as optional.
|
156
|
+
optional bool repeated = 6;
|
157
|
+
|
158
|
+
reserved 4; // removed is_repeated
|
159
|
+
}
|
160
|
+
|
161
|
+
// For external users: DO NOT USE. We are in the process of open sourcing
|
162
|
+
// extension declaration and executing internal cleanups before it can be
|
163
|
+
// used externally.
|
164
|
+
repeated Declaration declaration = 2 [retention = RETENTION_SOURCE];
|
165
|
+
|
166
|
+
// Any features defined in the specific edition.
|
167
|
+
optional FeatureSet features = 50;
|
168
|
+
|
169
|
+
// The verification state of the extension range.
|
170
|
+
enum VerificationState {
|
171
|
+
// All the extensions of the range must be declared.
|
172
|
+
DECLARATION = 0;
|
173
|
+
UNVERIFIED = 1;
|
174
|
+
}
|
175
|
+
|
176
|
+
// The verification state of the range.
|
177
|
+
// TODO(b/278783756): flip the default to DECLARATION once all empty ranges
|
178
|
+
// are marked as UNVERIFIED.
|
179
|
+
optional VerificationState verification = 3 [default = UNVERIFIED];
|
132
180
|
|
133
181
|
// Clients can define custom options in extensions of this message. See above.
|
134
182
|
extensions 1000 to max;
|
@@ -199,7 +247,6 @@ message FieldDescriptorProto {
|
|
199
247
|
// For booleans, "true" or "false".
|
200
248
|
// For strings, contains the default text contents (not escaped in any way).
|
201
249
|
// For bytes, contains the C escaped value. All bytes >= 128 are escaped.
|
202
|
-
// TODO(kenton): Base-64 encode?
|
203
250
|
optional string default_value = 7;
|
204
251
|
|
205
252
|
// If set, gives the index of a oneof in the containing type's oneof_decl
|
@@ -306,7 +353,6 @@ message MethodDescriptorProto {
|
|
306
353
|
optional bool server_streaming = 6 [default = false];
|
307
354
|
}
|
308
355
|
|
309
|
-
|
310
356
|
// ===================================================================
|
311
357
|
// Options
|
312
358
|
|
@@ -347,7 +393,6 @@ message FileOptions {
|
|
347
393
|
// domain names.
|
348
394
|
optional string java_package = 1;
|
349
395
|
|
350
|
-
|
351
396
|
// Controls the name of the wrapper Java class generated for the .proto file.
|
352
397
|
// That class will always contain the .proto file's getDescriptor() method as
|
353
398
|
// well as any top-level extensions defined in the .proto file.
|
@@ -374,7 +419,6 @@ message FileOptions {
|
|
374
419
|
// This option has no effect on when used with the lite runtime.
|
375
420
|
optional bool java_string_check_utf8 = 27 [default = false];
|
376
421
|
|
377
|
-
|
378
422
|
// Generated classes can be optimized for speed or code size.
|
379
423
|
enum OptimizeMode {
|
380
424
|
SPEED = 1; // Generate complete code for parsing, serialization,
|
@@ -391,9 +435,6 @@ message FileOptions {
|
|
391
435
|
// - Otherwise, the basename of the .proto file, without extension.
|
392
436
|
optional string go_package = 11;
|
393
437
|
|
394
|
-
|
395
|
-
|
396
|
-
|
397
438
|
// Should generic services be generated in each language? "Generic" services
|
398
439
|
// are not specific to any particular RPC system. They are generated by the
|
399
440
|
// main code generators in each language (without additional plugins).
|
@@ -419,7 +460,6 @@ message FileOptions {
|
|
419
460
|
// only to generated classes for C++.
|
420
461
|
optional bool cc_enable_arenas = 31 [default = true];
|
421
462
|
|
422
|
-
|
423
463
|
// Sets the objective c class prefix which is prepended to all objective c
|
424
464
|
// generated classes from this .proto. There is no default.
|
425
465
|
optional string objc_class_prefix = 36;
|
@@ -452,6 +492,8 @@ message FileOptions {
|
|
452
492
|
// determining the ruby package.
|
453
493
|
optional string ruby_package = 45;
|
454
494
|
|
495
|
+
// Any features defined in the specific edition.
|
496
|
+
optional FeatureSet features = 50;
|
455
497
|
|
456
498
|
// The parser stores options it doesn't recognize here.
|
457
499
|
// See the documentation for the "Options" section above.
|
@@ -498,6 +540,10 @@ message MessageOptions {
|
|
498
540
|
|
499
541
|
reserved 4, 5, 6;
|
500
542
|
|
543
|
+
// NOTE: Do not set the option in .proto files. Always use the maps syntax
|
544
|
+
// instead. The option should only be implicitly set by the proto compiler
|
545
|
+
// parser.
|
546
|
+
//
|
501
547
|
// Whether the message is an automatically generated map entry type for the
|
502
548
|
// maps field.
|
503
549
|
//
|
@@ -515,15 +561,25 @@ message MessageOptions {
|
|
515
561
|
// use a native map in the target language to hold the keys and values.
|
516
562
|
// The reflection APIs in such implementations still need to work as
|
517
563
|
// if the field is a repeated message field.
|
518
|
-
//
|
519
|
-
// NOTE: Do not set the option in .proto files. Always use the maps syntax
|
520
|
-
// instead. The option should only be implicitly set by the proto compiler
|
521
|
-
// parser.
|
522
564
|
optional bool map_entry = 7;
|
523
565
|
|
524
566
|
reserved 8; // javalite_serializable
|
525
567
|
reserved 9; // javanano_as_lite
|
526
568
|
|
569
|
+
// Enable the legacy handling of JSON field name conflicts. This lowercases
|
570
|
+
// and strips underscored from the fields before comparison in proto3 only.
|
571
|
+
// The new behavior takes `json_name` into account and applies to proto2 as
|
572
|
+
// well.
|
573
|
+
//
|
574
|
+
// This should only be used as a temporary measure against broken builds due
|
575
|
+
// to the change in behavior for JSON field name conflicts.
|
576
|
+
//
|
577
|
+
// TODO(b/261750190) This is legacy behavior we plan to remove once downstream
|
578
|
+
// teams have had time to migrate.
|
579
|
+
optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];
|
580
|
+
|
581
|
+
// Any features defined in the specific edition.
|
582
|
+
optional FeatureSet features = 12;
|
527
583
|
|
528
584
|
// The parser stores options it doesn't recognize here. See above.
|
529
585
|
repeated UninterpretedOption uninterpreted_option = 999;
|
@@ -535,13 +591,21 @@ message MessageOptions {
|
|
535
591
|
message FieldOptions {
|
536
592
|
// The ctype option instructs the C++ code generator to use a different
|
537
593
|
// representation of the field than it normally would. See the specific
|
538
|
-
// options below. This option is
|
539
|
-
//
|
594
|
+
// options below. This option is only implemented to support use of
|
595
|
+
// [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
|
596
|
+
// type "bytes" in the open source release -- sorry, we'll try to include
|
597
|
+
// other types in a future version!
|
540
598
|
optional CType ctype = 1 [default = STRING];
|
541
599
|
enum CType {
|
542
600
|
// Default mode.
|
543
601
|
STRING = 0;
|
544
602
|
|
603
|
+
// The option [ctype=CORD] may be applied to a non-repeated field of type
|
604
|
+
// "bytes". It indicates that in C++, the data should be stored in a Cord
|
605
|
+
// instead of a string. For very large strings, this may reduce memory
|
606
|
+
// fragmentation. It may also allow better performance when parsing from a
|
607
|
+
// Cord, or when parsing with aliasing enabled, as the parsed Cord may then
|
608
|
+
// alias the original buffer.
|
545
609
|
CORD = 1;
|
546
610
|
|
547
611
|
STRING_PIECE = 2;
|
@@ -593,7 +657,6 @@ message FieldOptions {
|
|
593
657
|
// call from multiple threads concurrently, while non-const methods continue
|
594
658
|
// to require exclusive access.
|
595
659
|
//
|
596
|
-
//
|
597
660
|
// Note that implementations may choose not to check required fields within
|
598
661
|
// a lazy sub-message. That is, calling IsInitialized() on the outer message
|
599
662
|
// may return true even if the inner message has missing required fields.
|
@@ -604,8 +667,16 @@ message FieldOptions {
|
|
604
667
|
// implementation must either *always* check its required fields, or *never*
|
605
668
|
// check its required fields, regardless of whether or not the message has
|
606
669
|
// been parsed.
|
670
|
+
//
|
671
|
+
// As of May 2022, lazy verifies the contents of the byte stream during
|
672
|
+
// parsing. An invalid byte stream will cause the overall parsing to fail.
|
607
673
|
optional bool lazy = 5 [default = false];
|
608
674
|
|
675
|
+
// unverified_lazy does no correctness checks on the byte stream. This should
|
676
|
+
// only be used where lazy with verification is prohibitive for performance
|
677
|
+
// reasons.
|
678
|
+
optional bool unverified_lazy = 15 [default = false];
|
679
|
+
|
609
680
|
// Is this field deprecated?
|
610
681
|
// Depending on the target platform, this can emit Deprecated annotations
|
611
682
|
// for accessors, or it will be completely ignored; in the very least, this
|
@@ -615,6 +686,48 @@ message FieldOptions {
|
|
615
686
|
// For Google-internal migration only. Do not use.
|
616
687
|
optional bool weak = 10 [default = false];
|
617
688
|
|
689
|
+
// Indicate that the field value should not be printed out when using debug
|
690
|
+
// formats, e.g. when the field contains sensitive credentials.
|
691
|
+
optional bool debug_redact = 16 [default = false];
|
692
|
+
|
693
|
+
// If set to RETENTION_SOURCE, the option will be omitted from the binary.
|
694
|
+
// Note: as of January 2023, support for this is in progress and does not yet
|
695
|
+
// have an effect (b/264593489).
|
696
|
+
enum OptionRetention {
|
697
|
+
RETENTION_UNKNOWN = 0;
|
698
|
+
RETENTION_RUNTIME = 1;
|
699
|
+
RETENTION_SOURCE = 2;
|
700
|
+
}
|
701
|
+
|
702
|
+
optional OptionRetention retention = 17;
|
703
|
+
|
704
|
+
// This indicates the types of entities that the field may apply to when used
|
705
|
+
// as an option. If it is unset, then the field may be freely used as an
|
706
|
+
// option on any kind of entity. Note: as of January 2023, support for this is
|
707
|
+
// in progress and does not yet have an effect (b/264593489).
|
708
|
+
enum OptionTargetType {
|
709
|
+
TARGET_TYPE_UNKNOWN = 0;
|
710
|
+
TARGET_TYPE_FILE = 1;
|
711
|
+
TARGET_TYPE_EXTENSION_RANGE = 2;
|
712
|
+
TARGET_TYPE_MESSAGE = 3;
|
713
|
+
TARGET_TYPE_FIELD = 4;
|
714
|
+
TARGET_TYPE_ONEOF = 5;
|
715
|
+
TARGET_TYPE_ENUM = 6;
|
716
|
+
TARGET_TYPE_ENUM_ENTRY = 7;
|
717
|
+
TARGET_TYPE_SERVICE = 8;
|
718
|
+
TARGET_TYPE_METHOD = 9;
|
719
|
+
}
|
720
|
+
|
721
|
+
repeated OptionTargetType targets = 19;
|
722
|
+
|
723
|
+
message EditionDefault {
|
724
|
+
optional string edition = 1;
|
725
|
+
optional string value = 2; // Textproto value.
|
726
|
+
}
|
727
|
+
repeated EditionDefault edition_defaults = 20;
|
728
|
+
|
729
|
+
// Any features defined in the specific edition.
|
730
|
+
optional FeatureSet features = 21;
|
618
731
|
|
619
732
|
// The parser stores options it doesn't recognize here. See above.
|
620
733
|
repeated UninterpretedOption uninterpreted_option = 999;
|
@@ -622,10 +735,14 @@ message FieldOptions {
|
|
622
735
|
// Clients can define custom options in extensions of this message. See above.
|
623
736
|
extensions 1000 to max;
|
624
737
|
|
625
|
-
reserved 4;
|
738
|
+
reserved 4; // removed jtype
|
739
|
+
reserved 18; // reserve target, target_obsolete_do_not_use
|
626
740
|
}
|
627
741
|
|
628
742
|
message OneofOptions {
|
743
|
+
// Any features defined in the specific edition.
|
744
|
+
optional FeatureSet features = 1;
|
745
|
+
|
629
746
|
// The parser stores options it doesn't recognize here. See above.
|
630
747
|
repeated UninterpretedOption uninterpreted_option = 999;
|
631
748
|
|
@@ -647,6 +764,17 @@ message EnumOptions {
|
|
647
764
|
|
648
765
|
reserved 5; // javanano_as_lite
|
649
766
|
|
767
|
+
// Enable the legacy handling of JSON field name conflicts. This lowercases
|
768
|
+
// and strips underscored from the fields before comparison in proto3 only.
|
769
|
+
// The new behavior takes `json_name` into account and applies to proto2 as
|
770
|
+
// well.
|
771
|
+
// TODO(b/261750190) Remove this legacy behavior once downstream teams have
|
772
|
+
// had time to migrate.
|
773
|
+
optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];
|
774
|
+
|
775
|
+
// Any features defined in the specific edition.
|
776
|
+
optional FeatureSet features = 7;
|
777
|
+
|
650
778
|
// The parser stores options it doesn't recognize here. See above.
|
651
779
|
repeated UninterpretedOption uninterpreted_option = 999;
|
652
780
|
|
@@ -661,6 +789,14 @@ message EnumValueOptions {
|
|
661
789
|
// this is a formalization for deprecating enum values.
|
662
790
|
optional bool deprecated = 1 [default = false];
|
663
791
|
|
792
|
+
// Any features defined in the specific edition.
|
793
|
+
optional FeatureSet features = 2;
|
794
|
+
|
795
|
+
// Indicate that fields annotated with this enum value should not be printed
|
796
|
+
// out when using debug formats, e.g. when the field contains sensitive
|
797
|
+
// credentials.
|
798
|
+
optional bool debug_redact = 3 [default = false];
|
799
|
+
|
664
800
|
// The parser stores options it doesn't recognize here. See above.
|
665
801
|
repeated UninterpretedOption uninterpreted_option = 999;
|
666
802
|
|
@@ -670,6 +806,9 @@ message EnumValueOptions {
|
|
670
806
|
|
671
807
|
message ServiceOptions {
|
672
808
|
|
809
|
+
// Any features defined in the specific edition.
|
810
|
+
optional FeatureSet features = 34;
|
811
|
+
|
673
812
|
// Note: Field numbers 1 through 32 are reserved for Google's internal RPC
|
674
813
|
// framework. We apologize for hoarding these numbers to ourselves, but
|
675
814
|
// we were already using them long before we decided to release Protocol
|
@@ -712,6 +851,9 @@ message MethodOptions {
|
|
712
851
|
optional IdempotencyLevel idempotency_level = 34
|
713
852
|
[default = IDEMPOTENCY_UNKNOWN];
|
714
853
|
|
854
|
+
// Any features defined in the specific edition.
|
855
|
+
optional FeatureSet features = 35;
|
856
|
+
|
715
857
|
// The parser stores options it doesn't recognize here. See above.
|
716
858
|
repeated UninterpretedOption uninterpreted_option = 999;
|
717
859
|
|
@@ -719,7 +861,6 @@ message MethodOptions {
|
|
719
861
|
extensions 1000 to max;
|
720
862
|
}
|
721
863
|
|
722
|
-
|
723
864
|
// A message representing a option the parser does not recognize. This only
|
724
865
|
// appears in options protos created by the compiler::Parser class.
|
725
866
|
// DescriptorPool resolves these when building Descriptor objects. Therefore,
|
@@ -730,8 +871,8 @@ message UninterpretedOption {
|
|
730
871
|
// The name of the uninterpreted option. Each string represents a segment in
|
731
872
|
// a dot-separated name. is_extension is true iff a segment represents an
|
732
873
|
// extension (denoted with parentheses in options specs in .proto files).
|
733
|
-
// E.g.,{ ["foo", false], ["bar.baz", true], ["
|
734
|
-
// "foo.(bar.baz).
|
874
|
+
// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
|
875
|
+
// "foo.(bar.baz).moo".
|
735
876
|
message NamePart {
|
736
877
|
required string name_part = 1;
|
737
878
|
required bool is_extension = 2;
|
@@ -748,6 +889,99 @@ message UninterpretedOption {
|
|
748
889
|
optional string aggregate_value = 8;
|
749
890
|
}
|
750
891
|
|
892
|
+
// ===================================================================
|
893
|
+
// Features
|
894
|
+
|
895
|
+
// TODO(b/274655146) Enums in C++ gencode (and potentially other languages) are
|
896
|
+
// not well scoped. This means that each of the feature enums below can clash
|
897
|
+
// with each other. The short names we've chosen maximize call-site
|
898
|
+
// readability, but leave us very open to this scenario. A future feature will
|
899
|
+
// be designed and implemented to handle this, hopefully before we ever hit a
|
900
|
+
// conflict here.
|
901
|
+
message FeatureSet {
|
902
|
+
enum FieldPresence {
|
903
|
+
FIELD_PRESENCE_UNKNOWN = 0;
|
904
|
+
EXPLICIT = 1;
|
905
|
+
IMPLICIT = 2;
|
906
|
+
LEGACY_REQUIRED = 3;
|
907
|
+
}
|
908
|
+
optional FieldPresence field_presence = 1 [
|
909
|
+
retention = RETENTION_RUNTIME,
|
910
|
+
targets = TARGET_TYPE_FIELD,
|
911
|
+
targets = TARGET_TYPE_FILE,
|
912
|
+
edition_defaults = { edition: "2023", value: "EXPLICIT" }
|
913
|
+
];
|
914
|
+
|
915
|
+
enum EnumType {
|
916
|
+
ENUM_TYPE_UNKNOWN = 0;
|
917
|
+
OPEN = 1;
|
918
|
+
CLOSED = 2;
|
919
|
+
}
|
920
|
+
optional EnumType enum_type = 2 [
|
921
|
+
retention = RETENTION_RUNTIME,
|
922
|
+
targets = TARGET_TYPE_ENUM,
|
923
|
+
targets = TARGET_TYPE_FILE,
|
924
|
+
edition_defaults = { edition: "2023", value: "OPEN" }
|
925
|
+
];
|
926
|
+
|
927
|
+
enum RepeatedFieldEncoding {
|
928
|
+
REPEATED_FIELD_ENCODING_UNKNOWN = 0;
|
929
|
+
PACKED = 1;
|
930
|
+
EXPANDED = 2;
|
931
|
+
}
|
932
|
+
optional RepeatedFieldEncoding repeated_field_encoding = 3 [
|
933
|
+
retention = RETENTION_RUNTIME,
|
934
|
+
targets = TARGET_TYPE_FIELD,
|
935
|
+
targets = TARGET_TYPE_FILE,
|
936
|
+
edition_defaults = { edition: "2023", value: "PACKED" }
|
937
|
+
];
|
938
|
+
|
939
|
+
enum StringFieldValidation {
|
940
|
+
STRING_FIELD_VALIDATION_UNKNOWN = 0;
|
941
|
+
MANDATORY = 1;
|
942
|
+
HINT = 2;
|
943
|
+
NONE = 3;
|
944
|
+
}
|
945
|
+
optional StringFieldValidation string_field_validation = 4 [
|
946
|
+
retention = RETENTION_RUNTIME,
|
947
|
+
targets = TARGET_TYPE_FIELD,
|
948
|
+
targets = TARGET_TYPE_FILE,
|
949
|
+
edition_defaults = { edition: "2023", value: "MANDATORY" }
|
950
|
+
];
|
951
|
+
|
952
|
+
enum MessageEncoding {
|
953
|
+
MESSAGE_ENCODING_UNKNOWN = 0;
|
954
|
+
LENGTH_PREFIXED = 1;
|
955
|
+
DELIMITED = 2;
|
956
|
+
}
|
957
|
+
optional MessageEncoding message_encoding = 5 [
|
958
|
+
retention = RETENTION_RUNTIME,
|
959
|
+
targets = TARGET_TYPE_FIELD,
|
960
|
+
targets = TARGET_TYPE_FILE,
|
961
|
+
edition_defaults = { edition: "2023", value: "LENGTH_PREFIXED" }
|
962
|
+
];
|
963
|
+
|
964
|
+
enum JsonFormat {
|
965
|
+
JSON_FORMAT_UNKNOWN = 0;
|
966
|
+
ALLOW = 1;
|
967
|
+
LEGACY_BEST_EFFORT = 2;
|
968
|
+
}
|
969
|
+
optional JsonFormat json_format = 6 [
|
970
|
+
retention = RETENTION_RUNTIME,
|
971
|
+
targets = TARGET_TYPE_MESSAGE,
|
972
|
+
targets = TARGET_TYPE_ENUM,
|
973
|
+
targets = TARGET_TYPE_FILE,
|
974
|
+
edition_defaults = { edition: "2023", value: "ALLOW" }
|
975
|
+
];
|
976
|
+
|
977
|
+
optional FeatureSet raw_features = 999 [targets = TARGET_TYPE_UNKNOWN];
|
978
|
+
|
979
|
+
extensions 1000; // for Protobuf C++
|
980
|
+
extensions 1001; // for Protobuf Java
|
981
|
+
|
982
|
+
extensions 9995 to 9999; // For internal testing
|
983
|
+
}
|
984
|
+
|
751
985
|
// ===================================================================
|
752
986
|
// Optional source code info
|
753
987
|
|
@@ -803,8 +1037,8 @@ message SourceCodeInfo {
|
|
803
1037
|
// location.
|
804
1038
|
//
|
805
1039
|
// Each element is a field number or an index. They form a path from
|
806
|
-
// the root FileDescriptorProto to the place where the definition.
|
807
|
-
// example, this path:
|
1040
|
+
// the root FileDescriptorProto to the place where the definition occurs.
|
1041
|
+
// For example, this path:
|
808
1042
|
// [ 4, 3, 2, 7, 1 ]
|
809
1043
|
// refers to:
|
810
1044
|
// file.message_type(3) // 4, 3
|
@@ -858,13 +1092,13 @@ message SourceCodeInfo {
|
|
858
1092
|
// // Comment attached to baz.
|
859
1093
|
// // Another line attached to baz.
|
860
1094
|
//
|
861
|
-
// // Comment attached to
|
1095
|
+
// // Comment attached to moo.
|
862
1096
|
// //
|
863
|
-
// // Another line attached to
|
864
|
-
// optional double
|
1097
|
+
// // Another line attached to moo.
|
1098
|
+
// optional double moo = 4;
|
865
1099
|
//
|
866
1100
|
// // Detached comment for corge. This is not leading or trailing comments
|
867
|
-
// // to
|
1101
|
+
// // to moo or corge because there are blank lines separating it from
|
868
1102
|
// // both.
|
869
1103
|
//
|
870
1104
|
// // Detached comment for corge paragraph 2.
|
@@ -904,8 +1138,20 @@ message GeneratedCodeInfo {
|
|
904
1138
|
optional int32 begin = 3;
|
905
1139
|
|
906
1140
|
// Identifies the ending offset in bytes in the generated code that
|
907
|
-
// relates to the identified
|
1141
|
+
// relates to the identified object. The end offset should be one past
|
908
1142
|
// the last relevant byte (so the length of the text = end - begin).
|
909
1143
|
optional int32 end = 4;
|
1144
|
+
|
1145
|
+
// Represents the identified object's effect on the element in the original
|
1146
|
+
// .proto file.
|
1147
|
+
enum Semantic {
|
1148
|
+
// There is no effect or the effect is indescribable.
|
1149
|
+
NONE = 0;
|
1150
|
+
// The element is set or otherwise mutated.
|
1151
|
+
SET = 1;
|
1152
|
+
// An alias to the element is returned.
|
1153
|
+
ALIAS = 2;
|
1154
|
+
}
|
1155
|
+
optional Semantic semantic = 5;
|
910
1156
|
}
|
911
1157
|
}
|
@@ -32,13 +32,13 @@ syntax = "proto3";
|
|
32
32
|
|
33
33
|
package google.protobuf;
|
34
34
|
|
35
|
-
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
36
35
|
option cc_enable_arenas = true;
|
37
36
|
option go_package = "google.golang.org/protobuf/types/known/durationpb";
|
38
37
|
option java_package = "com.google.protobuf";
|
39
38
|
option java_outer_classname = "DurationProto";
|
40
39
|
option java_multiple_files = true;
|
41
40
|
option objc_class_prefix = "GPB";
|
41
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
42
42
|
|
43
43
|
// A Duration represents a signed, fixed-length span of time represented
|
44
44
|
// as a count of seconds and fractions of seconds at nanosecond
|
@@ -99,7 +99,6 @@ option objc_class_prefix = "GPB";
|
|
99
99
|
// be expressed in JSON format as "3.000000001s", and 3 seconds and 1
|
100
100
|
// microsecond should be expressed in JSON format as "3.000001s".
|
101
101
|
//
|
102
|
-
//
|
103
102
|
message Duration {
|
104
103
|
// Signed seconds of the span of time. Must be from -315,576,000,000
|
105
104
|
// to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
@@ -32,12 +32,12 @@ syntax = "proto3";
|
|
32
32
|
|
33
33
|
package google.protobuf;
|
34
34
|
|
35
|
-
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
36
35
|
option go_package = "google.golang.org/protobuf/types/known/emptypb";
|
37
36
|
option java_package = "com.google.protobuf";
|
38
37
|
option java_outer_classname = "EmptyProto";
|
39
38
|
option java_multiple_files = true;
|
40
39
|
option objc_class_prefix = "GPB";
|
40
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
41
41
|
option cc_enable_arenas = true;
|
42
42
|
|
43
43
|
// A generic empty message that you can re-use to avoid defining duplicated
|
@@ -48,5 +48,4 @@ option cc_enable_arenas = true;
|
|
48
48
|
// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
49
49
|
// }
|
50
50
|
//
|
51
|
-
// The JSON representation for `Empty` is empty JSON object `{}`.
|
52
51
|
message Empty {}
|