From ee11d9fdb7b893d3d902c955a8359eb99c88343c Mon Sep 17 00:00:00 2001 From: Oliver Kunz Date: Wed, 16 Mar 2022 00:43:16 -0700 Subject: [PATCH] Migration of remaining protobufs from proto2 to proto3 PiperOrigin-RevId: 434973223 Change-Id: I5518aa3944cab94d33ce0538bed8ee82f90d4b3a --- sandboxed_api/examples/sum/sum_params.proto | 8 ++++---- sandboxed_api/proto_arg.proto | 6 +++--- sandboxed_api/sandbox2/comms_test.proto | 2 +- sandboxed_api/sandbox2/logserver.proto | 12 ++++++------ 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sandboxed_api/examples/sum/sum_params.proto b/sandboxed_api/examples/sum/sum_params.proto index 1f5dbb4..9e2d3db 100644 --- a/sandboxed_api/examples/sum/sum_params.proto +++ b/sandboxed_api/examples/sum/sum_params.proto @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -syntax = "proto2"; +syntax = "proto3"; package sumsapi; message SumParamsProto { - optional int32 a = 1 [default = 0]; - optional int32 b = 2 [default = 0]; - optional int32 c = 3 [default = 0]; + optional int32 a = 1; + optional int32 b = 2; + optional int32 c = 3; } diff --git a/sandboxed_api/proto_arg.proto b/sandboxed_api/proto_arg.proto index 3c847e5..a1adb20 100644 --- a/sandboxed_api/proto_arg.proto +++ b/sandboxed_api/proto_arg.proto @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -syntax = "proto2"; +syntax = "proto3"; package sapi; message ProtoArg { // Fully qualified name of the protobuf that is being passed. - required string full_name = 1; + optional string full_name = 1; // The serialized protobuf data. - required bytes protobuf_data = 2; + optional bytes protobuf_data = 2; } diff --git a/sandboxed_api/sandbox2/comms_test.proto b/sandboxed_api/sandbox2/comms_test.proto index 1f4c542..6b2cd12 100644 --- a/sandboxed_api/sandbox2/comms_test.proto +++ b/sandboxed_api/sandbox2/comms_test.proto @@ -14,7 +14,7 @@ // A proto for comms_test -syntax = "proto2"; +syntax = "proto3"; package sandbox2; message CommsTestMsg { diff --git a/sandboxed_api/sandbox2/logserver.proto b/sandboxed_api/sandbox2/logserver.proto index e569b82..0329c24 100644 --- a/sandboxed_api/sandbox2/logserver.proto +++ b/sandboxed_api/sandbox2/logserver.proto @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -syntax = "proto2"; +syntax = "proto3"; package sandbox2; message LogMessage { - required int32 severity = 1; - required string path = 2; - required int32 line = 3; - required string message = 4; - required int32 pid = 5; + optional int32 severity = 1; + optional string path = 2; + optional int32 line = 3; + optional string message = 4; + optional int32 pid = 5; }