ProtoAdapter

expect abstract class ProtoAdapter<E>(fieldEncoding: FieldEncoding, type: KClass<*>?, typeUrl: String?, syntax: Syntax, identity: E? = null, sourceFile: String? = null)

Inheritors

actual abstract class ProtoAdapter<E>(fieldEncoding: FieldEncoding, val type: KClass<*>?, val typeUrl: String?, val syntax: Syntax, val identity: E?, val sourceFile: String?)

Inheritors

actual abstract class ProtoAdapter<E>(fieldEncoding: FieldEncoding, val type: KClass<*>?, val typeUrl: String?, val syntax: Syntax, val identity: E?, val sourceFile: String?)

Inheritors

actual abstract class ProtoAdapter<E>(fieldEncoding: FieldEncoding, val type: KClass<*>?, val typeUrl: String?, val syntax: Syntax, val identity: E?, val sourceFile: String?)

Inheritors

Constructors

Link copied to clipboard
expect constructor(fieldEncoding: FieldEncoding, type: KClass<*>?, typeUrl: String?, syntax: Syntax, identity: E? = null, sourceFile: String? = null)
actual constructor(fieldEncoding: FieldEncoding, type: KClass<*>?, typeUrl: String?, syntax: Syntax, identity: E?, sourceFile: String?)
constructor(fieldEncoding: FieldEncoding, type: Class<*>)
constructor(fieldEncoding: FieldEncoding, type: Class<*>, typeUrl: String?)
constructor(fieldEncoding: FieldEncoding, type: Class<*>, typeUrl: String?, syntax: Syntax)
constructor(fieldEncoding: FieldEncoding, type: Class<*>, typeUrl: String?, syntax: Syntax, identity: E?)
constructor(fieldEncoding: FieldEncoding, type: KClass<*>?)
constructor(fieldEncoding: FieldEncoding, type: KClass<*>?, typeUrl: String?)
constructor(fieldEncoding: FieldEncoding, type: KClass<*>?, typeUrl: String?, syntax: Syntax)
constructor(fieldEncoding: FieldEncoding, type: KClass<*>?, typeUrl: String?, syntax: Syntax, identity: E?)
constructor(fieldEncoding: FieldEncoding, type: Class<*>, typeUrl: String?, syntax: Syntax, identity: E?, sourceFile: String?)
actual constructor(fieldEncoding: FieldEncoding, type: KClass<*>?, typeUrl: String?, syntax: Syntax, identity: E?, sourceFile: String?)
actual constructor(fieldEncoding: FieldEncoding, type: KClass<*>?, typeUrl: String?, syntax: Syntax, identity: E?, sourceFile: String?)

Types

Link copied to clipboard
expect object Companion
actual object Companion
actual object Companion
actual object Companion
Link copied to clipboard

Properties

Link copied to clipboard
expect val identity: E?

A special value that is used when a field is absent from an encoded proto3 message. When encoding a proto3 message, fields that hold this value will be omitted.

actual val identity: E?
actual val identity: E?
actual val identity: E?
Link copied to clipboard
expect val sourceFile: String?

Path to the file containing the protobuf definition of this type.

actual val sourceFile: String?
actual val sourceFile: String?
actual val sourceFile: String?
Link copied to clipboard
expect val syntax: Syntax

Identifies the syntax in which type is defined in the proto schema. This string contains either "proto2" or "proto3".

actual val syntax: Syntax
actual val syntax: Syntax
actual val syntax: Syntax
Link copied to clipboard
expect val type: KClass<*>?
actual val type: KClass<*>?
actual val type: KClass<*>?
actual val type: KClass<*>?
Link copied to clipboard
expect val typeUrl: String?

Identifies this type for inclusion in a google.protobuf.Any. This is a string like "type.googleapis.com/packagename.messagename" or null if this type is either not a message (such as scalars and enums), or was code-generated before Wire 3.2 which introduced support for type URLS.

actual val typeUrl: String?
actual val typeUrl: String?
actual val typeUrl: String?

Functions

Link copied to clipboard
expect fun asPacked(): ProtoAdapter<List<E>>

Returns an adapter for E but as a packed, repeated value.

actual fun asPacked(): ProtoAdapter<List<E>>

Returns an adapter for E but as a packed, repeated value.

actual fun asPacked(): ProtoAdapter<List<E>>
actual fun asPacked(): ProtoAdapter<List<E>>

Returns an adapter for E but as a packed, repeated value.

Link copied to clipboard
expect fun asRepeated(): ProtoAdapter<List<E>>

Returns an adapter for E but as a repeated value.

actual fun asRepeated(): ProtoAdapter<List<E>>

Returns an adapter for E but as a repeated value.

actual fun asRepeated(): ProtoAdapter<List<E>>
actual fun asRepeated(): ProtoAdapter<List<E>>

Returns an adapter for E but as a repeated value.

Link copied to clipboard
expect abstract fun decode(reader: ProtoReader): E

Read a non-null value from reader.

expect fun decode(bytes: ByteArray): E
expect fun decode(bytes: ByteString): E

Read an encoded message from bytes.

expect fun decode(source: BufferedSource): E

Read an encoded message from source.

actual abstract fun decode(reader: ProtoReader): E

Read a non-null value from reader.

actual fun decode(bytes: ByteArray): E
actual fun decode(bytes: ByteString): E

Read an encoded message from bytes.

actual fun decode(source: BufferedSource): E

