grpc-tools 1.54.3 → 1.55.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/bin/x86-linux/google/protobuf/any.proto +8 -5
  3. data/bin/x86-linux/google/protobuf/api.proto +2 -3
  4. data/bin/x86-linux/google/protobuf/compiler/plugin.proto +1 -4
  5. data/bin/x86-linux/google/protobuf/descriptor.proto +131 -24
  6. data/bin/x86-linux/google/protobuf/duration.proto +1 -2
  7. data/bin/x86-linux/google/protobuf/empty.proto +1 -1
  8. data/bin/x86-linux/google/protobuf/field_mask.proto +1 -1
  9. data/bin/x86-linux/google/protobuf/source_context.proto +1 -1
  10. data/bin/x86-linux/google/protobuf/struct.proto +2 -2
  11. data/bin/x86-linux/google/protobuf/timestamp.proto +2 -5
  12. data/bin/x86-linux/google/protobuf/type.proto +7 -1
  13. data/bin/x86-linux/google/protobuf/wrappers.proto +2 -2
  14. data/bin/x86-linux/grpc_ruby_plugin +0 -0
  15. data/bin/x86-linux/protoc +0 -0
  16. data/bin/x86-windows/google/protobuf/any.proto +8 -5
  17. data/bin/x86-windows/google/protobuf/api.proto +2 -3
  18. data/bin/x86-windows/google/protobuf/compiler/plugin.proto +1 -4
  19. data/bin/x86-windows/google/protobuf/descriptor.proto +131 -24
  20. data/bin/x86-windows/google/protobuf/duration.proto +1 -2
  21. data/bin/x86-windows/google/protobuf/empty.proto +1 -1
  22. data/bin/x86-windows/google/protobuf/field_mask.proto +1 -1
  23. data/bin/x86-windows/google/protobuf/source_context.proto +1 -1
  24. data/bin/x86-windows/google/protobuf/struct.proto +2 -2
  25. data/bin/x86-windows/google/protobuf/timestamp.proto +2 -5
  26. data/bin/x86-windows/google/protobuf/type.proto +7 -1
  27. data/bin/x86-windows/google/protobuf/wrappers.proto +2 -2
  28. data/bin/x86-windows/grpc_ruby_plugin.exe +0 -0
  29. data/bin/x86-windows/protoc.exe +0 -0
  30. data/bin/x86_64-linux/google/protobuf/any.proto +8 -5
  31. data/bin/x86_64-linux/google/protobuf/api.proto +2 -3
  32. data/bin/x86_64-linux/google/protobuf/compiler/plugin.proto +1 -4
  33. data/bin/x86_64-linux/google/protobuf/descriptor.proto +131 -24
  34. data/bin/x86_64-linux/google/protobuf/duration.proto +1 -2
  35. data/bin/x86_64-linux/google/protobuf/empty.proto +1 -1
  36. data/bin/x86_64-linux/google/protobuf/field_mask.proto +1 -1
  37. data/bin/x86_64-linux/google/protobuf/source_context.proto +1 -1
  38. data/bin/x86_64-linux/google/protobuf/struct.proto +2 -2
  39. data/bin/x86_64-linux/google/protobuf/timestamp.proto +2 -5
  40. data/bin/x86_64-linux/google/protobuf/type.proto +7 -1
  41. data/bin/x86_64-linux/google/protobuf/wrappers.proto +2 -2
  42. data/bin/x86_64-linux/grpc_ruby_plugin +0 -0
  43. data/bin/x86_64-linux/protoc +0 -0
  44. data/bin/x86_64-macos/google/protobuf/any.proto +8 -5
  45. data/bin/x86_64-macos/google/protobuf/api.proto +2 -3
  46. data/bin/x86_64-macos/google/protobuf/compiler/plugin.proto +1 -4
  47. data/bin/x86_64-macos/google/protobuf/descriptor.proto +131 -24
  48. data/bin/x86_64-macos/google/protobuf/duration.proto +1 -2
  49. data/bin/x86_64-macos/google/protobuf/empty.proto +1 -1
  50. data/bin/x86_64-macos/google/protobuf/field_mask.proto +1 -1
  51. data/bin/x86_64-macos/google/protobuf/source_context.proto +1 -1
  52. data/bin/x86_64-macos/google/protobuf/struct.proto +2 -2
  53. data/bin/x86_64-macos/google/protobuf/timestamp.proto +2 -5
  54. data/bin/x86_64-macos/google/protobuf/type.proto +7 -1
  55. data/bin/x86_64-macos/google/protobuf/wrappers.proto +2 -2
  56. data/bin/x86_64-macos/grpc_ruby_plugin +0 -0
  57. data/bin/x86_64-macos/protoc +0 -0
  58. data/bin/x86_64-windows/google/protobuf/any.proto +8 -5
  59. data/bin/x86_64-windows/google/protobuf/api.proto +2 -3
  60. data/bin/x86_64-windows/google/protobuf/compiler/plugin.proto +1 -4
  61. data/bin/x86_64-windows/google/protobuf/descriptor.proto +131 -24
  62. data/bin/x86_64-windows/google/protobuf/duration.proto +1 -2
  63. data/bin/x86_64-windows/google/protobuf/empty.proto +1 -1
  64. data/bin/x86_64-windows/google/protobuf/field_mask.proto +1 -1
  65. data/bin/x86_64-windows/google/protobuf/source_context.proto +1 -1
  66. data/bin/x86_64-windows/google/protobuf/struct.proto +2 -2
  67. data/bin/x86_64-windows/google/protobuf/timestamp.proto +2 -5
  68. data/bin/x86_64-windows/google/protobuf/type.proto +7 -1
  69. data/bin/x86_64-windows/google/protobuf/wrappers.proto +2 -2
  70. data/bin/x86_64-windows/grpc_ruby_plugin.exe +0 -0
  71. data/bin/x86_64-windows/protoc.exe +0 -0
  72. data/platform_check.rb +1 -1
  73. data/version.rb +1 -1
  74. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a92f4782a0a4b6a5b7d982cbe761bf0302371f21319146deda4f9808f17be39
