Types

Link copied to clipboard
data class Collection(val elementStrategy: MappingStrategy, val isSet: Boolean = false) : MappingStrategy

Collection mapping: elements ride the convertEach… element seams, selected by the (target element shape × onFail) table — e.g. tags.convertEachOrSkip("tags", from, to) { … }. Direct same-type elements keep the container passthrough (no seam); container-level null handling stays separate (scope separation: element failure never escalates to the container).

Link copied to clipboard
data class Convert(val converterFqn: String, val forward: Boolean) : MappingStrategy

Converter call resolved orientation-aware.

Link copied to clipboard
data object Direct : MappingStrategy

Direct assignment (same type, nullable compatible).

Link copied to clipboard
data class EnumFromWire(val enumFqn: String) : MappingStrategy

Wire-backed enum mapping: source wire value → target enum via MappableEnum.entries.

Link copied to clipboard

Enum → wire value mapping via MappableEnum.wireValue.

Link copied to clipboard
data class External(val parameterName: String) : MappingStrategy

External field (comes from function parameter).

Link copied to clipboard
data class MapValues(val valueStrategy: MappingStrategy) : MappingStrategy

Map → Map mapping: entries ride the convertEntries… seams (per-entry key/value ladders at keyed paths like prices["usd"]), selected by the (target value shape × onFail) table — e.g. prices.convertEntriesOrSkip("prices", keyFrom, keyTo, valueFrom, valueTo, { it }) { … }. Keys stay same-type in v1 (the identity lambda fills the seam's convertKey slot); different key types → Unmappable. Direct same-type values keep the container passthrough (no seam). Plain kotlin.collections.Map only; PersistentMap/ImmutableMap wrappers are deferred.

Link copied to clipboard
data class Nested(val mapperFunctionName: String) : MappingStrategy

Nested object mapping (recursive mapper call).

Link copied to clipboard
data class OptionUnwrap(val innerMapperFn: String? = null) : MappingStrategy

Source field type is arrow.core.Option<Inner>. Target field is Inner? or Inner (non-null guarded by existing RequiredFieldMissing path). Detection: matched by source-type FQN string "arrow.core.Option".

Link copied to clipboard
data class OptionWrap(val innerMapperFn: String? = null) : MappingStrategy

Target field type is arrow.core.Option<Inner>. Source field is Inner (non-null) or Inner? (nullable). Detection: matched by target-type FQN string "arrow.core.Option" — no arrow Gradle dep needed.

Link copied to clipboard
data class SerializableEnumFromWire(val enumFqn: String, val entries: List<Pair<String, String>>) : MappingStrategy

Wire String → enum via kotlinx.serialization @Serializable/@SerialName (the MappableEnum-free path). entries is the resolved entrySimpleName → wireValue list (wireValue = @SerialName argument, else the entry name); the generator emits a compile-time when over these — no runtime serializer. Wire type is always String.

Link copied to clipboard
data class SerializableEnumToWire(val enumFqn: String, val entries: List<Pair<String, String>>) : MappingStrategy

Enum → wire String via @Serializable/@SerialName — the mirror of SerializableEnumFromWire; generated as a when mapping each entry to its wire literal.

Link copied to clipboard

No mapping strategy could be determined (type mismatch without a converter). The generator skips this field entirely; the processor emits a compile error.

Link copied to clipboard
data class WrappedCollection(val elementStrategy: MappingStrategy, val wrapperObjectFqn: String, val useUnwrap: Boolean = false) : MappingStrategy

Collection mapping whose container shell is handled by a @CollectionWrapper object, in either direction. Element conversion stays on the normal seam rails: forward (wrap): WrapperObject.wrap(<element seam chain>) reverse (unwrap): WrapperObject.unwrap(source).<element seam chain>