| 105 | } |
| 106 | |
| 107 | absl::StatusOr<MapValue> MapValueFromExpr( |
| 108 | const ExprMapValue& map_value, |
| 109 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 110 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 111 | google::protobuf::Arena* absl_nonnull arena) { |
| 112 | auto builder = cel::NewMapValueBuilder(arena); |
| 113 | for (const auto& entry : map_value.entries()) { |
| 114 | CEL_ASSIGN_OR_RETURN(auto key, |
| 115 | FromExprValue(entry.key(), descriptor_pool, |
| 116 | message_factory, arena)); |
| 117 | CEL_ASSIGN_OR_RETURN(auto value, |
| 118 | FromExprValue(entry.value(), descriptor_pool, |
| 119 | message_factory, arena)); |
| 120 | CEL_RETURN_IF_ERROR(builder->Put(std::move(key), std::move(value))); |
| 121 | } |
| 122 | |
| 123 | return std::move(*builder).Build(); |
| 124 | } |
| 125 | |
| 126 | absl::StatusOr<ListValue> ListValueFromExpr( |
| 127 | const ExprListValue& list_value, |
no test coverage detected