grpc-tools 1.33.0.pre1 → 1.37.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) 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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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/version.rb +1 -1
  73. metadata +2 -16
  74. data/bin/x86-macos/google/protobuf/any.proto +0 -155
  75. data/bin/x86-macos/google/protobuf/api.proto +0 -210
  76. data/bin/x86-macos/google/protobuf/compiler/plugin.proto +0 -178
  77. data/bin/x86-macos/google/protobuf/descriptor.proto +0 -909
  78. data/bin/x86-macos/google/protobuf/duration.proto +0 -116
  79. data/bin/x86-macos/google/protobuf/empty.proto +0 -52
  80. data/bin/x86-macos/google/protobuf/field_mask.proto +0 -245
  81. data/bin/x86-macos/google/protobuf/source_context.proto +0 -48
  82. data/bin/x86-macos/google/protobuf/struct.proto +0 -95
  83. data/bin/x86-macos/google/protobuf/timestamp.proto +0 -138
  84. data/bin/x86-macos/google/protobuf/type.proto +0 -187
  85. data/bin/x86-macos/google/protobuf/wrappers.proto +0 -123
  86. data/bin/x86-macos/grpc_ruby_plugin +0 -0
  87. data/bin/x86-macos/protoc +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2217975a1a50d8be0b8bbab166886097dbdfa21cf135bb3cdcad7a391fe5562
4
- data.tar.gz: efb9209d47a957090ea58c51245d0e8177f002c50e796a16ab3f7b4fddcc5c7e
3
+ metadata.gz: b8649a406affa6b5cf56f3079a3f7bfec1fa2a9875f4c489bd3f51276eb47727
4
+ data.tar.gz: b4984bd524811840f8d455994f45a07a4804ef5afb0893bae0dd1a2c9a17951d
5
5
  SHA512:
6
- metadata.gz: 3431a7e173908f15578240ce4eb33210434c594ee45afae1ed5866ce7af594ea0952b6d7078212cbe0a81372a1493b357afe87c3d6cbfcb69f4bb08c251d26b5
7
- data.tar.gz: 95efc668e40ccc986a27362dbda5b14bcbb6500730ce2348a1b6292d5093d13d274fb0f4bf4f2e97087cc2a1fa9562b22f8621c521a8b48c66c4ebe3c3415c7c
6
+ metadata.gz: 246394aef14c8a6dd95c7f5c9074d452a7a2ee5befb0829cd401c5c2102831cc2eadbcd651e5682138832884ee68a2fa2d110c15a0512dccb25ab4f3aeb787b2
7
+ data.tar.gz: 803f4454a936196713c5ad721fe31e7316e3f16398e065f2b94980251dac16425fcaae15df930fefec8613ef006c35d87e28306caa34112114acc055b7f4dcb2
@@ -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";
@@ -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";
@@ -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 {