Skip to content

Commit a943305

Browse files
committed
Update the proto files from upstream.
Used commit 214c77e1b76e63e512bd675d1c300c80438642b6.
1 parent 8dcb280 commit a943305

15 files changed

+49
-18
lines changed

Protos/google/protobuf/any.proto

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ syntax = "proto3";
3333
package google.protobuf;
3434

3535
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";
3737
option java_package = "com.google.protobuf";
3838
option java_outer_classname = "AnyProto";
3939
option java_multiple_files = true;
@@ -77,10 +77,13 @@ option objc_class_prefix = "GPB";
7777
// Example 4: Pack and unpack a message in Go
7878
//
7979
// foo := &pb.Foo{...}
80-
// any, err := ptypes.MarshalAny(foo)
80+
// any, err := anypb.New(foo)
81+
// if err != nil {
82+
// ...
83+
// }
8184
// ...
8285
// foo := &pb.Foo{}
83-
// if err := ptypes.UnmarshalAny(any, foo); err != nil {
86+
// if err := any.UnmarshalTo(foo); err != nil {
8487
// ...
8588
// }
8689
//

Protos/google/protobuf/api.proto

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ option java_package = "com.google.protobuf";
4040
option java_outer_classname = "ApiProto";
4141
option java_multiple_files = true;
4242
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";
4444

4545
// Api is a light-weight descriptor for an API Interface.
4646
//
@@ -52,7 +52,6 @@ option go_package = "google.golang.org/genproto/protobuf/api;api";
5252
// this message itself. See https://cloud.google.com/apis/design/glossary for
5353
// detailed terminology.
5454
message Api {
55-
5655
// The fully qualified name of this interface, including package name
5756
// followed by the interface's simple name.
5857
string name = 1;
@@ -99,7 +98,6 @@ message Api {
9998

10099
// Method represents a method of an API interface.
101100
message Method {
102-
103101
// The simple name of this method.
104102
string name = 1;
105103

Protos/google/protobuf/compiler/plugin.proto

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ package google.protobuf.compiler;
5050
option java_package = "com.google.protobuf.compiler";
5151
option java_outer_classname = "PluginProtos";
5252

53-
option go_package = "github.com/golang/protobuf/protoc-gen-go/plugin;plugin_go";
53+
option go_package = "google.golang.org/protobuf/types/pluginpb";
5454

5555
import "google/protobuf/descriptor.proto";
5656

@@ -173,6 +173,11 @@ message CodeGeneratorResponse {
173173

174174
// The file contents.
175175
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;
176181
}
177182
repeated File file = 15;
178183
}

Protos/google/protobuf/descriptor.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ syntax = "proto2";
4141

4242
package google.protobuf;
4343

44-
option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor";
44+
option go_package = "google.golang.org/protobuf/types/descriptorpb";
4545
option java_package = "com.google.protobuf";
4646
option java_outer_classname = "DescriptorProtos";
4747
option csharp_namespace = "Google.Protobuf.Reflection";

Protos/google/protobuf/duration.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ package google.protobuf;
3434

3535
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
3636
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";
3838
option java_package = "com.google.protobuf";
3939
option java_outer_classname = "DurationProto";
4040
option java_multiple_files = true;

Protos/google/protobuf/empty.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ syntax = "proto3";
3333
package google.protobuf;
3434

3535
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";
3737
option java_package = "com.google.protobuf";
3838
option java_outer_classname = "EmptyProto";
3939
option java_multiple_files = true;

Protos/google/protobuf/field_mask.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ option java_package = "com.google.protobuf";
3737
option java_outer_classname = "FieldMaskProto";
3838
option java_multiple_files = true;
3939
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";
4141
option cc_enable_arenas = true;
4242

4343
// `FieldMask` represents a set of symbolic field paths, for example:

Protos/google/protobuf/source_context.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ option java_package = "com.google.protobuf";
3737
option java_outer_classname = "SourceContextProto";
3838
option java_multiple_files = true;
3939
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";
4141

4242
// `SourceContext` represents information about the source of a
4343
// protobuf element, like the file in which it is defined.

Protos/google/protobuf/struct.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ package google.protobuf;
3434

3535
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
3636
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";
3838
option java_package = "com.google.protobuf";
3939
option java_outer_classname = "StructProto";
4040
option java_multiple_files = true;

Protos/google/protobuf/test_messages_proto3.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ message TestAllTypesProto3 {
203203
float oneof_float = 117;
204204
double oneof_double = 118;
205205
NestedEnum oneof_enum = 119;
206+
google.protobuf.NullValue oneof_null_value = 120;
206207
}
207208

208209
// Well-known types
@@ -232,6 +233,7 @@ message TestAllTypesProto3 {
232233
google.protobuf.Struct optional_struct = 304;
233234
google.protobuf.Any optional_any = 305;
234235
google.protobuf.Value optional_value = 306;
236+
google.protobuf.NullValue optional_null_value = 307;
235237

236238
repeated google.protobuf.Duration repeated_duration = 311;
237239
repeated google.protobuf.Timestamp repeated_timestamp = 312;

0 commit comments

Comments
 (0)