grpc-tools 1.34.0 → 1.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/bin/x86-linux/google/protobuf/any.proto +6 -3
  3. data/bin/x86-linux/google/protobuf/api.proto +2 -4
  4. data/bin/x86-linux/google/protobuf/compiler/plugin.proto +6 -1
  5. data/bin/x86-linux/google/protobuf/descriptor.proto +11 -9
  6. data/bin/x86-linux/google/protobuf/duration.proto +1 -1
  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 +1 -1
  11. data/bin/x86-linux/google/protobuf/timestamp.proto +11 -2
  12. data/bin/x86-linux/google/protobuf/type.proto +2 -2
  13. data/bin/x86-linux/google/protobuf/wrappers.proto +1 -1
  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 +6 -3
  17. data/bin/x86-windows/google/protobuf/api.proto +2 -4
  18. data/bin/x86-windows/google/protobuf/compiler/plugin.proto +6 -1
  19. data/bin/x86-windows/google/protobuf/descriptor.proto +11 -9
  20. data/bin/x86-windows/google/protobuf/duration.proto +1 -1
  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 +1 -1
  25. data/bin/x86-windows/google/protobuf/timestamp.proto +11 -2
  26. data/bin/x86-windows/google/protobuf/type.proto +2 -2
  27. data/bin/x86-windows/google/protobuf/wrappers.proto +1 -1
  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 +6 -3
  31. data/bin/x86_64-linux/google/protobuf/api.proto +2 -4
  32. data/bin/x86_64-linux/google/protobuf/compiler/plugin.proto +6 -1
  33. data/bin/x86_64-linux/google/protobuf/descriptor.proto +11 -9
  34. data/bin/x86_64-linux/google/protobuf/duration.proto +1 -1
  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 +1 -1
  39. data/bin/x86_64-linux/google/protobuf/timestamp.proto +11 -2
  40. data/bin/x86_64-linux/google/protobuf/type.proto +2 -2
  41. data/bin/x86_64-linux/google/protobuf/wrappers.proto +1 -1
  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 +6 -3
  45. data/bin/x86_64-macos/google/protobuf/api.proto +2 -4
  46. data/bin/x86_64-macos/google/protobuf/compiler/plugin.proto +6 -1
  47. data/bin/x86_64-macos/google/protobuf/descriptor.proto +11 -9
  48. data/bin/x86_64-macos/google/protobuf/duration.proto +1 -1
  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 +1 -1
  53. data/bin/x86_64-macos/google/protobuf/timestamp.proto +11 -2
  54. data/bin/x86_64-macos/google/protobuf/type.proto +2 -2
  55. data/bin/x86_64-macos/google/protobuf/wrappers.proto +1 -1
  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 +6 -3
  59. data/bin/x86_64-windows/google/protobuf/api.proto +2 -4
  60. data/bin/x86_64-windows/google/protobuf/compiler/plugin.proto +6 -1
  61. data/bin/x86_64-windows/google/protobuf/descriptor.proto +11 -9
  62. data/bin/x86_64-windows/google/protobuf/duration.proto +1 -1
  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 +1 -1
  67. data/bin/x86_64-windows/google/protobuf/timestamp.proto +11 -2
  68. data/bin/x86_64-windows/google/protobuf/type.proto +2 -2
  69. data/bin/x86_64-windows/google/protobuf/wrappers.proto +1 -1
  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 +6 -1
  73. data/version.rb +1 -1
  74. metadata +2 -16
  75. data/bin/x86-macos/google/protobuf/any.proto +0 -155
  76. data/bin/x86-macos/google/protobuf/api.proto +0 -210
  77. data/bin/x86-macos/google/protobuf/compiler/plugin.proto +0 -178
  78. data/bin/x86-macos/google/protobuf/descriptor.proto +0 -909
  79. data/bin/x86-macos/google/protobuf/duration.proto +0 -116
  80. data/bin/x86-macos/google/protobuf/empty.proto +0 -52
  81. data/bin/x86-macos/google/protobuf/field_mask.proto +0 -245
  82. data/bin/x86-macos/google/protobuf/source_context.proto +0 -48
  83. data/bin/x86-macos/google/protobuf/struct.proto +0 -95
  84. data/bin/x86-macos/google/protobuf/timestamp.proto +0 -138
  85. data/bin/x86-macos/google/protobuf/type.proto +0 -187
  86. data/bin/x86-macos/google/protobuf/wrappers.proto +0 -123
  87. data/bin/x86-macos/grpc_ruby_plugin +0 -0
  88. data/bin/x86-macos/protoc +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69483f293df53d63a0a3d2de3e95bdf54201de8ad6eba876305feb32c7ca87ad
