StructStruct
A named record defined inline, in a package or shared module.
When to use
Define this contract before assigning it to stream valueType or keyType.
Behavior
- Usually carries application messages between operators.
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: Struct
type: struct