Companion

expect object Companion
actual object Companion
actual object Companion
actual object Companion

Types

Link copied to clipboard

Stub ProtoAdapter for Wire types which are typeliased to java.time types on the JVM such as Duration and Instant. This proto adapter is used when the corresponding java.time type is missing from the JVM classpath.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
expect val BYTES: ProtoAdapter<ByteString>
actual val BYTES: ProtoAdapter<ByteString>
actual val BYTES: ProtoAdapter<ByteString>
actual val BYTES: ProtoAdapter<ByteString>
Link copied to clipboard
expect val BYTES_VALUE: ProtoAdapter<ByteString?>
actual val BYTES_VALUE: ProtoAdapter<ByteString?>
actual val BYTES_VALUE: ProtoAdapter<ByteString?>
actual val BYTES_VALUE: ProtoAdapter<ByteString?>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
actual val EMPTY: ProtoAdapter<Unit>
actual val EMPTY: ProtoAdapter<Unit>
Link copied to clipboard
actual val FIXED32: ProtoAdapter<Int>
actual val FIXED32: ProtoAdapter<Int>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
actual val FLOAT: ProtoAdapter<Float>
actual val FLOAT: ProtoAdapter<Float>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
actual val INT32: ProtoAdapter<Int>
actual val INT32: ProtoAdapter<Int>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
actual val INT64: ProtoAdapter<Long>
actual val INT64: ProtoAdapter<Long>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
actual val SINT32: ProtoAdapter<Int>
actual val SINT32: ProtoAdapter<Int>
Link copied to clipboard
Link copied to clipboard
actual val SINT64: ProtoAdapter<Long>
actual val SINT64: ProtoAdapter<Long>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
actual val STRUCT_LIST: ProtoAdapter<List<*>?>
actual val STRUCT_LIST: ProtoAdapter<List<*>?>
Link copied to clipboard
actual val STRUCT_MAP: ProtoAdapter<Map<String, *>?>
actual val STRUCT_MAP: ProtoAdapter<Map<String, *>?>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
actual val UINT32: ProtoAdapter<Int>
actual val UINT32: ProtoAdapter<Int>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Like INT64, but negative longs are interpreted as large positive values, and encoded that way in JSON.

actual val UINT64: ProtoAdapter<Long>

Like INT64, but negative longs are interpreted as large positive values, and encoded that way in JSON.

actual val UINT64: ProtoAdapter<Long>

Like INT64, but negative longs are interpreted as large positive values, and encoded that way in JSON.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun <M : Message<*, *>> get(message: M): ProtoAdapter<M>

Returns the adapter for the type of Message.

fun <M> get(type: Class<M>): ProtoAdapter<M>

Returns the adapter for type.

fun get(adapterString: String): ProtoAdapter<*>

Returns the adapter for a given adapterString. adapterString is specified on a proto message field's WireField annotation in the form com.squareup.wire.protos.person.Person#ADAPTER.

fun get(adapterString: String, classLoader: ClassLoader?): ProtoAdapter<*>

Returns the adapter for a given adapterString, using classLoader. adapterString is specified on a proto message field's WireField annotation in the form com.squareup.wire.protos.person.Person#ADAPTER.

Link copied to clipboard

Creates a new proto adapter for type.

Link copied to clipboard
expect fun <K, V> newMapAdapter(keyAdapter: ProtoAdapter<K>, valueAdapter: ProtoAdapter<V>): ProtoAdapter<Map<K, V>>

Creates a new proto adapter for a map using keyAdapter and valueAdapter.

actual fun <K, V> newMapAdapter(keyAdapter: ProtoAdapter<K>, valueAdapter: ProtoAdapter<V>): ProtoAdapter<Map<K, V>>

Creates a new proto adapter for a map using keyAdapter and valueAdapter.

actual fun <K, V> newMapAdapter(keyAdapter: ProtoAdapter<K>, valueAdapter: ProtoAdapter<V>): ProtoAdapter<Map<K, V>>
actual fun <K, V> newMapAdapter(keyAdapter: ProtoAdapter<K>, valueAdapter: ProtoAdapter<V>): ProtoAdapter<Map<K, V>>

Creates a new proto adapter for a map using keyAdapter and valueAdapter.

Link copied to clipboard
fun <M : Message<M, B>, B : Message.Builder<M, B>> newMessageAdapter(type: Class<M>, typeUrl: String, syntax: Syntax): ProtoAdapter<M>

fun <M : Message<M, B>, B : Message.Builder<M, B>> newMessageAdapter(type: Class<M>, typeUrl: String, syntax: Syntax, classLoader: ClassLoader?): ProtoAdapter<M>

Creates a new proto adapter for type.