4
- data.tar.gz: 5b8fdc05b2aa668628fa4ac8d8459c7fb098ca938eaf5816807c6cb0efc5283d
3
+ metadata.gz: 70f00b67a85c7805e7ebda295de4bf88b36b2b20cae61dce342dc6cc631ea426
4
+ data.tar.gz: d3f4158c1b2b9fff521fd1b370216b9aae1039f2a70cdcc135ab3971c369ae07
5
5
  SHA512:
6
- metadata.gz: 70b3401bce8ec931012c3a8fe68b435bd086930bbeae7cda89a8142db254d14b4d89bc2e6600c37b81fa8466819cc7064ccc0975bf34d83bb43846d1aadf5fd4
7
- data.tar.gz: ee959c262323f6c46a0410705a0de70da97366e0a325fd419f61413c0914248e88cb06272826b71c66674e4d6aec1c01e2bfe3a6bba718e43bb6b11459a20aa1
6
+ metadata.gz: ad4245a84e1fcbb97c5d8f42269b3228c4b1a48b5105e11f7a81339228715c63a35a442c32ae0c00dc26ad5146391af8394c2458dd8e92aec036ad6b1e72a28a
7
+ data.tar.gz: c05b852fe34e8c215b78fd1c3c1426186000c96d738949210753f8eb9bc527dcf4a30ce11794d1e634b5016cf006cb6fb47271290f912348fe82188006c17d3e
@@ -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,8 +63,12 @@ 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
- // Example 3: Pack and unpack a message in Python.
71
+ // Example 3: Pack and unpack a message in Python.
68
72
  //
69
73
  // foo = Foo(...)
