| 757 | } |
| 758 | |
| 759 | google::protobuf::Message* BytesFromValue(const google::protobuf::Message* prototype, |
| 760 | const CelValue& value, google::protobuf::Arena* arena) { |
| 761 | CelValue::BytesHolder view_val; |
| 762 | if (!value.GetValue(&view_val)) { |
| 763 | return nullptr; |
| 764 | } |
| 765 | auto* message = prototype->New(arena); |
| 766 | CEL_ASSIGN_OR_RETURN( |
| 767 | auto reflection, |
| 768 | cel::well_known_types::GetBytesValueReflection(message->GetDescriptor()), |
| 769 | _.With(IgnoreErrorAndReturnNullptr())); |
| 770 | reflection.SetValue(message, view_val.value()); |
| 771 | return message; |
| 772 | } |
| 773 | |
| 774 | google::protobuf::Message* DoubleFromValue(const google::protobuf::Message* prototype, |
| 775 | const CelValue& value, google::protobuf::Arena* arena) { |
no test coverage detected