| 742 | } |
| 743 | |
| 744 | google::protobuf::Message* BoolFromValue(const google::protobuf::Message* prototype, |
| 745 | const CelValue& value, google::protobuf::Arena* arena) { |
| 746 | bool val; |
| 747 | if (!value.GetValue(&val)) { |
| 748 | return nullptr; |
| 749 | } |
| 750 | auto* message = prototype->New(arena); |
| 751 | CEL_ASSIGN_OR_RETURN( |
| 752 | auto reflection, |
| 753 | cel::well_known_types::GetBoolValueReflection(message->GetDescriptor()), |
| 754 | _.With(IgnoreErrorAndReturnNullptr())); |
| 755 | reflection.SetValue(message, val); |
| 756 | return message; |
| 757 | } |
| 758 | |
| 759 | google::protobuf::Message* BytesFromValue(const google::protobuf::Message* prototype, |
| 760 | const CelValue& value, google::protobuf::Arena* arena) { |
no test coverage detected