70
74
  // any = Any()
@@ -74,7 +78,7 @@ option objc_class_prefix = "GPB";
74
78
  // any.Unpack(foo)
75
79
  // ...
76
80
  //
77
- // Example 4: Pack and unpack a message in Go
81
+ // Example 4: Pack and unpack a message in Go
78
82
  //
79
83
  // foo := &pb.Foo{...}
80
84
  // any, err := anypb.New(foo)
@@ -93,9 +97,8 @@ 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
100
103
  // representation of the deserialized, embedded message, with an
101
104
  // additional field `@type` which contains the type URL. Example:
@@ -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 inheriting
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";
@@ -92,7 +90,6 @@ message CodeGeneratorRequest {
92
90
 
93
91
  // The version number of protocol compiler.
94
92
  optional Version compiler_version = 3;
95
-
96
93
  }
97
94
 
98
95
  // The plugin writes an encoded CodeGeneratorResponse to stdout.
@@ -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 "proto3".
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,49 @@ 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
+ // Deprecated. Please use "repeated".
150
+ optional bool is_repeated = 4 [deprecated = true];
151
+
152
+ // If true, indicates that the number is reserved in the extension range,
153
+ // and any extension field with the number will fail to compile. Set this
154
+ // when a declared extension field is deleted.
155
+ optional bool reserved = 5;
156
+
157
+ // If true, indicates that the extension must be defined as repeated.
158
+ // Otherwise the extension must be defined as optional.
159
+ optional bool repeated = 6;
160
+ }
161
+
162
+ // go/protobuf-stripping-extension-declarations
163
+ // Like Metadata, but we use a repeated field to hold all extension
164
+ // declarations. This should avoid the size increases of transforming a large
165
+ // extension range into small ranges in generated binaries.
166
+ repeated Declaration declaration = 2 [retention = RETENTION_SOURCE];
167
+
168
+ // The verification state of the extension range.
169
+ enum VerificationState {
170
+ // All the extensions of the range must be declared.
171
+ DECLARATION = 0;
172
+ UNVERIFIED = 1;
173
+ }
174
+
175
+ // The verification state of the range.
176
+ // TODO(b/278783756): flip the default to DECLARATION once all empty ranges
177
+ // are marked as UNVERIFIED.
178
+ optional VerificationState verification = 3 [default = UNVERIFIED];
132
179
 
133
180
  // Clients can define custom options in extensions of this message. See above.
134
181
  extensions 1000 to max;
@@ -305,7 +352,6 @@ message MethodDescriptorProto {
305
352
  optional bool server_streaming = 6 [default = false];
306
353
  }
307
354
 
308
-
309
355
  // ===================================================================
310
356
  // Options
311
357
 