4
- data.tar.gz: 12eb4b802942a6e3bbc39071acb1854da9679930fbdd3d7763b6787e9125ef89
3
+ metadata.gz: 60d9a98ed0133a881d37015dba8366e237da751be6b9089c3bc2f848f2840f5c
4
+ data.tar.gz: 4619974ab15028383c6117e2aa6a1a8b5530dd9695ae8c4272f0770c64d0e94a
5
5
  SHA512:
6
- metadata.gz: 91231e667370917bbaf4066eedd536e24240a7b2bc408d14375a7cc1e69d51744a44999c810643f3d47367967df020eb4c3dd419748f821fc38aef3735fd427b
7
- data.tar.gz: 621aa76bddcba13215362cc3c1957e1c6f18aeef6aa0c3a9b24a68422e251f93e100d3b07664d5567264d2537705c7d96e840a32cca3b811c8ff008622313b4e
6
+ metadata.gz: 95412aa5499cea8bf59896d961035325faa822fb1ba498e414b3f4ace775a187f30df3d5c3217a4bb268b57d281cbf4a6c7d0bedb2602b8bcdf0116cfa313b31
7
+ data.tar.gz: d38556b54714270fab02a3061ba7528b6efd3e1d43b8a68d16164892ace7ba74d58c933a475f28299ac8c846b7655e73cc07fd058af79a544c89c1696f4f8c17
@@ -33,7 +33,7 @@ syntax = "proto3";
33
33
  package google.protobuf;
34
34
 
35
35
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
- option go_package = "github.com/golang/protobuf/ptypes/any";
36
+ option go_package = "google.golang.org/protobuf/types/known/anypb";
37
37
  option java_package = "com.google.protobuf";
38
38
  option java_outer_classname = "AnyProto";
39
39
  option java_multiple_files = true;
@@ -77,10 +77,13 @@ option objc_class_prefix = "GPB";
77
77
  // Example 4: Pack and unpack a message in Go
78
78
  //
79
79
  // foo := &pb.Foo{...}
80
- // any, err := ptypes.MarshalAny(foo)
80
+ // any, err := anypb.New(foo)
81
+ // if err != nil {
82
+ // ...
83
+ // }
81
84
  // ...
82
85
  // foo := &pb.Foo{}
83
- // if err := ptypes.UnmarshalAny(any, foo); err != nil {
86
+ // if err := any.UnmarshalTo(foo); err != nil {
84
87
  // ...
85
88
  // }
86
89
  //
@@ -40,7 +40,7 @@ option java_package = "com.google.protobuf";
40
40
  option java_outer_classname = "ApiProto";
41
41
  option java_multiple_files = true;
42
42
  option objc_class_prefix = "GPB";
43
- option go_package = "google.golang.org/genproto/protobuf/api;api";
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.
46
46
  //
@@ -52,7 +52,6 @@ option go_package = "google.golang.org/genproto/protobuf/api;api";
52
52
  // this message itself. See https://cloud.google.com/apis/design/glossary for
53
53
  // detailed terminology.
