QueryValueSchema

class QueryValueSchema(val kind: QueryValueKind, val title: String? = null, val description: String? = null, enumValues: List<JsonNode>? = null, enumDescriptions: Map<JsonNode, String> = emptyMap(), valueTypes: Set<QueryValueType> = if (kind == QueryValueKind.OBJECT) setOf(QueryValueType.OBJECT) else emptySet(), properties: Map<String, QueryValueSchema> = emptyMap(), val items: QueryValueSchema? = null, val additionalProperties: QueryValueSchema? = null, alternatives: List<QueryValueSchema> = emptyList(), val nullable: Boolean = kind != QueryValueKind.UNION || alternatives.any { it.nullable }, val required: Boolean = false, val semanticType: QuerySemanticType? = null, val maskRule: MaskRule? = null, val variant: String? = null, aliases: Set<QueryField> = emptySet(), val deprecated: QueryDeprecation? = null)

One immutable logical value shape, shared by backend schema snapshots. Collection inputs are snapshotted; mutable enum JSON is detached on read.

Constructors

Link copied to clipboard
constructor(kind: QueryValueKind, title: String? = null, description: String? = null, enumValues: List<JsonNode>? = null, enumDescriptions: Map<JsonNode, String> = emptyMap(), valueTypes: Set<QueryValueType> = if (kind == QueryValueKind.OBJECT) setOf(QueryValueType.OBJECT) else emptySet(), properties: Map<String, QueryValueSchema> = emptyMap(), items: QueryValueSchema? = null, additionalProperties: QueryValueSchema? = null, alternatives: List<QueryValueSchema> = emptyList(), nullable: Boolean = kind != QueryValueKind.UNION || alternatives.any { it.nullable }, required: Boolean = false, semanticType: QuerySemanticType? = null, maskRule: MaskRule? = null, variant: String? = null, aliases: Set<QueryField> = emptySet(), deprecated: QueryDeprecation? = null)

Properties

Link copied to clipboard

Other logical paths that name this value.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Set when the field is kept only for existing callers.

Link copied to clipboard
Link copied to clipboard
val enumDescriptions: Map<JsonNode, String>

What each enum value means, by value; values without a description are absent.

Link copied to clipboard
val enumValues: List<JsonNode>?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The discriminator value when this value is one variant of a variant payload, such as an event's bodyType.

Functions

Link copied to clipboard

Flattens nested unions into their non-union alternatives; any other value is its own single alternative.

Link copied to clipboard

Whether any alternative of this value is an array, so storage may flatten it into multiple values.

Link copied to clipboard

Whether this value can be an element scope: every non-null alternative is an array whose non-null items are all objects, so a predicate can match one element as a whole.

Link copied to clipboard

Operations on primitive arrays use one member layer, without flattening the definition.

Link copied to clipboard
fun QueryValueSchema.storageFamilies(capability: QueryCapability, rules: QueryStorageFamilyRules = QueryStorageFamilyRules.STRICT): List<Set<QueryStorageFamily>>

The native type families this scalar value needs for capability: one set per declared alternative, and storage proves the capability when its native types cover every set and fall in some set. An empty list, or a list with an empty set, means no storage can prove the capability for this value.