CommandInput

interface CommandInput(source)

Open input contract: new kinds can supply a validator without changing this interface.

Inheritors

Types

Link copied to clipboard
data object Boolean : CommandInput
Link copied to clipboard
data class Choice(val options: List<CommandInput.Option>) : CommandInput
Link copied to clipboard
data class Field(val id: String, val input: CommandInput)
Link copied to clipboard
data object None : CommandInput
Link copied to clipboard
data class Option(val id: String, val value: Int)
Link copied to clipboard
data class Range(val min: Int, val max: Int, val step: Int, val unit: String, val scale: Double = 1.0) : CommandInput
Link copied to clipboard
data class RawPayload(val description: String, val valueTypes: Set<String>) : CommandInput
Link copied to clipboard
data class Record(val apiType: String, val fields: List<CommandInput.Field>) : CommandInput
Link copied to clipboard
data class Text(val minLength: Int, val maxLength: Int, val pattern: String, val sensitive: Boolean) : CommandInput
Link copied to clipboard
data class Tuple(val apiType: String, val fields: List<CommandInput.Field>) : CommandInput
Link copied to clipboard
data class Unsupported(val reason: String) : CommandInput

The catalogue knows the command, but its input contract is not yet implemented.

Properties

Link copied to clipboard
abstract val kind: String

Functions

Link copied to clipboard
abstract fun validationError(value: CommandValue): String?

A value-free explanation, or null when the input satisfies this contract.