resolveDurationBounds

fun resolveDurationBounds(metadata: FieldMetadata?, allowsZero: Boolean, maxOverride: Int? = null): DurationBounds(source)

Resolves DurationBounds from optional protobuf metadata, whether the field's preset list allows 0 (Unset), and an optional explicit maxOverride cap (for example, a nanopb int_size storage limit not reflected in proto FieldMetadata). When both metadata and maxOverride specify a maximum, the tighter cap applies. Inverted bounds (min > max) are treated as unbounded rather than locking the user out.