@@ -346,7 +392,6 @@ message FileOptions {
346
392
  // domain names.
347
393
  optional string java_package = 1;
348
394
 
349
-
350
395
  // Controls the name of the wrapper Java class generated for the .proto file.
351
396
  // That class will always contain the .proto file's getDescriptor() method as
352
397
  // well as any top-level extensions defined in the .proto file.
@@ -373,7 +418,6 @@ message FileOptions {
373
418
  // This option has no effect on when used with the lite runtime.
374
419
  optional bool java_string_check_utf8 = 27 [default = false];
375
420
 
376
-
377
421
  // Generated classes can be optimized for speed or code size.
378
422
  enum OptimizeMode {
379
423
  SPEED = 1; // Generate complete code for parsing, serialization,
@@ -390,9 +434,6 @@ message FileOptions {
390
434
  // - Otherwise, the basename of the .proto file, without extension.
391
435
  optional string go_package = 11;
392
436
 
393
-
394
-
395
-
396
437
  // Should generic services be generated in each language? "Generic" services
397
438
  // are not specific to any particular RPC system. They are generated by the
398
439
  // main code generators in each language (without additional plugins).
@@ -418,7 +459,6 @@ message FileOptions {
418
459
  // only to generated classes for C++.
419
460
  optional bool cc_enable_arenas = 31 [default = true];
420
461
 
421
-
422
462
  // Sets the objective c class prefix which is prepended to all objective c
423
463
  // generated classes from this .proto. There is no default.
424
464
  optional string objc_class_prefix = 36;
@@ -451,7 +491,6 @@ message FileOptions {
451
491
  // determining the ruby package.
452
492
  optional string ruby_package = 45;
453
493
 
454
-
455
494
  // The parser stores options it doesn't recognize here.
456
495
  // See the documentation for the "Options" section above.
457
496
  repeated UninterpretedOption uninterpreted_option = 999;
@@ -497,6 +536,10 @@ message MessageOptions {
497
536
 
498
537
  reserved 4, 5, 6;
499
538
 
539
+ // NOTE: Do not set the option in .proto files. Always use the maps syntax
540
+ // instead. The option should only be implicitly set by the proto compiler
541
+ // parser.
542
+ //
500
543
  // Whether the message is an automatically generated map entry type for the
501
544
  // maps field.
502
545
  //
@@ -514,15 +557,22 @@ message MessageOptions {
514
557
  // use a native map in the target language to hold the keys and values.
515
558
  // The reflection APIs in such implementations still need to work as
516
559
  // if the field is a repeated message field.
517
- //
518
- // NOTE: Do not set the option in .proto files. Always use the maps syntax
519
- // instead. The option should only be implicitly set by the proto compiler
520
- // parser.
521
560
  optional bool map_entry = 7;
522
561
 
523
562
  reserved 8; // javalite_serializable
524
563
  reserved 9; // javanano_as_lite
525
564
 
565
+ // Enable the legacy handling of JSON field name conflicts. This lowercases
566
+ // and strips underscored from the fields before comparison in proto3 only.
567
+ // The new behavior takes `json_name` into account and applies to proto2 as
568
+ // well.
569
+ //
570
+ // This should only be used as a temporary measure against broken builds due
571
+ // to the change in behavior for JSON field name conflicts.
572
+ //
573
+ // TODO(b/261750190) This is legacy behavior we plan to remove once downstream
574
+ // teams have had time to migrate.
575
+ optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];
526
576
 
527
577
  // The parser stores options it doesn't recognize here. See above.
528
578
  repeated UninterpretedOption uninterpreted_option = 999;
@@ -534,13 +584,21 @@ message MessageOptions {
534
584
  message FieldOptions {
535
585
  // The ctype option instructs the C++ code generator to use a different
536
586
  // representation of the field than it normally would. See the specific
537
- // options below. This option is not yet implemented in the open source
538
- // release -- sorry, we'll try to include it in a future version!
587
+ // options below. This option is only implemented to support use of
588
+ // [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
589
+ // type "bytes" in the open source release -- sorry, we'll try to include
590
+ // other types in a future version!
539
591
  optional CType ctype = 1 [default = STRING];
540
592
  enum CType {
541
593
  // Default mode.
542
594
  STRING = 0;
543
595
 
596
+ // The option [ctype=CORD] may be applied to a non-repeated field of type
597
+ // "bytes". It indicates that in C++, the data should be stored in a Cord
598
+ // instead of a string. For very large strings, this may reduce memory
599
+ // fragmentation. It may also allow better performance when parsing from a
600
+ // Cord, or when parsing with aliasing enabled, as the parsed Cord may then
601
+ // alias the original buffer.
544
602
  CORD = 1;
545
603
 
546
604
  STRING_PIECE = 2;
@@ -592,7 +650,6 @@ message FieldOptions {
592
650
  // call from multiple threads concurrently, while non-const methods continue
593
651
  // to require exclusive access.
594
652
  //
595
- //
596
653
  // Note that implementations may choose not to check required fields within
597
654
  // a lazy sub-message. That is, calling IsInitialized() on the outer message
598
655
  // may return true even if the inner message has missing required fields.
@@ -604,11 +661,8 @@ message FieldOptions {
604
661
  // check its required fields, regardless of whether or not the message has
605
662
  // been parsed.
606
663
  //
607
- // As of 2021, lazy does no correctness checks on the byte stream during
608
- // parsing. This may lead to crashes if and when an invalid byte stream is
609
- // finally parsed upon access.
610
- //
611
- // TODO(b/211906113): Enable validation on lazy fields.
664
+ // As of May 2022, lazy verifies the contents of the byte stream during
665
+ // parsing. An invalid byte stream will cause the overall parsing to fail.
612
666
  optional bool lazy = 5 [default = false];
613
667
 
614
668
  // unverified_lazy does no correctness checks on the byte stream. This should
@@ -625,6 +679,40 @@ message FieldOptions {
625
679
  // For Google-internal migration only. Do not use.
626
680
  optional bool weak = 10 [default = false];
627
681
 
682
+ // Indicate that the field value should not be printed out when using debug
683
+ // formats, e.g. when the field contains sensitive credentials.
684
+ optional bool debug_redact = 16 [default = false];
685
+
686
+ // If set to RETENTION_SOURCE, the option will be omitted from the binary.
687
+ // Note: as of January 2023, support for this is in progress and does not yet
688
+ // have an effect (b/264593489).
689
+ enum OptionRetention {
690
+ RETENTION_UNKNOWN = 0;
691
+ RETENTION_RUNTIME = 1;
692
+ RETENTION_SOURCE = 2;
693
+ }
694
+
695
+ optional OptionRetention retention = 17;
696
+
697
+ // This indicates the types of entities that the field may apply to when used
698
+ // as an option. If it is unset, then the field may be freely used as an
699
+ // option on any kind of entity. Note: as of January 2023, support for this is
700
+ // in progress and does not yet have an effect (b/264593489).
701
+ enum OptionTargetType {
702
+ TARGET_TYPE_UNKNOWN = 0;
703
+ TARGET_TYPE_FILE = 1;
704
+ TARGET_TYPE_EXTENSION_RANGE = 2;
705
+ TARGET_TYPE_MESSAGE = 3;
706
+ TARGET_TYPE_FIELD = 4;
707
+ TARGET_TYPE_ONEOF = 5;
708
+ TARGET_TYPE_ENUM = 6;
709
+ TARGET_TYPE_ENUM_ENTRY = 7;
710
+ TARGET_TYPE_SERVICE = 8;
711
+ TARGET_TYPE_METHOD = 9;
712
+ }
713
+
714
+ optional OptionTargetType target = 18 [deprecated = true];
715
+ repeated OptionTargetType targets = 19;
628
716
 
629
717
  // The parser stores options it doesn't recognize here. See above.
630
718
  repeated UninterpretedOption uninterpreted_option = 999;
@@ -657,6 +745,14 @@ message EnumOptions {
657
745
 
658
746
  reserved 5; // javanano_as_lite
659
747
 
748
+ // Enable the legacy handling of JSON field name conflicts. This lowercases
749
+ // and strips underscored from the fields before comparison in proto3 only.
750
+ // The new behavior takes `json_name` into account and applies to proto2 as
751
+ // well.
752
+ // TODO(b/261750190) Remove this legacy behavior once downstream teams have
753
+ // had time to migrate.
754
+ optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];
755
+
660
756
  // The parser stores options it doesn't recognize here. See above.
661
757
  repeated UninterpretedOption uninterpreted_option = 999;
662
758
 
@@ -729,7 +825,6 @@ message MethodOptions {
729
825
  extensions 1000 to max;
730
826
  }
731
827
 
732
-
733
828
  // A message representing a option the parser does not recognize. This only
734
829
  // appears in options protos created by the compiler::Parser class.
735
830
  // DescriptorPool resolves these when building Descriptor objects. Therefore,
@@ -914,8 +1009,20 @@ message GeneratedCodeInfo {
914
1009
  optional int32 begin = 3;
915
1010
 
916
1011
  // Identifies the ending offset in bytes in the generated code that
917
- // relates to the identified offset. The end offset should be one past
1012
+ // relates to the identified object. The end offset should be one past
918
1013
  // the last relevant byte (so the length of the text = end - begin).
919
1014
  optional int32 end = 4;
1015
+
1016
+ // Represents the identified object's effect on the element in the original
1017
+ // .proto file.
1018
+ enum Semantic {
1019
+ // There is no effect or the effect is indescribable.
1020
+ NONE = 0;
1021
+ // The element is set or otherwise mutated.
1022
+ SET = 1;
1023
+ // An alias to the element is returned.
1024
+ ALIAS = 2;
1025
+ }
1026
+ optional Semantic semantic = 5;
920
1027
  }
921
1028
  }
@@ -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
@@ -32,11 +32,11 @@ syntax = "proto3";
32
32
 
33
33
  package google.protobuf;
34
34
 
35
- option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
35
  option java_package = "com.google.protobuf";
37
36
  option java_outer_classname = "FieldMaskProto";
38
37
  option java_multiple_files = true;
39
38
  option objc_class_prefix = "GPB";
39
+ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
40
40
  option go_package = "google.golang.org/protobuf/types/known/fieldmaskpb";
41
41
  option cc_enable_arenas = true;
42
42
 
@@ -32,11 +32,11 @@ syntax = "proto3";
32
32
 
33
33
  package google.protobuf;
34
34
 
35
- option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
35
  option java_package = "com.google.protobuf";
37
36
  option java_outer_classname = "SourceContextProto";
38
37
  option java_multiple_files = true;
39
38
  option objc_class_prefix = "GPB";
39
+ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
40
40
  option go_package = "google.golang.org/protobuf/types/known/sourcecontextpb";
41
41
 
42
42
  // `SourceContext` represents information about the source of a
@@ -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/structpb";
38
37
  option java_package = "com.google.protobuf";
39
38
  option java_outer_classname = "StructProto";
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
  // `Struct` represents a structured data value, consisting of fields
44
44
  // which map to dynamically typed values. In some languages, `Struct`
@@ -80,7 +80,7 @@ message Value {
80
80
  // `NullValue` is a singleton enumeration to represent the null value for the
81
81
  // `Value` type union.
82
82
  //
83
- // The JSON representation for `NullValue` is JSON `null`.
83
+ // The JSON representation for `NullValue` is JSON `null`.
84
84
  enum NullValue {
85
85
  // Null value.
86
86
  NULL_VALUE = 0;
@@ -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/timestamppb";
38
37
  option java_package = "com.google.protobuf";
39
38
  option java_outer_classname = "TimestampProto";
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 Timestamp represents a point in time independent of any time zone or local
44
44
  // calendar, encoded as a count of seconds and fractions of seconds at
@@ -90,7 +90,6 @@ option objc_class_prefix = "GPB";
90
90
  // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
91
91
  // .setNanos((int) ((millis % 1000) * 1000000)).build();
92
92
  //
93
- //
94
93
  // Example 5: Compute Timestamp from Java `Instant.now()`.
95
94
  //
96
95
  // Instant now = Instant.now();
@@ -99,7 +98,6 @@ option objc_class_prefix = "GPB";
99
98
  // Timestamp.newBuilder().setSeconds(now.getEpochSecond())
100
99
  // .setNanos(now.getNano()).build();
101
100
  //
102
- //
103
101
  // Example 6: Compute Timestamp from current time in Python.
104
102
  //
105
103
  // timestamp = Timestamp()
@@ -129,10 +127,9 @@ option objc_class_prefix = "GPB";
129
127
  // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
130
128
  // the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
131
129
  // the Joda Time's [`ISODateTimeFormat.dateTime()`](
132
- // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
130
+ // http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
133
131
  // ) to obtain a formatter capable of generating timestamps in this format.
134
132
  //
135
- //
136
133
  message Timestamp {
137
134
  // Represents seconds of UTC time since Unix epoch
138
135
  // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
@@ -35,12 +35,12 @@ package google.protobuf;
35
35
  import "google/protobuf/any.proto";
36
36
  import "google/protobuf/source_context.proto";
37
37
 
38
- option csharp_namespace = "Google.Protobuf.WellKnownTypes";
39
38
  option cc_enable_arenas = true;
40
39
  option java_package = "com.google.protobuf";
41
40
  option java_outer_classname = "TypeProto";
42
41
  option java_multiple_files = true;
43
42
  option objc_class_prefix = "GPB";
43
+ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
44
44
  option go_package = "google.golang.org/protobuf/types/known/typepb";
45
45
 
46
46
  // A protocol buffer message type.
@@ -57,6 +57,8 @@ message Type {
57
57
  SourceContext source_context = 5;
58
58
  // The source syntax.
59
59
  Syntax syntax = 6;
60
+ // The source edition string, only valid when syntax is SYNTAX_EDITIONS.
61
+ string edition = 7;
60
62
  }
61
63
 
62
64
  // A single field of a message type.
@@ -151,6 +153,8 @@ message Enum {
151
153
  SourceContext source_context = 4;
152
154
  // The source syntax.
153
155
  Syntax syntax = 5;
156
+ // The source edition string, only valid when syntax is SYNTAX_EDITIONS.
157
+ string edition = 6;
154
158
  }
155
159
 
156
160
  // Enum value definition.
@@ -184,4 +188,6 @@ enum Syntax {
184
188
  SYNTAX_PROTO2 = 0;
185
189
  // Syntax `proto3`.
186
190
  SYNTAX_PROTO3 = 1;
191
+ // Syntax `editions`.
192
+ SYNTAX_EDITIONS = 2;
187
193
  }
@@ -27,7 +27,7 @@
27
27
  // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
28
  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
29
  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
-
30
+ //
31
31
  // Wrappers for primitive (non-message) types. These types are useful
32
32
  // for embedding primitives in the `google.protobuf.Any` type and for places
33
33
  // where we need to distinguish between the absence of a primitive
@@ -42,13 +42,13 @@ syntax = "proto3";
42
42
 
43
43
  package google.protobuf;
44
44
 
45
- option csharp_namespace = "Google.Protobuf.WellKnownTypes";
46
45
  option cc_enable_arenas = true;
47
46
  option go_package = "google.golang.org/protobuf/types/known/wrapperspb";
48
47
  option java_package = "com.google.protobuf";
49
48
  option java_outer_classname = "WrappersProto";
50
49
  option java_multiple_files = true;
51
50
  option objc_class_prefix = "GPB";
51
+ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
52
52
 
53
53
  // Wrapper message for `double`.
54
54
  //
Binary file
data/bin/x86-linux/protoc CHANGED
Binary file
@@ -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,8 +63,12 @@ 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
- // Example 3: Pack and unpack a message in Python.
71
+ // Example 3: Pack and unpack a message in Python.
68
72
  //
69
73
  // foo = Foo(...)
70
74
  // any = Any()
@@ -74,7 +78,7 @@ option objc_class_prefix = "GPB";
74
78
  // any.Unpack(foo)
75
79
  // ...
76
80
  //
77
- // Example 4: Pack and unpack a message in Go
81
+ // Example 4: Pack and unpack a message in Go
78
82
  //
79
83
  // foo := &pb.Foo{...}
80
84
  // any, err := anypb.New(foo)
@@ -93,9 +97,8 @@ 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
100
103
  // representation of the deserialized, embedded message, with an
101
104
  // additional field `@type` which contains the type URL. Example: