QueryValueSchema

class QueryValueSchema @InternalWowApi constructor(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: its kind, the scalar valueTypes, an object's properties and additionalProperties, an array's items, a union's alternatives, and what the sources declare about it (semanticType, maskRule, aliases, deprecated). The core builds it from the model's sources; a storage adapter reads it, through LogicalQuerySchema, to report what its storage serves. 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

The sensitivity of this string value: its level and how responses mask it; null when it is not sensitive.

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 this value may be an array holding a null element: an array whose items the schema lets be null.

Link copied to clipboard

The values an operation on this value compares: the value itself, an array's items (one member layer, without flattening the definition) and a union's alternatives, each a non-union value. A storage adapter asks each one which storage families a capability needs (storageFamilies).

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.