| 297 | } |
| 298 | |
| 299 | const absl::StatusOr<std::string> Attribute::AsString() const { |
| 300 | if (variable_name().empty()) { |
| 301 | return absl::InvalidArgumentError( |
| 302 | "Only ident rooted attributes are supported."); |
| 303 | } |
| 304 | |
| 305 | std::string result = std::string(variable_name()); |
| 306 | |
| 307 | for (const auto& qualifier : qualifier_path()) { |
| 308 | CEL_RETURN_IF_ERROR(absl::visit( |
| 309 | AttributeStringPrinter(&result, qualifier.kind()), qualifier.value_)); |
| 310 | } |
| 311 | |
| 312 | return result; |
| 313 | } |
| 314 | |
| 315 | bool AttributeQualifier::IsMatch(const AttributeQualifier& other) const { |
| 316 | if (absl::holds_alternative<Kind>(value_) || |
nothing calls this directly
no test coverage detected