Built-in scalar and runtime typesBuilt-in scalar and runtime types
`DataType` values that require no `keyType` or `valueType`: numeric, character, boolean, string and framework runtime contracts.
When to use
Define this contract before assigning it to stream valueType or keyType.
Behavior
intanduintuse the target language native integer representation.int8,int16,int32,int64anduint8,uint16,uint32,uint64make width and signedness explicit.byte,charandunicode charrepresent byte-oriented, character and Unicode code-point values according to the target backend.booleanrepresents a true/false value.stringandunicode stringrepresent text contracts; the backend maps them to its native string representation.floatanddoublerepresent single- and double-precision floating-point values.anyis an intentionally untyped or dynamically represented payload.erroris the framework error contract used in error streams and generated error paths.useAliascreates a project-named type over a built-in contract; that alias may become public only whenuseAliasis enabled.
Definition properties
Identity and representation
namestringCanonical named type referenced by streams and other types.
Requiredtypeint | uint | byte | char | boolean | unicode char | string | unicode string | float | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | any | error | array | map | struct | customDataType kind that controls generated representation, composition and serde behavior.
RequiredAllowed:int, uint, byte, char, boolean, unicode char, string, unicode string, float, double, int8, int16, int32, int64, uint8, uint16, uint32, uint64, any, error, array, map, struct, customdefinitionFormatNative | Protobuf | FlatBuffers | CapNProto | OpenAPISerialization or external definition format.
Allowed:Native, Protobuf, FlatBuffers, CapNProto, OpenAPIdescriptiontextGenerated type documentation.
Composition properties
Nested type references
keyTypeTypeMap key type.
map onlyvalueTypeTypeArray item or map value type.
array or mapCode generation properties
Sharing and target-language behavior
transferByValuebooleanUses value rather than pointer/reference signatures.
Default:falseuseAliasbooleanGenerates a named alias for a built-in scalar or runtime contract.
Default:falsepublicTypebooleanPlaces the named type in a user-selected Module so it can be shared across services.
moduleModuleUser-defined Module that owns a public type.
publicType = truepackagestringTarget-language package alias.
typeDefinitionLang*codeInline target-language definition.
custom typeConfiguration example
name: Built-in scalar and runtimeType
type: primitive