Read an encoded message from source.

actual abstract fun decode(reader: ProtoReader): E
fun decode(stream: InputStream): E
actual fun decode(bytes: ByteArray): E
actual fun decode(source: BufferedSource): E
actual fun decode(bytes: ByteString): E
actual abstract fun decode(reader: ProtoReader): E

Read a non-null value from reader.

actual fun decode(bytes: ByteArray): E
actual fun decode(bytes: ByteString): E

Read an encoded message from bytes.

actual fun decode(source: BufferedSource): E

Read an encoded message from source.

Link copied to clipboard
fun <E> ProtoAdapter<E>.decode(data: <Error class: unknown class>): E

Read an encoded message from data.

Link copied to clipboard
expect fun encode(value: E): ByteArray

Encode value as a byte[].

expect abstract fun encode(writer: ProtoWriter, value: E)
expect open fun encode(writer: ReverseProtoWriter, value: E)

Write non-null value to writer.

expect fun encode(sink: BufferedSink, value: E)

Encode value and write it to stream.

actual fun encode(value: E): ByteArray

Encode value as a byte[].

actual abstract fun encode(writer: ProtoWriter, value: E)
actual open fun encode(writer: ReverseProtoWriter, value: E)

Write non-null value to writer.

actual fun encode(sink: BufferedSink, value: E)

Encode value and write it to stream.

actual fun encode(value: E): ByteArray
actual abstract fun encode(writer: ProtoWriter, value: E)
actual open fun encode(writer: ReverseProtoWriter, value: E)
fun encode(stream: OutputStream, value: E)
actual fun encode(sink: BufferedSink, value: E)
actual fun encode(value: E): ByteArray

Encode value as a byte[].

actual abstract fun encode(writer: ProtoWriter, value: E)
actual open fun encode(writer: ReverseProtoWriter, value: E)

Write non-null value to writer.

actual fun encode(sink: BufferedSink, value: E)

Encode value and write it to stream.

Link copied to clipboard
expect fun encodeByteString(value: E): ByteString

Encode value as a ByteString.

actual fun encodeByteString(value: E): ByteString

Encode value as a ByteString.

actual fun encodeByteString(value: E): ByteString
actual fun encodeByteString(value: E): ByteString

Encode value as a ByteString.

Link copied to clipboard
expect abstract fun encodedSize(value: E): Int

The size of the non-null data value. This does not include the size required for a length-delimited prefix (should the type require one).

actual abstract fun encodedSize(value: E): Int

The size of the non-null data value. This does not include the size required for a length-delimited prefix (should the type require one).

actual abstract fun encodedSize(value: E): Int
actual abstract fun encodedSize(value: E): Int

The size of the non-null data value. This does not include the size required for a length-delimited prefix (should the type require one).

Link copied to clipboard
expect open fun encodedSizeWithTag(tag: Int, value: E?): Int

The size of tag and value in the wire format. This size includes the tag, type, length-delimited prefix (should the type require one), and value. Returns 0 if value is null.

actual open fun encodedSizeWithTag(tag: Int, value: E?): Int

The size of tag and value in the wire format. This size includes the tag, type, length-delimited prefix (should the type require one), and value. Returns 0 if value is null.

actual open fun encodedSizeWithTag(tag: Int, value: E?): Int
actual open fun encodedSizeWithTag(tag: Int, value: E?): Int

The size of tag and value in the wire format. This size includes the tag, type, length-delimited prefix (should the type require one), and value. Returns 0 if value is null.

Link copied to clipboard
expect open fun encodeWithTag(writer: ProtoWriter, tag: Int, value: E?)
expect open fun encodeWithTag(writer: ReverseProtoWriter, tag: Int, value: E?)

Write tag and value to writer. If value is null this does nothing.

actual open fun encodeWithTag(writer: ProtoWriter, tag: Int, value: E?)
actual open fun encodeWithTag(writer: ReverseProtoWriter, tag: Int, value: E?)

Write tag and value to writer. If value is null this does nothing.

actual open fun encodeWithTag(writer: ProtoWriter, tag: Int, value: E?)
actual open fun encodeWithTag(writer: ReverseProtoWriter, tag: Int, value: E?)
actual open fun encodeWithTag(writer: ProtoWriter, tag: Int, value: E?)
actual open fun encodeWithTag(writer: ReverseProtoWriter, tag: Int, value: E?)

Write tag and value to writer. If value is null this does nothing.

Link copied to clipboard
expect abstract fun redact(value: E): E

Returns the redacted form of value.

actual abstract fun redact(value: E): E

Returns the redacted form of value.

actual abstract fun redact(value: E): E
actual abstract fun redact(value: E): E

Returns the redacted form of value.

Link copied to clipboard
expect open fun toString(value: E): String

Returns a human-readable version of the given value.

actual open fun toString(value: E): String

Returns a human-readable version of the given value.

actual open fun toString(value: E): String
actual open fun toString(value: E): String

Returns a human-readable version of the given value.

Link copied to clipboard
expect fun tryDecode(reader: ProtoReader, destination: MutableList<E>)

Reads a value and appends it to destination if this has data available. Otherwise, it will only clear the reader state.

actual fun tryDecode(reader: ProtoReader, destination: MutableList<E>)
actual fun tryDecode(reader: ProtoReader, destination: MutableList<E>)
actual fun tryDecode(reader: ProtoReader, destination: MutableList<E>)