From 6f8fdbdd59629f5927e4c230e8ad91e886d42948 Mon Sep 17 00:00:00 2001 From: Mike Kruskal <mkruskal@google.com> Date: Sun, 6 Oct 2024 13:30:15 -0700 Subject: [PATCH] Automated rollback of commit 03aec42fcbc7b9499f20995bbec362205bf41821. PiperOrigin-RevId: 682948830 --- php/ext/google/protobuf/wkt.inc | 158 +++----- php/src/GPBMetadata/Google/Protobuf/Any.php | 9 +- php/src/GPBMetadata/Google/Protobuf/Api.php | 25 +- .../GPBMetadata/Google/Protobuf/Duration.php | 9 +- .../GPBMetadata/Google/Protobuf/FieldMask.php | 8 +- .../GPBMetadata/Google/Protobuf/GPBEmpty.php | 8 +- .../Google/Protobuf/Internal/Descriptor.php | 148 +------- .../Google/Protobuf/SourceContext.php | 8 +- .../GPBMetadata/Google/Protobuf/Struct.php | Bin 1600 -> 1162 bytes .../GPBMetadata/Google/Protobuf/Timestamp.php | 9 +- php/src/GPBMetadata/Google/Protobuf/Type.php | Bin 3575 -> 2205 bytes .../GPBMetadata/Google/Protobuf/Wrappers.php | 28 +- php/src/Google/Protobuf/Any.php | 26 +- php/src/Google/Protobuf/Api.php | 1 - php/src/Google/Protobuf/BoolValue.php | 1 - php/src/Google/Protobuf/BytesValue.php | 1 - php/src/Google/Protobuf/DoubleValue.php | 1 - php/src/Google/Protobuf/Duration.php | 1 - php/src/Google/Protobuf/Enum.php | 35 -- php/src/Google/Protobuf/EnumValue.php | 1 - php/src/Google/Protobuf/Field.php | 1 - php/src/Google/Protobuf/Field/Cardinality.php | 4 +- php/src/Google/Protobuf/Field/Kind.php | 4 +- php/src/Google/Protobuf/FieldMask.php | 1 - php/src/Google/Protobuf/FloatValue.php | 1 - php/src/Google/Protobuf/GPBEmpty.php | 1 - php/src/Google/Protobuf/Int32Value.php | 1 - php/src/Google/Protobuf/Int64Value.php | 1 - .../Protobuf/Internal/DescriptorProto.php | 1 - .../DescriptorProto/ExtensionRange.php | 4 +- .../DescriptorProto/ReservedRange.php | 4 +- .../Protobuf/Internal/EnumDescriptorProto.php | 1 - .../EnumDescriptorProto/EnumReservedRange.php | 4 +- .../Google/Protobuf/Internal/EnumOptions.php | 53 +-- .../Internal/EnumValueDescriptorProto.php | 1 - .../Protobuf/Internal/EnumValueOptions.php | 141 -------- .../Internal/ExtensionRangeOptions.php | 139 ------- .../Internal/FieldDescriptorProto.php | 49 ++- .../Internal/FieldDescriptorProto/Label.php | 18 +- .../Internal/FieldDescriptorProto/Type.php | 9 +- .../Google/Protobuf/Internal/FieldOptions.php | 339 ++++-------------- .../Protobuf/Internal/FieldOptions/CType.php | 11 +- .../Protobuf/Internal/FieldOptions/JSType.php | 4 +- .../Protobuf/Internal/FileDescriptorProto.php | 25 +- .../Protobuf/Internal/FileDescriptorSet.php | 1 - .../Google/Protobuf/Internal/FileOptions.php | 146 ++++---- .../Internal/FileOptions/OptimizeMode.php | 4 +- .../Protobuf/Internal/GeneratedCodeInfo.php | 1 - .../Internal/GeneratedCodeInfo/Annotation.php | 4 +- .../Protobuf/Internal/MessageOptions.php | 77 +--- .../Internal/MethodDescriptorProto.php | 1 - .../Protobuf/Internal/MethodOptions.php | 45 --- .../MethodOptions/IdempotencyLevel.php | 4 +- .../Internal/OneofDescriptorProto.php | 1 - .../Google/Protobuf/Internal/OneofOptions.php | 45 --- .../Internal/ServiceDescriptorProto.php | 1 - .../Protobuf/Internal/ServiceOptions.php | 45 --- .../Protobuf/Internal/SourceCodeInfo.php | 1 - .../Internal/SourceCodeInfo/Location.php | 44 +-- .../Protobuf/Internal/UninterpretedOption.php | 1 - .../Internal/UninterpretedOption/NamePart.php | 4 +- php/src/Google/Protobuf/ListValue.php | 1 - php/src/Google/Protobuf/Method.php | 1 - php/src/Google/Protobuf/Mixin.php | 1 - php/src/Google/Protobuf/NullValue.php | 3 +- php/src/Google/Protobuf/Option.php | 1 - php/src/Google/Protobuf/SourceContext.php | 1 - php/src/Google/Protobuf/StringValue.php | 1 - php/src/Google/Protobuf/Struct.php | 1 - php/src/Google/Protobuf/Syntax.php | 8 - php/src/Google/Protobuf/Timestamp.php | 3 +- php/src/Google/Protobuf/Type.php | 35 -- php/src/Google/Protobuf/UInt32Value.php | 1 - php/src/Google/Protobuf/UInt64Value.php | 1 - php/src/Google/Protobuf/Value.php | 1 - src/google/protobuf/compiler/cpp/field.cc | 6 + src/google/protobuf/compiler/cpp/field.h | 3 + .../cpp/field_generators/string_field.cc | 6 +- .../cpp/field_generators/string_view_field.cc | 3 +- src/google/protobuf/compiler/cpp/helpers.cc | 17 +- src/google/protobuf/compiler/cpp/helpers.h | 10 +- src/google/protobuf/compiler/cpp/message.cc | 13 +- src/google/protobuf/descriptor.h | 14 - .../protobuf/generated_message_reflection.cc | 15 +- .../protobuf/reflection_visit_field_info.h | 4 +- src/google/protobuf/reflection_visit_fields.h | 37 +- 86 files changed, 460 insertions(+), 1446 deletions(-) diff --git a/php/ext/google/protobuf/wkt.inc b/php/ext/google/protobuf/wkt.inc index a093995a61..6902c4f0f0 100644 --- a/php/ext/google/protobuf/wkt.inc +++ b/php/ext/google/protobuf/wkt.inc @@ -1622,12 +1622,12 @@ static void google_protobuf_Timestamp_ModuleInit() { zend_class_entry* GPBMetadata_Google_Protobuf_Type_ce; -const char google_protobuf_type_proto_descriptor [1647] = { +const char google_protobuf_type_proto_descriptor [1592] = { '\n', '\032', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'y', 'p', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '$', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 'o', 'u', 'r', 'c', 'e', '_', 'c', 'o', 'n', -'t', 'e', 'x', 't', '.', 'p', 'r', 'o', 't', 'o', '\"', '\350', '\001', '\n', '\004', 'T', 'y', 'p', 'e', '\022', '\014', '\n', '\004', 'n', 'a', +'t', 'e', 'x', 't', '.', 'p', 'r', 'o', 't', 'o', '\"', '\327', '\001', '\n', '\004', 'T', 'y', 'p', 'e', '\022', '\014', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', '\022', '&', '\n', '\006', 'f', 'i', 'e', 'l', 'd', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '\026', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', '\022', '\016', '\n', '\006', 'o', 'n', 'e', 'o', 'f', 's', '\030', '\003', ' ', '\003', '(', '\t', '\022', '(', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', @@ -1636,59 +1636,57 @@ const char google_protobuf_type_proto_descriptor [1647] = { '\005', ' ', '\001', '(', '\013', '2', '\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 'o', 'u', 'r', 'c', 'e', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', '\'', '\n', '\006', 's', 'y', 'n', 't', 'a', 'x', '\030', '\006', ' ', '\001', '(', '\016', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 'y', 'n', -'t', 'a', 'x', '\022', '\017', '\n', '\007', 'e', 'd', 'i', 't', 'i', 'o', 'n', '\030', '\007', ' ', '\001', '(', '\t', '\"', '\325', '\005', '\n', '\005', -'F', 'i', 'e', 'l', 'd', '\022', ')', '\n', '\004', 'k', 'i', 'n', 'd', '\030', '\001', ' ', '\001', '(', '\016', '2', '\033', '.', 'g', 'o', 'o', -'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', '.', 'K', 'i', 'n', 'd', '\022', '7', -'\n', '\013', 'c', 'a', 'r', 'd', 'i', 'n', 'a', 'l', 'i', 't', 'y', '\030', '\002', ' ', '\001', '(', '\016', '2', '\"', '.', 'g', 'o', 'o', -'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', '.', 'C', 'a', 'r', 'd', 'i', 'n', -'a', 'l', 'i', 't', 'y', '\022', '\016', '\n', '\006', 'n', 'u', 'm', 'b', 'e', 'r', '\030', '\003', ' ', '\001', '(', '\005', '\022', '\014', '\n', '\004', -'n', 'a', 'm', 'e', '\030', '\004', ' ', '\001', '(', '\t', '\022', '\020', '\n', '\010', 't', 'y', 'p', 'e', '_', 'u', 'r', 'l', '\030', '\006', ' ', -'\001', '(', '\t', '\022', '\023', '\n', '\013', 'o', 'n', 'e', 'o', 'f', '_', 'i', 'n', 'd', 'e', 'x', '\030', '\007', ' ', '\001', '(', '\005', '\022', -'\016', '\n', '\006', 'p', 'a', 'c', 'k', 'e', 'd', '\030', '\010', ' ', '\001', '(', '\010', '\022', '(', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', -'s', '\030', '\t', ' ', '\003', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', -'.', 'O', 'p', 't', 'i', 'o', 'n', '\022', '\021', '\n', '\t', 'j', 's', 'o', 'n', '_', 'n', 'a', 'm', 'e', '\030', '\n', ' ', '\001', '(', -'\t', '\022', '\025', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\013', ' ', '\001', '(', '\t', '\"', -'\310', '\002', '\n', '\004', 'K', 'i', 'n', 'd', '\022', '\020', '\n', '\014', 'T', 'Y', 'P', 'E', '_', 'U', 'N', 'K', 'N', 'O', 'W', 'N', '\020', -'\000', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'D', 'O', 'U', 'B', 'L', 'E', '\020', '\001', '\022', '\016', '\n', '\n', 'T', 'Y', 'P', -'E', '_', 'F', 'L', 'O', 'A', 'T', '\020', '\002', '\022', '\016', '\n', '\n', 'T', 'Y', 'P', 'E', '_', 'I', 'N', 'T', '6', '4', '\020', '\003', -'\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'U', 'I', 'N', 'T', '6', '4', '\020', '\004', '\022', '\016', '\n', '\n', 'T', 'Y', 'P', 'E', -'_', 'I', 'N', 'T', '3', '2', '\020', '\005', '\022', '\020', '\n', '\014', 'T', 'Y', 'P', 'E', '_', 'F', 'I', 'X', 'E', 'D', '6', '4', '\020', -'\006', '\022', '\020', '\n', '\014', 'T', 'Y', 'P', 'E', '_', 'F', 'I', 'X', 'E', 'D', '3', '2', '\020', '\007', '\022', '\r', '\n', '\t', 'T', 'Y', -'P', 'E', '_', 'B', 'O', 'O', 'L', '\020', '\010', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'S', 'T', 'R', 'I', 'N', 'G', '\020', -'\t', '\022', '\016', '\n', '\n', 'T', 'Y', 'P', 'E', '_', 'G', 'R', 'O', 'U', 'P', '\020', '\n', '\022', '\020', '\n', '\014', 'T', 'Y', 'P', 'E', -'_', 'M', 'E', 'S', 'S', 'A', 'G', 'E', '\020', '\013', '\022', '\016', '\n', '\n', 'T', 'Y', 'P', 'E', '_', 'B', 'Y', 'T', 'E', 'S', '\020', -'\014', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'U', 'I', 'N', 'T', '3', '2', '\020', '\r', '\022', '\r', '\n', '\t', 'T', 'Y', 'P', -'E', '_', 'E', 'N', 'U', 'M', '\020', '\016', '\022', '\021', '\n', '\r', 'T', 'Y', 'P', 'E', '_', 'S', 'F', 'I', 'X', 'E', 'D', '3', '2', -'\020', '\017', '\022', '\021', '\n', '\r', 'T', 'Y', 'P', 'E', '_', 'S', 'F', 'I', 'X', 'E', 'D', '6', '4', '\020', '\020', '\022', '\017', '\n', '\013', -'T', 'Y', 'P', 'E', '_', 'S', 'I', 'N', 'T', '3', '2', '\020', '\021', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'S', 'I', 'N', -'T', '6', '4', '\020', '\022', '\"', 't', '\n', '\013', 'C', 'a', 'r', 'd', 'i', 'n', 'a', 'l', 'i', 't', 'y', '\022', '\027', '\n', '\023', 'C', -'A', 'R', 'D', 'I', 'N', 'A', 'L', 'I', 'T', 'Y', '_', 'U', 'N', 'K', 'N', 'O', 'W', 'N', '\020', '\000', '\022', '\030', '\n', '\024', 'C', -'A', 'R', 'D', 'I', 'N', 'A', 'L', 'I', 'T', 'Y', '_', 'O', 'P', 'T', 'I', 'O', 'N', 'A', 'L', '\020', '\001', '\022', '\030', '\n', '\024', -'C', 'A', 'R', 'D', 'I', 'N', 'A', 'L', 'I', 'T', 'Y', '_', 'R', 'E', 'Q', 'U', 'I', 'R', 'E', 'D', '\020', '\002', '\022', '\030', '\n', -'\024', 'C', 'A', 'R', 'D', 'I', 'N', 'A', 'L', 'I', 'T', 'Y', '_', 'R', 'E', 'P', 'E', 'A', 'T', 'E', 'D', '\020', '\003', '\"', '\337', -'\001', '\n', '\004', 'E', 'n', 'u', 'm', '\022', '\014', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', '\022', '-', '\n', '\t', -'e', 'n', 'u', 'm', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\003', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', -'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'V', 'a', 'l', 'u', 'e', '\022', '(', '\n', '\007', 'o', 'p', 't', -'i', 'o', 'n', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', -'b', 'u', 'f', '.', 'O', 'p', 't', 'i', 'o', 'n', '\022', '6', '\n', '\016', 's', 'o', 'u', 'r', 'c', 'e', '_', 'c', 'o', 'n', 't', -'e', 'x', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', '\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', -'u', 'f', '.', 'S', 'o', 'u', 'r', 'c', 'e', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', '\'', '\n', '\006', 's', 'y', 'n', 't', 'a', -'x', '\030', '\005', ' ', '\001', '(', '\016', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', -'.', 'S', 'y', 'n', 't', 'a', 'x', '\022', '\017', '\n', '\007', 'e', 'd', 'i', 't', 'i', 'o', 'n', '\030', '\006', ' ', '\001', '(', '\t', '\"', -'S', '\n', '\t', 'E', 'n', 'u', 'm', 'V', 'a', 'l', 'u', 'e', '\022', '\014', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', -'\t', '\022', '\016', '\n', '\006', 'n', 'u', 'm', 'b', 'e', 'r', '\030', '\002', ' ', '\001', '(', '\005', '\022', '(', '\n', '\007', 'o', 'p', 't', 'i', -'o', 'n', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', -'u', 'f', '.', 'O', 'p', 't', 'i', 'o', 'n', '\"', ';', '\n', '\006', 'O', 'p', 't', 'i', 'o', 'n', '\022', '\014', '\n', '\004', 'n', 'a', -'m', 'e', '\030', '\001', ' ', '\001', '(', '\t', '\022', '#', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\024', -'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', '*', 'C', '\n', '\006', 'S', -'y', 'n', 't', 'a', 'x', '\022', '\021', '\n', '\r', 'S', 'Y', 'N', 'T', 'A', 'X', '_', 'P', 'R', 'O', 'T', 'O', '2', '\020', '\000', '\022', -'\021', '\n', '\r', 'S', 'Y', 'N', 'T', 'A', 'X', '_', 'P', 'R', 'O', 'T', 'O', '3', '\020', '\001', '\022', '\023', '\n', '\017', 'S', 'Y', 'N', -'T', 'A', 'X', '_', 'E', 'D', 'I', 'T', 'I', 'O', 'N', 'S', '\020', '\002', 'B', '{', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', -'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\t', 'T', 'y', 'p', 'e', 'P', 'r', 'o', 't', 'o', 'P', '\001', -'Z', '-', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o', -'b', 'u', 'f', '/', 't', 'y', 'p', 'e', 's', '/', 'k', 'n', 'o', 'w', 'n', '/', 't', 'y', 'p', 'e', 'p', 'b', '\370', '\001', '\001', -'\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002', '\036', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', -'W', 'e', 'l', 'l', 'K', 'n', 'o', 'w', 'n', 'T', 'y', 'p', 'e', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +'t', 'a', 'x', '\"', '\325', '\005', '\n', '\005', 'F', 'i', 'e', 'l', 'd', '\022', ')', '\n', '\004', 'k', 'i', 'n', 'd', '\030', '\001', ' ', '\001', +'(', '\016', '2', '\033', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', +'d', '.', 'K', 'i', 'n', 'd', '\022', '7', '\n', '\013', 'c', 'a', 'r', 'd', 'i', 'n', 'a', 'l', 'i', 't', 'y', '\030', '\002', ' ', '\001', +'(', '\016', '2', '\"', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', +'d', '.', 'C', 'a', 'r', 'd', 'i', 'n', 'a', 'l', 'i', 't', 'y', '\022', '\016', '\n', '\006', 'n', 'u', 'm', 'b', 'e', 'r', '\030', '\003', +' ', '\001', '(', '\005', '\022', '\014', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\004', ' ', '\001', '(', '\t', '\022', '\020', '\n', '\010', 't', 'y', 'p', +'e', '_', 'u', 'r', 'l', '\030', '\006', ' ', '\001', '(', '\t', '\022', '\023', '\n', '\013', 'o', 'n', 'e', 'o', 'f', '_', 'i', 'n', 'd', 'e', +'x', '\030', '\007', ' ', '\001', '(', '\005', '\022', '\016', '\n', '\006', 'p', 'a', 'c', 'k', 'e', 'd', '\030', '\010', ' ', '\001', '(', '\010', '\022', '(', +'\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\t', ' ', '\003', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'O', 'p', 't', 'i', 'o', 'n', '\022', '\021', '\n', '\t', 'j', 's', 'o', 'n', '_', 'n', +'a', 'm', 'e', '\030', '\n', ' ', '\001', '(', '\t', '\022', '\025', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'u', +'e', '\030', '\013', ' ', '\001', '(', '\t', '\"', '\310', '\002', '\n', '\004', 'K', 'i', 'n', 'd', '\022', '\020', '\n', '\014', 'T', 'Y', 'P', 'E', '_', +'U', 'N', 'K', 'N', 'O', 'W', 'N', '\020', '\000', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'D', 'O', 'U', 'B', 'L', 'E', '\020', +'\001', '\022', '\016', '\n', '\n', 'T', 'Y', 'P', 'E', '_', 'F', 'L', 'O', 'A', 'T', '\020', '\002', '\022', '\016', '\n', '\n', 'T', 'Y', 'P', 'E', +'_', 'I', 'N', 'T', '6', '4', '\020', '\003', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'U', 'I', 'N', 'T', '6', '4', '\020', '\004', +'\022', '\016', '\n', '\n', 'T', 'Y', 'P', 'E', '_', 'I', 'N', 'T', '3', '2', '\020', '\005', '\022', '\020', '\n', '\014', 'T', 'Y', 'P', 'E', '_', +'F', 'I', 'X', 'E', 'D', '6', '4', '\020', '\006', '\022', '\020', '\n', '\014', 'T', 'Y', 'P', 'E', '_', 'F', 'I', 'X', 'E', 'D', '3', '2', +'\020', '\007', '\022', '\r', '\n', '\t', 'T', 'Y', 'P', 'E', '_', 'B', 'O', 'O', 'L', '\020', '\010', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', +'_', 'S', 'T', 'R', 'I', 'N', 'G', '\020', '\t', '\022', '\016', '\n', '\n', 'T', 'Y', 'P', 'E', '_', 'G', 'R', 'O', 'U', 'P', '\020', '\n', +'\022', '\020', '\n', '\014', 'T', 'Y', 'P', 'E', '_', 'M', 'E', 'S', 'S', 'A', 'G', 'E', '\020', '\013', '\022', '\016', '\n', '\n', 'T', 'Y', 'P', +'E', '_', 'B', 'Y', 'T', 'E', 'S', '\020', '\014', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'U', 'I', 'N', 'T', '3', '2', '\020', +'\r', '\022', '\r', '\n', '\t', 'T', 'Y', 'P', 'E', '_', 'E', 'N', 'U', 'M', '\020', '\016', '\022', '\021', '\n', '\r', 'T', 'Y', 'P', 'E', '_', +'S', 'F', 'I', 'X', 'E', 'D', '3', '2', '\020', '\017', '\022', '\021', '\n', '\r', 'T', 'Y', 'P', 'E', '_', 'S', 'F', 'I', 'X', 'E', 'D', +'6', '4', '\020', '\020', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'S', 'I', 'N', 'T', '3', '2', '\020', '\021', '\022', '\017', '\n', '\013', +'T', 'Y', 'P', 'E', '_', 'S', 'I', 'N', 'T', '6', '4', '\020', '\022', '\"', 't', '\n', '\013', 'C', 'a', 'r', 'd', 'i', 'n', 'a', 'l', +'i', 't', 'y', '\022', '\027', '\n', '\023', 'C', 'A', 'R', 'D', 'I', 'N', 'A', 'L', 'I', 'T', 'Y', '_', 'U', 'N', 'K', 'N', 'O', 'W', +'N', '\020', '\000', '\022', '\030', '\n', '\024', 'C', 'A', 'R', 'D', 'I', 'N', 'A', 'L', 'I', 'T', 'Y', '_', 'O', 'P', 'T', 'I', 'O', 'N', +'A', 'L', '\020', '\001', '\022', '\030', '\n', '\024', 'C', 'A', 'R', 'D', 'I', 'N', 'A', 'L', 'I', 'T', 'Y', '_', 'R', 'E', 'Q', 'U', 'I', +'R', 'E', 'D', '\020', '\002', '\022', '\030', '\n', '\024', 'C', 'A', 'R', 'D', 'I', 'N', 'A', 'L', 'I', 'T', 'Y', '_', 'R', 'E', 'P', 'E', +'A', 'T', 'E', 'D', '\020', '\003', '\"', '\316', '\001', '\n', '\004', 'E', 'n', 'u', 'm', '\022', '\014', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', +' ', '\001', '(', '\t', '\022', '-', '\n', '\t', 'e', 'n', 'u', 'm', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\003', '(', '\013', '2', '\032', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'V', 'a', 'l', 'u', +'e', '\022', '(', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'O', 'p', 't', 'i', 'o', 'n', '\022', '6', '\n', '\016', 's', 'o', 'u', +'r', 'c', 'e', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', '\036', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 'o', 'u', 'r', 'c', 'e', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', +'\'', '\n', '\006', 's', 'y', 'n', 't', 'a', 'x', '\030', '\005', ' ', '\001', '(', '\016', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 'y', 'n', 't', 'a', 'x', '\"', 'S', '\n', '\t', 'E', 'n', 'u', 'm', 'V', 'a', +'l', 'u', 'e', '\022', '\014', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', '\022', '\016', '\n', '\006', 'n', 'u', 'm', 'b', +'e', 'r', '\030', '\002', ' ', '\001', '(', '\005', '\022', '(', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\003', ' ', '\003', '(', '\013', +'2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'O', 'p', 't', 'i', 'o', 'n', +'\"', ';', '\n', '\006', 'O', 'p', 't', 'i', 'o', 'n', '\022', '\014', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', '\022', +'#', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', '*', '.', '\n', '\006', 'S', 'y', 'n', 't', 'a', 'x', '\022', '\021', '\n', '\r', +'S', 'Y', 'N', 'T', 'A', 'X', '_', 'P', 'R', 'O', 'T', 'O', '2', '\020', '\000', '\022', '\021', '\n', '\r', 'S', 'Y', 'N', 'T', 'A', 'X', +'_', 'P', 'R', 'O', 'T', 'O', '3', '\020', '\001', 'B', '{', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\t', 'T', 'y', 'p', 'e', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '-', 'g', 'o', 'o', +'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', +'y', 'p', 'e', 's', '/', 'k', 'n', 'o', 'w', 'n', '/', 't', 'y', 'p', 'e', 'p', 'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', +'B', '\252', '\002', '\036', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'W', 'e', 'l', 'l', 'K', +'n', 'o', 'w', 'n', 'T', 'y', 'p', 'e', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', }; static void google_protobuf_type_proto_AddDescriptor() { @@ -1858,28 +1856,6 @@ static PHP_METHOD(google_protobuf_Type, setSyntax) { RETURN_COPY(getThis()); } -static PHP_METHOD(google_protobuf_Type, getEdition) { - Message* intern = (Message*)Z_OBJ_P(getThis()); - const upb_FieldDef *f = upb_MessageDef_FindFieldByName( - intern->desc->msgdef, "edition"); - zval ret; - Message_get(intern, f, &ret); - RETURN_COPY_VALUE(&ret); -} - -static PHP_METHOD(google_protobuf_Type, setEdition) { - Message* intern = (Message*)Z_OBJ_P(getThis()); - const upb_FieldDef *f = upb_MessageDef_FindFieldByName( - intern->desc->msgdef, "edition"); - zval *val; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &val) - == FAILURE) { - return; - } - Message_set(intern, f, val); - RETURN_COPY(getThis()); -} - static zend_function_entry google_protobuf_Type_phpmethods[] = { PHP_ME(google_protobuf_Type, __construct, arginfo_construct, ZEND_ACC_PUBLIC) PHP_ME(google_protobuf_Type, getName, arginfo_void, ZEND_ACC_PUBLIC) @@ -1894,8 +1870,6 @@ static zend_function_entry google_protobuf_Type_phpmethods[] = { PHP_ME(google_protobuf_Type, setSourceContext, arginfo_setter, ZEND_ACC_PUBLIC) PHP_ME(google_protobuf_Type, getSyntax, arginfo_void, ZEND_ACC_PUBLIC) PHP_ME(google_protobuf_Type, setSyntax, arginfo_setter, ZEND_ACC_PUBLIC) - PHP_ME(google_protobuf_Type, getEdition, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(google_protobuf_Type, setEdition, arginfo_setter, ZEND_ACC_PUBLIC) ZEND_FE_END }; @@ -2466,28 +2440,6 @@ static PHP_METHOD(google_protobuf_Enum, setSyntax) { RETURN_COPY(getThis()); } -static PHP_METHOD(google_protobuf_Enum, getEdition) { - Message* intern = (Message*)Z_OBJ_P(getThis()); - const upb_FieldDef *f = upb_MessageDef_FindFieldByName( - intern->desc->msgdef, "edition"); - zval ret; - Message_get(intern, f, &ret); - RETURN_COPY_VALUE(&ret); -} - -static PHP_METHOD(google_protobuf_Enum, setEdition) { - Message* intern = (Message*)Z_OBJ_P(getThis()); - const upb_FieldDef *f = upb_MessageDef_FindFieldByName( - intern->desc->msgdef, "edition"); - zval *val; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &val) - == FAILURE) { - return; - } - Message_set(intern, f, val); - RETURN_COPY(getThis()); -} - static zend_function_entry google_protobuf_Enum_phpmethods[] = { PHP_ME(google_protobuf_Enum, __construct, arginfo_construct, ZEND_ACC_PUBLIC) PHP_ME(google_protobuf_Enum, getName, arginfo_void, ZEND_ACC_PUBLIC) @@ -2500,8 +2452,6 @@ static zend_function_entry google_protobuf_Enum_phpmethods[] = { PHP_ME(google_protobuf_Enum, setSourceContext, arginfo_setter, ZEND_ACC_PUBLIC) PHP_ME(google_protobuf_Enum, getSyntax, arginfo_void, ZEND_ACC_PUBLIC) PHP_ME(google_protobuf_Enum, setSyntax, arginfo_setter, ZEND_ACC_PUBLIC) - PHP_ME(google_protobuf_Enum, getEdition, arginfo_void, ZEND_ACC_PUBLIC) - PHP_ME(google_protobuf_Enum, setEdition, arginfo_setter, ZEND_ACC_PUBLIC) ZEND_FE_END }; @@ -2753,8 +2703,6 @@ static void google_protobuf_Syntax_ModuleInit() { strlen("SYNTAX_PROTO2"), 0); zend_declare_class_constant_long(google_protobuf_Syntax_ce, "SYNTAX_PROTO3", strlen("SYNTAX_PROTO3"), 1); - zend_declare_class_constant_long(google_protobuf_Syntax_ce, "SYNTAX_EDITIONS", - strlen("SYNTAX_EDITIONS"), 2); } /* google/protobuf/wrappers.proto */ diff --git a/php/src/GPBMetadata/Google/Protobuf/Any.php b/php/src/GPBMetadata/Google/Protobuf/Any.php index c9a2952010..fbce4bfdb1 100644 --- a/php/src/GPBMetadata/Google/Protobuf/Any.php +++ b/php/src/GPBMetadata/Google/Protobuf/Any.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/any.proto namespace GPBMetadata\Google\Protobuf; @@ -16,7 +15,13 @@ class Any return; } $pool->internalAddGeneratedFile( - "\x0A\xD4\x01\x0A\x19google/protobuf/any.proto\x12\x0Fgoogle.protobuf\"&\x0A\x03Any\x12\x10\x0A\x08type_url\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x0CBv\x0A\x13com.google.protobufB\x08AnyProtoP\x01Z,google.golang.org/protobuf/types/known/anypb\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3" + ' +� +google/protobuf/any.protogoogle.protobuf"& +Any +type_url ( +value (Bv +com.google.protobufBAnyProtoPZ,google.golang.org/protobuf/types/known/anypb�GPB�Google.Protobuf.WellKnownTypesbproto3' , true); static::$is_initialized = true; diff --git a/php/src/GPBMetadata/Google/Protobuf/Api.php b/php/src/GPBMetadata/Google/Protobuf/Api.php index 4485d3d0b3..75e0ec6318 100644 --- a/php/src/GPBMetadata/Google/Protobuf/Api.php +++ b/php/src/GPBMetadata/Google/Protobuf/Api.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/api.proto namespace GPBMetadata\Google\Protobuf; @@ -18,7 +17,29 @@ class Api \GPBMetadata\Google\Protobuf\SourceContext::initOnce(); \GPBMetadata\Google\Protobuf\Type::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xC9\x05\x0A\x19google/protobuf/api.proto\x12\x0Fgoogle.protobuf\x1A\x1Agoogle/protobuf/type.proto\"\x81\x02\x0A\x03Api\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12(\x0A\x07methods\x18\x02 \x03(\x0B2\x17.google.protobuf.Method\x12(\x0A\x07options\x18\x03 \x03(\x0B2\x17.google.protobuf.Option\x12\x0F\x0A\x07version\x18\x04 \x01(\x09\x126\x0A\x0Esource_context\x18\x05 \x01(\x0B2\x1E.google.protobuf.SourceContext\x12&\x0A\x06mixins\x18\x06 \x03(\x0B2\x16.google.protobuf.Mixin\x12'\x0A\x06syntax\x18\x07 \x01(\x0E2\x17.google.protobuf.Syntax\"\xD5\x01\x0A\x06Method\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x18\x0A\x10request_type_url\x18\x02 \x01(\x09\x12\x19\x0A\x11request_streaming\x18\x03 \x01(\x08\x12\x19\x0A\x11response_type_url\x18\x04 \x01(\x09\x12\x1A\x0A\x12response_streaming\x18\x05 \x01(\x08\x12(\x0A\x07options\x18\x06 \x03(\x0B2\x17.google.protobuf.Option\x12'\x0A\x06syntax\x18\x07 \x01(\x0E2\x17.google.protobuf.Syntax\"#\x0A\x05Mixin\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x0C\x0A\x04root\x18\x02 \x01(\x09Bv\x0A\x13com.google.protobufB\x08ApiProtoP\x01Z,google.golang.org/protobuf/types/known/apipb\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3" + ' +� +google/protobuf/api.protogoogle.protobufgoogle/protobuf/type.proto"� +Api +name ( ( +methods (2.google.protobuf.Method( +options (2.google.protobuf.Option +version ( 6 +source_context (2.google.protobuf.SourceContext& +mixins (2.google.protobuf.Mixin\' +syntax (2.google.protobuf.Syntax"� +Method +name ( +request_type_url ( +request_streaming ( +response_type_url ( +response_streaming (( +options (2.google.protobuf.Option\' +syntax (2.google.protobuf.Syntax"# +Mixin +name ( +root ( Bv +com.google.protobufBApiProtoPZ,google.golang.org/protobuf/types/known/apipb�GPB�Google.Protobuf.WellKnownTypesbproto3' , true); static::$is_initialized = true; diff --git a/php/src/GPBMetadata/Google/Protobuf/Duration.php b/php/src/GPBMetadata/Google/Protobuf/Duration.php index 29e02a8451..5d8023e4db 100644 --- a/php/src/GPBMetadata/Google/Protobuf/Duration.php +++ b/php/src/GPBMetadata/Google/Protobuf/Duration.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/duration.proto namespace GPBMetadata\Google\Protobuf; @@ -16,7 +15,13 @@ class Duration return; } $pool->internalAddGeneratedFile( - "\x0A\xEB\x01\x0A\x1Egoogle/protobuf/duration.proto\x12\x0Fgoogle.protobuf\"*\x0A\x08Duration\x12\x0F\x0A\x07seconds\x18\x01 \x01(\x03\x12\x0D\x0A\x05nanos\x18\x02 \x01(\x05B\x83\x01\x0A\x13com.google.protobufB\x0DDurationProtoP\x01Z1google.golang.org/protobuf/types/known/durationpb\xF8\x01\x01\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3" + ' +� +google/protobuf/duration.protogoogle.protobuf"* +Duration +seconds ( +nanos (B� +com.google.protobufB DurationProtoPZ1google.golang.org/protobuf/types/known/durationpb��GPB�Google.Protobuf.WellKnownTypesbproto3' , true); static::$is_initialized = true; diff --git a/php/src/GPBMetadata/Google/Protobuf/FieldMask.php b/php/src/GPBMetadata/Google/Protobuf/FieldMask.php index 394e41043a..f31bcc0012 100644 --- a/php/src/GPBMetadata/Google/Protobuf/FieldMask.php +++ b/php/src/GPBMetadata/Google/Protobuf/FieldMask.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/field_mask.proto namespace GPBMetadata\Google\Protobuf; @@ -16,7 +15,12 @@ class FieldMask return; } $pool->internalAddGeneratedFile( - "\x0A\xDF\x01\x0A google/protobuf/field_mask.proto\x12\x0Fgoogle.protobuf\"\x1A\x0A\x09FieldMask\x12\x0D\x0A\x05paths\x18\x01 \x03(\x09B\x85\x01\x0A\x13com.google.protobufB\x0EFieldMaskProtoP\x01Z2google.golang.org/protobuf/types/known/fieldmaskpb\xF8\x01\x01\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3" + ' +� + google/protobuf/field_mask.protogoogle.protobuf" + FieldMask +paths ( B� +com.google.protobufBFieldMaskProtoPZ2google.golang.org/protobuf/types/known/fieldmaskpb��GPB�Google.Protobuf.WellKnownTypesbproto3' , true); static::$is_initialized = true; diff --git a/php/src/GPBMetadata/Google/Protobuf/GPBEmpty.php b/php/src/GPBMetadata/Google/Protobuf/GPBEmpty.php index 2842d0e992..5e42536f27 100644 --- a/php/src/GPBMetadata/Google/Protobuf/GPBEmpty.php +++ b/php/src/GPBMetadata/Google/Protobuf/GPBEmpty.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/empty.proto namespace GPBMetadata\Google\Protobuf; @@ -16,7 +15,12 @@ class GPBEmpty return; } $pool->internalAddGeneratedFile( - "\x0A\xBE\x01\x0A\x1Bgoogle/protobuf/empty.proto\x12\x0Fgoogle.protobuf\"\x07\x0A\x05EmptyB}\x0A\x13com.google.protobufB\x0AEmptyProtoP\x01Z.google.golang.org/protobuf/types/known/emptypb\xF8\x01\x01\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3" + ' +� +google/protobuf/empty.protogoogle.protobuf" +EmptyB} +com.google.protobufB +EmptyProtoPZ.google.golang.org/protobuf/types/known/emptypb��GPB�Google.Protobuf.WellKnownTypesbproto3' , true); static::$is_initialized = true; diff --git a/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php b/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php index c2af953db2..4247c09546 100644 --- a/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php +++ b/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace GPBMetadata\Google\Protobuf\Internal; @@ -32,7 +31,7 @@ class Descriptor ->optional('options', \Google\Protobuf\Internal\GPBType::MESSAGE, 8, 'google.protobuf.internal.FileOptions') ->optional('source_code_info', \Google\Protobuf\Internal\GPBType::MESSAGE, 9, 'google.protobuf.internal.SourceCodeInfo') ->optional('syntax', \Google\Protobuf\Internal\GPBType::STRING, 12) - ->optional('edition', \Google\Protobuf\Internal\GPBType::ENUM, 14, 'google.protobuf.internal.Edition') + ->optional('edition', \Google\Protobuf\Internal\GPBType::STRING, 13) ->finalizeToPool(); $pool->addMessage('google.protobuf.internal.DescriptorProto', \Google\Protobuf\Internal\DescriptorProto::class) @@ -61,22 +60,6 @@ class Descriptor $pool->addMessage('google.protobuf.internal.ExtensionRangeOptions', \Google\Protobuf\Internal\ExtensionRangeOptions::class) ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption') - ->repeated('declaration', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.ExtensionRangeOptions.Declaration') - ->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 50, 'google.protobuf.internal.FeatureSet') - ->optional('verification', \Google\Protobuf\Internal\GPBType::ENUM, 3, 'google.protobuf.internal.ExtensionRangeOptions.VerificationState') - ->finalizeToPool(); - - $pool->addMessage('google.protobuf.internal.ExtensionRangeOptions.Declaration', \Google\Protobuf\Internal\ExtensionRangeOptions\Declaration::class) - ->optional('number', \Google\Protobuf\Internal\GPBType::INT32, 1) - ->optional('full_name', \Google\Protobuf\Internal\GPBType::STRING, 2) - ->optional('type', \Google\Protobuf\Internal\GPBType::STRING, 3) - ->optional('reserved', \Google\Protobuf\Internal\GPBType::BOOL, 5) - ->optional('repeated', \Google\Protobuf\Internal\GPBType::BOOL, 6) - ->finalizeToPool(); - - $pool->addEnum('google.protobuf.internal.ExtensionRangeOptions.VerificationState', \Google\Protobuf\Internal\VerificationState::class) - ->value("DECLARATION", 0) - ->value("UNVERIFIED", 1) ->finalizeToPool(); $pool->addMessage('google.protobuf.internal.FieldDescriptorProto', \Google\Protobuf\Internal\FieldDescriptorProto::class) @@ -116,8 +99,8 @@ class Descriptor $pool->addEnum('google.protobuf.internal.FieldDescriptorProto.Label', \Google\Protobuf\Internal\Label::class) ->value("LABEL_OPTIONAL", 1) - ->value("LABEL_REPEATED", 3) ->value("LABEL_REQUIRED", 2) + ->value("LABEL_REPEATED", 3) ->finalizeToPool(); $pool->addMessage('google.protobuf.internal.OneofDescriptorProto', \Google\Protobuf\Internal\OneofDescriptorProto::class) @@ -170,6 +153,7 @@ class Descriptor ->optional('cc_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 16) ->optional('java_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 17) ->optional('py_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 18) + ->optional('php_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 42) ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 23) ->optional('cc_enable_arenas', \Google\Protobuf\Internal\GPBType::BOOL, 31) ->optional('objc_class_prefix', \Google\Protobuf\Internal\GPBType::STRING, 36) @@ -179,7 +163,6 @@ class Descriptor ->optional('php_namespace', \Google\Protobuf\Internal\GPBType::STRING, 41) ->optional('php_metadata_namespace', \Google\Protobuf\Internal\GPBType::STRING, 44) ->optional('ruby_package', \Google\Protobuf\Internal\GPBType::STRING, 45) - ->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 50, 'google.protobuf.internal.FeatureSet') ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption') ->finalizeToPool(); @@ -195,7 +178,6 @@ class Descriptor ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3) ->optional('map_entry', \Google\Protobuf\Internal\GPBType::BOOL, 7) ->optional('deprecated_legacy_json_field_conflicts', \Google\Protobuf\Internal\GPBType::BOOL, 11) - ->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 12, 'google.protobuf.internal.FeatureSet') ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption') ->finalizeToPool(); @@ -207,27 +189,9 @@ class Descriptor ->optional('unverified_lazy', \Google\Protobuf\Internal\GPBType::BOOL, 15) ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3) ->optional('weak', \Google\Protobuf\Internal\GPBType::BOOL, 10) - ->optional('debug_redact', \Google\Protobuf\Internal\GPBType::BOOL, 16) - ->optional('retention', \Google\Protobuf\Internal\GPBType::ENUM, 17, 'google.protobuf.internal.FieldOptions.OptionRetention') - ->repeated('targets', \Google\Protobuf\Internal\GPBType::ENUM, 19, 'google.protobuf.internal.FieldOptions.OptionTargetType') - ->repeated('edition_defaults', \Google\Protobuf\Internal\GPBType::MESSAGE, 20, 'google.protobuf.internal.FieldOptions.EditionDefault') - ->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 21, 'google.protobuf.internal.FeatureSet') - ->optional('feature_support', \Google\Protobuf\Internal\GPBType::MESSAGE, 22, 'google.protobuf.internal.FieldOptions.FeatureSupport') ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption') ->finalizeToPool(); - $pool->addMessage('google.protobuf.internal.FieldOptions.EditionDefault', \Google\Protobuf\Internal\FieldOptions\EditionDefault::class) - ->optional('edition', \Google\Protobuf\Internal\GPBType::ENUM, 3, 'google.protobuf.internal.Edition') - ->optional('value', \Google\Protobuf\Internal\GPBType::STRING, 2) - ->finalizeToPool(); - - $pool->addMessage('google.protobuf.internal.FieldOptions.FeatureSupport', \Google\Protobuf\Internal\FieldOptions\FeatureSupport::class) - ->optional('edition_introduced', \Google\Protobuf\Internal\GPBType::ENUM, 1, 'google.protobuf.internal.Edition') - ->optional('edition_deprecated', \Google\Protobuf\Internal\GPBType::ENUM, 2, 'google.protobuf.internal.Edition') - ->optional('deprecation_warning', \Google\Protobuf\Internal\GPBType::STRING, 3) - ->optional('edition_removed', \Google\Protobuf\Internal\GPBType::ENUM, 4, 'google.protobuf.internal.Edition') - ->finalizeToPool(); - $pool->addEnum('google.protobuf.internal.FieldOptions.CType', \Google\Protobuf\Internal\CType::class) ->value("STRING", 0) ->value("CORD", 1) @@ -240,27 +204,7 @@ class Descriptor ->value("JS_NUMBER", 2) ->finalizeToPool(); - $pool->addEnum('google.protobuf.internal.FieldOptions.OptionRetention', \Google\Protobuf\Internal\OptionRetention::class) - ->value("RETENTION_UNKNOWN", 0) - ->value("RETENTION_RUNTIME", 1) - ->value("RETENTION_SOURCE", 2) - ->finalizeToPool(); - - $pool->addEnum('google.protobuf.internal.FieldOptions.OptionTargetType', \Google\Protobuf\Internal\OptionTargetType::class) - ->value("TARGET_TYPE_UNKNOWN", 0) - ->value("TARGET_TYPE_FILE", 1) - ->value("TARGET_TYPE_EXTENSION_RANGE", 2) - ->value("TARGET_TYPE_MESSAGE", 3) - ->value("TARGET_TYPE_FIELD", 4) - ->value("TARGET_TYPE_ONEOF", 5) - ->value("TARGET_TYPE_ENUM", 6) - ->value("TARGET_TYPE_ENUM_ENTRY", 7) - ->value("TARGET_TYPE_SERVICE", 8) - ->value("TARGET_TYPE_METHOD", 9) - ->finalizeToPool(); - $pool->addMessage('google.protobuf.internal.OneofOptions', \Google\Protobuf\Internal\OneofOptions::class) - ->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.FeatureSet') ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption') ->finalizeToPool(); @@ -268,20 +212,15 @@ class Descriptor ->optional('allow_alias', \Google\Protobuf\Internal\GPBType::BOOL, 2) ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 3) ->optional('deprecated_legacy_json_field_conflicts', \Google\Protobuf\Internal\GPBType::BOOL, 6) - ->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 7, 'google.protobuf.internal.FeatureSet') ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption') ->finalizeToPool(); $pool->addMessage('google.protobuf.internal.EnumValueOptions', \Google\Protobuf\Internal\EnumValueOptions::class) ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 1) - ->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 2, 'google.protobuf.internal.FeatureSet') - ->optional('debug_redact', \Google\Protobuf\Internal\GPBType::BOOL, 3) - ->optional('feature_support', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.FieldOptions.FeatureSupport') ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption') ->finalizeToPool(); $pool->addMessage('google.protobuf.internal.ServiceOptions', \Google\Protobuf\Internal\ServiceOptions::class) - ->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 34, 'google.protobuf.internal.FeatureSet') ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 33) ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption') ->finalizeToPool(); @@ -289,7 +228,6 @@ class Descriptor $pool->addMessage('google.protobuf.internal.MethodOptions', \Google\Protobuf\Internal\MethodOptions::class) ->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 33) ->optional('idempotency_level', \Google\Protobuf\Internal\GPBType::ENUM, 34, 'google.protobuf.internal.MethodOptions.IdempotencyLevel') - ->optional('features', \Google\Protobuf\Internal\GPBType::MESSAGE, 35, 'google.protobuf.internal.FeatureSet') ->repeated('uninterpreted_option', \Google\Protobuf\Internal\GPBType::MESSAGE, 999, 'google.protobuf.internal.UninterpretedOption') ->finalizeToPool(); @@ -314,64 +252,6 @@ class Descriptor ->required('is_extension', \Google\Protobuf\Internal\GPBType::BOOL, 2) ->finalizeToPool(); - $pool->addMessage('google.protobuf.internal.FeatureSet', \Google\Protobuf\Internal\FeatureSet::class) - ->optional('field_presence', \Google\Protobuf\Internal\GPBType::ENUM, 1, 'google.protobuf.internal.FeatureSet.FieldPresence') - ->optional('enum_type', \Google\Protobuf\Internal\GPBType::ENUM, 2, 'google.protobuf.internal.FeatureSet.EnumType') - ->optional('repeated_field_encoding', \Google\Protobuf\Internal\GPBType::ENUM, 3, 'google.protobuf.internal.FeatureSet.RepeatedFieldEncoding') - ->optional('utf8_validation', \Google\Protobuf\Internal\GPBType::ENUM, 4, 'google.protobuf.internal.FeatureSet.Utf8Validation') - ->optional('message_encoding', \Google\Protobuf\Internal\GPBType::ENUM, 5, 'google.protobuf.internal.FeatureSet.MessageEncoding') - ->optional('json_format', \Google\Protobuf\Internal\GPBType::ENUM, 6, 'google.protobuf.internal.FeatureSet.JsonFormat') - ->finalizeToPool(); - - $pool->addEnum('google.protobuf.internal.FeatureSet.FieldPresence', \Google\Protobuf\Internal\FieldPresence::class) - ->value("FIELD_PRESENCE_UNKNOWN", 0) - ->value("EXPLICIT", 1) - ->value("IMPLICIT", 2) - ->value("LEGACY_REQUIRED", 3) - ->finalizeToPool(); - - $pool->addEnum('google.protobuf.internal.FeatureSet.EnumType', \Google\Protobuf\Internal\EnumType::class) - ->value("ENUM_TYPE_UNKNOWN", 0) - ->value("OPEN", 1) - ->value("CLOSED", 2) - ->finalizeToPool(); - - $pool->addEnum('google.protobuf.internal.FeatureSet.RepeatedFieldEncoding', \Google\Protobuf\Internal\RepeatedFieldEncoding::class) - ->value("REPEATED_FIELD_ENCODING_UNKNOWN", 0) - ->value("PACKED", 1) - ->value("EXPANDED", 2) - ->finalizeToPool(); - - $pool->addEnum('google.protobuf.internal.FeatureSet.Utf8Validation', \Google\Protobuf\Internal\Utf8Validation::class) - ->value("UTF8_VALIDATION_UNKNOWN", 0) - ->value("VERIFY", 2) - ->value("NONE", 3) - ->finalizeToPool(); - - $pool->addEnum('google.protobuf.internal.FeatureSet.MessageEncoding', \Google\Protobuf\Internal\MessageEncoding::class) - ->value("MESSAGE_ENCODING_UNKNOWN", 0) - ->value("LENGTH_PREFIXED", 1) - ->value("DELIMITED", 2) - ->finalizeToPool(); - - $pool->addEnum('google.protobuf.internal.FeatureSet.JsonFormat', \Google\Protobuf\Internal\JsonFormat::class) - ->value("JSON_FORMAT_UNKNOWN", 0) - ->value("ALLOW", 1) - ->value("LEGACY_BEST_EFFORT", 2) - ->finalizeToPool(); - - $pool->addMessage('google.protobuf.internal.FeatureSetDefaults', \Google\Protobuf\Internal\FeatureSetDefaults::class) - ->repeated('defaults', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.FeatureSetDefaults.FeatureSetEditionDefault') - ->optional('minimum_edition', \Google\Protobuf\Internal\GPBType::ENUM, 4, 'google.protobuf.internal.Edition') - ->optional('maximum_edition', \Google\Protobuf\Internal\GPBType::ENUM, 5, 'google.protobuf.internal.Edition') - ->finalizeToPool(); - - $pool->addMessage('google.protobuf.internal.FeatureSetDefaults.FeatureSetEditionDefault', \Google\Protobuf\Internal\FeatureSetDefaults\FeatureSetEditionDefault::class) - ->optional('edition', \Google\Protobuf\Internal\GPBType::ENUM, 3, 'google.protobuf.internal.Edition') - ->optional('overridable_features', \Google\Protobuf\Internal\GPBType::MESSAGE, 4, 'google.protobuf.internal.FeatureSet') - ->optional('fixed_features', \Google\Protobuf\Internal\GPBType::MESSAGE, 5, 'google.protobuf.internal.FeatureSet') - ->finalizeToPool(); - $pool->addMessage('google.protobuf.internal.SourceCodeInfo', \Google\Protobuf\Internal\SourceCodeInfo::class) ->repeated('location', \Google\Protobuf\Internal\GPBType::MESSAGE, 1, 'google.protobuf.internal.SourceCodeInfo.Location') ->finalizeToPool(); @@ -393,28 +273,6 @@ class Descriptor ->optional('source_file', \Google\Protobuf\Internal\GPBType::STRING, 2) ->optional('begin', \Google\Protobuf\Internal\GPBType::INT32, 3) ->optional('end', \Google\Protobuf\Internal\GPBType::INT32, 4) - ->optional('semantic', \Google\Protobuf\Internal\GPBType::ENUM, 5, 'google.protobuf.internal.GeneratedCodeInfo.Annotation.Semantic') - ->finalizeToPool(); - - $pool->addEnum('google.protobuf.internal.GeneratedCodeInfo.Annotation.Semantic', \Google\Protobuf\Internal\Semantic::class) - ->value("NONE", 0) - ->value("SET", 1) - ->value("ALIAS", 2) - ->finalizeToPool(); - - $pool->addEnum('google.protobuf.internal.Edition', \Google\Protobuf\Internal\Edition::class) - ->value("EDITION_UNKNOWN", 0) - ->value("EDITION_LEGACY", 900) - ->value("EDITION_PROTO2", 998) - ->value("EDITION_PROTO3", 999) - ->value("EDITION_2023", 1000) - ->value("EDITION_2024", 1001) - ->value("EDITION_1_TEST_ONLY", 1) - ->value("EDITION_2_TEST_ONLY", 2) - ->value("EDITION_99997_TEST_ONLY", 99997) - ->value("EDITION_99998_TEST_ONLY", 99998) - ->value("EDITION_99999_TEST_ONLY", 99999) - ->value("EDITION_MAX", 2147483647) ->finalizeToPool(); $pool->finish(); diff --git a/php/src/GPBMetadata/Google/Protobuf/SourceContext.php b/php/src/GPBMetadata/Google/Protobuf/SourceContext.php index 8d1566c05a..797732d9f3 100644 --- a/php/src/GPBMetadata/Google/Protobuf/SourceContext.php +++ b/php/src/GPBMetadata/Google/Protobuf/SourceContext.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/source_context.proto namespace GPBMetadata\Google\Protobuf; @@ -16,7 +15,12 @@ class SourceContext return; } $pool->internalAddGeneratedFile( - "\x0A\xF0\x01\x0A\$google/protobuf/source_context.proto\x12\x0Fgoogle.protobuf\"\"\x0A\x0DSourceContext\x12\x11\x0A\x09file_name\x18\x01 \x01(\x09B\x8A\x01\x0A\x13com.google.protobufB\x12SourceContextProtoP\x01Z6google.golang.org/protobuf/types/known/sourcecontextpb\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3" + ' +� +$google/protobuf/source_context.protogoogle.protobuf"" + SourceContext + file_name ( B� +com.google.protobufBSourceContextProtoPZ6google.golang.org/protobuf/types/known/sourcecontextpb�GPB�Google.Protobuf.WellKnownTypesbproto3' , true); static::$is_initialized = true; diff --git a/php/src/GPBMetadata/Google/Protobuf/Struct.php b/php/src/GPBMetadata/Google/Protobuf/Struct.php index 6fad5d9a83462a43c8385478e396555025e61bc0..888a81adee4075a2c04ab9805212f7c132174f4e 100644 GIT binary patch delta 522 zcmX@W)5ST#d1FcgBbz$cKNc>Ti8(TQLj39Z`RO^SdId%KCHYCEX-X}OTx`K5MWx9l zLdINdX_=`xDa8_u3d|bZM#_`zS;Xu0+`wY4c_l@aQm$OwNL(RqF6QjiN}zH^4Nf6d zF4nTdoYGVYCLovFNK6mSD!nj}tQC_5qtYuzE><v4$bgG0uQVqo9-<Ru5TB70vd+n= z%>3~TLSkGzd8N5YsYOtgAUha6z~aRvMVWc&P;q9EQ-I<kTwF={`7m=?fTA2gQGG5R zplYCBp{iMd;@n2!Kz~YzGl1NZlUWRtV*|@cP3~lou4iy!<6_Cq%u7)+=Hm1Ls)0CO zjf)NJZdicf@UoUP7pEW4lMqdOTwH#kK0fhbjy|ET0t`;|T*AruxyW7y#fuX+BvJxE z@x&CsIJt_|(D(-<<02+z_W-9=Omgm!cm&G>)$4_)=Hz(i<(KD$R2HNbC$WJe*jRn? HA66FtlWvwD literal 1600 zcmaJ>{ZHF45dA%Wg$HaZ(@2{J3N2$((xwH`HPu#_G(|#b>ISREi4tckoA}>%=X}r* zwo1*1^WMAXyYqeg9N)*<KABKK6JOF5Sw0eZPf46aG72J2mf3nu6B0xZG2=AR2^qO$ z<}Qdcx>~#e>dYm>OJ{iPjE=5mWd7A%xc1GMOq|)!9XS9<qbv#NfP_&La@tnPpxRDl zk_A#%@0uq32b#uyK*?lof1%P}`O^0$isQ}E4RFpiE#Q8dl5dKu{m}^g;%v!TKvL;T zxE-+cjtM52&)IL-&;?ohJf%QwV%M1nB#Q(=f-3^rIwZL!Vh`d75^zCYy6~=qq>1pk zH==2fuvkXP9H4_iNM)5tTxlH^VNs5)Nh|j_7&J^?5ZDpjjZR2HWtNC@<r@W_swd^_ z=o2e^SgTbPb_`W&RY0WedE1WVZO0DWkMn0^_`hO!TcZoOagNCg1j+Y6=nMsnT%^;> ztAKE`Tv{{AS1Bx=A&|huY{A9u?&~k)^qj4a6~hrSc?6n;F2QZbuCJpZyZB^oC_<|U z21e+kjkg8j<fqRwT41{9LSbxBF?tOnw+J2psH-G#pAK3m_j#fKsNX5{Es=44w;M!l zRRwV{h}8%(1BTMM1P#!^6dS!lZz!^dB~5CI&$f+MDR6w42x}Cx+G&56QWU*oEukfA zgyV{ERuS5zCkO!NvxYyZ@G6z3ja}w7t+c9qahBGVdUd5{zNWx<&KH)xOxE#+iIulk zwp_nLVp87~?t7{@uQej3z2RF$dJmt<9_v^2LRAng`_h`-Os99Z*7OEe4BR00<>@$& zYnU)7U#g>~oo7Z3vN^mPKib842qW%`P>+)Ec{Iw$n5ONGh<=G;OvXz%!FhYC#<b8A z{!JK{-qyl?#g1|&YGUf;#MHl2&aY8uftsMw>8Xip?o~tLLq2<UM%6#ZltShc=}CLi Fw7+3(5a$2@ diff --git a/php/src/GPBMetadata/Google/Protobuf/Timestamp.php b/php/src/GPBMetadata/Google/Protobuf/Timestamp.php index fd4eaacc9d..09437271a9 100644 --- a/php/src/GPBMetadata/Google/Protobuf/Timestamp.php +++ b/php/src/GPBMetadata/Google/Protobuf/Timestamp.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/timestamp.proto namespace GPBMetadata\Google\Protobuf; @@ -16,7 +15,13 @@ class Timestamp return; } $pool->internalAddGeneratedFile( - "\x0A\xEF\x01\x0A\x1Fgoogle/protobuf/timestamp.proto\x12\x0Fgoogle.protobuf\"+\x0A\x09Timestamp\x12\x0F\x0A\x07seconds\x18\x01 \x01(\x03\x12\x0D\x0A\x05nanos\x18\x02 \x01(\x05B\x85\x01\x0A\x13com.google.protobufB\x0ETimestampProtoP\x01Z2google.golang.org/protobuf/types/known/timestamppb\xF8\x01\x01\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3" + ' +� +google/protobuf/timestamp.protogoogle.protobuf"+ + Timestamp +seconds ( +nanos (B� +com.google.protobufBTimestampProtoPZ2google.golang.org/protobuf/types/known/timestamppb��GPB�Google.Protobuf.WellKnownTypesbproto3' , true); static::$is_initialized = true; diff --git a/php/src/GPBMetadata/Google/Protobuf/Type.php b/php/src/GPBMetadata/Google/Protobuf/Type.php index 6bec20ded3c2eae7b6d520581f644a993fc37885..7d0bfbb533a2af7e63c43fd4b02e5bf41c61ac3c 100644 GIT binary patch literal 2205 zcmb7FTTkOw5N@vE2?S%dU5iSq(<~}sRe}_%trSYDgqSD-;xuu(%PLaj*e6*RV_UY< zlCJnEed%L=NuT;w^{@1?bB<Y)%YwGN1kZfm+~>@<-+OO8cupGBp}rnclMJUMd`pSv zyP<2iHW^MvBkB{wz4k1d`Xxf@Dru=2QR+?Y3#10_#5ZV#j9qtZ(*sUK(m^=&Xo-IT zIQlgWJl&wA(XL(4P&f5Z?>9K3-)63maRgx4dJqr|neYw>{&|z3Z5bp8^$>q{tYBa{ zR%q$A^()4DOh&pLP$Vv6M-#^gE!QE8pgIOE?vcnQ!|r%4=5|aLW9T=Xkot~p_v<t; ze9H@6zm3pJWlY1kNK8`PyK~FTStC-6Vysk_f;=XnKcTbU3Grz-@tq?cH#2Y>|JQ${ zLj9^UtyJz4y5~R2>hcbqxR}~a_+dV;$NqQLUG`PejFUaZwin~@Sg^bB+Zt>?+;3?k z(na0J&Tj84f}^1s7*R|Su<%a;(yaH=8l>68$O)1t3euO59a+>i135`j#a#Kb(t`QY zDN{>%$hr=7M}eF|oFElp#r4<-1ag`apDqzqu9sdyem)>MgPwEcXG?^+QcC?@$Ocm< z)NkZ067uC`4_&S<{GEYJ6y+YIuPn#px#i2BFL~go(iuXeZy;yrzG>k&THzG4XD$j4 zFi!4~tP;-TdPse&M5369>zT$cK@wq=?dD+O+dOPR+JYRf94?nhZ{!tDLL<1bSJaeO z@q2Z)oWkSf+yvpLz;y<^hroS)3hO2v=@UB~{H)s(D(9HE@MjXzJXI0aw9B?K=(WyT z>Z_LciL?PZE~%@%+PNYoFe%`I({r_|iOKl8+0tHqEv8~ZFA}6@0f%KVgLy|jPMfcl zI#ROp62z=X>mYC^HB~(qS7V!9t<!8ZL?O1>=%~H62(g6=rQ5AG6fqYgYL}YQ71v@D zEG%@f9=lLly$dlfZNfVD*yUj%Vq-ysk&3aEZe(S1PJjrh5JGNt1fIgyNwrgNwyNh% z?Q*8BGCY}8sBNvOA_xn-py?<-^qL)|j-_7Gw3VucnpEL0Tv-KYEgrFGW%og#D2-Yj zZSD5b+%n#eY#3%oi>+?%1AFw~rm~s-Uz^HS`;krUf^Z+${6loVR%{hBA0Kw%2(otx z%v*d8nfEnfSv*;)5kB}YN|23S5jGgz%a&GsJ!p4SO)cY^EQk)pMC~1H;k8~gRTJ3L z%5QBu@n-+-2_3t(?u<*WKb}9_!NHZ|{^IZ>?hXG<Bz{k(@G$+6eAeJcyY&8OmtIlZ jK4VyBJ{V^C#XsDQ55`x~^_w}C4<1U6jBeU3+yeXuWdD7~ literal 3575 zcmbtXZExa65dO}u*yf@(sTvLfA%QflY-}h>VpA}^OJxZ;uyDROHnL4iddh$A%y`!? z*hD8K5&@QHo_U|~{`&jo%ck~$4Y|)lC+17`_`>2ZoNdA&4i<sO9=EF%57{Dk-nbqQ z>x^k8Gfa!=+Q|9=L=BVm|Iqulx^^})*mz=EraBw2p>Fg|O$R^}Y{Lcbv2_rvJ^qoH zf%Rkjvf*|5R;&5WGmkdTg0taRz2~vBbYjOIl7u}*TR`HvR$F*Z6fp}VYu{=N{x;i3 z&t0%6c4BxtcB8rLyRqwd?tkFS4O=;0#6hr(U2XkE>;^tV0n=ablT(&(BKCL_fb%zO z-v)c+$2{~M&(?Uf2;EH_gkymAdTSo1QN)vzQ=t~=+!Z@XZ0z+)M&7VE-15A3#zG!% zL;srWMuOM$ll?}7Y{h@+^)iPt`8TDel%akAuI=J#d5Xu`Z?5oOSuRs&2T&I$sd;GZ zk-cju_D*ZVdq4TyR1T-#-ZjqwHAoOiNkF>cSh0`y#gb~8FA`%Dunh|JE1+m5${KB~ z5J4*pXtc4$;EZq#!6)#qi>M!kSZC#OZy5>DIf7aUQo+1tr@m)jeSm0`2Z$~y0-pyf zNzqCvNDp#BTpE|b1}jgZ+9`?@U6vG?1V>FB!JrqzAS}K}-6A5rL{vyL^8F;uj$ZuO z*$JLb%A=#_WrL;?O?i`E@g;O#;0uz=l%$LK(JlanFATs%8oE<)(tdJ%jAb!9q+Tt# zLDKcxMB@BXP^b$hT)NPjZu}ycD20?~U^+U$(=Uh>lId@sA9*OqD49eCZcx&zN{f=2 zl@=fy!oDjUc=K)O3BD}KR2*>HlAcfz!6aL9nUXA;Qh8c&FgBmKjNMflb%<p1{6NKZ z5tWs8Il)=Q0gLRa?$;>r=eaggQf1NunP6?nSI*Xp=l?j~R(745gF{91G1nMwtcbSE zCg_s^>st?FeLgd84fB&B&f&LYSO__lFq%12?;s!~3g#ACQX$CT&QvUc0Hqa(kzsXU zVi5;qqC(9q4?$?YSQ0gWXdylNATqV*&tUXf*HT5$(8yASNqL~aNs}gg?vg{QY2FDz zN;UjAC<J9{O-9C0KtzJlIh9yDoS3t5roF<Fdwn`phBCCOute5g!lFJ{`c$w$OOUNa zQ!sF;JK#ozJGwEu7aXV!V<PKLBY&q9xReDH90bYeVpJ=vndYoPB?llW3yh9fMz%C8 znqvGkTYY7sjSS^(WIa?DEe$s)_GUW|HOJP-1Ti?rq7n8~V<-Bbv(ZGy2qG4PgfDEQ z67NJG>xz|PTQr0*Ei$Za9mZS2Ah+~eOY$sH(&%y!%eVF3o>WR>7WMok=D?welx@m) z?!avRzHbL+yYwA9FhAmtphalZbqn!;!>TpX%+1QAKxNN$3QH;5a5QZW%=_<+?$Ncd zv6Ei_-(%nhA$U=$4BCa1i*~6p;Bob5>3t{vP?7ci^ue%{&vUw0$U!OEx*CL|JKsp~ zox(m4On7gBhLZ#9T>X{+nk~5F>{|!}uhGSaNxFlK;al_XGw~d_4m`(S*Mo3fywgM< zpZwropYAuCM|(HG_Qa-xmjW)(&TGL_JbcB~hhFJJy6V*BRj2-md)_V5pz;V<8XdYS cwT{v!?O&2>L++Mw@P<Li<TCJDd#%;}2gdD+Gynhq diff --git a/php/src/GPBMetadata/Google/Protobuf/Wrappers.php b/php/src/GPBMetadata/Google/Protobuf/Wrappers.php index 49f84252b6..e7ea1a3b95 100644 --- a/php/src/GPBMetadata/Google/Protobuf/Wrappers.php +++ b/php/src/GPBMetadata/Google/Protobuf/Wrappers.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/wrappers.proto namespace GPBMetadata\Google\Protobuf; @@ -16,7 +15,32 @@ class Wrappers return; } $pool->internalAddGeneratedFile( - "\x0A\xC7\x03\x0A\x1Egoogle/protobuf/wrappers.proto\x12\x0Fgoogle.protobuf\"\x1C\x0A\x0BDoubleValue\x12\x0D\x0A\x05value\x18\x01 \x01(\x01\"\x1B\x0A\x0AFloatValue\x12\x0D\x0A\x05value\x18\x01 \x01(\x02\"\x1B\x0A\x0AInt64Value\x12\x0D\x0A\x05value\x18\x01 \x01(\x03\"\x1C\x0A\x0BUInt64Value\x12\x0D\x0A\x05value\x18\x01 \x01(\x04\"\x1B\x0A\x0AInt32Value\x12\x0D\x0A\x05value\x18\x01 \x01(\x05\"\x1C\x0A\x0BUInt32Value\x12\x0D\x0A\x05value\x18\x01 \x01(\x0D\"\x1A\x0A\x09BoolValue\x12\x0D\x0A\x05value\x18\x01 \x01(\x08\"\x1C\x0A\x0BStringValue\x12\x0D\x0A\x05value\x18\x01 \x01(\x09\"\x1B\x0A\x0ABytesValue\x12\x0D\x0A\x05value\x18\x01 \x01(\x0CB\x83\x01\x0A\x13com.google.protobufB\x0DWrappersProtoP\x01Z1google.golang.org/protobuf/types/known/wrapperspb\xF8\x01\x01\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3" + ' +� +google/protobuf/wrappers.protogoogle.protobuf" +DoubleValue +value (" + +FloatValue +value (" + +Int64Value +value (" +UInt64Value +value (" + +Int32Value +value (" +UInt32Value +value ( " + BoolValue +value (" +StringValue +value ( " + +BytesValue +value (B� +com.google.protobufB WrappersProtoPZ1google.golang.org/protobuf/types/known/wrapperspb��GPB�Google.Protobuf.WellKnownTypesbproto3' , true); static::$is_initialized = true; diff --git a/php/src/Google/Protobuf/Any.php b/php/src/Google/Protobuf/Any.php index 2f245ca2f6..feea41aad9 100644 --- a/php/src/Google/Protobuf/Any.php +++ b/php/src/Google/Protobuf/Any.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/any.proto namespace Google\Protobuf; @@ -33,7 +32,7 @@ use Google\Protobuf\Internal\GPBUtil; * if (any.isSameTypeAs(Foo.getDefaultInstance())) { * foo = any.unpack(Foo.getDefaultInstance()); * } - * Example 3: Pack and unpack a message in Python. + * Example 3: Pack and unpack a message in Python. * foo = Foo(...) * any = Any() * any.Pack(foo) @@ -41,7 +40,7 @@ use Google\Protobuf\Internal\GPBUtil; * if any.Is(Foo.DESCRIPTOR): * any.Unpack(foo) * ... - * Example 4: Pack and unpack a message in Go + * Example 4: Pack and unpack a message in Go * foo := &pb.Foo{...} * any, err := anypb.New(foo) * if err != nil { @@ -58,26 +57,25 @@ use Google\Protobuf\Internal\GPBUtil; * in the type URL, for example "foo.bar.com/x/y.z" will yield type * name "y.z". * JSON - * ==== * The JSON representation of an `Any` value uses the regular * representation of the deserialized, embedded message, with an - * additional field `\@type` which contains the type URL. Example: + * additional field `@type` which contains the type URL. Example: * package google.profile; * message Person { * string first_name = 1; * string last_name = 2; * } * { - * "\@type": "type.googleapis.com/google.profile.Person", + * "@type": "type.googleapis.com/google.profile.Person", * "firstName": <string>, * "lastName": <string> * } * If the embedded message type is well-known and has a custom JSON * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `\@type` + * `value` which holds the custom JSON in addition to the `@type` * field. Example (for message [google.protobuf.Duration][]): * { - * "\@type": "type.googleapis.com/google.protobuf.Duration", + * "@type": "type.googleapis.com/google.protobuf.Duration", * "value": "1.212s" * } * @@ -106,8 +104,7 @@ class Any extends \Google\Protobuf\Internal\AnyBase * breaking changes.) * Note: this functionality is not currently available in the official * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. As of May 2023, there are no widely used type server - * implementations and no plans to implement one. + * type.googleapis.com. * Schemes other than `http`, `https` (or the empty scheme) might be * used with implementation specific semantics. * @@ -148,8 +145,7 @@ class Any extends \Google\Protobuf\Internal\AnyBase * breaking changes.) * Note: this functionality is not currently available in the official * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. As of May 2023, there are no widely used type server - * implementations and no plans to implement one. + * type.googleapis.com. * Schemes other than `http`, `https` (or the empty scheme) might be * used with implementation specific semantics. * @type string $value @@ -182,8 +178,7 @@ class Any extends \Google\Protobuf\Internal\AnyBase * breaking changes.) * Note: this functionality is not currently available in the official * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. As of May 2023, there are no widely used type server - * implementations and no plans to implement one. + * type.googleapis.com. * Schemes other than `http`, `https` (or the empty scheme) might be * used with implementation specific semantics. * @@ -216,8 +211,7 @@ class Any extends \Google\Protobuf\Internal\AnyBase * breaking changes.) * Note: this functionality is not currently available in the official * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. As of May 2023, there are no widely used type server - * implementations and no plans to implement one. + * type.googleapis.com. * Schemes other than `http`, `https` (or the empty scheme) might be * used with implementation specific semantics. * diff --git a/php/src/Google/Protobuf/Api.php b/php/src/Google/Protobuf/Api.php index f39e81aab6..3784263cbf 100644 --- a/php/src/Google/Protobuf/Api.php +++ b/php/src/Google/Protobuf/Api.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/api.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/BoolValue.php b/php/src/Google/Protobuf/BoolValue.php index 5c750a3cd3..ecdbf4dcc2 100644 --- a/php/src/Google/Protobuf/BoolValue.php +++ b/php/src/Google/Protobuf/BoolValue.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/wrappers.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/BytesValue.php b/php/src/Google/Protobuf/BytesValue.php index bf83507e21..1582e14acd 100644 --- a/php/src/Google/Protobuf/BytesValue.php +++ b/php/src/Google/Protobuf/BytesValue.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/wrappers.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/DoubleValue.php b/php/src/Google/Protobuf/DoubleValue.php index 0b88e28275..b72399f460 100644 --- a/php/src/Google/Protobuf/DoubleValue.php +++ b/php/src/Google/Protobuf/DoubleValue.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/wrappers.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/Duration.php b/php/src/Google/Protobuf/Duration.php index f63169b121..531cd50b57 100644 --- a/php/src/Google/Protobuf/Duration.php +++ b/php/src/Google/Protobuf/Duration.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/duration.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/Enum.php b/php/src/Google/Protobuf/Enum.php index 4befa14de5..185e54e03c 100644 --- a/php/src/Google/Protobuf/Enum.php +++ b/php/src/Google/Protobuf/Enum.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/type.proto namespace Google\Protobuf; @@ -46,12 +45,6 @@ class Enum extends \Google\Protobuf\Internal\Message * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 5;</code> */ protected $syntax = 0; - /** - * The source edition string, only valid when syntax is SYNTAX_EDITIONS. - * - * Generated from protobuf field <code>string edition = 6;</code> - */ - protected $edition = ''; /** * Constructor. @@ -69,8 +62,6 @@ class Enum extends \Google\Protobuf\Internal\Message * The source context. * @type int $syntax * The source syntax. - * @type string $edition - * The source edition string, only valid when syntax is SYNTAX_EDITIONS. * } */ public function __construct($data = NULL) { @@ -218,31 +209,5 @@ class Enum extends \Google\Protobuf\Internal\Message return $this; } - /** - * The source edition string, only valid when syntax is SYNTAX_EDITIONS. - * - * Generated from protobuf field <code>string edition = 6;</code> - * @return string - */ - public function getEdition() - { - return $this->edition; - } - - /** - * The source edition string, only valid when syntax is SYNTAX_EDITIONS. - * - * Generated from protobuf field <code>string edition = 6;</code> - * @param string $var - * @return $this - */ - public function setEdition($var) - { - GPBUtil::checkString($var, True); - $this->edition = $var; - - return $this; - } - } diff --git a/php/src/Google/Protobuf/EnumValue.php b/php/src/Google/Protobuf/EnumValue.php index 3914d285d4..93c20f967c 100644 --- a/php/src/Google/Protobuf/EnumValue.php +++ b/php/src/Google/Protobuf/EnumValue.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/type.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/Field.php b/php/src/Google/Protobuf/Field.php index c2b635c60d..ddae570c2b 100644 --- a/php/src/Google/Protobuf/Field.php +++ b/php/src/Google/Protobuf/Field.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/type.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/Field/Cardinality.php b/php/src/Google/Protobuf/Field/Cardinality.php index 72a11e37f6..a422199576 100644 --- a/php/src/Google/Protobuf/Field/Cardinality.php +++ b/php/src/Google/Protobuf/Field/Cardinality.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/type.proto namespace Google\Protobuf\Field; @@ -67,3 +66,6 @@ class Cardinality } } +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Cardinality::class, \Google\Protobuf\Field_Cardinality::class); + diff --git a/php/src/Google/Protobuf/Field/Kind.php b/php/src/Google/Protobuf/Field/Kind.php index bcbfcdd19b..2d8dd77c1c 100644 --- a/php/src/Google/Protobuf/Field/Kind.php +++ b/php/src/Google/Protobuf/Field/Kind.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/type.proto namespace Google\Protobuf\Field; @@ -172,3 +171,6 @@ class Kind } } +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Kind::class, \Google\Protobuf\Field_Kind::class); + diff --git a/php/src/Google/Protobuf/FieldMask.php b/php/src/Google/Protobuf/FieldMask.php index 2661c30704..a8e5243f83 100644 --- a/php/src/Google/Protobuf/FieldMask.php +++ b/php/src/Google/Protobuf/FieldMask.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/field_mask.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/FloatValue.php b/php/src/Google/Protobuf/FloatValue.php index 90c79156c0..4285358d5e 100644 --- a/php/src/Google/Protobuf/FloatValue.php +++ b/php/src/Google/Protobuf/FloatValue.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/wrappers.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/GPBEmpty.php b/php/src/Google/Protobuf/GPBEmpty.php index 24db6dc677..4db69238bf 100644 --- a/php/src/Google/Protobuf/GPBEmpty.php +++ b/php/src/Google/Protobuf/GPBEmpty.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/empty.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/Int32Value.php b/php/src/Google/Protobuf/Int32Value.php index 98791408f3..cfd73cdc90 100644 --- a/php/src/Google/Protobuf/Int32Value.php +++ b/php/src/Google/Protobuf/Int32Value.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/wrappers.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/Int64Value.php b/php/src/Google/Protobuf/Int64Value.php index cb83ba4854..143474fcd7 100644 --- a/php/src/Google/Protobuf/Int64Value.php +++ b/php/src/Google/Protobuf/Int64Value.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/wrappers.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/Internal/DescriptorProto.php b/php/src/Google/Protobuf/Internal/DescriptorProto.php index 6ce36334f9..2937c5a7c5 100644 --- a/php/src/Google/Protobuf/Internal/DescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/DescriptorProto.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; diff --git a/php/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php b/php/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php index 387c6c78b1..43c33c4a91 100644 --- a/php/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php +++ b/php/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal\DescriptorProto; @@ -157,3 +156,6 @@ class ExtensionRange extends \Google\Protobuf\Internal\Message } +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExtensionRange::class, \Google\Protobuf\Internal\DescriptorProto_ExtensionRange::class); + diff --git a/php/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php b/php/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php index 63ff860481..f099cc345a 100644 --- a/php/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php +++ b/php/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal\DescriptorProto; @@ -124,3 +123,6 @@ class ReservedRange extends \Google\Protobuf\Internal\Message } +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReservedRange::class, \Google\Protobuf\Internal\DescriptorProto_ReservedRange::class); + diff --git a/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php b/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php index d0d22a2022..cb2a42ae37 100644 --- a/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/EnumDescriptorProto.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; diff --git a/php/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php b/php/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php index 8c33acc3d5..7282fccb07 100644 --- a/php/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php +++ b/php/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal\EnumDescriptorProto; @@ -126,3 +125,6 @@ class EnumReservedRange extends \Google\Protobuf\Internal\Message } +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EnumReservedRange::class, \Google\Protobuf\Internal\EnumDescriptorProto_EnumReservedRange::class); + diff --git a/php/src/Google/Protobuf/Internal/EnumOptions.php b/php/src/Google/Protobuf/Internal/EnumOptions.php index b7d2059606..80cb7f275a 100644 --- a/php/src/Google/Protobuf/Internal/EnumOptions.php +++ b/php/src/Google/Protobuf/Internal/EnumOptions.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; @@ -44,12 +43,6 @@ class EnumOptions extends \Google\Protobuf\Internal\Message * @deprecated */ protected $deprecated_legacy_json_field_conflicts = null; - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 7;</code> - */ - protected $features = null; /** * The parser stores options it doesn't recognize here. See above. * @@ -78,8 +71,6 @@ class EnumOptions extends \Google\Protobuf\Internal\Message * well. * TODO Remove this legacy behavior once downstream teams have * had time to migrate. - * @type \Google\Protobuf\Internal\FeatureSet $features - * Any features defined in the specific edition. * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option * The parser stores options it doesn't recognize here. See above. * } @@ -183,17 +174,13 @@ class EnumOptions extends \Google\Protobuf\Internal\Message */ public function getDeprecatedLegacyJsonFieldConflicts() { - if (isset($this->deprecated_legacy_json_field_conflicts)) { - @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); - } + @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); return isset($this->deprecated_legacy_json_field_conflicts) ? $this->deprecated_legacy_json_field_conflicts : false; } public function hasDeprecatedLegacyJsonFieldConflicts() { - if (isset($this->deprecated_legacy_json_field_conflicts)) { - @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); - } + @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); return isset($this->deprecated_legacy_json_field_conflicts); } @@ -225,42 +212,6 @@ class EnumOptions extends \Google\Protobuf\Internal\Message return $this; } - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 7;</code> - * @return \Google\Protobuf\Internal\FeatureSet|null - */ - public function getFeatures() - { - return $this->features; - } - - public function hasFeatures() - { - return isset($this->features); - } - - public function clearFeatures() - { - unset($this->features); - } - - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 7;</code> - * @param \Google\Protobuf\Internal\FeatureSet $var - * @return $this - */ - public function setFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FeatureSet::class); - $this->features = $var; - - return $this; - } - /** * The parser stores options it doesn't recognize here. See above. * diff --git a/php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php b/php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php index 822e1de59b..0feaea6f18 100644 --- a/php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; diff --git a/php/src/Google/Protobuf/Internal/EnumValueOptions.php b/php/src/Google/Protobuf/Internal/EnumValueOptions.php index f99234bd2f..2db7fceea6 100644 --- a/php/src/Google/Protobuf/Internal/EnumValueOptions.php +++ b/php/src/Google/Protobuf/Internal/EnumValueOptions.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; @@ -25,26 +24,6 @@ class EnumValueOptions extends \Google\Protobuf\Internal\Message * Generated from protobuf field <code>optional bool deprecated = 1 [default = false];</code> */ protected $deprecated = null; - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 2;</code> - */ - protected $features = null; - /** - * Indicate that fields annotated with this enum value should not be printed - * out when using debug formats, e.g. when the field contains sensitive - * credentials. - * - * Generated from protobuf field <code>optional bool debug_redact = 3 [default = false];</code> - */ - protected $debug_redact = null; - /** - * Information about the support window of a feature value. - * - * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 4;</code> - */ - protected $feature_support = null; /** * The parser stores options it doesn't recognize here. See above. * @@ -63,14 +42,6 @@ class EnumValueOptions extends \Google\Protobuf\Internal\Message * Depending on the target platform, this can emit Deprecated annotations * for the enum value, or it will be completely ignored; in the very least, * this is a formalization for deprecating enum values. - * @type \Google\Protobuf\Internal\FeatureSet $features - * Any features defined in the specific edition. - * @type bool $debug_redact - * Indicate that fields annotated with this enum value should not be printed - * out when using debug formats, e.g. when the field contains sensitive - * credentials. - * @type \Google\Protobuf\Internal\FieldOptions\FeatureSupport $feature_support - * Information about the support window of a feature value. * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option * The parser stores options it doesn't recognize here. See above. * } @@ -122,118 +93,6 @@ class EnumValueOptions extends \Google\Protobuf\Internal\Message return $this; } - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 2;</code> - * @return \Google\Protobuf\Internal\FeatureSet|null - */ - public function getFeatures() - { - return $this->features; - } - - public function hasFeatures() - { - return isset($this->features); - } - - public function clearFeatures() - { - unset($this->features); - } - - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 2;</code> - * @param \Google\Protobuf\Internal\FeatureSet $var - * @return $this - */ - public function setFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FeatureSet::class); - $this->features = $var; - - return $this; - } - - /** - * Indicate that fields annotated with this enum value should not be printed - * out when using debug formats, e.g. when the field contains sensitive - * credentials. - * - * Generated from protobuf field <code>optional bool debug_redact = 3 [default = false];</code> - * @return bool - */ - public function getDebugRedact() - { - return isset($this->debug_redact) ? $this->debug_redact : false; - } - - public function hasDebugRedact() - { - return isset($this->debug_redact); - } - - public function clearDebugRedact() - { - unset($this->debug_redact); - } - - /** - * Indicate that fields annotated with this enum value should not be printed - * out when using debug formats, e.g. when the field contains sensitive - * credentials. - * - * Generated from protobuf field <code>optional bool debug_redact = 3 [default = false];</code> - * @param bool $var - * @return $this - */ - public function setDebugRedact($var) - { - GPBUtil::checkBool($var); - $this->debug_redact = $var; - - return $this; - } - - /** - * Information about the support window of a feature value. - * - * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 4;</code> - * @return \Google\Protobuf\Internal\FieldOptions\FeatureSupport|null - */ - public function getFeatureSupport() - { - return $this->feature_support; - } - - public function hasFeatureSupport() - { - return isset($this->feature_support); - } - - public function clearFeatureSupport() - { - unset($this->feature_support); - } - - /** - * Information about the support window of a feature value. - * - * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 4;</code> - * @param \Google\Protobuf\Internal\FieldOptions\FeatureSupport $var - * @return $this - */ - public function setFeatureSupport($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FieldOptions\FeatureSupport::class); - $this->feature_support = $var; - - return $this; - } - /** * The parser stores options it doesn't recognize here. See above. * diff --git a/php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php b/php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php index 2a969afb47..245173c3d0 100644 --- a/php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php +++ b/php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; @@ -22,28 +21,6 @@ class ExtensionRangeOptions extends \Google\Protobuf\Internal\Message * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code> */ private $uninterpreted_option; - /** - * For external users: DO NOT USE. We are in the process of open sourcing - * extension declaration and executing internal cleanups before it can be - * used externally. - * - * Generated from protobuf field <code>repeated .google.protobuf.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE];</code> - */ - private $declaration; - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 50;</code> - */ - protected $features = null; - /** - * The verification state of the range. - * TODO: flip the default to DECLARATION once all empty ranges - * are marked as UNVERIFIED. - * - * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED, retention = RETENTION_SOURCE];</code> - */ - protected $verification = null; /** * Constructor. @@ -53,16 +30,6 @@ class ExtensionRangeOptions extends \Google\Protobuf\Internal\Message * * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option * The parser stores options it doesn't recognize here. See above. - * @type array<\Google\Protobuf\Internal\ExtensionRangeOptions\Declaration>|\Google\Protobuf\Internal\RepeatedField $declaration - * For external users: DO NOT USE. We are in the process of open sourcing - * extension declaration and executing internal cleanups before it can be - * used externally. - * @type \Google\Protobuf\Internal\FeatureSet $features - * Any features defined in the specific edition. - * @type int $verification - * The verification state of the range. - * TODO: flip the default to DECLARATION once all empty ranges - * are marked as UNVERIFIED. * } */ public function __construct($data = NULL) { @@ -96,111 +63,5 @@ class ExtensionRangeOptions extends \Google\Protobuf\Internal\Message return $this; } - /** - * For external users: DO NOT USE. We are in the process of open sourcing - * extension declaration and executing internal cleanups before it can be - * used externally. - * - * Generated from protobuf field <code>repeated .google.protobuf.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE];</code> - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeclaration() - { - return $this->declaration; - } - - /** - * For external users: DO NOT USE. We are in the process of open sourcing - * extension declaration and executing internal cleanups before it can be - * used externally. - * - * Generated from protobuf field <code>repeated .google.protobuf.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE];</code> - * @param array<\Google\Protobuf\Internal\ExtensionRangeOptions\Declaration>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeclaration($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\ExtensionRangeOptions\Declaration::class); - $this->declaration = $arr; - - return $this; - } - - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 50;</code> - * @return \Google\Protobuf\Internal\FeatureSet|null - */ - public function getFeatures() - { - return $this->features; - } - - public function hasFeatures() - { - return isset($this->features); - } - - public function clearFeatures() - { - unset($this->features); - } - - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 50;</code> - * @param \Google\Protobuf\Internal\FeatureSet $var - * @return $this - */ - public function setFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FeatureSet::class); - $this->features = $var; - - return $this; - } - - /** - * The verification state of the range. - * TODO: flip the default to DECLARATION once all empty ranges - * are marked as UNVERIFIED. - * - * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED, retention = RETENTION_SOURCE];</code> - * @return int - */ - public function getVerification() - { - return isset($this->verification) ? $this->verification : 0; - } - - public function hasVerification() - { - return isset($this->verification); - } - - public function clearVerification() - { - unset($this->verification); - } - - /** - * The verification state of the range. - * TODO: flip the default to DECLARATION once all empty ranges - * are marked as UNVERIFIED. - * - * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED, retention = RETENTION_SOURCE];</code> - * @param int $var - * @return $this - */ - public function setVerification($var) - { - GPBUtil::checkEnum($var, \Google\Protobuf\Internal\ExtensionRangeOptions\VerificationState::class); - $this->verification = $var; - - return $this; - } - } diff --git a/php/src/Google/Protobuf/Internal/FieldDescriptorProto.php b/php/src/Google/Protobuf/Internal/FieldDescriptorProto.php index e493f53eb4..5e99bff173 100644 --- a/php/src/Google/Protobuf/Internal/FieldDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/FieldDescriptorProto.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; @@ -86,12 +85,12 @@ class FieldDescriptorProto extends \Google\Protobuf\Internal\Message /** * If true, this is a proto3 "optional". When a proto3 field is optional, it * tracks presence regardless of field type. - * When proto3_optional is true, this field must belong to a oneof to signal - * to old proto3 clients that presence is tracked for this field. This oneof - * is known as a "synthetic" oneof, and this field must be its sole member - * (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs - * exist in the descriptor only, and do not generate any API. Synthetic oneofs - * must be ordered after all "real" oneofs. + * When proto3_optional is true, this field must be belong to a oneof to + * signal to old proto3 clients that presence is tracked for this field. This + * oneof is known as a "synthetic" oneof, and this field must be its sole + * member (each proto3 optional field gets its own synthetic oneof). Synthetic + * oneofs exist in the descriptor only, and do not generate any API. Synthetic + * oneofs must be ordered after all "real" oneofs. * For message fields, proto3_optional doesn't create any semantic change, * since non-repeated message fields always track presence. However it still * indicates the semantic detail of whether the user wrote "optional" or not. @@ -145,12 +144,12 @@ class FieldDescriptorProto extends \Google\Protobuf\Internal\Message * @type bool $proto3_optional * If true, this is a proto3 "optional". When a proto3 field is optional, it * tracks presence regardless of field type. - * When proto3_optional is true, this field must belong to a oneof to signal - * to old proto3 clients that presence is tracked for this field. This oneof - * is known as a "synthetic" oneof, and this field must be its sole member - * (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs - * exist in the descriptor only, and do not generate any API. Synthetic oneofs - * must be ordered after all "real" oneofs. + * When proto3_optional is true, this field must be belong to a oneof to + * signal to old proto3 clients that presence is tracked for this field. This + * oneof is known as a "synthetic" oneof, and this field must be its sole + * member (each proto3 optional field gets its own synthetic oneof). Synthetic + * oneofs exist in the descriptor only, and do not generate any API. Synthetic + * oneofs must be ordered after all "real" oneofs. * For message fields, proto3_optional doesn't create any semantic change, * since non-repeated message fields always track presence. However it still * indicates the semantic detail of whether the user wrote "optional" or not. @@ -541,12 +540,12 @@ class FieldDescriptorProto extends \Google\Protobuf\Internal\Message /** * If true, this is a proto3 "optional". When a proto3 field is optional, it * tracks presence regardless of field type. - * When proto3_optional is true, this field must belong to a oneof to signal - * to old proto3 clients that presence is tracked for this field. This oneof - * is known as a "synthetic" oneof, and this field must be its sole member - * (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs - * exist in the descriptor only, and do not generate any API. Synthetic oneofs - * must be ordered after all "real" oneofs. + * When proto3_optional is true, this field must be belong to a oneof to + * signal to old proto3 clients that presence is tracked for this field. This + * oneof is known as a "synthetic" oneof, and this field must be its sole + * member (each proto3 optional field gets its own synthetic oneof). Synthetic + * oneofs exist in the descriptor only, and do not generate any API. Synthetic + * oneofs must be ordered after all "real" oneofs. * For message fields, proto3_optional doesn't create any semantic change, * since non-repeated message fields always track presence. However it still * indicates the semantic detail of whether the user wrote "optional" or not. @@ -579,12 +578,12 @@ class FieldDescriptorProto extends \Google\Protobuf\Internal\Message /** * If true, this is a proto3 "optional". When a proto3 field is optional, it * tracks presence regardless of field type. - * When proto3_optional is true, this field must belong to a oneof to signal - * to old proto3 clients that presence is tracked for this field. This oneof - * is known as a "synthetic" oneof, and this field must be its sole member - * (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs - * exist in the descriptor only, and do not generate any API. Synthetic oneofs - * must be ordered after all "real" oneofs. + * When proto3_optional is true, this field must be belong to a oneof to + * signal to old proto3 clients that presence is tracked for this field. This + * oneof is known as a "synthetic" oneof, and this field must be its sole + * member (each proto3 optional field gets its own synthetic oneof). Synthetic + * oneofs exist in the descriptor only, and do not generate any API. Synthetic + * oneofs must be ordered after all "real" oneofs. * For message fields, proto3_optional doesn't create any semantic change, * since non-repeated message fields always track presence. However it still * indicates the semantic detail of whether the user wrote "optional" or not. diff --git a/php/src/Google/Protobuf/Internal/FieldDescriptorProto/Label.php b/php/src/Google/Protobuf/Internal/FieldDescriptorProto/Label.php index eb091e397f..a54b228f1b 100644 --- a/php/src/Google/Protobuf/Internal/FieldDescriptorProto/Label.php +++ b/php/src/Google/Protobuf/Internal/FieldDescriptorProto/Label.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal\FieldDescriptorProto; @@ -19,22 +18,18 @@ class Label */ const LABEL_OPTIONAL = 1; /** - * Generated from protobuf enum <code>LABEL_REPEATED = 3;</code> - */ - const LABEL_REPEATED = 3; - /** - * The required label is only allowed in google.protobuf. In proto3 and Editions - * it's explicitly prohibited. In Editions, the `field_presence` feature - * can be used to get this behavior. - * * Generated from protobuf enum <code>LABEL_REQUIRED = 2;</code> */ const LABEL_REQUIRED = 2; + /** + * Generated from protobuf enum <code>LABEL_REPEATED = 3;</code> + */ + const LABEL_REPEATED = 3; private static $valueToName = [ self::LABEL_OPTIONAL => 'LABEL_OPTIONAL', - self::LABEL_REPEATED => 'LABEL_REPEATED', self::LABEL_REQUIRED => 'LABEL_REQUIRED', + self::LABEL_REPEATED => 'LABEL_REPEATED', ]; public static function name($value) @@ -58,3 +53,6 @@ class Label } } +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Label::class, \Google\Protobuf\Internal\FieldDescriptorProto_Label::class); + diff --git a/php/src/Google/Protobuf/Internal/FieldDescriptorProto/Type.php b/php/src/Google/Protobuf/Internal/FieldDescriptorProto/Type.php index 80c8395ba4..6072e9990f 100644 --- a/php/src/Google/Protobuf/Internal/FieldDescriptorProto/Type.php +++ b/php/src/Google/Protobuf/Internal/FieldDescriptorProto/Type.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal\FieldDescriptorProto; @@ -59,10 +58,9 @@ class Type const TYPE_STRING = 9; /** * Tag-delimited aggregate. - * Group type is deprecated and not supported after google.protobuf. However, Proto3 + * Group type is deprecated and not supported in proto3. However, Proto3 * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. In Editions, the group wire format - * can be enabled via the `message_encoding` feature. + * treat group fields as unknown fields. * * Generated from protobuf enum <code>TYPE_GROUP = 10;</code> */ @@ -150,3 +148,6 @@ class Type } } +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Protobuf\Internal\FieldDescriptorProto_Type::class); + diff --git a/php/src/Google/Protobuf/Internal/FieldOptions.php b/php/src/Google/Protobuf/Internal/FieldOptions.php index efde73f695..6f1d54b7ee 100644 --- a/php/src/Google/Protobuf/Internal/FieldOptions.php +++ b/php/src/Google/Protobuf/Internal/FieldOptions.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; @@ -17,13 +16,10 @@ use Google\Protobuf\Internal\GPBUtil; class FieldOptions extends \Google\Protobuf\Internal\Message { /** - * NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. * The ctype option instructs the C++ code generator to use a different * representation of the field than it normally would. See the specific - * options below. This option is only implemented to support use of - * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of - * type "bytes" in the open source release. - * TODO: make ctype actually deprecated. + * options below. This option is not yet implemented in the open source + * release -- sorry, we'll try to include it in a future version! * * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];</code> */ @@ -32,10 +28,8 @@ class FieldOptions extends \Google\Protobuf\Internal\Message * The packed option can be enabled for repeated primitive fields to enable * a more efficient representation on the wire. Rather than repeatedly * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. This option is prohibited in - * Editions, but the `repeated_field_encoding` feature can be used to control - * the behavior. + * a single length-prefixed blob. In proto3, only explicit setting it to + * false will avoid using packed encoding. * * Generated from protobuf field <code>optional bool packed = 2;</code> */ @@ -70,11 +64,18 @@ class FieldOptions extends \Google\Protobuf\Internal\Message * interface is not affected by this option; const methods remain safe to * call from multiple threads concurrently, while non-const methods continue * to require exclusive access. - * Note that lazy message fields are still eagerly verified to check - * ill-formed wireformat or missing required fields. Calling IsInitialized() - * on the outer message would fail if the inner message has missing required - * fields. Failed verification would result in parsing failure (except when - * uninitialized messages are acceptable). + * Note that implementations may choose not to check required fields within + * a lazy sub-message. That is, calling IsInitialized() on the outer message + * may return true even if the inner message has missing required fields. + * This is necessary because otherwise the inner message would have to be + * parsed in order to perform the check, defeating the purpose of lazy + * parsing. An implementation which chooses not to check required fields + * must be consistent about it. That is, for any particular sub-message, the + * implementation must either *always* check its required fields, or *never* + * check its required fields, regardless of whether or not the message has + * been parsed. + * As of May 2022, lazy verifies the contents of the byte stream during + * parsing. An invalid byte stream will cause the overall parsing to fail. * * Generated from protobuf field <code>optional bool lazy = 5 [default = false];</code> */ @@ -102,35 +103,6 @@ class FieldOptions extends \Google\Protobuf\Internal\Message * Generated from protobuf field <code>optional bool weak = 10 [default = false];</code> */ protected $weak = null; - /** - * Indicate that the field value should not be printed out when using debug - * formats, e.g. when the field contains sensitive credentials. - * - * Generated from protobuf field <code>optional bool debug_redact = 16 [default = false];</code> - */ - protected $debug_redact = null; - /** - * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.OptionRetention retention = 17;</code> - */ - protected $retention = null; - /** - * Generated from protobuf field <code>repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;</code> - */ - private $targets; - /** - * Generated from protobuf field <code>repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;</code> - */ - private $edition_defaults; - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 21;</code> - */ - protected $features = null; - /** - * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;</code> - */ - protected $feature_support = null; /** * The parser stores options it doesn't recognize here. See above. * @@ -145,21 +117,16 @@ class FieldOptions extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $ctype - * NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. * The ctype option instructs the C++ code generator to use a different * representation of the field than it normally would. See the specific - * options below. This option is only implemented to support use of - * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of - * type "bytes" in the open source release. - * TODO: make ctype actually deprecated. + * options below. This option is not yet implemented in the open source + * release -- sorry, we'll try to include it in a future version! * @type bool $packed * The packed option can be enabled for repeated primitive fields to enable * a more efficient representation on the wire. Rather than repeatedly * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. This option is prohibited in - * Editions, but the `repeated_field_encoding` feature can be used to control - * the behavior. + * a single length-prefixed blob. In proto3, only explicit setting it to + * false will avoid using packed encoding. * @type int $jstype * The jstype option determines the JavaScript type used for values of the * field. The option is permitted only for 64 bit integral and fixed types @@ -186,11 +153,18 @@ class FieldOptions extends \Google\Protobuf\Internal\Message * interface is not affected by this option; const methods remain safe to * call from multiple threads concurrently, while non-const methods continue * to require exclusive access. - * Note that lazy message fields are still eagerly verified to check - * ill-formed wireformat or missing required fields. Calling IsInitialized() - * on the outer message would fail if the inner message has missing required - * fields. Failed verification would result in parsing failure (except when - * uninitialized messages are acceptable). + * Note that implementations may choose not to check required fields within + * a lazy sub-message. That is, calling IsInitialized() on the outer message + * may return true even if the inner message has missing required fields. + * This is necessary because otherwise the inner message would have to be + * parsed in order to perform the check, defeating the purpose of lazy + * parsing. An implementation which chooses not to check required fields + * must be consistent about it. That is, for any particular sub-message, the + * implementation must either *always* check its required fields, or *never* + * check its required fields, regardless of whether or not the message has + * been parsed. + * As of May 2022, lazy verifies the contents of the byte stream during + * parsing. An invalid byte stream will cause the overall parsing to fail. * @type bool $unverified_lazy * unverified_lazy does no correctness checks on the byte stream. This should * only be used where lazy with verification is prohibitive for performance @@ -202,15 +176,6 @@ class FieldOptions extends \Google\Protobuf\Internal\Message * is a formalization for deprecating fields. * @type bool $weak * For Google-internal migration only. Do not use. - * @type bool $debug_redact - * Indicate that the field value should not be printed out when using debug - * formats, e.g. when the field contains sensitive credentials. - * @type int $retention - * @type array<int>|\Google\Protobuf\Internal\RepeatedField $targets - * @type array<\Google\Protobuf\Internal\FieldOptions\EditionDefault>|\Google\Protobuf\Internal\RepeatedField $edition_defaults - * @type \Google\Protobuf\Internal\FeatureSet $features - * Any features defined in the specific edition. - * @type \Google\Protobuf\Internal\FieldOptions\FeatureSupport $feature_support * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option * The parser stores options it doesn't recognize here. See above. * } @@ -221,13 +186,10 @@ class FieldOptions extends \Google\Protobuf\Internal\Message } /** - * NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. * The ctype option instructs the C++ code generator to use a different * representation of the field than it normally would. See the specific - * options below. This option is only implemented to support use of - * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of - * type "bytes" in the open source release. - * TODO: make ctype actually deprecated. + * options below. This option is not yet implemented in the open source + * release -- sorry, we'll try to include it in a future version! * * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];</code> * @return int @@ -248,13 +210,10 @@ class FieldOptions extends \Google\Protobuf\Internal\Message } /** - * NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. * The ctype option instructs the C++ code generator to use a different * representation of the field than it normally would. See the specific - * options below. This option is only implemented to support use of - * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of - * type "bytes" in the open source release. - * TODO: make ctype actually deprecated. + * options below. This option is not yet implemented in the open source + * release -- sorry, we'll try to include it in a future version! * * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];</code> * @param int $var @@ -272,10 +231,8 @@ class FieldOptions extends \Google\Protobuf\Internal\Message * The packed option can be enabled for repeated primitive fields to enable * a more efficient representation on the wire. Rather than repeatedly * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. This option is prohibited in - * Editions, but the `repeated_field_encoding` feature can be used to control - * the behavior. + * a single length-prefixed blob. In proto3, only explicit setting it to + * false will avoid using packed encoding. * * Generated from protobuf field <code>optional bool packed = 2;</code> * @return bool @@ -300,9 +257,7 @@ class FieldOptions extends \Google\Protobuf\Internal\Message * a more efficient representation on the wire. Rather than repeatedly * writing the tag and type for each element, the entire array is encoded as * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. This option is prohibited in - * Editions, but the `repeated_field_encoding` feature can be used to control - * the behavior. + * false will avoid using packed encoding. * * Generated from protobuf field <code>optional bool packed = 2;</code> * @param bool $var @@ -385,11 +340,18 @@ class FieldOptions extends \Google\Protobuf\Internal\Message * interface is not affected by this option; const methods remain safe to * call from multiple threads concurrently, while non-const methods continue * to require exclusive access. - * Note that lazy message fields are still eagerly verified to check - * ill-formed wireformat or missing required fields. Calling IsInitialized() - * on the outer message would fail if the inner message has missing required - * fields. Failed verification would result in parsing failure (except when - * uninitialized messages are acceptable). + * Note that implementations may choose not to check required fields within + * a lazy sub-message. That is, calling IsInitialized() on the outer message + * may return true even if the inner message has missing required fields. + * This is necessary because otherwise the inner message would have to be + * parsed in order to perform the check, defeating the purpose of lazy + * parsing. An implementation which chooses not to check required fields + * must be consistent about it. That is, for any particular sub-message, the + * implementation must either *always* check its required fields, or *never* + * check its required fields, regardless of whether or not the message has + * been parsed. + * As of May 2022, lazy verifies the contents of the byte stream during + * parsing. An invalid byte stream will cause the overall parsing to fail. * * Generated from protobuf field <code>optional bool lazy = 5 [default = false];</code> * @return bool @@ -424,11 +386,18 @@ class FieldOptions extends \Google\Protobuf\Internal\Message * interface is not affected by this option; const methods remain safe to * call from multiple threads concurrently, while non-const methods continue * to require exclusive access. - * Note that lazy message fields are still eagerly verified to check - * ill-formed wireformat or missing required fields. Calling IsInitialized() - * on the outer message would fail if the inner message has missing required - * fields. Failed verification would result in parsing failure (except when - * uninitialized messages are acceptable). + * Note that implementations may choose not to check required fields within + * a lazy sub-message. That is, calling IsInitialized() on the outer message + * may return true even if the inner message has missing required fields. + * This is necessary because otherwise the inner message would have to be + * parsed in order to perform the check, defeating the purpose of lazy + * parsing. An implementation which chooses not to check required fields + * must be consistent about it. That is, for any particular sub-message, the + * implementation must either *always* check its required fields, or *never* + * check its required fields, regardless of whether or not the message has + * been parsed. + * As of May 2022, lazy verifies the contents of the byte stream during + * parsing. An invalid byte stream will cause the overall parsing to fail. * * Generated from protobuf field <code>optional bool lazy = 5 [default = false];</code> * @param bool $var @@ -560,188 +529,6 @@ class FieldOptions extends \Google\Protobuf\Internal\Message return $this; } - /** - * Indicate that the field value should not be printed out when using debug - * formats, e.g. when the field contains sensitive credentials. - * - * Generated from protobuf field <code>optional bool debug_redact = 16 [default = false];</code> - * @return bool - */ - public function getDebugRedact() - { - return isset($this->debug_redact) ? $this->debug_redact : false; - } - - public function hasDebugRedact() - { - return isset($this->debug_redact); - } - - public function clearDebugRedact() - { - unset($this->debug_redact); - } - - /** - * Indicate that the field value should not be printed out when using debug - * formats, e.g. when the field contains sensitive credentials. - * - * Generated from protobuf field <code>optional bool debug_redact = 16 [default = false];</code> - * @param bool $var - * @return $this - */ - public function setDebugRedact($var) - { - GPBUtil::checkBool($var); - $this->debug_redact = $var; - - return $this; - } - - /** - * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.OptionRetention retention = 17;</code> - * @return int - */ - public function getRetention() - { - return isset($this->retention) ? $this->retention : 0; - } - - public function hasRetention() - { - return isset($this->retention); - } - - public function clearRetention() - { - unset($this->retention); - } - - /** - * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.OptionRetention retention = 17;</code> - * @param int $var - * @return $this - */ - public function setRetention($var) - { - GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldOptions\OptionRetention::class); - $this->retention = $var; - - return $this; - } - - /** - * Generated from protobuf field <code>repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;</code> - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargets() - { - return $this->targets; - } - - /** - * Generated from protobuf field <code>repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;</code> - * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Protobuf\Internal\FieldOptions\OptionTargetType::class); - $this->targets = $arr; - - return $this; - } - - /** - * Generated from protobuf field <code>repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;</code> - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEditionDefaults() - { - return $this->edition_defaults; - } - - /** - * Generated from protobuf field <code>repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;</code> - * @param array<\Google\Protobuf\Internal\FieldOptions\EditionDefault>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEditionDefaults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldOptions\EditionDefault::class); - $this->edition_defaults = $arr; - - return $this; - } - - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 21;</code> - * @return \Google\Protobuf\Internal\FeatureSet|null - */ - public function getFeatures() - { - return $this->features; - } - - public function hasFeatures() - { - return isset($this->features); - } - - public function clearFeatures() - { - unset($this->features); - } - - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 21;</code> - * @param \Google\Protobuf\Internal\FeatureSet $var - * @return $this - */ - public function setFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FeatureSet::class); - $this->features = $var; - - return $this; - } - - /** - * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;</code> - * @return \Google\Protobuf\Internal\FieldOptions\FeatureSupport|null - */ - public function getFeatureSupport() - { - return $this->feature_support; - } - - public function hasFeatureSupport() - { - return isset($this->feature_support); - } - - public function clearFeatureSupport() - { - unset($this->feature_support); - } - - /** - * Generated from protobuf field <code>optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;</code> - * @param \Google\Protobuf\Internal\FieldOptions\FeatureSupport $var - * @return $this - */ - public function setFeatureSupport($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FieldOptions\FeatureSupport::class); - $this->feature_support = $var; - - return $this; - } - /** * The parser stores options it doesn't recognize here. See above. * diff --git a/php/src/Google/Protobuf/Internal/FieldOptions/CType.php b/php/src/Google/Protobuf/Internal/FieldOptions/CType.php index a248777291..ba9eb4adb8 100644 --- a/php/src/Google/Protobuf/Internal/FieldOptions/CType.php +++ b/php/src/Google/Protobuf/Internal/FieldOptions/CType.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal\FieldOptions; @@ -19,13 +18,6 @@ class CType */ const STRING = 0; /** - * The option [ctype=CORD] may be applied to a non-repeated field of type - * "bytes". It indicates that in C++, the data should be stored in a Cord - * instead of a string. For very large strings, this may reduce memory - * fragmentation. It may also allow better performance when parsing from a - * Cord, or when parsing with aliasing enabled, as the parsed Cord may then - * alias the original buffer. - * * Generated from protobuf enum <code>CORD = 1;</code> */ const CORD = 1; @@ -61,3 +53,6 @@ class CType } } +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CType::class, \Google\Protobuf\Internal\FieldOptions_CType::class); + diff --git a/php/src/Google/Protobuf/Internal/FieldOptions/JSType.php b/php/src/Google/Protobuf/Internal/FieldOptions/JSType.php index 5ecc06bd98..175a4330bb 100644 --- a/php/src/Google/Protobuf/Internal/FieldOptions/JSType.php +++ b/php/src/Google/Protobuf/Internal/FieldOptions/JSType.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal\FieldOptions; @@ -58,3 +57,6 @@ class JSType } } +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(JSType::class, \Google\Protobuf\Internal\FieldOptions_JSType::class); + diff --git a/php/src/Google/Protobuf/Internal/FileDescriptorProto.php b/php/src/Google/Protobuf/Internal/FileDescriptorProto.php index 659d3b3675..d4c7f6bb8d 100644 --- a/php/src/Google/Protobuf/Internal/FileDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/FileDescriptorProto.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; @@ -89,9 +88,9 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message */ protected $syntax = null; /** - * The edition of the proto file. + * The edition of the proto file, which is an opaque string. * - * Generated from protobuf field <code>optional .google.protobuf.Edition edition = 14;</code> + * Generated from protobuf field <code>optional string edition = 13;</code> */ protected $edition = null; @@ -127,8 +126,8 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message * The syntax of the proto file. * The supported values are "proto2", "proto3", and "editions". * If `edition` is present, this value must be "editions". - * @type int $edition - * The edition of the proto file. + * @type string $edition + * The edition of the proto file, which is an opaque string. * } */ public function __construct($data = NULL) { @@ -495,14 +494,14 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message } /** - * The edition of the proto file. + * The edition of the proto file, which is an opaque string. * - * Generated from protobuf field <code>optional .google.protobuf.Edition edition = 14;</code> - * @return int + * Generated from protobuf field <code>optional string edition = 13;</code> + * @return string */ public function getEdition() { - return isset($this->edition) ? $this->edition : 0; + return isset($this->edition) ? $this->edition : ''; } public function hasEdition() @@ -516,15 +515,15 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message } /** - * The edition of the proto file. + * The edition of the proto file, which is an opaque string. * - * Generated from protobuf field <code>optional .google.protobuf.Edition edition = 14;</code> - * @param int $var + * Generated from protobuf field <code>optional string edition = 13;</code> + * @param string $var * @return $this */ public function setEdition($var) { - GPBUtil::checkEnum($var, \Google\Protobuf\Internal\Edition::class); + GPBUtil::checkString($var, True); $this->edition = $var; return $this; diff --git a/php/src/Google/Protobuf/Internal/FileDescriptorSet.php b/php/src/Google/Protobuf/Internal/FileDescriptorSet.php index 6337846661..1dae6fb3e3 100644 --- a/php/src/Google/Protobuf/Internal/FileDescriptorSet.php +++ b/php/src/Google/Protobuf/Internal/FileDescriptorSet.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; diff --git a/php/src/Google/Protobuf/Internal/FileOptions.php b/php/src/Google/Protobuf/Internal/FileOptions.php index 9d2c2ab010..43931be809 100644 --- a/php/src/Google/Protobuf/Internal/FileOptions.php +++ b/php/src/Google/Protobuf/Internal/FileOptions.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; @@ -54,14 +53,12 @@ class FileOptions extends \Google\Protobuf\Internal\Message */ protected $java_generate_equals_and_hash = null; /** - * A proto2 file can set this to true to opt in to UTF-8 checking for Java, - * which will throw an exception if invalid UTF-8 is parsed from the wire or - * assigned to a string field. - * TODO: clarify exactly what kinds of field types this option - * applies to, and update these docs accordingly. - * Proto3 files already perform these checks. Setting the option explicitly to - * false has no effect: it cannot be used to opt proto3 files out of UTF-8 - * checks. + * If set true, then the Java2 code generator will generate code that + * throws an exception whenever an attempt is made to assign a non-UTF-8 + * byte sequence to a string field. + * Message reflection will do the same. + * However, an extension field still accepts non-UTF-8 byte sequences. + * This option has no effect on when used with the lite runtime. * * Generated from protobuf field <code>optional bool java_string_check_utf8 = 27 [default = false];</code> */ @@ -102,6 +99,10 @@ class FileOptions extends \Google\Protobuf\Internal\Message * Generated from protobuf field <code>optional bool py_generic_services = 18 [default = false];</code> */ protected $py_generic_services = null; + /** + * Generated from protobuf field <code>optional bool php_generic_services = 42 [default = false];</code> + */ + protected $php_generic_services = null; /** * Is this file deprecated? * Depending on the target platform, this can emit Deprecated annotations @@ -171,12 +172,6 @@ class FileOptions extends \Google\Protobuf\Internal\Message * Generated from protobuf field <code>optional string ruby_package = 45;</code> */ protected $ruby_package = null; - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 50;</code> - */ - protected $features = null; /** * The parser stores options it doesn't recognize here. * See the documentation for the "Options" section above. @@ -212,14 +207,12 @@ class FileOptions extends \Google\Protobuf\Internal\Message * @type bool $java_generate_equals_and_hash * This option does nothing. * @type bool $java_string_check_utf8 - * A proto2 file can set this to true to opt in to UTF-8 checking for Java, - * which will throw an exception if invalid UTF-8 is parsed from the wire or - * assigned to a string field. - * TODO: clarify exactly what kinds of field types this option - * applies to, and update these docs accordingly. - * Proto3 files already perform these checks. Setting the option explicitly to - * false has no effect: it cannot be used to opt proto3 files out of UTF-8 - * checks. + * If set true, then the Java2 code generator will generate code that + * throws an exception whenever an attempt is made to assign a non-UTF-8 + * byte sequence to a string field. + * Message reflection will do the same. + * However, an extension field still accepts non-UTF-8 byte sequences. + * This option has no effect on when used with the lite runtime. * @type int $optimize_for * @type string $go_package * Sets the Go package where structs generated from this .proto will be @@ -239,6 +232,7 @@ class FileOptions extends \Google\Protobuf\Internal\Message * explicitly set them to true. * @type bool $java_generic_services * @type bool $py_generic_services + * @type bool $php_generic_services * @type bool $deprecated * Is this file deprecated? * Depending on the target platform, this can emit Deprecated annotations @@ -272,8 +266,6 @@ class FileOptions extends \Google\Protobuf\Internal\Message * Use this option to change the package of ruby generated classes. Default * is empty. When this option is not set, the package name will be used for * determining the ruby package. - * @type \Google\Protobuf\Internal\FeatureSet $features - * Any features defined in the specific edition. * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option * The parser stores options it doesn't recognize here. * See the documentation for the "Options" section above. @@ -425,17 +417,13 @@ class FileOptions extends \Google\Protobuf\Internal\Message */ public function getJavaGenerateEqualsAndHash() { - if (isset($this->java_generate_equals_and_hash)) { - @trigger_error('java_generate_equals_and_hash is deprecated.', E_USER_DEPRECATED); - } + @trigger_error('java_generate_equals_and_hash is deprecated.', E_USER_DEPRECATED); return isset($this->java_generate_equals_and_hash) ? $this->java_generate_equals_and_hash : false; } public function hasJavaGenerateEqualsAndHash() { - if (isset($this->java_generate_equals_and_hash)) { - @trigger_error('java_generate_equals_and_hash is deprecated.', E_USER_DEPRECATED); - } + @trigger_error('java_generate_equals_and_hash is deprecated.', E_USER_DEPRECATED); return isset($this->java_generate_equals_and_hash); } @@ -463,14 +451,12 @@ class FileOptions extends \Google\Protobuf\Internal\Message } /** - * A proto2 file can set this to true to opt in to UTF-8 checking for Java, - * which will throw an exception if invalid UTF-8 is parsed from the wire or - * assigned to a string field. - * TODO: clarify exactly what kinds of field types this option - * applies to, and update these docs accordingly. - * Proto3 files already perform these checks. Setting the option explicitly to - * false has no effect: it cannot be used to opt proto3 files out of UTF-8 - * checks. + * If set true, then the Java2 code generator will generate code that + * throws an exception whenever an attempt is made to assign a non-UTF-8 + * byte sequence to a string field. + * Message reflection will do the same. + * However, an extension field still accepts non-UTF-8 byte sequences. + * This option has no effect on when used with the lite runtime. * * Generated from protobuf field <code>optional bool java_string_check_utf8 = 27 [default = false];</code> * @return bool @@ -491,14 +477,12 @@ class FileOptions extends \Google\Protobuf\Internal\Message } /** - * A proto2 file can set this to true to opt in to UTF-8 checking for Java, - * which will throw an exception if invalid UTF-8 is parsed from the wire or - * assigned to a string field. - * TODO: clarify exactly what kinds of field types this option - * applies to, and update these docs accordingly. - * Proto3 files already perform these checks. Setting the option explicitly to - * false has no effect: it cannot be used to opt proto3 files out of UTF-8 - * checks. + * If set true, then the Java2 code generator will generate code that + * throws an exception whenever an attempt is made to assign a non-UTF-8 + * byte sequence to a string field. + * Message reflection will do the same. + * However, an extension field still accepts non-UTF-8 byte sequences. + * This option has no effect on when used with the lite runtime. * * Generated from protobuf field <code>optional bool java_string_check_utf8 = 27 [default = false];</code> * @param bool $var @@ -704,6 +688,38 @@ class FileOptions extends \Google\Protobuf\Internal\Message return $this; } + /** + * Generated from protobuf field <code>optional bool php_generic_services = 42 [default = false];</code> + * @return bool + */ + public function getPhpGenericServices() + { + return isset($this->php_generic_services) ? $this->php_generic_services : false; + } + + public function hasPhpGenericServices() + { + return isset($this->php_generic_services); + } + + public function clearPhpGenericServices() + { + unset($this->php_generic_services); + } + + /** + * Generated from protobuf field <code>optional bool php_generic_services = 42 [default = false];</code> + * @param bool $var + * @return $this + */ + public function setPhpGenericServices($var) + { + GPBUtil::checkBool($var); + $this->php_generic_services = $var; + + return $this; + } + /** * Is this file deprecated? * Depending on the target platform, this can emit Deprecated annotations @@ -1058,42 +1074,6 @@ class FileOptions extends \Google\Protobuf\Internal\Message return $this; } - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 50;</code> - * @return \Google\Protobuf\Internal\FeatureSet|null - */ - public function getFeatures() - { - return $this->features; - } - - public function hasFeatures() - { - return isset($this->features); - } - - public function clearFeatures() - { - unset($this->features); - } - - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 50;</code> - * @param \Google\Protobuf\Internal\FeatureSet $var - * @return $this - */ - public function setFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FeatureSet::class); - $this->features = $var; - - return $this; - } - /** * The parser stores options it doesn't recognize here. * See the documentation for the "Options" section above. diff --git a/php/src/Google/Protobuf/Internal/FileOptions/OptimizeMode.php b/php/src/Google/Protobuf/Internal/FileOptions/OptimizeMode.php index 2ffe8b2fae..0df27b5335 100644 --- a/php/src/Google/Protobuf/Internal/FileOptions/OptimizeMode.php +++ b/php/src/Google/Protobuf/Internal/FileOptions/OptimizeMode.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal\FileOptions; @@ -60,3 +59,6 @@ class OptimizeMode } } +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OptimizeMode::class, \Google\Protobuf\Internal\FileOptions_OptimizeMode::class); + diff --git a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php index 0fe4a433b6..a1db269bf9 100644 --- a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php +++ b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; diff --git a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php index 6a3b60c103..b1ef4ee95d 100644 --- a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php +++ b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal\GeneratedCodeInfo; @@ -251,3 +250,6 @@ class Annotation extends \Google\Protobuf\Internal\Message } +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Annotation::class, \Google\Protobuf\Internal\GeneratedCodeInfo_Annotation::class); + diff --git a/php/src/Google/Protobuf/Internal/MessageOptions.php b/php/src/Google/Protobuf/Internal/MessageOptions.php index 2fe22c2869..bb01aa4ba9 100644 --- a/php/src/Google/Protobuf/Internal/MessageOptions.php +++ b/php/src/Google/Protobuf/Internal/MessageOptions.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; @@ -54,6 +53,9 @@ class MessageOptions extends \Google\Protobuf\Internal\Message */ protected $deprecated = null; /** + * NOTE: Do not set the option in .proto files. Always use the maps syntax + * instead. The option should only be implicitly set by the proto compiler + * parser. * Whether the message is an automatically generated map entry type for the * maps field. * For maps fields: @@ -69,9 +71,6 @@ class MessageOptions extends \Google\Protobuf\Internal\Message * use a native map in the target language to hold the keys and values. * The reflection APIs in such implementations still need to work as * if the field is a repeated message field. - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. * * Generated from protobuf field <code>optional bool map_entry = 7;</code> */ @@ -90,12 +89,6 @@ class MessageOptions extends \Google\Protobuf\Internal\Message * @deprecated */ protected $deprecated_legacy_json_field_conflicts = null; - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 12;</code> - */ - protected $features = null; /** * The parser stores options it doesn't recognize here. See above. * @@ -135,6 +128,9 @@ class MessageOptions extends \Google\Protobuf\Internal\Message * for the message, or it will be completely ignored; in the very least, * this is a formalization for deprecating messages. * @type bool $map_entry + * NOTE: Do not set the option in .proto files. Always use the maps syntax + * instead. The option should only be implicitly set by the proto compiler + * parser. * Whether the message is an automatically generated map entry type for the * maps field. * For maps fields: @@ -150,9 +146,6 @@ class MessageOptions extends \Google\Protobuf\Internal\Message * use a native map in the target language to hold the keys and values. * The reflection APIs in such implementations still need to work as * if the field is a repeated message field. - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. * @type bool $deprecated_legacy_json_field_conflicts * Enable the legacy handling of JSON field name conflicts. This lowercases * and strips underscored from the fields before comparison in proto3 only. @@ -162,8 +155,6 @@ class MessageOptions extends \Google\Protobuf\Internal\Message * to the change in behavior for JSON field name conflicts. * TODO This is legacy behavior we plan to remove once downstream * teams have had time to migrate. - * @type \Google\Protobuf\Internal\FeatureSet $features - * Any features defined in the specific edition. * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option * The parser stores options it doesn't recognize here. See above. * } @@ -320,6 +311,9 @@ class MessageOptions extends \Google\Protobuf\Internal\Message } /** + * NOTE: Do not set the option in .proto files. Always use the maps syntax + * instead. The option should only be implicitly set by the proto compiler + * parser. * Whether the message is an automatically generated map entry type for the * maps field. * For maps fields: @@ -335,9 +329,6 @@ class MessageOptions extends \Google\Protobuf\Internal\Message * use a native map in the target language to hold the keys and values. * The reflection APIs in such implementations still need to work as * if the field is a repeated message field. - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. * * Generated from protobuf field <code>optional bool map_entry = 7;</code> * @return bool @@ -358,6 +349,9 @@ class MessageOptions extends \Google\Protobuf\Internal\Message } /** + * NOTE: Do not set the option in .proto files. Always use the maps syntax + * instead. The option should only be implicitly set by the proto compiler + * parser. * Whether the message is an automatically generated map entry type for the * maps field. * For maps fields: @@ -373,9 +367,6 @@ class MessageOptions extends \Google\Protobuf\Internal\Message * use a native map in the target language to hold the keys and values. * The reflection APIs in such implementations still need to work as * if the field is a repeated message field. - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. * * Generated from protobuf field <code>optional bool map_entry = 7;</code> * @param bool $var @@ -405,17 +396,13 @@ class MessageOptions extends \Google\Protobuf\Internal\Message */ public function getDeprecatedLegacyJsonFieldConflicts() { - if (isset($this->deprecated_legacy_json_field_conflicts)) { - @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); - } + @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); return isset($this->deprecated_legacy_json_field_conflicts) ? $this->deprecated_legacy_json_field_conflicts : false; } public function hasDeprecatedLegacyJsonFieldConflicts() { - if (isset($this->deprecated_legacy_json_field_conflicts)) { - @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); - } + @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); return isset($this->deprecated_legacy_json_field_conflicts); } @@ -449,42 +436,6 @@ class MessageOptions extends \Google\Protobuf\Internal\Message return $this; } - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 12;</code> - * @return \Google\Protobuf\Internal\FeatureSet|null - */ - public function getFeatures() - { - return $this->features; - } - - public function hasFeatures() - { - return isset($this->features); - } - - public function clearFeatures() - { - unset($this->features); - } - - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 12;</code> - * @param \Google\Protobuf\Internal\FeatureSet $var - * @return $this - */ - public function setFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FeatureSet::class); - $this->features = $var; - - return $this; - } - /** * The parser stores options it doesn't recognize here. See above. * diff --git a/php/src/Google/Protobuf/Internal/MethodDescriptorProto.php b/php/src/Google/Protobuf/Internal/MethodDescriptorProto.php index 93276e3930..96efb02d24 100644 --- a/php/src/Google/Protobuf/Internal/MethodDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/MethodDescriptorProto.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; diff --git a/php/src/Google/Protobuf/Internal/MethodOptions.php b/php/src/Google/Protobuf/Internal/MethodOptions.php index fc9e551029..87af45167a 100644 --- a/php/src/Google/Protobuf/Internal/MethodOptions.php +++ b/php/src/Google/Protobuf/Internal/MethodOptions.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; @@ -29,12 +28,6 @@ class MethodOptions extends \Google\Protobuf\Internal\Message * Generated from protobuf field <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code> */ protected $idempotency_level = null; - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 35;</code> - */ - protected $features = null; /** * The parser stores options it doesn't recognize here. See above. * @@ -54,8 +47,6 @@ class MethodOptions extends \Google\Protobuf\Internal\Message * for the method, or it will be completely ignored; in the very least, * this is a formalization for deprecating methods. * @type int $idempotency_level - * @type \Google\Protobuf\Internal\FeatureSet $features - * Any features defined in the specific edition. * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option * The parser stores options it doesn't recognize here. See above. * } @@ -139,42 +130,6 @@ class MethodOptions extends \Google\Protobuf\Internal\Message return $this; } - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 35;</code> - * @return \Google\Protobuf\Internal\FeatureSet|null - */ - public function getFeatures() - { - return $this->features; - } - - public function hasFeatures() - { - return isset($this->features); - } - - public function clearFeatures() - { - unset($this->features); - } - - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 35;</code> - * @param \Google\Protobuf\Internal\FeatureSet $var - * @return $this - */ - public function setFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FeatureSet::class); - $this->features = $var; - - return $this; - } - /** * The parser stores options it doesn't recognize here. See above. * diff --git a/php/src/Google/Protobuf/Internal/MethodOptions/IdempotencyLevel.php b/php/src/Google/Protobuf/Internal/MethodOptions/IdempotencyLevel.php index ce99b8c70f..ce3c062c69 100644 --- a/php/src/Google/Protobuf/Internal/MethodOptions/IdempotencyLevel.php +++ b/php/src/Google/Protobuf/Internal/MethodOptions/IdempotencyLevel.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal\MethodOptions; @@ -60,3 +59,6 @@ class IdempotencyLevel } } +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IdempotencyLevel::class, \Google\Protobuf\Internal\MethodOptions_IdempotencyLevel::class); + diff --git a/php/src/Google/Protobuf/Internal/OneofDescriptorProto.php b/php/src/Google/Protobuf/Internal/OneofDescriptorProto.php index da55bb4f42..3cb9f25c21 100644 --- a/php/src/Google/Protobuf/Internal/OneofDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/OneofDescriptorProto.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; diff --git a/php/src/Google/Protobuf/Internal/OneofOptions.php b/php/src/Google/Protobuf/Internal/OneofOptions.php index 4d7f344680..b44d194573 100644 --- a/php/src/Google/Protobuf/Internal/OneofOptions.php +++ b/php/src/Google/Protobuf/Internal/OneofOptions.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; @@ -16,12 +15,6 @@ use Google\Protobuf\Internal\GPBUtil; */ class OneofOptions extends \Google\Protobuf\Internal\Message { - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 1;</code> - */ - protected $features = null; /** * The parser stores options it doesn't recognize here. See above. * @@ -35,8 +28,6 @@ class OneofOptions extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type \Google\Protobuf\Internal\FeatureSet $features - * Any features defined in the specific edition. * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option * The parser stores options it doesn't recognize here. See above. * } @@ -46,42 +37,6 @@ class OneofOptions extends \Google\Protobuf\Internal\Message parent::__construct($data); } - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 1;</code> - * @return \Google\Protobuf\Internal\FeatureSet|null - */ - public function getFeatures() - { - return $this->features; - } - - public function hasFeatures() - { - return isset($this->features); - } - - public function clearFeatures() - { - unset($this->features); - } - - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 1;</code> - * @param \Google\Protobuf\Internal\FeatureSet $var - * @return $this - */ - public function setFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FeatureSet::class); - $this->features = $var; - - return $this; - } - /** * The parser stores options it doesn't recognize here. See above. * diff --git a/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php b/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php index bcc44f0e23..e322e2abf1 100644 --- a/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; diff --git a/php/src/Google/Protobuf/Internal/ServiceOptions.php b/php/src/Google/Protobuf/Internal/ServiceOptions.php index 278a60c5ce..8ac27ee804 100644 --- a/php/src/Google/Protobuf/Internal/ServiceOptions.php +++ b/php/src/Google/Protobuf/Internal/ServiceOptions.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; @@ -16,12 +15,6 @@ use Google\Protobuf\Internal\GPBUtil; */ class ServiceOptions extends \Google\Protobuf\Internal\Message { - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 34;</code> - */ - protected $features = null; /** * Is this service deprecated? * Depending on the target platform, this can emit Deprecated annotations @@ -44,8 +37,6 @@ class ServiceOptions extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type \Google\Protobuf\Internal\FeatureSet $features - * Any features defined in the specific edition. * @type bool $deprecated * Is this service deprecated? * Depending on the target platform, this can emit Deprecated annotations @@ -60,42 +51,6 @@ class ServiceOptions extends \Google\Protobuf\Internal\Message parent::__construct($data); } - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 34;</code> - * @return \Google\Protobuf\Internal\FeatureSet|null - */ - public function getFeatures() - { - return $this->features; - } - - public function hasFeatures() - { - return isset($this->features); - } - - public function clearFeatures() - { - unset($this->features); - } - - /** - * Any features defined in the specific edition. - * - * Generated from protobuf field <code>optional .google.protobuf.FeatureSet features = 34;</code> - * @param \Google\Protobuf\Internal\FeatureSet $var - * @return $this - */ - public function setFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FeatureSet::class); - $this->features = $var; - - return $this; - } - /** * Is this service deprecated? * Depending on the target platform, this can emit Deprecated annotations diff --git a/php/src/Google/Protobuf/Internal/SourceCodeInfo.php b/php/src/Google/Protobuf/Internal/SourceCodeInfo.php index d6419f5a96..0005bc6696 100644 --- a/php/src/Google/Protobuf/Internal/SourceCodeInfo.php +++ b/php/src/Google/Protobuf/Internal/SourceCodeInfo.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; diff --git a/php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php b/php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php index 5253dbc4ff..032be39214 100644 --- a/php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php +++ b/php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal\SourceCodeInfo; @@ -20,7 +19,7 @@ class Location extends \Google\Protobuf\Internal\Message * Identifies which part of the FileDescriptorProto was defined at this * location. * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition appears. + * the root FileDescriptorProto to the place where the definition occurs. * For example, this path: * [ 4, 3, 2, 7, 1 ] * refers to: @@ -82,11 +81,11 @@ class Location extends \Google\Protobuf\Internal\Message * // both. * // Detached comment for corge paragraph 2. * optional string corge = 5; - * /* Block comment attached + * /* Block comment attached * * to corge. Leading asterisks - * * will be removed. {@*} - * /* Block comment attached to - * * grault. {@*} + * * will be removed. */ + * /* Block comment attached to + * * grault. */ * optional int32 grault = 6; * // ignored detached comments. * @@ -112,7 +111,7 @@ class Location extends \Google\Protobuf\Internal\Message * Identifies which part of the FileDescriptorProto was defined at this * location. * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition appears. + * the root FileDescriptorProto to the place where the definition occurs. * For example, this path: * [ 4, 3, 2, 7, 1 ] * refers to: @@ -166,11 +165,11 @@ class Location extends \Google\Protobuf\Internal\Message * // both. * // Detached comment for corge paragraph 2. * optional string corge = 5; - * /* Block comment attached + * /* Block comment attached * * to corge. Leading asterisks - * * will be removed. {@*} - * /* Block comment attached to - * * grault. {@*} + * * will be removed. */ + * /* Block comment attached to + * * grault. */ * optional int32 grault = 6; * // ignored detached comments. * @type string $trailing_comments @@ -186,7 +185,7 @@ class Location extends \Google\Protobuf\Internal\Message * Identifies which part of the FileDescriptorProto was defined at this * location. * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition appears. + * the root FileDescriptorProto to the place where the definition occurs. * For example, this path: * [ 4, 3, 2, 7, 1 ] * refers to: @@ -217,7 +216,7 @@ class Location extends \Google\Protobuf\Internal\Message * Identifies which part of the FileDescriptorProto was defined at this * location. * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition appears. + * the root FileDescriptorProto to the place where the definition occurs. * For example, this path: * [ 4, 3, 2, 7, 1 ] * refers to: @@ -312,11 +311,11 @@ class Location extends \Google\Protobuf\Internal\Message * // both. * // Detached comment for corge paragraph 2. * optional string corge = 5; - * /* Block comment attached + * /* Block comment attached * * to corge. Leading asterisks - * * will be removed. {@*} - * /* Block comment attached to - * * grault. {@*} + * * will be removed. */ + * /* Block comment attached to + * * grault. */ * optional int32 grault = 6; * // ignored detached comments. * @@ -368,11 +367,11 @@ class Location extends \Google\Protobuf\Internal\Message * // both. * // Detached comment for corge paragraph 2. * optional string corge = 5; - * /* Block comment attached + * /* Block comment attached * * to corge. Leading asterisks - * * will be removed. {@*} - * /* Block comment attached to - * * grault. {@*} + * * will be removed. */ + * /* Block comment attached to + * * grault. */ * optional int32 grault = 6; * // ignored detached comments. * @@ -444,3 +443,6 @@ class Location extends \Google\Protobuf\Internal\Message } +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Location::class, \Google\Protobuf\Internal\SourceCodeInfo_Location::class); + diff --git a/php/src/Google/Protobuf/Internal/UninterpretedOption.php b/php/src/Google/Protobuf/Internal/UninterpretedOption.php index 156534e4f2..a1cdca5734 100644 --- a/php/src/Google/Protobuf/Internal/UninterpretedOption.php +++ b/php/src/Google/Protobuf/Internal/UninterpretedOption.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal; diff --git a/php/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php b/php/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php index 784a9cff9e..2debf83a62 100644 --- a/php/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php +++ b/php/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/descriptor.proto namespace Google\Protobuf\Internal\UninterpretedOption; @@ -112,3 +111,6 @@ class NamePart extends \Google\Protobuf\Internal\Message } +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NamePart::class, \Google\Protobuf\Internal\UninterpretedOption_NamePart::class); + diff --git a/php/src/Google/Protobuf/ListValue.php b/php/src/Google/Protobuf/ListValue.php index af0845f4b4..891283c2b2 100644 --- a/php/src/Google/Protobuf/ListValue.php +++ b/php/src/Google/Protobuf/ListValue.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/struct.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/Method.php b/php/src/Google/Protobuf/Method.php index 6c92edf677..eda00bf611 100644 --- a/php/src/Google/Protobuf/Method.php +++ b/php/src/Google/Protobuf/Method.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/api.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/Mixin.php b/php/src/Google/Protobuf/Mixin.php index f01a4d24f1..4f7bf844cc 100644 --- a/php/src/Google/Protobuf/Mixin.php +++ b/php/src/Google/Protobuf/Mixin.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/api.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/NullValue.php b/php/src/Google/Protobuf/NullValue.php index 2c40d97b60..61569f8a36 100644 --- a/php/src/Google/Protobuf/NullValue.php +++ b/php/src/Google/Protobuf/NullValue.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/struct.proto namespace Google\Protobuf; @@ -10,7 +9,7 @@ use UnexpectedValueException; /** * `NullValue` is a singleton enumeration to represent the null value for the * `Value` type union. - * The JSON representation for `NullValue` is JSON `null`. + * The JSON representation for `NullValue` is JSON `null`. * * Protobuf type <code>google.protobuf.NullValue</code> */ diff --git a/php/src/Google/Protobuf/Option.php b/php/src/Google/Protobuf/Option.php index aeb8368916..31249e5131 100644 --- a/php/src/Google/Protobuf/Option.php +++ b/php/src/Google/Protobuf/Option.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/type.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/SourceContext.php b/php/src/Google/Protobuf/SourceContext.php index cdb5670e48..8b3ea11220 100644 --- a/php/src/Google/Protobuf/SourceContext.php +++ b/php/src/Google/Protobuf/SourceContext.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/source_context.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/StringValue.php b/php/src/Google/Protobuf/StringValue.php index 9c46c2db99..ad98316b22 100644 --- a/php/src/Google/Protobuf/StringValue.php +++ b/php/src/Google/Protobuf/StringValue.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/wrappers.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/Struct.php b/php/src/Google/Protobuf/Struct.php index 38c6089089..0456541cbd 100644 --- a/php/src/Google/Protobuf/Struct.php +++ b/php/src/Google/Protobuf/Struct.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/struct.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/Syntax.php b/php/src/Google/Protobuf/Syntax.php index 90a75b7e55..10952bfd42 100644 --- a/php/src/Google/Protobuf/Syntax.php +++ b/php/src/Google/Protobuf/Syntax.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/type.proto namespace Google\Protobuf; @@ -26,17 +25,10 @@ class Syntax * Generated from protobuf enum <code>SYNTAX_PROTO3 = 1;</code> */ const SYNTAX_PROTO3 = 1; - /** - * Syntax `editions`. - * - * Generated from protobuf enum <code>SYNTAX_EDITIONS = 2;</code> - */ - const SYNTAX_EDITIONS = 2; private static $valueToName = [ self::SYNTAX_PROTO2 => 'SYNTAX_PROTO2', self::SYNTAX_PROTO3 => 'SYNTAX_PROTO3', - self::SYNTAX_EDITIONS => 'SYNTAX_EDITIONS', ]; public static function name($value) diff --git a/php/src/Google/Protobuf/Timestamp.php b/php/src/Google/Protobuf/Timestamp.php index 489e21d36e..a12f48520b 100644 --- a/php/src/Google/Protobuf/Timestamp.php +++ b/php/src/Google/Protobuf/Timestamp.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/timestamp.proto namespace Google\Protobuf; @@ -74,7 +73,7 @@ use Google\Protobuf\Internal\GPBUtil; * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D * ) to obtain a formatter capable of generating timestamps in this format. * * Generated from protobuf message <code>google.protobuf.Timestamp</code> diff --git a/php/src/Google/Protobuf/Type.php b/php/src/Google/Protobuf/Type.php index 6167ba4484..d4af7dfecb 100644 --- a/php/src/Google/Protobuf/Type.php +++ b/php/src/Google/Protobuf/Type.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/type.proto namespace Google\Protobuf; @@ -52,12 +51,6 @@ class Type extends \Google\Protobuf\Internal\Message * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 6;</code> */ protected $syntax = 0; - /** - * The source edition string, only valid when syntax is SYNTAX_EDITIONS. - * - * Generated from protobuf field <code>string edition = 7;</code> - */ - protected $edition = ''; /** * Constructor. @@ -77,8 +70,6 @@ class Type extends \Google\Protobuf\Internal\Message * The source context. * @type int $syntax * The source syntax. - * @type string $edition - * The source edition string, only valid when syntax is SYNTAX_EDITIONS. * } */ public function __construct($data = NULL) { @@ -252,31 +243,5 @@ class Type extends \Google\Protobuf\Internal\Message return $this; } - /** - * The source edition string, only valid when syntax is SYNTAX_EDITIONS. - * - * Generated from protobuf field <code>string edition = 7;</code> - * @return string - */ - public function getEdition() - { - return $this->edition; - } - - /** - * The source edition string, only valid when syntax is SYNTAX_EDITIONS. - * - * Generated from protobuf field <code>string edition = 7;</code> - * @param string $var - * @return $this - */ - public function setEdition($var) - { - GPBUtil::checkString($var, True); - $this->edition = $var; - - return $this; - } - } diff --git a/php/src/Google/Protobuf/UInt32Value.php b/php/src/Google/Protobuf/UInt32Value.php index 84303edff1..ae5fc5b42c 100644 --- a/php/src/Google/Protobuf/UInt32Value.php +++ b/php/src/Google/Protobuf/UInt32Value.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/wrappers.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/UInt64Value.php b/php/src/Google/Protobuf/UInt64Value.php index e19ba41f28..aa9686726b 100644 --- a/php/src/Google/Protobuf/UInt64Value.php +++ b/php/src/Google/Protobuf/UInt64Value.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/wrappers.proto namespace Google\Protobuf; diff --git a/php/src/Google/Protobuf/Value.php b/php/src/Google/Protobuf/Value.php index 710f39fdf1..dcc0bdf7c4 100644 --- a/php/src/Google/Protobuf/Value.php +++ b/php/src/Google/Protobuf/Value.php @@ -1,6 +1,5 @@ <?php # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: google/protobuf/struct.proto namespace Google\Protobuf; diff --git a/src/google/protobuf/compiler/cpp/field.cc b/src/google/protobuf/compiler/cpp/field.cc index b7a8d1f450..a38518d96f 100644 --- a/src/google/protobuf/compiler/cpp/field.cc +++ b/src/google/protobuf/compiler/cpp/field.cc @@ -227,6 +227,12 @@ void FieldGeneratorBase::GenerateCopyConstructorCode(io::Printer* p) const { } } +pb::CppFeatures::StringType FieldGeneratorBase::GetDeclaredStringType() const { + return CppGenerator::GetResolvedSourceFeatures(*field_) + .GetExtension(pb::cpp) + .string_type(); +} + namespace { std::unique_ptr<FieldGeneratorBase> MakeGenerator(const FieldDescriptor* field, const Options& options, diff --git a/src/google/protobuf/compiler/cpp/field.h b/src/google/protobuf/compiler/cpp/field.h index 4722fc5236..7a0a8f1d16 100644 --- a/src/google/protobuf/compiler/cpp/field.h +++ b/src/google/protobuf/compiler/cpp/field.h @@ -25,6 +25,7 @@ #include "absl/types/span.h" #include "google/protobuf/compiler/cpp/helpers.h" #include "google/protobuf/compiler/cpp/options.h" +#include "google/protobuf/cpp_features.pb.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/io/printer.h" @@ -199,6 +200,8 @@ class FieldGeneratorBase { MessageSCCAnalyzer* scc_; absl::flat_hash_map<absl::string_view, std::string> variables_; + pb::CppFeatures::StringType GetDeclaredStringType() const; + private: bool should_split_ = false; bool is_trivial_ = false; diff --git a/src/google/protobuf/compiler/cpp/field_generators/string_field.cc b/src/google/protobuf/compiler/cpp/field_generators/string_field.cc index 88635e3a88..1fc3951d49 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/string_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/string_field.cc @@ -234,8 +234,7 @@ void SingularString::GenerateAccessorDeclarations(io::Printer* p) const { // files that applied the ctype. The field can still be accessed via the // reflection interface since the reflection interface is independent of // the string's underlying representation. - bool unknown_ctype = - field_->options().ctype() != internal::cpp::EffectiveStringCType(field_); + bool unknown_ctype = GetDeclaredStringType() != pb::CppFeatures::STRING; if (unknown_ctype) { p->Emit(R"cc( @@ -820,8 +819,7 @@ class RepeatedString : public FieldGeneratorBase { }; void RepeatedString::GenerateAccessorDeclarations(io::Printer* p) const { - bool unknown_ctype = - field_->options().ctype() != internal::cpp::EffectiveStringCType(field_); + bool unknown_ctype = GetDeclaredStringType() != pb::CppFeatures::STRING; if (unknown_ctype) { p->Emit(R"cc( diff --git a/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc b/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc index 43a4beb881..6f09abc557 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc @@ -637,8 +637,7 @@ class RepeatedStringView : public FieldGeneratorBase { }; void RepeatedStringView::GenerateAccessorDeclarations(io::Printer* p) const { - bool unknown_ctype = - field_->options().ctype() != internal::cpp::EffectiveStringCType(field_); + bool unknown_ctype = GetDeclaredStringType() != pb::CppFeatures::VIEW; if (unknown_ctype) { p->Emit(R"cc( diff --git a/src/google/protobuf/compiler/cpp/helpers.cc b/src/google/protobuf/compiler/cpp/helpers.cc index b6fd838ec3..6eaa38fb9c 100644 --- a/src/google/protobuf/compiler/cpp/helpers.cc +++ b/src/google/protobuf/compiler/cpp/helpers.cc @@ -1094,18 +1094,8 @@ bool HasRepeatedFields(const FileDescriptor* file) { return false; } -static bool IsStringPieceField(const FieldDescriptor* field, - const Options& options) { - return field->cpp_type() == FieldDescriptor::CPPTYPE_STRING && - internal::cpp::EffectiveStringCType(field) == - FieldOptions::STRING_PIECE; -} - static bool HasStringPieceFields(const Descriptor* descriptor, const Options& options) { - for (int i = 0; i < descriptor->field_count(); ++i) { - if (IsStringPieceField(descriptor->field(i), options)) return true; - } for (int i = 0; i < descriptor->nested_type_count(); ++i) { if (HasStringPieceFields(descriptor->nested_type(i), options)) return true; } @@ -1119,15 +1109,10 @@ bool HasStringPieceFields(const FileDescriptor* file, const Options& options) { return false; } -static bool IsCordField(const FieldDescriptor* field, const Options& options) { - return field->cpp_type() == FieldDescriptor::CPPTYPE_STRING && - internal::cpp::EffectiveStringCType(field) == FieldOptions::CORD; -} - static bool HasCordFields(const Descriptor* descriptor, const Options& options) { for (int i = 0; i < descriptor->field_count(); ++i) { - if (IsCordField(descriptor->field(i), options)) return true; + if (IsCord(descriptor->field(i))) return true; } for (int i = 0; i < descriptor->nested_type_count(); ++i) { if (HasCordFields(descriptor->nested_type(i), options)) return true; diff --git a/src/google/protobuf/compiler/cpp/helpers.h b/src/google/protobuf/compiler/cpp/helpers.h index 09dcb20a2f..c8078e15e4 100644 --- a/src/google/protobuf/compiler/cpp/helpers.h +++ b/src/google/protobuf/compiler/cpp/helpers.h @@ -330,19 +330,15 @@ inline bool IsWeak(const FieldDescriptor* field, const Options& options) { inline bool IsCord(const FieldDescriptor* field) { return field->cpp_type() == FieldDescriptor::CPPTYPE_STRING && - internal::cpp::EffectiveStringCType(field) == FieldOptions::CORD; + field->cpp_string_type() == FieldDescriptor::CppStringType::kCord; } inline bool IsString(const FieldDescriptor* field) { return field->cpp_type() == FieldDescriptor::CPPTYPE_STRING && - internal::cpp::EffectiveStringCType(field) == FieldOptions::STRING; + (field->cpp_string_type() == FieldDescriptor::CppStringType::kString || + field->cpp_string_type() == FieldDescriptor::CppStringType::kView); } -inline bool IsStringPiece(const FieldDescriptor* field) { - return field->cpp_type() == FieldDescriptor::CPPTYPE_STRING && - internal::cpp::EffectiveStringCType(field) == - FieldOptions::STRING_PIECE; -} bool IsProfileDriven(const Options& options); diff --git a/src/google/protobuf/compiler/cpp/message.cc b/src/google/protobuf/compiler/cpp/message.cc index 26128b3899..2af5856224 100644 --- a/src/google/protobuf/compiler/cpp/message.cc +++ b/src/google/protobuf/compiler/cpp/message.cc @@ -3880,21 +3880,16 @@ MessageGenerator::NewOpRequirements MessageGenerator::GetNewOp( break; case FieldDescriptor::CPPTYPE_STRING: - switch (internal::cpp::EffectiveStringCType(field)) { - case FieldOptions::STRING_PIECE: - op.needs_arena_seeding = true; - print_arena_offset(); - break; - case FieldOptions::CORD: + switch (field->cpp_string_type()) { + case FieldDescriptor::CppStringType::kCord: // Cord fields are currently rejected above because of ArenaDtor // requirements. ABSL_CHECK(op.needs_to_run_constructor); break; - case FieldOptions::STRING: + case FieldDescriptor::CppStringType::kView: + case FieldDescriptor::CppStringType::kString: op.needs_memcpy = true; break; - default: - ABSL_LOG(FATAL); } break; case FieldDescriptor::CPPTYPE_MESSAGE: diff --git a/src/google/protobuf/descriptor.h b/src/google/protobuf/descriptor.h index ccbc409746..eda070f5c6 100644 --- a/src/google/protobuf/descriptor.h +++ b/src/google/protobuf/descriptor.h @@ -2949,20 +2949,6 @@ PROTOBUF_EXPORT bool HasPreservingUnknownEnumSemantics( PROTOBUF_EXPORT bool HasHasbit(const FieldDescriptor* field); #ifndef SWIG -// For a string field, returns the effective ctype. If the actual ctype is -// not supported, returns the default of STRING. -template <typename FieldDesc = FieldDescriptor, - typename FieldOpts = FieldOptions> -typename FieldOpts::CType EffectiveStringCType(const FieldDesc* field) { - // TODO Replace this function with - // FieldDescriptor::cpp_string_type; - switch (field->cpp_string_type()) { - case FieldDescriptor::CppStringType::kCord: - return FieldOpts::CORD; - default: - return FieldOpts::STRING; - } -} enum class Utf8CheckMode : uint8_t { kStrict = 0, // Parsing will fail if non UTF-8 data is in string fields. diff --git a/src/google/protobuf/generated_message_reflection.cc b/src/google/protobuf/generated_message_reflection.cc index 391318ed21..6857caf65f 100644 --- a/src/google/protobuf/generated_message_reflection.cc +++ b/src/google/protobuf/generated_message_reflection.cc @@ -33,6 +33,7 @@ #include "absl/synchronization/mutex.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/descriptor.pb.h" +#include "google/protobuf/descriptor_lite.h" #include "google/protobuf/extension_set.h" #include "google/protobuf/generated_message_tctable_decl.h" #include "google/protobuf/generated_message_tctable_gen.h" @@ -162,6 +163,17 @@ PROTOBUF_NOINLINE const std::string& NameOfDenseEnumSlow( } } +bool IsMatchingCType(const FieldDescriptor* field, int ctype) { + switch (field->cpp_string_type()) { + case FieldDescriptor::CppStringType::kCord: + return ctype == FieldOptions::CORD; + case FieldDescriptor::CppStringType::kView: + case FieldDescriptor::CppStringType::kString: + return ctype == FieldOptions::STRING; + } + internal::Unreachable(); +} + } // namespace internal // =================================================================== @@ -2669,8 +2681,7 @@ const void* Reflection::GetRawRepeatedField(const Message& message, ReportReflectionUsageTypeError(descriptor_, field, "GetRawRepeatedField", cpptype); if (ctype >= 0) - ABSL_CHECK_EQ(internal::cpp::EffectiveStringCType(field), ctype) - << "subtype mismatch"; + ABSL_CHECK(IsMatchingCType(field, ctype)) << "subtype mismatch"; if (desc != nullptr) ABSL_CHECK_EQ(field->message_type(), desc) << "wrong submessage type"; if (field->is_extension()) { diff --git a/src/google/protobuf/reflection_visit_field_info.h b/src/google/protobuf/reflection_visit_field_info.h index 2edc56984a..dee9c8526d 100644 --- a/src/google/protobuf/reflection_visit_field_info.h +++ b/src/google/protobuf/reflection_visit_field_info.h @@ -117,8 +117,8 @@ struct DynamicFieldInfoHelper { static absl::string_view GetStringView(const Reflection* reflection, const Message& message, const FieldDescriptor* field) { - auto ctype = cpp::EffectiveStringCType(field); - ABSL_DCHECK_NE(ctype, FieldOptions::CORD); + auto string_type = field->cpp_string_type(); + ABSL_DCHECK(string_type != FieldDescriptor::CppStringType::kCord); ABSL_DCHECK(!is_oneof || reflection->HasOneofField(message, field)); auto str = Get<ArenaStringPtr>(reflection, message, field); ABSL_DCHECK(!str.IsDefault()); diff --git a/src/google/protobuf/reflection_visit_fields.h b/src/google/protobuf/reflection_visit_fields.h index d1b317bc2f..005b6d8311 100644 --- a/src/google/protobuf/reflection_visit_fields.h +++ b/src/google/protobuf/reflection_visit_fields.h @@ -174,9 +174,10 @@ void ReflectionVisit::VisitFields(MessageT& message, CallbackFn&& func, reflection, message, field, rep}); \ } - switch (cpp::EffectiveStringCType(field)) { - default: - case FieldOptions::STRING: + switch (field->cpp_string_type()) { + case FieldDescriptor::CppStringType::kCord: + case FieldDescriptor::CppStringType::kView: + case FieldDescriptor::CppStringType::kString: PROTOBUF_IMPL_STRING_CASE(std::string, String); break; } @@ -227,13 +228,16 @@ void ReflectionVisit::VisitFields(MessageT& message, CallbackFn&& func, case FieldDescriptor::TYPE_BYTES: case FieldDescriptor::TYPE_STRING: { - auto ctype = cpp::EffectiveStringCType(field); - if (ctype == FieldOptions::CORD) { - func(CordDynamicFieldInfo<MessageT, true>{reflection, message, - field}); - } else { - func(StringDynamicFieldInfo<MessageT, true>{reflection, message, + switch (field->cpp_string_type()) { + case FieldDescriptor::CppStringType::kCord: + func(CordDynamicFieldInfo<MessageT, true>{reflection, message, field}); + break; + case FieldDescriptor::CppStringType::kString: + case FieldDescriptor::CppStringType::kView: + func(StringDynamicFieldInfo<MessageT, true>{reflection, message, + field}); + break; } break; } @@ -279,13 +283,16 @@ void ReflectionVisit::VisitFields(MessageT& message, CallbackFn&& func, break; case FieldDescriptor::TYPE_BYTES: case FieldDescriptor::TYPE_STRING: { - auto ctype = cpp::EffectiveStringCType(field); - if (ctype == FieldOptions::CORD) { - func(CordDynamicFieldInfo<MessageT, false>{reflection, message, - field}); - } else { - func(StringDynamicFieldInfo<MessageT, false>{reflection, message, + switch (field->cpp_string_type()) { + case FieldDescriptor::CppStringType::kCord: + func(CordDynamicFieldInfo<MessageT, false>{reflection, message, field}); + break; + case FieldDescriptor::CppStringType::kString: + case FieldDescriptor::CppStringType::kView: + func(StringDynamicFieldInfo<MessageT, false>{reflection, message, + field}); + break; } break; }