protoAdapter

fun protoAdapter(typeName: String, includeUnknown: Boolean): ProtoAdapter<Any>

Returns a wire adapter for the message or enum type named typeName. The returned type adapter doesn't have model classes to encode and decode from, so instead it uses scalar types (String, ByteString, Integer, etc.), maps, lists, and corresponding classes to proto3 types (e.g. Instant for google.prptobuf.Timestamp.) It can both encode and decode these objects. Map keys are field names.

Parameters

includeUnknown

true to include values for unknown tags in the returned model. Map keys for such values is the unknown value's tag name as a string. Unknown values are decoded to Long, Long, Integer, or ByteString for VARINT, FIXED64, FIXED32, or LENGTH_DELIMITED, respectively.