| 62 | } |
| 63 | |
| 64 | absl::Status IntValue::ConvertToJson( |
| 65 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 66 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 67 | google::protobuf::Message* absl_nonnull json) const { |
| 68 | ABSL_DCHECK(descriptor_pool != nullptr); |
| 69 | ABSL_DCHECK(message_factory != nullptr); |
| 70 | ABSL_DCHECK(json != nullptr); |
| 71 | ABSL_DCHECK_EQ(json->GetDescriptor()->well_known_type(), |
| 72 | google::protobuf::Descriptor::WELLKNOWNTYPE_VALUE); |
| 73 | |
| 74 | ValueReflection value_reflection; |
| 75 | CEL_RETURN_IF_ERROR(value_reflection.Initialize(json->GetDescriptor())); |
| 76 | value_reflection.SetNumberValue(json, NativeValue()); |
| 77 | |
| 78 | return absl::OkStatus(); |
| 79 | } |
| 80 | |
| 81 | absl::Status IntValue::Equal( |
| 82 | const Value& other, |