Package-level declarations

Types

Link copied to clipboard
class DoubleArrayList(initialCapacity: Int)

Offers a nice wrapper around DoubleArray, that handles resizing the underlying array as needed and provides a trimToSize() method to truncate the underlying array to the current number of elements.

Link copied to clipboard

Encode a duration as a JSON string like "1.200s". From the spec:

Link copied to clipboard

Encodes enums using their declared names as defined in WireEnumConstant or their generated names if the declared name is empty. Decodes using either their declared names, their generated names, or their tags.

Link copied to clipboard

Read, write, and describe a tag within a message. This class knows how to assign fields to a builder object, and how to extract values from a message object.

Link copied to clipboard
abstract class FieldOrOneOfBinding<M, B>
Link copied to clipboard
class FloatArrayList(initialCapacity: Int)

Offers a nice wrapper around FloatArray, that handles resizing the underlying array as needed and provides a trimToSize() method to truncate the underlying array to the current number of elements.

Link copied to clipboard

Encode an instant as a JSON string like "1950-01-01T00:00:00Z". From the spec:

Link copied to clipboard
class IntArrayList(initialCapacity: Int)

Offers a nice wrapper around IntArray, that handles resizing the underlying array as needed and provides a trimToSize() method to truncate the underlying array to the current number of elements.

Link copied to clipboard
interface JsonFormatter<W : Any>

Transforms a scalar value to and from JSON.

Link copied to clipboard
abstract class JsonIntegration<F, A>

Integrates a JSON library like Moshi or Gson into proto. This rigid interface attempts to make it easy all JSON libraries to encode and decode JSON in the exact same way.

Link copied to clipboard
Link copied to clipboard
expect annotation class JvmField
actual annotation class JvmField

This annotation is an empty placeholder.

actual typealias JvmField = kotlin.jvm.JvmField
actual annotation class JvmField

This annotation is an empty placeholder.

Link copied to clipboard
expect annotation class JvmStatic
actual annotation class JvmStatic

This annotation is an empty placeholder.

actual typealias JvmStatic = kotlin.jvm.JvmStatic
actual annotation class JvmStatic

This annotation is an empty placeholder.

Link copied to clipboard
expect annotation class JvmSynthetic
actual annotation class JvmSynthetic

This annotation is an empty placeholder.

actual annotation class JvmSynthetic

This annotation is an empty placeholder.

Link copied to clipboard
class LongArrayList(initialCapacity: Int)

Offers a nice wrapper around LongArray, that handles resizing the underlying array as needed and provides a trimToSize() method to truncate the underlying array to the current number of elements.

Link copied to clipboard
interface MessageBinding<M : Any, B : Any>

A representation of a message and its builder class. Typically these are generated subtypes of com.squareup.wire.Message and com.squareup.wire.Message.Builder.

Link copied to clipboard
expect abstract class ObjectStreamException : IOException
actual abstract class ObjectStreamException : IOException
actual abstract class ObjectStreamException : IOException
Link copied to clipboard
expect class ProtocolException(host: String) : IOException
actual class ProtocolException(host: String) : IOException
actual class ProtocolException(host: String) : IOException
Link copied to clipboard
Link copied to clipboard
expect interface Serializable
actual interface Serializable
actual interface Serializable
Link copied to clipboard
expect annotation class Throws(val exceptionClasses: KClass<out Throwable>)
actual typealias Throws = kotlin.jvm.Throws

Properties

Link copied to clipboard

The enum with constant 0. This is non-null for proto3 enum types.

Functions

Link copied to clipboard
Link copied to clipboard
fun boxedOneOfKeyFieldName(oneOfName: String, fieldName: String): String

Maps oneOfName and fieldName to the companion object key representing a boxed oneof field.

Link copied to clipboard

Maps oneOfName to the companion object field of type Set containing the eligible keys.

Link copied to clipboard
expect fun camelCase(string: String, upperCamel: Boolean = false): String

Convert string, from snake case to camel case.

actual fun camelCase(string: String, upperCamel: Boolean): String
actual fun camelCase(string: String, upperCamel: Boolean): String
actual fun camelCase(string: String, upperCamel: Boolean): String
Link copied to clipboard

Throw NullPointerException if any of list's items is null.

fun checkElementsNotNull(map: Map<*, *>)

Throw NullPointerException if any ofmap's keys or values is null.

Link copied to clipboard
fun <T> copyOf(list: List<T>): MutableList<T>
fun <K, V> copyOf(map: Map<K, V>): MutableMap<K, V>
fun <T> copyOf(name: String, list: List<T>?): MutableList<T>
fun <K, V> copyOf(name: String, map: Map<K, V>?): MutableMap<K, V>
Link copied to clipboard
fun countNonNull(a: Any?, b: Any?): Int

Returns the number of non-null values in a, b.

fun countNonNull(a: Any?, b: Any?, c: Any?): Int

Returns the number of non-null values in a, b, c.

fun countNonNull(a: Any?, b: Any?, c: Any?, d: Any?, vararg rest: Any?): Int

Returns the number of non-null values in a, b, c, d, rest.

Link copied to clipboard
fun <M : Message<M, B>, B : Message.Builder<M, B>> createRuntimeMessageAdapter(messageType: Class<M>, writeIdentityValues: Boolean, classLoader: ClassLoader? = messageType.classLoader): RuntimeMessageAdapter<M, B>
fun <M : Message<M, B>, B : Message.Builder<M, B>> createRuntimeMessageAdapter(messageType: Class<M>, typeUrl: String?, syntax: Syntax, classLoader: ClassLoader? = messageType.classLoader, writeIdentityValues: Boolean = false): RuntimeMessageAdapter<M, B>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun equals(a: Any?, b: Any?): Boolean
Link copied to clipboard
fun <T> immutableCopyOf(name: String, list: List<T>): List<T>
fun <K, V> immutableCopyOf(name: String, map: Map<K, V>): Map<K, V>
Link copied to clipboard

Confirms the values of map are structs and returns an immutable copy.

Link copied to clipboard
fun <T> immutableCopyOfStruct(name: String, value: T): T

Confirms value is a struct and returns an immutable copy.

Link copied to clipboard

Create an exception for missing required fields.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T> redactElements(list: MutableList<T>, adapter: ProtoAdapter<T>)
fun <T> redactElements(map: MutableMap<*, T>, adapter: ProtoAdapter<T>)
Link copied to clipboard
@JvmName(name = "-redactElements")
fun <T> List<T>.redactElements(adapter: ProtoAdapter<T>): List<T>
@JvmName(name = "-redactElements")
fun <K, V> Map<K, V>.redactElements(adapter: ProtoAdapter<V>): Map<K, V>
Link copied to clipboard
fun sanitize(value: String): String
fun sanitize(values: List<String>): String

Return a string where ,[]{}\ are escaped with a \.

Link copied to clipboard
actual inline fun <T> MutableList<T>.toUnmodifiableList(): List<T>
actual inline fun <T> MutableList<T>.toUnmodifiableList(): List<T>
actual inline fun <T> MutableList<T>.toUnmodifiableList(): List<T>
Link copied to clipboard
expect fun <K, V> MutableMap<K, V>.toUnmodifiableMap(): Map<K, V>
actual inline fun <K, V> MutableMap<K, V>.toUnmodifiableMap(): Map<K, V>
actual inline fun <K, V> MutableMap<K, V>.toUnmodifiableMap(): Map<K, V>
actual inline fun <K, V> MutableMap<K, V>.toUnmodifiableMap(): Map<K, V>