@@ -319,6 +319,13 @@ static PHP_METHOD(google_protobuf_Api, setSourceContext) {
319319 RETURN_COPY (getThis ());
320320}
321321
322+ static PHP_METHOD (google_protobuf_Api, hasSourceContext) {
323+ Message* intern = (Message*)Z_OBJ_P (getThis ());
324+ const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
325+ intern->desc ->msgdef , " source_context" );
326+ RETVAL_BOOL (upb_Message_HasFieldByDef (intern->msg , f));
327+ }
328+
322329static PHP_METHOD (google_protobuf_Api, getMixins) {
323330 Message* intern = (Message*)Z_OBJ_P (getThis ());
324331 const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
@@ -375,6 +382,7 @@ static zend_function_entry google_protobuf_Api_phpmethods[] = {
375382 PHP_ME (google_protobuf_Api, setVersion, arginfo_setter, ZEND_ACC_PUBLIC)
376383 PHP_ME (google_protobuf_Api, getSourceContext, arginfo_void, ZEND_ACC_PUBLIC)
377384 PHP_ME (google_protobuf_Api, setSourceContext, arginfo_setter, ZEND_ACC_PUBLIC)
385+ PHP_ME (google_protobuf_Api, hasSourceContext, arginfo_void, ZEND_ACC_PUBLIC)
378386 PHP_ME (google_protobuf_Api, getMixins, arginfo_void, ZEND_ACC_PUBLIC)
379387 PHP_ME (google_protobuf_Api, setMixins, arginfo_setter, ZEND_ACC_PUBLIC)
380388 PHP_ME (google_protobuf_Api, getSyntax, arginfo_void, ZEND_ACC_PUBLIC)
@@ -1183,12 +1191,20 @@ static PHP_METHOD(google_protobuf_Struct_FieldsEntry, setValue) {
11831191 RETURN_COPY (getThis ());
11841192}
11851193
1194+ static PHP_METHOD (google_protobuf_Struct_FieldsEntry, hasValue) {
1195+ Message* intern = (Message*)Z_OBJ_P (getThis ());
1196+ const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
1197+ intern->desc ->msgdef , " value" );
1198+ RETVAL_BOOL (upb_Message_HasFieldByDef (intern->msg , f));
1199+ }
1200+
11861201static zend_function_entry google_protobuf_Struct_FieldsEntry_phpmethods[] = {
11871202 PHP_ME (google_protobuf_Struct_FieldsEntry, __construct, arginfo_construct, ZEND_ACC_PUBLIC)
11881203 PHP_ME (google_protobuf_Struct_FieldsEntry, getKey, arginfo_void, ZEND_ACC_PUBLIC)
11891204 PHP_ME (google_protobuf_Struct_FieldsEntry, setKey, arginfo_setter, ZEND_ACC_PUBLIC)
11901205 PHP_ME (google_protobuf_Struct_FieldsEntry, getValue, arginfo_void, ZEND_ACC_PUBLIC)
11911206 PHP_ME (google_protobuf_Struct_FieldsEntry, setValue, arginfo_setter, ZEND_ACC_PUBLIC)
1207+ PHP_ME (google_protobuf_Struct_FieldsEntry, hasValue, arginfo_void, ZEND_ACC_PUBLIC)
11921208 ZEND_FE_END
11931209};
11941210
@@ -1235,6 +1251,13 @@ static PHP_METHOD(google_protobuf_Value, setNullValue) {
12351251 RETURN_COPY (getThis ());
12361252}
12371253
1254+ static PHP_METHOD (google_protobuf_Value, hasNullValue) {
1255+ Message* intern = (Message*)Z_OBJ_P (getThis ());
1256+ const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
1257+ intern->desc ->msgdef , " null_value" );
1258+ RETVAL_BOOL (upb_Message_HasFieldByDef (intern->msg , f));
1259+ }
1260+
12381261static PHP_METHOD (google_protobuf_Value, getNumberValue) {
12391262 Message* intern = (Message*)Z_OBJ_P (getThis ());
12401263 const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
@@ -1257,6 +1280,13 @@ static PHP_METHOD(google_protobuf_Value, setNumberValue) {
12571280 RETURN_COPY (getThis ());
12581281}
12591282
1283+ static PHP_METHOD (google_protobuf_Value, hasNumberValue) {
1284+ Message* intern = (Message*)Z_OBJ_P (getThis ());
1285+ const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
1286+ intern->desc ->msgdef , " number_value" );
1287+ RETVAL_BOOL (upb_Message_HasFieldByDef (intern->msg , f));
1288+ }
1289+
12601290static PHP_METHOD (google_protobuf_Value, getStringValue) {
12611291 Message* intern = (Message*)Z_OBJ_P (getThis ());
12621292 const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
@@ -1279,6 +1309,13 @@ static PHP_METHOD(google_protobuf_Value, setStringValue) {
12791309 RETURN_COPY (getThis ());
12801310}
12811311
1312+ static PHP_METHOD (google_protobuf_Value, hasStringValue) {
1313+ Message* intern = (Message*)Z_OBJ_P (getThis ());
1314+ const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
1315+ intern->desc ->msgdef , " string_value" );
1316+ RETVAL_BOOL (upb_Message_HasFieldByDef (intern->msg , f));
1317+ }
1318+
12821319static PHP_METHOD (google_protobuf_Value, getBoolValue) {
12831320 Message* intern = (Message*)Z_OBJ_P (getThis ());
12841321 const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
@@ -1301,6 +1338,13 @@ static PHP_METHOD(google_protobuf_Value, setBoolValue) {
13011338 RETURN_COPY (getThis ());
13021339}
13031340
1341+ static PHP_METHOD (google_protobuf_Value, hasBoolValue) {
1342+ Message* intern = (Message*)Z_OBJ_P (getThis ());
1343+ const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
1344+ intern->desc ->msgdef , " bool_value" );
1345+ RETVAL_BOOL (upb_Message_HasFieldByDef (intern->msg , f));
1346+ }
1347+
13041348static PHP_METHOD (google_protobuf_Value, getStructValue) {
13051349 Message* intern = (Message*)Z_OBJ_P (getThis ());
13061350 const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
@@ -1323,6 +1367,13 @@ static PHP_METHOD(google_protobuf_Value, setStructValue) {
13231367 RETURN_COPY (getThis ());
13241368}
13251369
1370+ static PHP_METHOD (google_protobuf_Value, hasStructValue) {
1371+ Message* intern = (Message*)Z_OBJ_P (getThis ());
1372+ const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
1373+ intern->desc ->msgdef , " struct_value" );
1374+ RETVAL_BOOL (upb_Message_HasFieldByDef (intern->msg , f));
1375+ }
1376+
13261377static PHP_METHOD (google_protobuf_Value, getListValue) {
13271378 Message* intern = (Message*)Z_OBJ_P (getThis ());
13281379 const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
@@ -1345,6 +1396,13 @@ static PHP_METHOD(google_protobuf_Value, setListValue) {
13451396 RETURN_COPY (getThis ());
13461397}
13471398
1399+ static PHP_METHOD (google_protobuf_Value, hasListValue) {
1400+ Message* intern = (Message*)Z_OBJ_P (getThis ());
1401+ const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
1402+ intern->desc ->msgdef , " list_value" );
1403+ RETVAL_BOOL (upb_Message_HasFieldByDef (intern->msg , f));
1404+ }
1405+
13481406static PHP_METHOD (google_protobuf_Value, getKind) {
13491407 Message* intern = (Message*)Z_OBJ_P (getThis ());
13501408 const upb_OneofDef *oneof = upb_MessageDef_FindOneofByName (
@@ -1357,16 +1415,22 @@ static zend_function_entry google_protobuf_Value_phpmethods[] = {
13571415 PHP_ME (google_protobuf_Value, __construct, arginfo_construct, ZEND_ACC_PUBLIC)
13581416 PHP_ME (google_protobuf_Value, getNullValue, arginfo_void, ZEND_ACC_PUBLIC)
13591417 PHP_ME (google_protobuf_Value, setNullValue, arginfo_setter, ZEND_ACC_PUBLIC)
1418+ PHP_ME (google_protobuf_Value, hasNullValue, arginfo_void, ZEND_ACC_PUBLIC)
13601419 PHP_ME (google_protobuf_Value, getNumberValue, arginfo_void, ZEND_ACC_PUBLIC)
13611420 PHP_ME (google_protobuf_Value, setNumberValue, arginfo_setter, ZEND_ACC_PUBLIC)
1421+ PHP_ME (google_protobuf_Value, hasNumberValue, arginfo_void, ZEND_ACC_PUBLIC)
13621422 PHP_ME (google_protobuf_Value, getStringValue, arginfo_void, ZEND_ACC_PUBLIC)
13631423 PHP_ME (google_protobuf_Value, setStringValue, arginfo_setter, ZEND_ACC_PUBLIC)
1424+ PHP_ME (google_protobuf_Value, hasStringValue, arginfo_void, ZEND_ACC_PUBLIC)
13641425 PHP_ME (google_protobuf_Value, getBoolValue, arginfo_void, ZEND_ACC_PUBLIC)
13651426 PHP_ME (google_protobuf_Value, setBoolValue, arginfo_setter, ZEND_ACC_PUBLIC)
1427+ PHP_ME (google_protobuf_Value, hasBoolValue, arginfo_void, ZEND_ACC_PUBLIC)
13661428 PHP_ME (google_protobuf_Value, getStructValue, arginfo_void, ZEND_ACC_PUBLIC)
13671429 PHP_ME (google_protobuf_Value, setStructValue, arginfo_setter, ZEND_ACC_PUBLIC)
1430+ PHP_ME (google_protobuf_Value, hasStructValue, arginfo_void, ZEND_ACC_PUBLIC)
13681431 PHP_ME (google_protobuf_Value, getListValue, arginfo_void, ZEND_ACC_PUBLIC)
13691432 PHP_ME (google_protobuf_Value, setListValue, arginfo_setter, ZEND_ACC_PUBLIC)
1433+ PHP_ME (google_protobuf_Value, hasListValue, arginfo_void, ZEND_ACC_PUBLIC)
13701434 PHP_ME (google_protobuf_Value, getKind, arginfo_void, ZEND_ACC_PUBLIC)
13711435 ZEND_FE_END
13721436};
@@ -1836,6 +1900,13 @@ static PHP_METHOD(google_protobuf_Type, setSourceContext) {
18361900 RETURN_COPY (getThis ());
18371901}
18381902
1903+ static PHP_METHOD (google_protobuf_Type, hasSourceContext) {
1904+ Message* intern = (Message*)Z_OBJ_P (getThis ());
1905+ const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
1906+ intern->desc ->msgdef , " source_context" );
1907+ RETVAL_BOOL (upb_Message_HasFieldByDef (intern->msg , f));
1908+ }
1909+
18391910static PHP_METHOD (google_protobuf_Type, getSyntax) {
18401911 Message* intern = (Message*)Z_OBJ_P (getThis ());
18411912 const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
@@ -1892,6 +1963,7 @@ static zend_function_entry google_protobuf_Type_phpmethods[] = {
18921963 PHP_ME (google_protobuf_Type, setOptions, arginfo_setter, ZEND_ACC_PUBLIC)
18931964 PHP_ME (google_protobuf_Type, getSourceContext, arginfo_void, ZEND_ACC_PUBLIC)
18941965 PHP_ME (google_protobuf_Type, setSourceContext, arginfo_setter, ZEND_ACC_PUBLIC)
1966+ PHP_ME (google_protobuf_Type, hasSourceContext, arginfo_void, ZEND_ACC_PUBLIC)
18951967 PHP_ME (google_protobuf_Type, getSyntax, arginfo_void, ZEND_ACC_PUBLIC)
18961968 PHP_ME (google_protobuf_Type, setSyntax, arginfo_setter, ZEND_ACC_PUBLIC)
18971969 PHP_ME (google_protobuf_Type, getEdition, arginfo_void, ZEND_ACC_PUBLIC)
@@ -2444,6 +2516,13 @@ static PHP_METHOD(google_protobuf_Enum, setSourceContext) {
24442516 RETURN_COPY (getThis ());
24452517}
24462518
2519+ static PHP_METHOD (google_protobuf_Enum, hasSourceContext) {
2520+ Message* intern = (Message*)Z_OBJ_P (getThis ());
2521+ const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
2522+ intern->desc ->msgdef , " source_context" );
2523+ RETVAL_BOOL (upb_Message_HasFieldByDef (intern->msg , f));
2524+ }
2525+
24472526static PHP_METHOD (google_protobuf_Enum, getSyntax) {
24482527 Message* intern = (Message*)Z_OBJ_P (getThis ());
24492528 const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
@@ -2498,6 +2577,7 @@ static zend_function_entry google_protobuf_Enum_phpmethods[] = {
24982577 PHP_ME (google_protobuf_Enum, setOptions, arginfo_setter, ZEND_ACC_PUBLIC)
24992578 PHP_ME (google_protobuf_Enum, getSourceContext, arginfo_void, ZEND_ACC_PUBLIC)
25002579 PHP_ME (google_protobuf_Enum, setSourceContext, arginfo_setter, ZEND_ACC_PUBLIC)
2580+ PHP_ME (google_protobuf_Enum, hasSourceContext, arginfo_void, ZEND_ACC_PUBLIC)
25012581 PHP_ME (google_protobuf_Enum, getSyntax, arginfo_void, ZEND_ACC_PUBLIC)
25022582 PHP_ME (google_protobuf_Enum, setSyntax, arginfo_setter, ZEND_ACC_PUBLIC)
25032583 PHP_ME (google_protobuf_Enum, getEdition, arginfo_void, ZEND_ACC_PUBLIC)
@@ -2668,12 +2748,20 @@ static PHP_METHOD(google_protobuf_Option, setValue) {
26682748 RETURN_COPY (getThis ());
26692749}
26702750
2751+ static PHP_METHOD (google_protobuf_Option, hasValue) {
2752+ Message* intern = (Message*)Z_OBJ_P (getThis ());
2753+ const upb_FieldDef *f = upb_MessageDef_FindFieldByName (
2754+ intern->desc ->msgdef , " value" );
2755+ RETVAL_BOOL (upb_Message_HasFieldByDef (intern->msg , f));
2756+ }
2757+
26712758static zend_function_entry google_protobuf_Option_phpmethods[] = {
26722759 PHP_ME (google_protobuf_Option, __construct, arginfo_construct, ZEND_ACC_PUBLIC)
26732760 PHP_ME (google_protobuf_Option, getName, arginfo_void, ZEND_ACC_PUBLIC)
26742761 PHP_ME (google_protobuf_Option, setName, arginfo_setter, ZEND_ACC_PUBLIC)
26752762 PHP_ME (google_protobuf_Option, getValue, arginfo_void, ZEND_ACC_PUBLIC)
26762763 PHP_ME (google_protobuf_Option, setValue, arginfo_setter, ZEND_ACC_PUBLIC)
2764+ PHP_ME (google_protobuf_Option, hasValue, arginfo_void, ZEND_ACC_PUBLIC)
26772765 ZEND_FE_END
26782766};
26792767
0 commit comments