| 115 | } |
| 116 | |
| 117 | absl::Status ParsedMapFieldValue::Equal( |
| 118 | const Value& other, |
| 119 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 120 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 121 | google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) const { |
| 122 | if (auto other_value = other.AsParsedMapField(); other_value) { |
| 123 | ABSL_DCHECK(field_ != nullptr); |
| 124 | ABSL_DCHECK(other_value->field_ != nullptr); |
| 125 | CEL_ASSIGN_OR_RETURN( |
| 126 | auto equal, internal::MessageFieldEquals( |
| 127 | *message_, field_, *other_value->message_, |
| 128 | other_value->field_, descriptor_pool, message_factory)); |
| 129 | *result = BoolValue(equal); |
| 130 | return absl::OkStatus(); |
| 131 | } |
| 132 | if (auto other_value = other.AsParsedJsonMap(); other_value) { |
| 133 | if (other_value->value_ == nullptr) { |
| 134 | *result = BoolValue(IsEmpty()); |
| 135 | return absl::OkStatus(); |
| 136 | } |
| 137 | ABSL_DCHECK(field_ != nullptr); |
| 138 | CEL_ASSIGN_OR_RETURN( |
| 139 | auto equal, |
| 140 | internal::MessageFieldEquals(*message_, field_, *other_value->value_, |
| 141 | descriptor_pool, message_factory)); |
| 142 | *result = BoolValue(equal); |
| 143 | return absl::OkStatus(); |
| 144 | } |
| 145 | if (auto other_value = other.AsMap(); other_value) { |
| 146 | return common_internal::MapValueEqual(MapValue(*this), *other_value, |
| 147 | descriptor_pool, message_factory, |
| 148 | arena, result); |
| 149 | } |
| 150 | *result = BoolValue(false); |
| 151 | return absl::OkStatus(); |
| 152 | } |
| 153 | |
| 154 | bool ParsedMapFieldValue::IsZeroValue() const { return IsEmpty(); } |
| 155 |
nothing calls this directly
no test coverage detected