DurationBounds

data class DurationBounds(val min: Int, val max: Int, val allowsZero: Boolean, val hasSchemaMin: Boolean, val hasSchemaMax: Boolean)(source)

Validated numeric bounds for custom duration entry.

Constructors

Link copied to clipboard
constructor(min: Int, max: Int, allowsZero: Boolean, hasSchemaMin: Boolean, hasSchemaMax: Boolean)

Properties

Link copied to clipboard

Whether 0 (Unset / Disabled) is valid even when min> 0.

Link copied to clipboard

Whether max came from the protobuf field metadata or an explicit caller cap.

Link copied to clipboard

Whether min came from the protobuf field metadata.

Link copied to clipboard
val max: Int

Inclusive upper bound (Int.MAX_VALUE when the schema declares no maximum).

Link copied to clipboard
val min: Int

Inclusive lower bound for non-zero durations (0 when the schema declares no minimum).

Functions

Link copied to clipboard
fun isValid(value: Int): Boolean

Whether value satisfies these bounds.