Message

expect abstract class Message<M : Message<M, B>, B : Message.Builder<M, B>>

A protocol buffer message.

Inheritors

actual abstract class Message<M : Message<M, B>, B : Message.Builder<M, B>>

A protocol buffer message.

actual abstract class Message<M : Message<M, B>, B : Message.Builder<M, B>> : Serializable

A protocol buffer message.

Inheritors

actual abstract class Message<M : Message<M, B>, B : Message.Builder<M, B>>

A protocol buffer message.

Types

Link copied to clipboard
expect abstract class Builder<M : Message<M, B>, B : Message.Builder<M, B>>

Superclass for protocol buffer message builders.

actual abstract class Builder<M : Message<M, B>, B : Message.Builder<M, B>>

Superclass for protocol buffer message builders.

actual abstract class Builder<M : Message<M, B>, B : Message.Builder<M, B>>

Superclass for protocol buffer message builders.

actual abstract class Builder<M : Message<M, B>, B : Message.Builder<M, B>>

Superclass for protocol buffer message builders.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
expect val adapter: ProtoAdapter<M>

The ProtoAdapter for encoding and decoding messages of this type.

actual val adapter: ProtoAdapter<M>

The ProtoAdapter for encoding and decoding messages of this type.

@get:JvmName(name = "adapter")
actual val adapter: ProtoAdapter<M>

The ProtoAdapter for encoding and decoding messages of this type.

actual val adapter: ProtoAdapter<M>

The ProtoAdapter for encoding and decoding messages of this type.

Link copied to clipboard
expect val unknownFields: ByteString

Returns a byte string containing the proto encoding of this message's unknown fields. Returns an empty byte string if this message has no unknown fields.

actual val unknownFields: ByteString

Returns a byte string containing the proto encoding of this message's unknown fields. Returns an empty byte string if this message has no unknown fields.

@get:JvmName(name = "unknownFields")
actual val unknownFields: ByteString

Returns a byte string containing the proto encoding of this message's unknown fields. Returns an empty byte string if this message has no unknown fields.

actual val unknownFields: ByteString

Returns a byte string containing the proto encoding of this message's unknown fields. Returns an empty byte string if this message has no unknown fields.

Functions

Link copied to clipboard
expect fun encode(): ByteArray

Encode this message as a byte[].

expect fun encode(sink: BufferedSink)

Encode this message and write it to stream.

actual fun encode(): ByteArray

Encode this message as a byte[].

actual fun encode(sink: BufferedSink)

Encode this message and write it to stream.

actual fun encode(): ByteArray

Encode this message as a byte[].

fun encode(stream: OutputStream)
actual fun encode(sink: BufferedSink)

Encode this message and write it to stream.

actual fun encode(): ByteArray

Encode this message as a byte[].

actual fun encode(sink: BufferedSink)

Encode this message and write it to stream.

Link copied to clipboard
expect fun encodeByteString(): ByteString

Encode this message as a ByteString.

actual fun encodeByteString(): ByteString

Encode this message as a ByteString.

actual fun encodeByteString(): ByteString

Encode this message as a ByteString.

actual fun encodeByteString(): ByteString

Encode this message as a ByteString.

Link copied to clipboard
expect abstract fun newBuilder(): B

Returns a new builder initialized with the data in this message.

actual abstract fun newBuilder(): B

Returns a new builder initialized with the data in this message.

actual abstract fun newBuilder(): B

Returns a new builder initialized with the data in this message.

actual abstract fun newBuilder(): B

Returns a new builder initialized with the data in this message.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Returns this message with any unknown fields removed.