Flex bytes
Represents a variable-length byte array.
- Kotlin Definition:
FlexBytesDefinition - Kotlin Value:
ByteArray - Maryk Yaml Definition:
FlexBytes
Usage options
Section titled “Usage options”- Value
- Map Key or Value
- List
Validation Options
Section titled “Validation Options”required- default truefinal- default falseunique- default falseminSize- minimum length of the byte array. Default unset.maxSize- maximum length of the byte array. Default unset.minValue- default false. Minimum value (Sort start value)maxValue- default false. Maximum value (Sort end value)
Other options
Section titled “Other options”default- the default value to be used if value was not set.
Examples
Section titled “Examples”Example of a Flex Bytes property definition for use within a Model
val value by flexBytes( index = 1u, required = false, final = true, unique = true, minSize = 2, maxSize = 5, default = Bytes.ofHex("1111"), minValue = Bytes.ofHex("0000"), maxValue = Bytes.ofHex("FFFFFFFFFF"))Example of a separate Flex Bytes property definition
val def = FlexBytesDefinition( required = false, final = true, unique = true, minSize = 2, maxSize = 5, default = Bytes.ofHex("1111"), minValue = Bytes.ofHex("0000"), maxValue = Bytes.ofHex("FFFFFFFFFF"))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