| 324 | } |
| 325 | |
| 326 | absl::Status CustomListValueInterface::Contains( |
| 327 | const Value& other, |
| 328 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 329 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 330 | google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) const { |
| 331 | Value outcome = BoolValue(false); |
| 332 | Value equal; |
| 333 | CEL_RETURN_IF_ERROR(ForEach( |
| 334 | [&](size_t index, const Value& element) -> absl::StatusOr<bool> { |
| 335 | CEL_RETURN_IF_ERROR(element.Equal(other, descriptor_pool, |
| 336 | message_factory, arena, &equal)); |
| 337 | if (auto bool_result = As<BoolValue>(equal); |
| 338 | bool_result.has_value() && bool_result->NativeValue()) { |
| 339 | outcome = BoolValue(true); |
| 340 | return false; |
| 341 | } |
| 342 | return true; |
| 343 | }, |
| 344 | descriptor_pool, message_factory, arena)); |
| 345 | *result = outcome; |
| 346 | return absl::OkStatus(); |
| 347 | } |
| 348 | |
| 349 | CustomListValue::CustomListValue() { |
| 350 | content_ = CustomListValueContent::From(CustomListValueInterface::Content{ |
nothing calls this directly
no test coverage detected