diff --git a/php/ext/google/protobuf/wkt.inc b/php/ext/google/protobuf/wkt.inc index 6902c4f0f0..a093995a61 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 [1592] = { +const char google_protobuf_type_proto_descriptor [1647] = { '\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', '\"', '\327', '\001', '\n', '\004', 'T', 'y', 'p', 'e', '\022', '\014', '\n', '\004', 'n', 'a', +'t', 'e', 'x', 't', '.', 'p', 'r', 'o', 't', 'o', '\"', '\350', '\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,57 +1636,59 @@ const char google_protobuf_type_proto_descriptor [1592] = { '\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', '\"', '\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', +'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', }; static void google_protobuf_type_proto_AddDescriptor() { @@ -1856,6 +1858,28 @@ 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) @@ -1870,6 +1894,8 @@ 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 }; @@ -2440,6 +2466,28 @@ 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) @@ -2452,6 +2500,8 @@ 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 }; @@ -2703,6 +2753,8 @@ 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 fbce4bfdb1..c9a2952010 100644 --- a/php/src/GPBMetadata/Google/Protobuf/Any.php +++ b/php/src/GPBMetadata/Google/Protobuf/Any.php @@ -1,5 +1,6 @@ internalAddGeneratedFile( - ' -Ô -google/protobuf/any.protogoogle.protobuf"& -Any -type_url (  -value ( Bv -com.google.protobufBAnyProtoPZ,google.golang.org/protobuf/types/known/anypb¢GPBªGoogle.Protobuf.WellKnownTypesbproto3' + "\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" , true); static::$is_initialized = true; diff --git a/php/src/GPBMetadata/Google/Protobuf/Api.php b/php/src/GPBMetadata/Google/Protobuf/Api.php index 75e0ec6318..4485d3d0b3 100644 --- a/php/src/GPBMetadata/Google/Protobuf/Api.php +++ b/php/src/GPBMetadata/Google/Protobuf/Api.php @@ -1,5 +1,6 @@ internalAddGeneratedFile( - ' -É -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' + "\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" , true); static::$is_initialized = true; diff --git a/php/src/GPBMetadata/Google/Protobuf/Duration.php b/php/src/GPBMetadata/Google/Protobuf/Duration.php index 5d8023e4db..29e02a8451 100644 --- a/php/src/GPBMetadata/Google/Protobuf/Duration.php +++ b/php/src/GPBMetadata/Google/Protobuf/Duration.php @@ -1,5 +1,6 @@ internalAddGeneratedFile( - ' -ë -google/protobuf/duration.protogoogle.protobuf"* -Duration -seconds ( -nanos (Bƒ -com.google.protobufB DurationProtoPZ1google.golang.org/protobuf/types/known/durationpbø¢GPBªGoogle.Protobuf.WellKnownTypesbproto3' + "\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" , true); static::$is_initialized = true; diff --git a/php/src/GPBMetadata/Google/Protobuf/FieldMask.php b/php/src/GPBMetadata/Google/Protobuf/FieldMask.php index f31bcc0012..394e41043a 100644 --- a/php/src/GPBMetadata/Google/Protobuf/FieldMask.php +++ b/php/src/GPBMetadata/Google/Protobuf/FieldMask.php @@ -1,5 +1,6 @@ internalAddGeneratedFile( - ' -ß - google/protobuf/field_mask.protogoogle.protobuf" - FieldMask -paths ( B… -com.google.protobufBFieldMaskProtoPZ2google.golang.org/protobuf/types/known/fieldmaskpbø¢GPBªGoogle.Protobuf.WellKnownTypesbproto3' + "\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" , true); static::$is_initialized = true; diff --git a/php/src/GPBMetadata/Google/Protobuf/GPBEmpty.php b/php/src/GPBMetadata/Google/Protobuf/GPBEmpty.php index 5e42536f27..2842d0e992 100644 --- a/php/src/GPBMetadata/Google/Protobuf/GPBEmpty.php +++ b/php/src/GPBMetadata/Google/Protobuf/GPBEmpty.php @@ -1,5 +1,6 @@ internalAddGeneratedFile( - ' -¾ -google/protobuf/empty.protogoogle.protobuf" -EmptyB} -com.google.protobufB -EmptyProtoPZ.google.golang.org/protobuf/types/known/emptypbø¢GPBªGoogle.Protobuf.WellKnownTypesbproto3' + "\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" , 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 4247c09546..c2af953db2 100644 --- a/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php +++ b/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php @@ -1,5 +1,6 @@ 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::STRING, 13) + ->optional('edition', \Google\Protobuf\Internal\GPBType::ENUM, 14, 'google.protobuf.internal.Edition') ->finalizeToPool(); $pool->addMessage('google.protobuf.internal.DescriptorProto', \Google\Protobuf\Internal\DescriptorProto::class) @@ -60,6 +61,22 @@ 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) @@ -99,8 +116,8 @@ class Descriptor $pool->addEnum('google.protobuf.internal.FieldDescriptorProto.Label', \Google\Protobuf\Internal\Label::class) ->value("LABEL_OPTIONAL", 1) - ->value("LABEL_REQUIRED", 2) ->value("LABEL_REPEATED", 3) + ->value("LABEL_REQUIRED", 2) ->finalizeToPool(); $pool->addMessage('google.protobuf.internal.OneofDescriptorProto', \Google\Protobuf\Internal\OneofDescriptorProto::class) @@ -153,7 +170,6 @@ 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) @@ -163,6 +179,7 @@ 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(); @@ -178,6 +195,7 @@ 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(); @@ -189,9 +207,27 @@ 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) @@ -204,7 +240,27 @@ 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(); @@ -212,15 +268,20 @@ 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(); @@ -228,6 +289,7 @@ 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(); @@ -252,6 +314,64 @@ 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(); @@ -273,6 +393,28 @@ 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 797732d9f3..8d1566c05a 100644 --- a/php/src/GPBMetadata/Google/Protobuf/SourceContext.php +++ b/php/src/GPBMetadata/Google/Protobuf/SourceContext.php @@ -1,5 +1,6 @@ internalAddGeneratedFile( - ' -ð -$google/protobuf/source_context.protogoogle.protobuf"" - SourceContext - file_name ( BŠ -com.google.protobufBSourceContextProtoPZ6google.golang.org/protobuf/types/known/sourcecontextpb¢GPBªGoogle.Protobuf.WellKnownTypesbproto3' + "\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" , true); static::$is_initialized = true; diff --git a/php/src/GPBMetadata/Google/Protobuf/Struct.php b/php/src/GPBMetadata/Google/Protobuf/Struct.php index 888a81adee..6fad5d9a83 100644 Binary files a/php/src/GPBMetadata/Google/Protobuf/Struct.php and b/php/src/GPBMetadata/Google/Protobuf/Struct.php differ diff --git a/php/src/GPBMetadata/Google/Protobuf/Timestamp.php b/php/src/GPBMetadata/Google/Protobuf/Timestamp.php index 09437271a9..fd4eaacc9d 100644 --- a/php/src/GPBMetadata/Google/Protobuf/Timestamp.php +++ b/php/src/GPBMetadata/Google/Protobuf/Timestamp.php @@ -1,5 +1,6 @@ internalAddGeneratedFile( - ' -ï -google/protobuf/timestamp.protogoogle.protobuf"+ - Timestamp -seconds ( -nanos (B… -com.google.protobufBTimestampProtoPZ2google.golang.org/protobuf/types/known/timestamppbø¢GPBªGoogle.Protobuf.WellKnownTypesbproto3' + "\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" , true); static::$is_initialized = true; diff --git a/php/src/GPBMetadata/Google/Protobuf/Type.php b/php/src/GPBMetadata/Google/Protobuf/Type.php index 7d0bfbb533..6bec20ded3 100644 Binary files a/php/src/GPBMetadata/Google/Protobuf/Type.php and b/php/src/GPBMetadata/Google/Protobuf/Type.php differ diff --git a/php/src/GPBMetadata/Google/Protobuf/Wrappers.php b/php/src/GPBMetadata/Google/Protobuf/Wrappers.php index e7ea1a3b95..49f84252b6 100644 --- a/php/src/GPBMetadata/Google/Protobuf/Wrappers.php +++ b/php/src/GPBMetadata/Google/Protobuf/Wrappers.php @@ -1,5 +1,6 @@ internalAddGeneratedFile( - ' -Ç -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' + "\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" , true); static::$is_initialized = true; diff --git a/php/src/Google/Protobuf/Any.php b/php/src/Google/Protobuf/Any.php index feea41aad9..2f245ca2f6 100644 --- a/php/src/Google/Protobuf/Any.php +++ b/php/src/Google/Protobuf/Any.php @@ -1,5 +1,6 @@ , * "lastName": * } * 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" * } * @@ -104,7 +106,8 @@ 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. + * type.googleapis.com. As of May 2023, there are no widely used type server + * implementations and no plans to implement one. * Schemes other than `http`, `https` (or the empty scheme) might be * used with implementation specific semantics. * @@ -145,7 +148,8 @@ 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. + * type.googleapis.com. As of May 2023, there are no widely used type server + * implementations and no plans to implement one. * Schemes other than `http`, `https` (or the empty scheme) might be * used with implementation specific semantics. * @type string $value @@ -178,7 +182,8 @@ 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. + * type.googleapis.com. As of May 2023, there are no widely used type server + * implementations and no plans to implement one. * Schemes other than `http`, `https` (or the empty scheme) might be * used with implementation specific semantics. * @@ -211,7 +216,8 @@ 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. + * type.googleapis.com. As of May 2023, there are no widely used type server + * implementations and no plans to implement one. * 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 3784263cbf..f39e81aab6 100644 --- a/php/src/Google/Protobuf/Api.php +++ b/php/src/Google/Protobuf/Api.php @@ -1,5 +1,6 @@ .google.protobuf.Syntax syntax = 5; */ protected $syntax = 0; + /** + * The source edition string, only valid when syntax is SYNTAX_EDITIONS. + * + * Generated from protobuf field string edition = 6; + */ + protected $edition = ''; /** * Constructor. @@ -62,6 +69,8 @@ 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) { @@ -209,5 +218,31 @@ class Enum extends \Google\Protobuf\Internal\Message return $this; } + /** + * The source edition string, only valid when syntax is SYNTAX_EDITIONS. + * + * Generated from protobuf field string edition = 6; + * @return string + */ + public function getEdition() + { + return $this->edition; + } + + /** + * The source edition string, only valid when syntax is SYNTAX_EDITIONS. + * + * Generated from protobuf field string edition = 6; + * @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 93c20f967c..3914d285d4 100644 --- a/php/src/Google/Protobuf/EnumValue.php +++ b/php/src/Google/Protobuf/EnumValue.php @@ -1,5 +1,6 @@ optional .google.protobuf.FeatureSet features = 7; + */ + protected $features = null; /** * The parser stores options it doesn't recognize here. See above. * @@ -71,6 +78,8 @@ 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. * } @@ -174,13 +183,17 @@ class EnumOptions extends \Google\Protobuf\Internal\Message */ public function getDeprecatedLegacyJsonFieldConflicts() { - @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); + if (isset($this->deprecated_legacy_json_field_conflicts)) { + @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() { - @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); + if (isset($this->deprecated_legacy_json_field_conflicts)) { + @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); + } return isset($this->deprecated_legacy_json_field_conflicts); } @@ -212,6 +225,42 @@ class EnumOptions extends \Google\Protobuf\Internal\Message return $this; } + /** + * Any features defined in the specific edition. + * + * Generated from protobuf field optional .google.protobuf.FeatureSet features = 7; + * @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 optional .google.protobuf.FeatureSet features = 7; + * @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 0feaea6f18..822e1de59b 100644 --- a/php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php @@ -1,5 +1,6 @@ optional bool deprecated = 1 [default = false]; */ protected $deprecated = null; + /** + * Any features defined in the specific edition. + * + * Generated from protobuf field optional .google.protobuf.FeatureSet features = 2; + */ + 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 optional bool debug_redact = 3 [default = false]; + */ + protected $debug_redact = null; + /** + * Information about the support window of a feature value. + * + * Generated from protobuf field optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 4; + */ + protected $feature_support = null; /** * The parser stores options it doesn't recognize here. See above. * @@ -42,6 +63,14 @@ 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. * } @@ -93,6 +122,118 @@ class EnumValueOptions extends \Google\Protobuf\Internal\Message return $this; } + /** + * Any features defined in the specific edition. + * + * Generated from protobuf field optional .google.protobuf.FeatureSet features = 2; + * @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 optional .google.protobuf.FeatureSet features = 2; + * @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 optional bool debug_redact = 3 [default = false]; + * @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 optional bool debug_redact = 3 [default = false]; + * @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 optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 4; + * @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 optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 4; + * @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 245173c3d0..2a969afb47 100644 --- a/php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php +++ b/php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php @@ -1,5 +1,6 @@ repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; */ 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 repeated .google.protobuf.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE]; + */ + private $declaration; + /** + * Any features defined in the specific edition. + * + * Generated from protobuf field optional .google.protobuf.FeatureSet features = 50; + */ + 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 optional .google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED, retention = RETENTION_SOURCE]; + */ + protected $verification = null; /** * Constructor. @@ -30,6 +53,16 @@ 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) { @@ -63,5 +96,111 @@ 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 repeated .google.protobuf.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE]; + * @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 repeated .google.protobuf.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE]; + * @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 optional .google.protobuf.FeatureSet features = 50; + * @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 optional .google.protobuf.FeatureSet features = 50; + * @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 optional .google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED, retention = RETENTION_SOURCE]; + * @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 optional .google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED, retention = RETENTION_SOURCE]; + * @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 5e99bff173..e493f53eb4 100644 --- a/php/src/Google/Protobuf/Internal/FieldDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/FieldDescriptorProto.php @@ -1,5 +1,6 @@ LABEL_OPTIONAL = 1; */ const LABEL_OPTIONAL = 1; - /** - * Generated from protobuf enum LABEL_REQUIRED = 2; - */ - const LABEL_REQUIRED = 2; /** * Generated from protobuf enum LABEL_REPEATED = 3; */ 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 LABEL_REQUIRED = 2; + */ + const LABEL_REQUIRED = 2; private static $valueToName = [ self::LABEL_OPTIONAL => 'LABEL_OPTIONAL', - self::LABEL_REQUIRED => 'LABEL_REQUIRED', self::LABEL_REPEATED => 'LABEL_REPEATED', + self::LABEL_REQUIRED => 'LABEL_REQUIRED', ]; public static function name($value) @@ -53,6 +58,3 @@ 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 6072e9990f..80c8395ba4 100644 --- a/php/src/Google/Protobuf/Internal/FieldDescriptorProto/Type.php +++ b/php/src/Google/Protobuf/Internal/FieldDescriptorProto/Type.php @@ -1,5 +1,6 @@ TYPE_GROUP = 10; */ @@ -148,6 +150,3 @@ 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 6f1d54b7ee..efde73f695 100644 --- a/php/src/Google/Protobuf/Internal/FieldOptions.php +++ b/php/src/Google/Protobuf/Internal/FieldOptions.php @@ -1,5 +1,6 @@ optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; */ @@ -28,8 +32,10 @@ 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-prefixed blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. + * 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. * * Generated from protobuf field optional bool packed = 2; */ @@ -64,18 +70,11 @@ 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 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. + * 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). * * Generated from protobuf field optional bool lazy = 5 [default = false]; */ @@ -103,6 +102,35 @@ class FieldOptions extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional bool weak = 10 [default = false]; */ 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 optional bool debug_redact = 16 [default = false]; + */ + protected $debug_redact = null; + /** + * Generated from protobuf field optional .google.protobuf.FieldOptions.OptionRetention retention = 17; + */ + protected $retention = null; + /** + * Generated from protobuf field repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19; + */ + private $targets; + /** + * Generated from protobuf field repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; + */ + private $edition_defaults; + /** + * Any features defined in the specific edition. + * + * Generated from protobuf field optional .google.protobuf.FeatureSet features = 21; + */ + protected $features = null; + /** + * Generated from protobuf field optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22; + */ + protected $feature_support = null; /** * The parser stores options it doesn't recognize here. See above. * @@ -117,16 +145,21 @@ 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! + * 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. * @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-prefixed blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. + * 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. * @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 @@ -153,18 +186,11 @@ 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 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. + * 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). * @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 @@ -176,6 +202,15 @@ 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|\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. * } @@ -186,10 +221,13 @@ 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! + * 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. * * Generated from protobuf field optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; * @return int @@ -210,10 +248,13 @@ 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 not yet implemented in the open source - * release -- sorry, we'll try to include it in a future version! + * 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. * * Generated from protobuf field optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; * @param int $var @@ -231,8 +272,10 @@ 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-prefixed blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. + * 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. * * Generated from protobuf field optional bool packed = 2; * @return bool @@ -257,7 +300,9 @@ 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. + * 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. * * Generated from protobuf field optional bool packed = 2; * @param bool $var @@ -340,18 +385,11 @@ 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 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. + * 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). * * Generated from protobuf field optional bool lazy = 5 [default = false]; * @return bool @@ -386,18 +424,11 @@ 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 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. + * 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). * * Generated from protobuf field optional bool lazy = 5 [default = false]; * @param bool $var @@ -529,6 +560,188 @@ 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 optional bool debug_redact = 16 [default = false]; + * @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 optional bool debug_redact = 16 [default = false]; + * @param bool $var + * @return $this + */ + public function setDebugRedact($var) + { + GPBUtil::checkBool($var); + $this->debug_redact = $var; + + return $this; + } + + /** + * Generated from protobuf field optional .google.protobuf.FieldOptions.OptionRetention retention = 17; + * @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 optional .google.protobuf.FieldOptions.OptionRetention retention = 17; + * @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 repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargets() + { + return $this->targets; + } + + /** + * Generated from protobuf field repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19; + * @param array|\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 repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEditionDefaults() + { + return $this->edition_defaults; + } + + /** + * Generated from protobuf field repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; + * @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 optional .google.protobuf.FeatureSet features = 21; + * @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 optional .google.protobuf.FeatureSet features = 21; + * @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 optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22; + * @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 optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22; + * @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 ba9eb4adb8..a248777291 100644 --- a/php/src/Google/Protobuf/Internal/FieldOptions/CType.php +++ b/php/src/Google/Protobuf/Internal/FieldOptions/CType.php @@ -1,5 +1,6 @@ CORD = 1; */ const CORD = 1; @@ -53,6 +61,3 @@ 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 175a4330bb..5ecc06bd98 100644 --- a/php/src/Google/Protobuf/Internal/FieldOptions/JSType.php +++ b/php/src/Google/Protobuf/Internal/FieldOptions/JSType.php @@ -1,5 +1,6 @@ optional string edition = 13; + * Generated from protobuf field optional .google.protobuf.Edition edition = 14; */ protected $edition = null; @@ -126,8 +127,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 string $edition - * The edition of the proto file, which is an opaque string. + * @type int $edition + * The edition of the proto file. * } */ public function __construct($data = NULL) { @@ -494,14 +495,14 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message } /** - * The edition of the proto file, which is an opaque string. + * The edition of the proto file. * - * Generated from protobuf field optional string edition = 13; - * @return string + * Generated from protobuf field optional .google.protobuf.Edition edition = 14; + * @return int */ public function getEdition() { - return isset($this->edition) ? $this->edition : ''; + return isset($this->edition) ? $this->edition : 0; } public function hasEdition() @@ -515,15 +516,15 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message } /** - * The edition of the proto file, which is an opaque string. + * The edition of the proto file. * - * Generated from protobuf field optional string edition = 13; - * @param string $var + * Generated from protobuf field optional .google.protobuf.Edition edition = 14; + * @param int $var * @return $this */ public function setEdition($var) { - GPBUtil::checkString($var, True); + GPBUtil::checkEnum($var, \Google\Protobuf\Internal\Edition::class); $this->edition = $var; return $this; diff --git a/php/src/Google/Protobuf/Internal/FileDescriptorSet.php b/php/src/Google/Protobuf/Internal/FileDescriptorSet.php index 1dae6fb3e3..6337846661 100644 --- a/php/src/Google/Protobuf/Internal/FileDescriptorSet.php +++ b/php/src/Google/Protobuf/Internal/FileDescriptorSet.php @@ -1,5 +1,6 @@ optional bool java_string_check_utf8 = 27 [default = false]; */ @@ -99,10 +102,6 @@ class FileOptions extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional bool py_generic_services = 18 [default = false]; */ protected $py_generic_services = null; - /** - * Generated from protobuf field optional bool php_generic_services = 42 [default = false]; - */ - protected $php_generic_services = null; /** * Is this file deprecated? * Depending on the target platform, this can emit Deprecated annotations @@ -172,6 +171,12 @@ class FileOptions extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional string ruby_package = 45; */ protected $ruby_package = null; + /** + * Any features defined in the specific edition. + * + * Generated from protobuf field optional .google.protobuf.FeatureSet features = 50; + */ + protected $features = null; /** * The parser stores options it doesn't recognize here. * See the documentation for the "Options" section above. @@ -207,12 +212,14 @@ class FileOptions extends \Google\Protobuf\Internal\Message * @type bool $java_generate_equals_and_hash * This option does nothing. * @type bool $java_string_check_utf8 - * 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. + * 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. * @type int $optimize_for * @type string $go_package * Sets the Go package where structs generated from this .proto will be @@ -232,7 +239,6 @@ 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 @@ -266,6 +272,8 @@ 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. @@ -417,13 +425,17 @@ class FileOptions extends \Google\Protobuf\Internal\Message */ public function getJavaGenerateEqualsAndHash() { - @trigger_error('java_generate_equals_and_hash is deprecated.', E_USER_DEPRECATED); + if (isset($this->java_generate_equals_and_hash)) { + @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() { - @trigger_error('java_generate_equals_and_hash is deprecated.', E_USER_DEPRECATED); + if (isset($this->java_generate_equals_and_hash)) { + @trigger_error('java_generate_equals_and_hash is deprecated.', E_USER_DEPRECATED); + } return isset($this->java_generate_equals_and_hash); } @@ -451,12 +463,14 @@ class FileOptions extends \Google\Protobuf\Internal\Message } /** - * 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. + * 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. * * Generated from protobuf field optional bool java_string_check_utf8 = 27 [default = false]; * @return bool @@ -477,12 +491,14 @@ class FileOptions extends \Google\Protobuf\Internal\Message } /** - * 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. + * 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. * * Generated from protobuf field optional bool java_string_check_utf8 = 27 [default = false]; * @param bool $var @@ -688,38 +704,6 @@ class FileOptions extends \Google\Protobuf\Internal\Message return $this; } - /** - * Generated from protobuf field optional bool php_generic_services = 42 [default = false]; - * @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 optional bool php_generic_services = 42 [default = false]; - * @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 @@ -1074,6 +1058,42 @@ class FileOptions extends \Google\Protobuf\Internal\Message return $this; } + /** + * Any features defined in the specific edition. + * + * Generated from protobuf field optional .google.protobuf.FeatureSet features = 50; + * @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 optional .google.protobuf.FeatureSet features = 50; + * @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 0df27b5335..2ffe8b2fae 100644 --- a/php/src/Google/Protobuf/Internal/FileOptions/OptimizeMode.php +++ b/php/src/Google/Protobuf/Internal/FileOptions/OptimizeMode.php @@ -1,5 +1,6 @@ optional bool map_entry = 7; */ @@ -89,6 +90,12 @@ 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 optional .google.protobuf.FeatureSet features = 12; + */ + protected $features = null; /** * The parser stores options it doesn't recognize here. See above. * @@ -128,9 +135,6 @@ 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: @@ -146,6 +150,9 @@ 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. @@ -155,6 +162,8 @@ 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. * } @@ -311,9 +320,6 @@ 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: @@ -329,6 +335,9 @@ 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 optional bool map_entry = 7; * @return bool @@ -349,9 +358,6 @@ 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: @@ -367,6 +373,9 @@ 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 optional bool map_entry = 7; * @param bool $var @@ -396,13 +405,17 @@ class MessageOptions extends \Google\Protobuf\Internal\Message */ public function getDeprecatedLegacyJsonFieldConflicts() { - @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); + if (isset($this->deprecated_legacy_json_field_conflicts)) { + @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() { - @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); + if (isset($this->deprecated_legacy_json_field_conflicts)) { + @trigger_error('deprecated_legacy_json_field_conflicts is deprecated.', E_USER_DEPRECATED); + } return isset($this->deprecated_legacy_json_field_conflicts); } @@ -436,6 +449,42 @@ class MessageOptions extends \Google\Protobuf\Internal\Message return $this; } + /** + * Any features defined in the specific edition. + * + * Generated from protobuf field optional .google.protobuf.FeatureSet features = 12; + * @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 optional .google.protobuf.FeatureSet features = 12; + * @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 96efb02d24..93276e3930 100644 --- a/php/src/Google/Protobuf/Internal/MethodDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/MethodDescriptorProto.php @@ -1,5 +1,6 @@ optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; */ protected $idempotency_level = null; + /** + * Any features defined in the specific edition. + * + * Generated from protobuf field optional .google.protobuf.FeatureSet features = 35; + */ + protected $features = null; /** * The parser stores options it doesn't recognize here. See above. * @@ -47,6 +54,8 @@ 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. * } @@ -130,6 +139,42 @@ class MethodOptions extends \Google\Protobuf\Internal\Message return $this; } + /** + * Any features defined in the specific edition. + * + * Generated from protobuf field optional .google.protobuf.FeatureSet features = 35; + * @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 optional .google.protobuf.FeatureSet features = 35; + * @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 ce3c062c69..ce99b8c70f 100644 --- a/php/src/Google/Protobuf/Internal/MethodOptions/IdempotencyLevel.php +++ b/php/src/Google/Protobuf/Internal/MethodOptions/IdempotencyLevel.php @@ -1,5 +1,6 @@ optional .google.protobuf.FeatureSet features = 1; + */ + protected $features = null; /** * The parser stores options it doesn't recognize here. See above. * @@ -28,6 +35,8 @@ 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. * } @@ -37,6 +46,42 @@ class OneofOptions extends \Google\Protobuf\Internal\Message parent::__construct($data); } + /** + * Any features defined in the specific edition. + * + * Generated from protobuf field optional .google.protobuf.FeatureSet features = 1; + * @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 optional .google.protobuf.FeatureSet features = 1; + * @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 e322e2abf1..bcc44f0e23 100644 --- a/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php @@ -1,5 +1,6 @@ optional .google.protobuf.FeatureSet features = 34; + */ + protected $features = null; /** * Is this service deprecated? * Depending on the target platform, this can emit Deprecated annotations @@ -37,6 +44,8 @@ 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 @@ -51,6 +60,42 @@ class ServiceOptions extends \Google\Protobuf\Internal\Message parent::__construct($data); } + /** + * Any features defined in the specific edition. + * + * Generated from protobuf field optional .google.protobuf.FeatureSet features = 34; + * @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 optional .google.protobuf.FeatureSet features = 34; + * @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 0005bc6696..d6419f5a96 100644 --- a/php/src/Google/Protobuf/Internal/SourceCodeInfo.php +++ b/php/src/Google/Protobuf/Internal/SourceCodeInfo.php @@ -1,5 +1,6 @@ google.protobuf.NullValue */ diff --git a/php/src/Google/Protobuf/Option.php b/php/src/Google/Protobuf/Option.php index 31249e5131..aeb8368916 100644 --- a/php/src/Google/Protobuf/Option.php +++ b/php/src/Google/Protobuf/Option.php @@ -1,5 +1,6 @@ SYNTAX_PROTO3 = 1; */ const SYNTAX_PROTO3 = 1; + /** + * Syntax `editions`. + * + * Generated from protobuf enum SYNTAX_EDITIONS = 2; + */ + 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 a12f48520b..489e21d36e 100644 --- a/php/src/Google/Protobuf/Timestamp.php +++ b/php/src/Google/Protobuf/Timestamp.php @@ -1,5 +1,6 @@ google.protobuf.Timestamp diff --git a/php/src/Google/Protobuf/Type.php b/php/src/Google/Protobuf/Type.php index d4af7dfecb..6167ba4484 100644 --- a/php/src/Google/Protobuf/Type.php +++ b/php/src/Google/Protobuf/Type.php @@ -1,5 +1,6 @@ .google.protobuf.Syntax syntax = 6; */ protected $syntax = 0; + /** + * The source edition string, only valid when syntax is SYNTAX_EDITIONS. + * + * Generated from protobuf field string edition = 7; + */ + protected $edition = ''; /** * Constructor. @@ -70,6 +77,8 @@ 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) { @@ -243,5 +252,31 @@ class Type extends \Google\Protobuf\Internal\Message return $this; } + /** + * The source edition string, only valid when syntax is SYNTAX_EDITIONS. + * + * Generated from protobuf field string edition = 7; + * @return string + */ + public function getEdition() + { + return $this->edition; + } + + /** + * The source edition string, only valid when syntax is SYNTAX_EDITIONS. + * + * Generated from protobuf field string edition = 7; + * @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 ae5fc5b42c..84303edff1 100644 --- a/php/src/Google/Protobuf/UInt32Value.php +++ b/php/src/Google/Protobuf/UInt32Value.php @@ -1,5 +1,6 @@