54
54
  message Api {
55
-
56
55
  // The fully qualified name of this interface, including package name
57
56
  // followed by the interface's simple name.
58
57
  string name = 1;
@@ -99,7 +98,6 @@ message Api {
99
98
 
100
99
  // Method represents a method of an API interface.
101
100
  message Method {
102
-
103
101
  // The simple name of this method.
104
102
  string name = 1;
105
103
 
@@ -169,7 +167,7 @@ message Method {
169
167
  // The mixin construct implies that all methods in `AccessControl` are
170
168
  // also declared with same name and request/response types in
171
169
  // `Storage`. A documentation generator or annotation processor will
172
- // see the effective `Storage.GetAcl` method after inherting
170
+ // see the effective `Storage.GetAcl` method after inheriting
173
171
  // documentation and annotations as follows:
174
172
  //
175
173
  // service Storage {
@@ -50,7 +50,7 @@ package google.protobuf.compiler;
50
50
  option java_package = "com.google.protobuf.compiler";
51
51
  option java_outer_classname = "PluginProtos";
52
52
 
53
- option go_package = "github.com/golang/protobuf/protoc-gen-go/plugin;plugin_go";
53
+ option go_package = "google.golang.org/protobuf/types/pluginpb";
54
54
 
55
55
  import "google/protobuf/descriptor.proto";
56
56
 
@@ -173,6 +173,11 @@ message CodeGeneratorResponse {
173
173
 
174
174
  // The file contents.
175
175
  optional string content = 15;
176
+
177
+ // Information describing the file content being inserted. If an insertion
178
+ // point is used, this information will be appropriately offset and inserted
179
+ // into the code generation metadata for the generated files.
180
+ optional GeneratedCodeInfo generated_code_info = 16;
176
181
  }
177
182
  repeated File file = 15;
178
183
  }
@@ -41,7 +41,7 @@ syntax = "proto2";
41
41
 
42
42
  package google.protobuf;
43
43
 
44
- option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor";
44
+ option go_package = "google.golang.org/protobuf/types/descriptorpb";
45
45
  option java_package = "com.google.protobuf";
46
46
  option java_outer_classname = "DescriptorProtos";
47
47
  option csharp_namespace = "Google.Protobuf.Reflection";
@@ -348,17 +348,17 @@ message FileOptions {
348
348
  optional string java_package = 1;
349
349
 
350
350
 
351
- // If set, all the classes from the .proto file are wrapped in a single
352
- // outer class with the given name. This applies to both Proto1
353
- // (equivalent to the old "--one_java_file" option) and Proto2 (where
354
- // a .proto always translates to a single class, but you may want to
355
- // explicitly choose the class name).
351
+ // Controls the name of the wrapper Java class generated for the .proto file.
352
+ // That class will always contain the .proto file's getDescriptor() method as
353
+ // well as any top-level extensions defined in the .proto file.
354
+ // If java_multiple_files is disabled, then all the other classes from the
355
+ // .proto file will be nested inside the single wrapper outer class.
356
356
  optional string java_outer_classname = 8;
357
357
 
358
- // If set true, then the Java code generator will generate a separate .java
358
+ // If enabled, then the Java code generator will generate a separate .java
359
359
  // file for each top-level message, enum, and service defined in the .proto
360
- // file. Thus, these types will *not* be nested inside the outer class
361
- // named by java_outer_classname. However, the outer class will still be
360
+ // file. Thus, these types will *not* be nested inside the wrapper class
361
+ // named by java_outer_classname. However, the wrapper class will still be
362
362
  // generated to contain the file's getDescriptor() method as well as any
363
363
  // top-level extensions defined in the file.
364
364
  optional bool java_multiple_files = 10 [default = false];
@@ -496,6 +496,8 @@ message MessageOptions {
496
496
  // this is a formalization for deprecating messages.
497
497
  optional bool deprecated = 3 [default = false];
498
498
 
499
+ reserved 4, 5, 6;
500
+
499
501
  // Whether the message is an automatically generated map entry type for the
500
502
  // maps field.
501
503
  //
@@ -34,7 +34,7 @@ package google.protobuf;
34
34
 
35
35
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
36
  option cc_enable_arenas = true;
37
- option go_package = "github.com/golang/protobuf/ptypes/duration";
37
+ option go_package = "google.golang.org/protobuf/types/known/durationpb";
38
38
  option java_package = "com.google.protobuf";
39
39
  option java_outer_classname = "DurationProto";
40
40
  option java_multiple_files = true;
@@ -33,7 +33,7 @@ syntax = "proto3";
33
33
  package google.protobuf;
34
34
 
35
35
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
- option go_package = "github.com/golang/protobuf/ptypes/empty";
36
+ option go_package = "google.golang.org/protobuf/types/known/emptypb";
37
37
  option java_package = "com.google.protobuf";
38
38
  option java_outer_classname = "EmptyProto";
39
39
  option java_multiple_files = true;
@@ -37,7 +37,7 @@ option java_package = "com.google.protobuf";
37
37
  option java_outer_classname = "FieldMaskProto";
38
38
  option java_multiple_files = true;
39
39
  option objc_class_prefix = "GPB";
40
- option go_package = "google.golang.org/genproto/protobuf/field_mask;field_mask";
40
+ option go_package = "google.golang.org/protobuf/types/known/fieldmaskpb";
41
41
  option cc_enable_arenas = true;
42
42
 
43
43
  // `FieldMask` represents a set of symbolic field paths, for example:
@@ -37,7 +37,7 @@ option java_package = "com.google.protobuf";
37
37
  option java_outer_classname = "SourceContextProto";
38
38
  option java_multiple_files = true;
39
39
  option objc_class_prefix = "GPB";
40
- option go_package = "google.golang.org/genproto/protobuf/source_context;source_context";
40
+ option go_package = "google.golang.org/protobuf/types/known/sourcecontextpb";
41
41
 
42
42
  // `SourceContext` represents information about the source of a
43
43
  // protobuf element, like the file in which it is defined.
@@ -34,7 +34,7 @@ package google.protobuf;
34
34
 
35
35
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
36
  option cc_enable_arenas = true;
37
- option go_package = "github.com/golang/protobuf/ptypes/struct;structpb";
37
+ option go_package = "google.golang.org/protobuf/types/known/structpb";
38
38
  option java_package = "com.google.protobuf";
39
39
  option java_outer_classname = "StructProto";
40
40
  option java_multiple_files = true;
@@ -34,7 +34,7 @@ package google.protobuf;
34
34
 
35
35
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
36
  option cc_enable_arenas = true;
37
- option go_package = "github.com/golang/protobuf/ptypes/timestamp";
37
+ option go_package = "google.golang.org/protobuf/types/known/timestamppb";
38
38
  option java_package = "com.google.protobuf";
39
39
  option java_outer_classname = "TimestampProto";
40
40
  option java_multiple_files = true;
@@ -91,7 +91,16 @@ option objc_class_prefix = "GPB";
91
91
  // .setNanos((int) ((millis % 1000) * 1000000)).build();
92
92
  //
93
93
  //
94
- // Example 5: Compute Timestamp from current time in Python.
94
+ // Example 5: Compute Timestamp from Java `Instant.now()`.
95
+ //
96
+ // Instant now = Instant.now();
97
+ //
98
+ // Timestamp timestamp =
99
+ // Timestamp.newBuilder().setSeconds(now.getEpochSecond())
100
+ // .setNanos(now.getNano()).build();
101
+ //
102
+ //
103
+ // Example 6: Compute Timestamp from current time in Python.
95
104
  //
96
105
  // timestamp = Timestamp()
97
106
  // timestamp.GetCurrentTime()
@@ -41,7 +41,7 @@ option java_package = "com.google.protobuf";
41
41
  option java_outer_classname = "TypeProto";
42
42
  option java_multiple_files = true;
43
43
  option objc_class_prefix = "GPB";
44
- option go_package = "google.golang.org/genproto/protobuf/ptype;ptype";
44
+ option go_package = "google.golang.org/protobuf/types/known/typepb";
45
45
 
46
46
  // A protocol buffer message type.
47
47
  message Type {
@@ -113,7 +113,7 @@ message Field {
113
113
  CARDINALITY_REQUIRED = 2;
114
114
  // For repeated fields.
115
115
  CARDINALITY_REPEATED = 3;
116
- };
116
+ }
117
117
 
118
118
  // The field type.
119
119
  Kind kind = 1;
@@ -44,7 +44,7 @@ package google.protobuf;
44
44
 
45
45
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
46
46
  option cc_enable_arenas = true;
47
- option go_package = "github.com/golang/protobuf/ptypes/wrappers";
47
+ option go_package = "google.golang.org/protobuf/types/known/wrapperspb";
48
48
  option java_package = "com.google.protobuf";
49
49
  option java_outer_classname = "WrappersProto";
50
50
  option java_multiple_files = true;
Binary file
data/bin/x86-linux/protoc CHANGED
Binary file
@@ -33,7 +33,7 @@ syntax = "proto3";
33
33
  package google.protobuf;
34
34
 
35
35
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
- option go_package = "github.com/golang/protobuf/ptypes/any";
36
+ option go_package = "google.golang.org/protobuf/types/known/anypb";
37
37
  option java_package = "com.google.protobuf";
38
38
  option java_outer_classname = "AnyProto";
39
39
  option java_multiple_files = true;
@@ -77,10 +77,13 @@ option objc_class_prefix = "GPB";
77
77
  // Example 4: Pack and unpack a message in Go
78
78
  //
79
79
  // foo := &pb.Foo{...}
80
- // any, err := ptypes.MarshalAny(foo)
80
+ // any, err := anypb.New(foo)
81
+ // if err != nil {
82
+ // ...
83
+ // }
81
84
  // ...
82
85
  // foo := &pb.Foo{}
83
- // if err := ptypes.UnmarshalAny(any, foo); err != nil {
86
+ // if err := any.UnmarshalTo(foo); err != nil {
84
87
  // ...
85
88
  // }
86
89
  //
@@ -40,7 +40,7 @@ option java_package = "com.google.protobuf";
40
40
  option java_outer_classname = "ApiProto";
41
41
  option java_multiple_files = true;
42
42
  option objc_class_prefix = "GPB";
43
- option go_package = "google.golang.org/genproto/protobuf/api;api";
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.
46
46
  //
@@ -52,7 +52,6 @@ option go_package = "google.golang.org/genproto/protobuf/api;api";
52
52
  // this message itself. See https://cloud.google.com/apis/design/glossary for
53
53
  // detailed terminology.
54
54
  message Api {
55
-
56
55
  // The fully qualified name of this interface, including package name
57
56
  // followed by the interface's simple name.
58
57
  string name = 1;
@@ -99,7 +98,6 @@ message Api {
99
98
 
100
99
  // Method represents a method of an API interface.
101
100
  message Method {
102
-
103
101
  // The simple name of this method.
104
102
  string name = 1;
105
103
 
@@ -169,7 +167,7 @@ message Method {
169
167
  // The mixin construct implies that all methods in `AccessControl` are
170
168
  // also declared with same name and request/response types in
171
169
  // `Storage`. A documentation generator or annotation processor will
172
- // see the effective `Storage.GetAcl` method after inherting
170
+ // see the effective `Storage.GetAcl` method after inheriting
173
171
  // documentation and annotations as follows:
174
172
  //
175
173
  // service Storage {
@@ -50,7 +50,7 @@ package google.protobuf.compiler;
50
50
  option java_package = "com.google.protobuf.compiler";
51
51
  option java_outer_classname = "PluginProtos";
52
52
 
53
- option go_package = "github.com/golang/protobuf/protoc-gen-go/plugin;plugin_go";
53
+ option go_package = "google.golang.org/protobuf/types/pluginpb";
54
54
 
55
55
  import "google/protobuf/descriptor.proto";
56
56
 
@@ -173,6 +173,11 @@ message CodeGeneratorResponse {
173
173
 
174
174
  // The file contents.
175
175
  optional string content = 15;
176
+
177
+ // Information describing the file content being inserted. If an insertion
178
+ // point is used, this information will be appropriately offset and inserted
179
+ // into the code generation metadata for the generated files.
180
+ optional GeneratedCodeInfo generated_code_info = 16;
176
181
  }
177
182
  repeated File file = 15;
178
183
  }
@@ -41,7 +41,7 @@ syntax = "proto2";
41
41
 
42
42
  package google.protobuf;
43
43
 
44
- option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor";
44
+ option go_package = "google.golang.org/protobuf/types/descriptorpb";
45
45
  option java_package = "com.google.protobuf";
46
46
  option java_outer_classname = "DescriptorProtos";
47
47
  option csharp_namespace = "Google.Protobuf.Reflection";
@@ -348,17 +348,17 @@ message FileOptions {
348
348
  optional string java_package = 1;
349
349
 
350
350
 
351
- // If set, all the classes from the .proto file are wrapped in a single
352
- // outer class with the given name. This applies to both Proto1
353
- // (equivalent to the old "--one_java_file" option) and Proto2 (where
354
- // a .proto always translates to a single class, but you may want to
355
- // explicitly choose the class name).
351
+ // Controls the name of the wrapper Java class generated for the .proto file.
352
+ // That class will always contain the .proto file's getDescriptor() method as
353
+ // well as any top-level extensions defined in the .proto file.
354
+ // If java_multiple_files is disabled, then all the other classes from the
355
+ // .proto file will be nested inside the single wrapper outer class.
356
356
  optional string java_outer_classname = 8;
357
357
 
358
- // If set true, then the Java code generator will generate a separate .java
358
+ // If enabled, then the Java code generator will generate a separate .java
359
359
  // file for each top-level message, enum, and service defined in the .proto
360
- // file. Thus, these types will *not* be nested inside the outer class
361
- // named by java_outer_classname. However, the outer class will still be
360
+ // file. Thus, these types will *not* be nested inside the wrapper class
361
+ // named by java_outer_classname. However, the wrapper class will still be
362
362
  // generated to contain the file's getDescriptor() method as well as any
363
363
  // top-level extensions defined in the file.
364
364
  optional bool java_multiple_files = 10 [default = false];
@@ -496,6 +496,8 @@ message MessageOptions {
496
496
  // this is a formalization for deprecating messages.
497
497
  optional bool deprecated = 3 [default = false];
498
498
 
499
+ reserved 4, 5, 6;
500
+
499
501
  // Whether the message is an automatically generated map entry type for the
500
502
  // maps field.
501
503
  //
@@ -34,7 +34,7 @@ package google.protobuf;
34
34
 
35
35
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
36
  option cc_enable_arenas = true;
37
- option go_package = "github.com/golang/protobuf/ptypes/duration";
37
+ option go_package = "google.golang.org/protobuf/types/known/durationpb";
38
38
  option java_package = "com.google.protobuf";
39
39
  option java_outer_classname = "DurationProto";
40
40
  option java_multiple_files = true;
@@ -33,7 +33,7 @@ syntax = "proto3";
33
33
  package google.protobuf;
34
34
 
35
35
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
- option go_package = "github.com/golang/protobuf/ptypes/empty";
36
+ option go_package = "google.golang.org/protobuf/types/known/emptypb";
37
37
  option java_package = "com.google.protobuf";
38
38
  option java_outer_classname = "EmptyProto";
39
39
  option java_multiple_files = true;
@@ -37,7 +37,7 @@ option java_package = "com.google.protobuf";
37
37
  option java_outer_classname = "FieldMaskProto";
38
38
  option java_multiple_files = true;
39
39
  option objc_class_prefix = "GPB";
40
- option go_package = "google.golang.org/genproto/protobuf/field_mask;field_mask";
40
+ option go_package = "google.golang.org/protobuf/types/known/fieldmaskpb";
41
41
  option cc_enable_arenas = true;
42
42
 
43
43
  // `FieldMask` represents a set of symbolic field paths, for example:
@@ -37,7 +37,7 @@ option java_package = "com.google.protobuf";
37
37
  option java_outer_classname = "SourceContextProto";
38
38
  option java_multiple_files = true;
39
39
  option objc_class_prefix = "GPB";
40
- option go_package = "google.golang.org/genproto/protobuf/source_context;source_context";
40
+ option go_package = "google.golang.org/protobuf/types/known/sourcecontextpb";
41
41
 
42
42
  // `SourceContext` represents information about the source of a
43
43
  // protobuf element, like the file in which it is defined.
@@ -34,7 +34,7 @@ package google.protobuf;
34
34
 
35
35
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
36
  option cc_enable_arenas = true;
37
- option go_package = "github.com/golang/protobuf/ptypes/struct;structpb";
37
+ option go_package = "google.golang.org/protobuf/types/known/structpb";
38
38
  option java_package = "com.google.protobuf";
39
39
  option java_outer_classname = "StructProto";
40
40
  option java_multiple_files = true;
@@ -34,7 +34,7 @@ package google.protobuf;
34
34
 
35
35
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
36
  option cc_enable_arenas = true;
37
- option go_package = "github.com/golang/protobuf/ptypes/timestamp";
37
+ option go_package = "google.golang.org/protobuf/types/known/timestamppb";
38
38
  option java_package = "com.google.protobuf";
39
39
  option java_outer_classname = "TimestampProto";
40
40
  option java_multiple_files = true;
@@ -91,7 +91,16 @@ option objc_class_prefix = "GPB";
91
91
  // .setNanos((int) ((millis % 1000) * 1000000)).build();
92
92
  //
93
93
  //
94
- // Example 5: Compute Timestamp from current time in Python.
94
+ // Example 5: Compute Timestamp from Java `Instant.now()`.
95
+ //
96
+ // Instant now = Instant.now();
97
+ //
98
+ // Timestamp timestamp =
99
+ // Timestamp.newBuilder().setSeconds(now.getEpochSecond())
100
+ // .setNanos(now.getNano()).build();
101
+ //
102
+ //
103
+ // Example 6: Compute Timestamp from current time in Python.
95
104
  //
96
105
  // timestamp = Timestamp()
97
106
  // timestamp.GetCurrentTime()
@@ -41,7 +41,7 @@ option java_package = "com.google.protobuf";
41
41
  option java_outer_classname = "TypeProto";
42
42
  option java_multiple_files = true;
43
43
  option objc_class_prefix = "GPB";
44
- option go_package = "google.golang.org/genproto/protobuf/ptype;ptype";
44
+ option go_package = "google.golang.org/protobuf/types/known/typepb";
45
45
 
46
46
  // A protocol buffer message type.
47
47
  message Type {
@@ -113,7 +113,7 @@ message Field {
113
113
  CARDINALITY_REQUIRED = 2;
114
114
  // For repeated fields.
115
115
  CARDINALITY_REPEATED = 3;
116
- };
116
+ }
117
117
 
118
118
  // The field type.
119
119
  Kind kind = 1;
@@ -44,7 +44,7 @@ package google.protobuf;
44
44
 
45
45
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
46
46
  option cc_enable_arenas = true;
47
- option go_package = "github.com/golang/protobuf/ptypes/wrappers";
47
+ option go_package = "google.golang.org/protobuf/types/known/wrapperspb";
48
48
  option java_package = "com.google.protobuf";
49
49
  option java_outer_classname = "WrappersProto";
50
50
  option java_multiple_files = true;
Binary file
Binary file
@@ -33,7 +33,7 @@ syntax = "proto3";
33
33
  package google.protobuf;
34
34
 
35
35
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
- option go_package = "github.com/golang/protobuf/ptypes/any";
36
+ option go_package = "google.golang.org/protobuf/types/known/anypb";
37
37
  option java_package = "com.google.protobuf";
38
38
  option java_outer_classname = "AnyProto";
39
39
  option java_multiple_files = true;
@@ -77,10 +77,13 @@ option objc_class_prefix = "GPB";
77
77
  // Example 4: Pack and unpack a message in Go
78
78
  //
79
79
  // foo := &pb.Foo{...}
80
- // any, err := ptypes.MarshalAny(foo)
80
+ // any, err := anypb.New(foo)
81
+ // if err != nil {
82
+ // ...
83
+ // }
81
84
  // ...
82
85
  // foo := &pb.Foo{}
83
- // if err := ptypes.UnmarshalAny(any, foo); err != nil {
86
+ // if err := any.UnmarshalTo(foo); err != nil {
84
87
  // ...
85
88
  // }
86
89
  //
@@ -40,7 +40,7 @@ option java_package = "com.google.protobuf";
40
40
  option java_outer_classname = "ApiProto";
41
41
  option java_multiple_files = true;
42
42
  option objc_class_prefix = "GPB";
43
- option go_package = "google.golang.org/genproto/protobuf/api;api";
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.
46
46
  //
@@ -52,7 +52,6 @@ option go_package = "google.golang.org/genproto/protobuf/api;api";
52
52
  // this message itself. See https://cloud.google.com/apis/design/glossary for
53
53
  // detailed terminology.
54
54
  message Api {
55
-
56
55
  // The fully qualified name of this interface, including package name
57
56
  // followed by the interface's simple name.
58
57
  string name = 1;
@@ -99,7 +98,6 @@ message Api {
99
98
 
100
99
  // Method represents a method of an API interface.
101
100
  message Method {
102
-
103
101
  // The simple name of this method.
104
102
  string name = 1;
105
103
 
@@ -169,7 +167,7 @@ message Method {
169
167
  // The mixin construct implies that all methods in `AccessControl` are
170
168
  // also declared with same name and request/response types in
171
169
  // `Storage`. A documentation generator or annotation processor will
172
- // see the effective `Storage.GetAcl` method after inherting
170
+ // see the effective `Storage.GetAcl` method after inheriting
173
171
  // documentation and annotations as follows:
174
172
  //
175
173
  // service Storage {
@@ -50,7 +50,7 @@ package google.protobuf.compiler;
50
50
  option java_package = "com.google.protobuf.compiler";
51
51
  option java_outer_classname = "PluginProtos";
52
52
 
53
- option go_package = "github.com/golang/protobuf/protoc-gen-go/plugin;plugin_go";
53
+ option go_package = "google.golang.org/protobuf/types/pluginpb";
54
54
 
55
55
  import "google/protobuf/descriptor.proto";
56
56
 
@@ -173,6 +173,11 @@ message CodeGeneratorResponse {
173
173
 
174
174
  // The file contents.
175
175
  optional string content = 15;
176
+
177
+ // Information describing the file content being inserted. If an insertion
178
+ // point is used, this information will be appropriately offset and inserted
179
+ // into the code generation metadata for the generated files.
180
+ optional GeneratedCodeInfo generated_code_info = 16;
176
181
  }
177
182
  repeated File file = 15;
178
183
  }
@@ -41,7 +41,7 @@ syntax = "proto2";
41
41
 
42
42
  package google.protobuf;
43
43
 
44
- option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor";
44
+ option go_package = "google.golang.org/protobuf/types/descriptorpb";
45
45
  option java_package = "com.google.protobuf";
46
46
  option java_outer_classname = "DescriptorProtos";
47
47
  option csharp_namespace = "Google.Protobuf.Reflection";
@@ -348,17 +348,17 @@ message FileOptions {
348
348
  optional string java_package = 1;
349
349
 
350
350
 
351
- // If set, all the classes from the .proto file are wrapped in a single
352
- // outer class with the given name. This applies to both Proto1
353
- // (equivalent to the old "--one_java_file" option) and Proto2 (where
354
- // a .proto always translates to a single class, but you may want to
355
- // explicitly choose the class name).
351
+ // Controls the name of the wrapper Java class generated for the .proto file.
352
+ // That class will always contain the .proto file's getDescriptor() method as
353
+ // well as any top-level extensions defined in the .proto file.
354
+ // If java_multiple_files is disabled, then all the other classes from the
355
+ // .proto file will be nested inside the single wrapper outer class.
356
356
  optional string java_outer_classname = 8;
357
357
 
358
- // If set true, then the Java code generator will generate a separate .java
358
+ // If enabled, then the Java code generator will generate a separate .java
359
359
  // file for each top-level message, enum, and service defined in the .proto
360
- // file. Thus, these types will *not* be nested inside the outer class
361
- // named by java_outer_classname. However, the outer class will still be
360
+ // file. Thus, these types will *not* be nested inside the wrapper class
361
+ // named by java_outer_classname. However, the wrapper class will still be
362
362
  // generated to contain the file's getDescriptor() method as well as any
363
363
  // top-level extensions defined in the file.
364
364
  optional bool java_multiple_files = 10 [default = false];
@@ -496,6 +496,8 @@ message MessageOptions {
496
496
  // this is a formalization for deprecating messages.
497
497
  optional bool deprecated = 3 [default = false];
498
498
 
499
+ reserved 4, 5, 6;
500
+
499
501
  // Whether the message is an automatically generated map entry type for the
500
502
  // maps field.
501
503
  //
@@ -34,7 +34,7 @@ package google.protobuf;
34
34
 
35
35
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
36
  option cc_enable_arenas = true;
37
- option go_package = "github.com/golang/protobuf/ptypes/duration";
37
+ option go_package = "google.golang.org/protobuf/types/known/durationpb";
38
38
  option java_package = "com.google.protobuf";
39
39
  option java_outer_classname = "DurationProto";
40
40
  option java_multiple_files = true;