grpc-tools 1.34.0 → 1.37.0

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: 69483f293df53d63a0a3d2de3e95bdf54201de8ad6eba876305feb32c7ca87ad
4
- data.tar.gz: 12eb4b802942a6e3bbc39071acb1854da9679930fbdd3d7763b6787e9125ef89
3
+ metadata.gz: 8c1b8c3f3b757902d053cd4346121b977f0bb9fbd9f4c613a43baa5da9da0b9f
4
+ data.tar.gz: 278099d1fac979dc2316433133a50541c42be469ed77dbf0dba1b40d93ccf469
5
5
  SHA512:
6
- metadata.gz: 91231e667370917bbaf4066eedd536e24240a7b2bc408d14375a7cc1e69d51744a44999c810643f3d47367967df020eb4c3dd419748f821fc38aef3735fd427b
7
- data.tar.gz: 621aa76bddcba13215362cc3c1957e1c6f18aeef6aa0c3a9b24a68422e251f93e100d3b07664d5567264d2537705c7d96e840a32cca3b811c8ff008622313b4e
6
+ metadata.gz: 510165f9fbb38fb80330a0f0203e17f0fa9dea20fc96c39371e206882dd29427d540d8e81b2c24be2c94f3dfe7866202c41e0ebc27f4ea0b5faa6839e4a363c7
7
+ data.tar.gz: 69f72b0777bd121f270f34464057a7fa6682ac132d5d47db47c0322e23de578b0f2c6168924b6a27c0a005f2851eb3fd65a486316ef69796c02ac935564276dd
@@ -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 {