Fixed bytes
Represents a fixed-length byte array.
- Kotlin Definition:
FixedBytesDefinition - Kotlin Value:
ByteArray - Maryk Yaml Definition:
FixedBytes
Usage options
Section titled “Usage options”- Value
- Map key or value
- Inside List/Set
Validation Options
Section titled “Validation Options”required- default truefinal- default falseunique- default falseminValue- default false. Minimum valuemaxValue- default false. Maximum value
Other options
Section titled “Other options”default- the default value to be used if value was not set.byteSize- fixed bytes size
Examples
Section titled “Examples”Example of a Fixed Bytes property definition for use within a Model
val value by fixedBytes( index = 1u, byteSize = 4, required = false, final = true, unique = true, default = byteArrayOf(0, 1, 1, 0), minValue = byteArrayOf(0, 0, 0, 0), maxValue = byteArrayOf(1, 1, 0, 0))Example of a separate Kotlin Fixed Bytes property definition
val def = FixedBytesDefinition( required = false, final = true, unique = true, byteSize = 4, default = byteArrayOf(0, 1, 1, 0), minValue = byteArrayOf(0, 0, 0, 0), maxValue = byteArrayOf(1, 1, 0, 0))Storage/Transport Byte representation
Section titled “Storage/Transport Byte representation”The byte array of the property. In transport bytes it is encoded as Length Delimited.
String representation
Section titled “String representation”Base 64 representation of the bytes