org.whispersystems.signalservice.internal.push.SyncMessage.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of signal-service-java Show documentation
Show all versions of signal-service-java Show documentation
Signal Service communication library for Java, unofficial fork
// Code generated by Wire protocol buffer compiler, do not edit.
// Source: signalservice.SyncMessage in SignalService.proto
package org.whispersystems.signalservice.`internal`.push
import com.squareup.wire.EnumAdapter
import com.squareup.wire.FieldEncoding
import com.squareup.wire.Message
import com.squareup.wire.ProtoAdapter
import com.squareup.wire.ProtoReader
import com.squareup.wire.ProtoWriter
import com.squareup.wire.ReverseProtoWriter
import com.squareup.wire.Syntax
import com.squareup.wire.Syntax.PROTO_2
import com.squareup.wire.WireEnum
import com.squareup.wire.WireField
import com.squareup.wire.`internal`.checkElementsNotNull
import com.squareup.wire.`internal`.countNonDefa
import com.squareup.wire.`internal`.immutableCopyOf
import com.squareup.wire.`internal`.redactElements
import com.squareup.wire.`internal`.sanitize
import kotlin.Any
import kotlin.Boolean
import kotlin.Int
import kotlin.Long
import kotlin.String
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmField
import kotlin.jvm.JvmStatic
import okio.ByteString
public class SyncMessage(
@field:WireField(
tag = 1,
adapter = "org.whispersystems.signalservice.internal.push.SyncMessage${'$'}Sent#ADAPTER",
)
@JvmField
public val sent: Sent? = null,
@field:WireField(
tag = 2,
adapter = "org.whispersystems.signalservice.internal.push.SyncMessage${'$'}Contacts#ADAPTER",
)
@JvmField
public val contacts: Contacts? = null,
@field:WireField(
tag = 3,
adapter = "org.whispersystems.signalservice.internal.push.SyncMessage${'$'}Groups#ADAPTER",
)
@JvmField
public val groups: Groups? = null,
@field:WireField(
tag = 4,
adapter = "org.whispersystems.signalservice.internal.push.SyncMessage${'$'}Request#ADAPTER",
)
@JvmField
public val request: Request? = null,
read: List = emptyList(),
@field:WireField(
tag = 6,
adapter = "org.whispersystems.signalservice.internal.push.SyncMessage${'$'}Blocked#ADAPTER",
)
@JvmField
public val blocked: Blocked? = null,
@field:WireField(
tag = 7,
adapter = "org.whispersystems.signalservice.internal.push.Verified#ADAPTER",
)
@JvmField
public val verified: Verified? = null,
@field:WireField(
tag = 9,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}Configuration#ADAPTER",
)
@JvmField
public val configuration: Configuration? = null,
@field:WireField(
tag = 8,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val padding: ByteString? = null,
stickerPackOperation: List = emptyList(),
@field:WireField(
tag = 11,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}ViewOnceOpen#ADAPTER",
)
@JvmField
public val viewOnceOpen: ViewOnceOpen? = null,
@field:WireField(
tag = 12,
adapter = "org.whispersystems.signalservice.internal.push.SyncMessage${'$'}FetchLatest#ADAPTER",
)
@JvmField
public val fetchLatest: FetchLatest? = null,
@field:WireField(
tag = 13,
adapter = "org.whispersystems.signalservice.internal.push.SyncMessage${'$'}Keys#ADAPTER",
)
@JvmField
public val keys: Keys? = null,
@field:WireField(
tag = 14,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}MessageRequestResponse#ADAPTER",
)
@JvmField
public val messageRequestResponse: MessageRequestResponse? = null,
@field:WireField(
tag = 15,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}OutgoingPayment#ADAPTER",
)
@JvmField
public val outgoingPayment: OutgoingPayment? = null,
viewed: List = emptyList(),
@field:WireField(
tag = 18,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}PniChangeNumber#ADAPTER",
)
@JvmField
public val pniChangeNumber: PniChangeNumber? = null,
@field:WireField(
tag = 19,
adapter = "org.whispersystems.signalservice.internal.push.SyncMessage${'$'}CallEvent#ADAPTER",
)
@JvmField
public val callEvent: CallEvent? = null,
@field:WireField(
tag = 20,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}CallLinkUpdate#ADAPTER",
)
@JvmField
public val callLinkUpdate: CallLinkUpdate? = null,
@field:WireField(
tag = 21,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}CallLogEvent#ADAPTER",
)
@JvmField
public val callLogEvent: CallLogEvent? = null,
@field:WireField(
tag = 22,
adapter = "org.whispersystems.signalservice.internal.push.SyncMessage${'$'}DeleteForMe#ADAPTER",
)
@JvmField
public val deleteForMe: DeleteForMe? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
@field:WireField(
tag = 5,
adapter = "org.whispersystems.signalservice.internal.push.SyncMessage${'$'}Read#ADAPTER",
label = WireField.Label.REPEATED,
)
@JvmField
public val read: List = immutableCopyOf("read", read)
@field:WireField(
tag = 10,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}StickerPackOperation#ADAPTER",
label = WireField.Label.REPEATED,
)
@JvmField
public val stickerPackOperation: List =
immutableCopyOf("stickerPackOperation", stickerPackOperation)
@field:WireField(
tag = 16,
adapter = "org.whispersystems.signalservice.internal.push.SyncMessage${'$'}Viewed#ADAPTER",
label = WireField.Label.REPEATED,
)
@JvmField
public val viewed: List = immutableCopyOf("viewed", viewed)
public override fun newBuilder(): Builder {
val builder = Builder()
builder.sent = sent
builder.contacts = contacts
builder.groups = groups
builder.request = request
builder.read = read
builder.blocked = blocked
builder.verified = verified
builder.configuration = configuration
builder.padding = padding
builder.stickerPackOperation = stickerPackOperation
builder.viewOnceOpen = viewOnceOpen
builder.fetchLatest = fetchLatest
builder.keys = keys
builder.messageRequestResponse = messageRequestResponse
builder.outgoingPayment = outgoingPayment
builder.viewed = viewed
builder.pniChangeNumber = pniChangeNumber
builder.callEvent = callEvent
builder.callLinkUpdate = callLinkUpdate
builder.callLogEvent = callLogEvent
builder.deleteForMe = deleteForMe
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is SyncMessage) return false
if (unknownFields != other.unknownFields) return false
if (sent != other.sent) return false
if (contacts != other.contacts) return false
if (groups != other.groups) return false
if (request != other.request) return false
if (read != other.read) return false
if (blocked != other.blocked) return false
if (verified != other.verified) return false
if (configuration != other.configuration) return false
if (padding != other.padding) return false
if (stickerPackOperation != other.stickerPackOperation) return false
if (viewOnceOpen != other.viewOnceOpen) return false
if (fetchLatest != other.fetchLatest) return false
if (keys != other.keys) return false
if (messageRequestResponse != other.messageRequestResponse) return false
if (outgoingPayment != other.outgoingPayment) return false
if (viewed != other.viewed) return false
if (pniChangeNumber != other.pniChangeNumber) return false
if (callEvent != other.callEvent) return false
if (callLinkUpdate != other.callLinkUpdate) return false
if (callLogEvent != other.callLogEvent) return false
if (deleteForMe != other.deleteForMe) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (sent?.hashCode() ?: 0)
result = result * 37 + (contacts?.hashCode() ?: 0)
result = result * 37 + (groups?.hashCode() ?: 0)
result = result * 37 + (request?.hashCode() ?: 0)
result = result * 37 + read.hashCode()
result = result * 37 + (blocked?.hashCode() ?: 0)
result = result * 37 + (verified?.hashCode() ?: 0)
result = result * 37 + (configuration?.hashCode() ?: 0)
result = result * 37 + (padding?.hashCode() ?: 0)
result = result * 37 + stickerPackOperation.hashCode()
result = result * 37 + (viewOnceOpen?.hashCode() ?: 0)
result = result * 37 + (fetchLatest?.hashCode() ?: 0)
result = result * 37 + (keys?.hashCode() ?: 0)
result = result * 37 + (messageRequestResponse?.hashCode() ?: 0)
result = result * 37 + (outgoingPayment?.hashCode() ?: 0)
result = result * 37 + viewed.hashCode()
result = result * 37 + (pniChangeNumber?.hashCode() ?: 0)
result = result * 37 + (callEvent?.hashCode() ?: 0)
result = result * 37 + (callLinkUpdate?.hashCode() ?: 0)
result = result * 37 + (callLogEvent?.hashCode() ?: 0)
result = result * 37 + (deleteForMe?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (sent != null) result += """sent=$sent"""
if (contacts != null) result += """contacts=$contacts"""
if (groups != null) result += """groups=$groups"""
if (request != null) result += """request=$request"""
if (read.isNotEmpty()) result += """read=$read"""
if (blocked != null) result += """blocked=$blocked"""
if (verified != null) result += """verified=$verified"""
if (configuration != null) result += """configuration=$configuration"""
if (padding != null) result += """padding=$padding"""
if (stickerPackOperation.isNotEmpty()) result +=
"""stickerPackOperation=$stickerPackOperation"""
if (viewOnceOpen != null) result += """viewOnceOpen=$viewOnceOpen"""
if (fetchLatest != null) result += """fetchLatest=$fetchLatest"""
if (keys != null) result += """keys=$keys"""
if (messageRequestResponse != null) result +=
"""messageRequestResponse=$messageRequestResponse"""
if (outgoingPayment != null) result += """outgoingPayment=$outgoingPayment"""
if (viewed.isNotEmpty()) result += """viewed=$viewed"""
if (pniChangeNumber != null) result += """pniChangeNumber=$pniChangeNumber"""
if (callEvent != null) result += """callEvent=$callEvent"""
if (callLinkUpdate != null) result += """callLinkUpdate=$callLinkUpdate"""
if (callLogEvent != null) result += """callLogEvent=$callLogEvent"""
if (deleteForMe != null) result += """deleteForMe=$deleteForMe"""
return result.joinToString(prefix = "SyncMessage{", separator = ", ", postfix = "}")
}
public fun copy(
sent: Sent? = this.sent,
contacts: Contacts? = this.contacts,
groups: Groups? = this.groups,
request: Request? = this.request,
read: List = this.read,
blocked: Blocked? = this.blocked,
verified: Verified? = this.verified,
configuration: Configuration? = this.configuration,
padding: ByteString? = this.padding,
stickerPackOperation: List = this.stickerPackOperation,
viewOnceOpen: ViewOnceOpen? = this.viewOnceOpen,
fetchLatest: FetchLatest? = this.fetchLatest,
keys: Keys? = this.keys,
messageRequestResponse: MessageRequestResponse? = this.messageRequestResponse,
outgoingPayment: OutgoingPayment? = this.outgoingPayment,
viewed: List = this.viewed,
pniChangeNumber: PniChangeNumber? = this.pniChangeNumber,
callEvent: CallEvent? = this.callEvent,
callLinkUpdate: CallLinkUpdate? = this.callLinkUpdate,
callLogEvent: CallLogEvent? = this.callLogEvent,
deleteForMe: DeleteForMe? = this.deleteForMe,
unknownFields: ByteString = this.unknownFields,
): SyncMessage = SyncMessage(sent, contacts, groups, request, read, blocked, verified,
configuration, padding, stickerPackOperation, viewOnceOpen, fetchLatest, keys,
messageRequestResponse, outgoingPayment, viewed, pniChangeNumber, callEvent, callLinkUpdate,
callLogEvent, deleteForMe, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var sent: Sent? = null
@JvmField
public var contacts: Contacts? = null
@JvmField
public var groups: Groups? = null
@JvmField
public var request: Request? = null
@JvmField
public var read: List = emptyList()
@JvmField
public var blocked: Blocked? = null
@JvmField
public var verified: Verified? = null
@JvmField
public var configuration: Configuration? = null
@JvmField
public var padding: ByteString? = null
@JvmField
public var stickerPackOperation: List = emptyList()
@JvmField
public var viewOnceOpen: ViewOnceOpen? = null
@JvmField
public var fetchLatest: FetchLatest? = null
@JvmField
public var keys: Keys? = null
@JvmField
public var messageRequestResponse: MessageRequestResponse? = null
@JvmField
public var outgoingPayment: OutgoingPayment? = null
@JvmField
public var viewed: List = emptyList()
@JvmField
public var pniChangeNumber: PniChangeNumber? = null
@JvmField
public var callEvent: CallEvent? = null
@JvmField
public var callLinkUpdate: CallLinkUpdate? = null
@JvmField
public var callLogEvent: CallLogEvent? = null
@JvmField
public var deleteForMe: DeleteForMe? = null
public fun sent(sent: Sent?): Builder {
this.sent = sent
return this
}
public fun contacts(contacts: Contacts?): Builder {
this.contacts = contacts
return this
}
public fun groups(groups: Groups?): Builder {
this.groups = groups
return this
}
public fun request(request: Request?): Builder {
this.request = request
return this
}
public fun read(read: List): Builder {
checkElementsNotNull(read)
this.read = read
return this
}
public fun blocked(blocked: Blocked?): Builder {
this.blocked = blocked
return this
}
public fun verified(verified: Verified?): Builder {
this.verified = verified
return this
}
public fun configuration(configuration: Configuration?): Builder {
this.configuration = configuration
return this
}
public fun padding(padding: ByteString?): Builder {
this.padding = padding
return this
}
public fun stickerPackOperation(stickerPackOperation: List): Builder {
checkElementsNotNull(stickerPackOperation)
this.stickerPackOperation = stickerPackOperation
return this
}
public fun viewOnceOpen(viewOnceOpen: ViewOnceOpen?): Builder {
this.viewOnceOpen = viewOnceOpen
return this
}
public fun fetchLatest(fetchLatest: FetchLatest?): Builder {
this.fetchLatest = fetchLatest
return this
}
public fun keys(keys: Keys?): Builder {
this.keys = keys
return this
}
public fun messageRequestResponse(messageRequestResponse: MessageRequestResponse?): Builder {
this.messageRequestResponse = messageRequestResponse
return this
}
public fun outgoingPayment(outgoingPayment: OutgoingPayment?): Builder {
this.outgoingPayment = outgoingPayment
return this
}
public fun viewed(viewed: List): Builder {
checkElementsNotNull(viewed)
this.viewed = viewed
return this
}
public fun pniChangeNumber(pniChangeNumber: PniChangeNumber?): Builder {
this.pniChangeNumber = pniChangeNumber
return this
}
public fun callEvent(callEvent: CallEvent?): Builder {
this.callEvent = callEvent
return this
}
public fun callLinkUpdate(callLinkUpdate: CallLinkUpdate?): Builder {
this.callLinkUpdate = callLinkUpdate
return this
}
public fun callLogEvent(callLogEvent: CallLogEvent?): Builder {
this.callLogEvent = callLogEvent
return this
}
public fun deleteForMe(deleteForMe: DeleteForMe?): Builder {
this.deleteForMe = deleteForMe
return this
}
public override fun build(): SyncMessage = SyncMessage(
sent = sent,
contacts = contacts,
groups = groups,
request = request,
read = read,
blocked = blocked,
verified = verified,
configuration = configuration,
padding = padding,
stickerPackOperation = stickerPackOperation,
viewOnceOpen = viewOnceOpen,
fetchLatest = fetchLatest,
keys = keys,
messageRequestResponse = messageRequestResponse,
outgoingPayment = outgoingPayment,
viewed = viewed,
pniChangeNumber = pniChangeNumber,
callEvent = callEvent,
callLinkUpdate = callLinkUpdate,
callLogEvent = callLogEvent,
deleteForMe = deleteForMe,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
SyncMessage::class,
"type.googleapis.com/signalservice.SyncMessage",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: SyncMessage): Int {
var size = value.unknownFields.size
size += Sent.ADAPTER.encodedSizeWithTag(1, value.sent)
size += Contacts.ADAPTER.encodedSizeWithTag(2, value.contacts)
size += Groups.ADAPTER.encodedSizeWithTag(3, value.groups)
size += Request.ADAPTER.encodedSizeWithTag(4, value.request)
size += Read.ADAPTER.asRepeated().encodedSizeWithTag(5, value.read)
size += Blocked.ADAPTER.encodedSizeWithTag(6, value.blocked)
size += Verified.ADAPTER.encodedSizeWithTag(7, value.verified)
size += Configuration.ADAPTER.encodedSizeWithTag(9, value.configuration)
size += ProtoAdapter.BYTES.encodedSizeWithTag(8, value.padding)
size += StickerPackOperation.ADAPTER.asRepeated().encodedSizeWithTag(10,
value.stickerPackOperation)
size += ViewOnceOpen.ADAPTER.encodedSizeWithTag(11, value.viewOnceOpen)
size += FetchLatest.ADAPTER.encodedSizeWithTag(12, value.fetchLatest)
size += Keys.ADAPTER.encodedSizeWithTag(13, value.keys)
size += MessageRequestResponse.ADAPTER.encodedSizeWithTag(14, value.messageRequestResponse)
size += OutgoingPayment.ADAPTER.encodedSizeWithTag(15, value.outgoingPayment)
size += Viewed.ADAPTER.asRepeated().encodedSizeWithTag(16, value.viewed)
size += PniChangeNumber.ADAPTER.encodedSizeWithTag(18, value.pniChangeNumber)
size += CallEvent.ADAPTER.encodedSizeWithTag(19, value.callEvent)
size += CallLinkUpdate.ADAPTER.encodedSizeWithTag(20, value.callLinkUpdate)
size += CallLogEvent.ADAPTER.encodedSizeWithTag(21, value.callLogEvent)
size += DeleteForMe.ADAPTER.encodedSizeWithTag(22, value.deleteForMe)
return size
}
public override fun encode(writer: ProtoWriter, `value`: SyncMessage): Unit {
Sent.ADAPTER.encodeWithTag(writer, 1, value.sent)
Contacts.ADAPTER.encodeWithTag(writer, 2, value.contacts)
Groups.ADAPTER.encodeWithTag(writer, 3, value.groups)
Request.ADAPTER.encodeWithTag(writer, 4, value.request)
Read.ADAPTER.asRepeated().encodeWithTag(writer, 5, value.read)
Blocked.ADAPTER.encodeWithTag(writer, 6, value.blocked)
Verified.ADAPTER.encodeWithTag(writer, 7, value.verified)
Configuration.ADAPTER.encodeWithTag(writer, 9, value.configuration)
ProtoAdapter.BYTES.encodeWithTag(writer, 8, value.padding)
StickerPackOperation.ADAPTER.asRepeated().encodeWithTag(writer, 10,
value.stickerPackOperation)
ViewOnceOpen.ADAPTER.encodeWithTag(writer, 11, value.viewOnceOpen)
FetchLatest.ADAPTER.encodeWithTag(writer, 12, value.fetchLatest)
Keys.ADAPTER.encodeWithTag(writer, 13, value.keys)
MessageRequestResponse.ADAPTER.encodeWithTag(writer, 14, value.messageRequestResponse)
OutgoingPayment.ADAPTER.encodeWithTag(writer, 15, value.outgoingPayment)
Viewed.ADAPTER.asRepeated().encodeWithTag(writer, 16, value.viewed)
PniChangeNumber.ADAPTER.encodeWithTag(writer, 18, value.pniChangeNumber)
CallEvent.ADAPTER.encodeWithTag(writer, 19, value.callEvent)
CallLinkUpdate.ADAPTER.encodeWithTag(writer, 20, value.callLinkUpdate)
CallLogEvent.ADAPTER.encodeWithTag(writer, 21, value.callLogEvent)
DeleteForMe.ADAPTER.encodeWithTag(writer, 22, value.deleteForMe)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: SyncMessage): Unit {
writer.writeBytes(value.unknownFields)
DeleteForMe.ADAPTER.encodeWithTag(writer, 22, value.deleteForMe)
CallLogEvent.ADAPTER.encodeWithTag(writer, 21, value.callLogEvent)
CallLinkUpdate.ADAPTER.encodeWithTag(writer, 20, value.callLinkUpdate)
CallEvent.ADAPTER.encodeWithTag(writer, 19, value.callEvent)
PniChangeNumber.ADAPTER.encodeWithTag(writer, 18, value.pniChangeNumber)
Viewed.ADAPTER.asRepeated().encodeWithTag(writer, 16, value.viewed)
OutgoingPayment.ADAPTER.encodeWithTag(writer, 15, value.outgoingPayment)
MessageRequestResponse.ADAPTER.encodeWithTag(writer, 14, value.messageRequestResponse)
Keys.ADAPTER.encodeWithTag(writer, 13, value.keys)
FetchLatest.ADAPTER.encodeWithTag(writer, 12, value.fetchLatest)
ViewOnceOpen.ADAPTER.encodeWithTag(writer, 11, value.viewOnceOpen)
StickerPackOperation.ADAPTER.asRepeated().encodeWithTag(writer, 10,
value.stickerPackOperation)
ProtoAdapter.BYTES.encodeWithTag(writer, 8, value.padding)
Configuration.ADAPTER.encodeWithTag(writer, 9, value.configuration)
Verified.ADAPTER.encodeWithTag(writer, 7, value.verified)
Blocked.ADAPTER.encodeWithTag(writer, 6, value.blocked)
Read.ADAPTER.asRepeated().encodeWithTag(writer, 5, value.read)
Request.ADAPTER.encodeWithTag(writer, 4, value.request)
Groups.ADAPTER.encodeWithTag(writer, 3, value.groups)
Contacts.ADAPTER.encodeWithTag(writer, 2, value.contacts)
Sent.ADAPTER.encodeWithTag(writer, 1, value.sent)
}
public override fun decode(reader: ProtoReader): SyncMessage {
var sent: Sent? = null
var contacts: Contacts? = null
var groups: Groups? = null
var request: Request? = null
val read = mutableListOf()
var blocked: Blocked? = null
var verified: Verified? = null
var configuration: Configuration? = null
var padding: ByteString? = null
val stickerPackOperation = mutableListOf()
var viewOnceOpen: ViewOnceOpen? = null
var fetchLatest: FetchLatest? = null
var keys: Keys? = null
var messageRequestResponse: MessageRequestResponse? = null
var outgoingPayment: OutgoingPayment? = null
val viewed = mutableListOf()
var pniChangeNumber: PniChangeNumber? = null
var callEvent: CallEvent? = null
var callLinkUpdate: CallLinkUpdate? = null
var callLogEvent: CallLogEvent? = null
var deleteForMe: DeleteForMe? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> sent = Sent.ADAPTER.decode(reader)
2 -> contacts = Contacts.ADAPTER.decode(reader)
3 -> groups = Groups.ADAPTER.decode(reader)
4 -> request = Request.ADAPTER.decode(reader)
5 -> read.add(Read.ADAPTER.decode(reader))
6 -> blocked = Blocked.ADAPTER.decode(reader)
7 -> verified = Verified.ADAPTER.decode(reader)
9 -> configuration = Configuration.ADAPTER.decode(reader)
8 -> padding = ProtoAdapter.BYTES.decode(reader)
10 -> stickerPackOperation.add(StickerPackOperation.ADAPTER.decode(reader))
11 -> viewOnceOpen = ViewOnceOpen.ADAPTER.decode(reader)
12 -> fetchLatest = FetchLatest.ADAPTER.decode(reader)
13 -> keys = Keys.ADAPTER.decode(reader)
14 -> messageRequestResponse = MessageRequestResponse.ADAPTER.decode(reader)
15 -> outgoingPayment = OutgoingPayment.ADAPTER.decode(reader)
16 -> viewed.add(Viewed.ADAPTER.decode(reader))
18 -> pniChangeNumber = PniChangeNumber.ADAPTER.decode(reader)
19 -> callEvent = CallEvent.ADAPTER.decode(reader)
20 -> callLinkUpdate = CallLinkUpdate.ADAPTER.decode(reader)
21 -> callLogEvent = CallLogEvent.ADAPTER.decode(reader)
22 -> deleteForMe = DeleteForMe.ADAPTER.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return SyncMessage(
sent = sent,
contacts = contacts,
groups = groups,
request = request,
read = read,
blocked = blocked,
verified = verified,
configuration = configuration,
padding = padding,
stickerPackOperation = stickerPackOperation,
viewOnceOpen = viewOnceOpen,
fetchLatest = fetchLatest,
keys = keys,
messageRequestResponse = messageRequestResponse,
outgoingPayment = outgoingPayment,
viewed = viewed,
pniChangeNumber = pniChangeNumber,
callEvent = callEvent,
callLinkUpdate = callLinkUpdate,
callLogEvent = callLogEvent,
deleteForMe = deleteForMe,
unknownFields = unknownFields
)
}
public override fun redact(`value`: SyncMessage): SyncMessage = value.copy(
sent = value.sent?.let(Sent.ADAPTER::redact),
contacts = value.contacts?.let(Contacts.ADAPTER::redact),
groups = value.groups?.let(Groups.ADAPTER::redact),
request = value.request?.let(Request.ADAPTER::redact),
read = value.read.redactElements(Read.ADAPTER),
blocked = value.blocked?.let(Blocked.ADAPTER::redact),
verified = value.verified?.let(Verified.ADAPTER::redact),
configuration = value.configuration?.let(Configuration.ADAPTER::redact),
stickerPackOperation =
value.stickerPackOperation.redactElements(StickerPackOperation.ADAPTER),
viewOnceOpen = value.viewOnceOpen?.let(ViewOnceOpen.ADAPTER::redact),
fetchLatest = value.fetchLatest?.let(FetchLatest.ADAPTER::redact),
keys = value.keys?.let(Keys.ADAPTER::redact),
messageRequestResponse =
value.messageRequestResponse?.let(MessageRequestResponse.ADAPTER::redact),
outgoingPayment = value.outgoingPayment?.let(OutgoingPayment.ADAPTER::redact),
viewed = value.viewed.redactElements(Viewed.ADAPTER),
pniChangeNumber = value.pniChangeNumber?.let(PniChangeNumber.ADAPTER::redact),
callEvent = value.callEvent?.let(CallEvent.ADAPTER::redact),
callLinkUpdate = value.callLinkUpdate?.let(CallLinkUpdate.ADAPTER::redact),
callLogEvent = value.callLogEvent?.let(CallLogEvent.ADAPTER::redact),
deleteForMe = value.deleteForMe?.let(DeleteForMe.ADAPTER::redact),
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
public class Sent(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
)
@JvmField
public val destinationE164: String? = null,
@field:WireField(
tag = 7,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
)
@JvmField
public val destinationServiceId: String? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#UINT64",
)
@JvmField
public val timestamp: Long? = null,
@field:WireField(
tag = 3,
adapter = "org.whispersystems.signalservice.internal.push.DataMessage#ADAPTER",
)
@JvmField
public val message: DataMessage? = null,
@field:WireField(
tag = 4,
adapter = "com.squareup.wire.ProtoAdapter#UINT64",
)
@JvmField
public val expirationStartTimestamp: Long? = null,
unidentifiedStatus: List = emptyList(),
@field:WireField(
tag = 6,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
)
@JvmField
public val isRecipientUpdate: Boolean? = null,
@field:WireField(
tag = 8,
adapter = "org.whispersystems.signalservice.internal.push.StoryMessage#ADAPTER",
)
@JvmField
public val storyMessage: StoryMessage? = null,
storyMessageRecipients: List = emptyList(),
@field:WireField(
tag = 10,
adapter = "org.whispersystems.signalservice.internal.push.EditMessage#ADAPTER",
)
@JvmField
public val editMessage: EditMessage? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
@field:WireField(
tag = 5,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}Sent${'$'}UnidentifiedDeliveryStatus#ADAPTER",
label = WireField.Label.REPEATED,
)
@JvmField
public val unidentifiedStatus: List =
immutableCopyOf("unidentifiedStatus", unidentifiedStatus)
@field:WireField(
tag = 9,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}Sent${'$'}StoryMessageRecipient#ADAPTER",
label = WireField.Label.REPEATED,
)
@JvmField
public val storyMessageRecipients: List =
immutableCopyOf("storyMessageRecipients", storyMessageRecipients)
public override fun newBuilder(): Builder {
val builder = Builder()
builder.destinationE164 = destinationE164
builder.destinationServiceId = destinationServiceId
builder.timestamp = timestamp
builder.message = message
builder.expirationStartTimestamp = expirationStartTimestamp
builder.unidentifiedStatus = unidentifiedStatus
builder.isRecipientUpdate = isRecipientUpdate
builder.storyMessage = storyMessage
builder.storyMessageRecipients = storyMessageRecipients
builder.editMessage = editMessage
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is Sent) return false
if (unknownFields != other.unknownFields) return false
if (destinationE164 != other.destinationE164) return false
if (destinationServiceId != other.destinationServiceId) return false
if (timestamp != other.timestamp) return false
if (message != other.message) return false
if (expirationStartTimestamp != other.expirationStartTimestamp) return false
if (unidentifiedStatus != other.unidentifiedStatus) return false
if (isRecipientUpdate != other.isRecipientUpdate) return false
if (storyMessage != other.storyMessage) return false
if (storyMessageRecipients != other.storyMessageRecipients) return false
if (editMessage != other.editMessage) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (destinationE164?.hashCode() ?: 0)
result = result * 37 + (destinationServiceId?.hashCode() ?: 0)
result = result * 37 + (timestamp?.hashCode() ?: 0)
result = result * 37 + (message?.hashCode() ?: 0)
result = result * 37 + (expirationStartTimestamp?.hashCode() ?: 0)
result = result * 37 + unidentifiedStatus.hashCode()
result = result * 37 + (isRecipientUpdate?.hashCode() ?: 0)
result = result * 37 + (storyMessage?.hashCode() ?: 0)
result = result * 37 + storyMessageRecipients.hashCode()
result = result * 37 + (editMessage?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (destinationE164 != null) result += """destinationE164=${sanitize(destinationE164)}"""
if (destinationServiceId != null) result +=
"""destinationServiceId=${sanitize(destinationServiceId)}"""
if (timestamp != null) result += """timestamp=$timestamp"""
if (message != null) result += """message=$message"""
if (expirationStartTimestamp != null) result +=
"""expirationStartTimestamp=$expirationStartTimestamp"""
if (unidentifiedStatus.isNotEmpty()) result += """unidentifiedStatus=$unidentifiedStatus"""
if (isRecipientUpdate != null) result += """isRecipientUpdate=$isRecipientUpdate"""
if (storyMessage != null) result += """storyMessage=$storyMessage"""
if (storyMessageRecipients.isNotEmpty()) result +=
"""storyMessageRecipients=$storyMessageRecipients"""
if (editMessage != null) result += """editMessage=$editMessage"""
return result.joinToString(prefix = "Sent{", separator = ", ", postfix = "}")
}
public fun copy(
destinationE164: String? = this.destinationE164,
destinationServiceId: String? = this.destinationServiceId,
timestamp: Long? = this.timestamp,
message: DataMessage? = this.message,
expirationStartTimestamp: Long? = this.expirationStartTimestamp,
unidentifiedStatus: List = this.unidentifiedStatus,
isRecipientUpdate: Boolean? = this.isRecipientUpdate,
storyMessage: StoryMessage? = this.storyMessage,
storyMessageRecipients: List = this.storyMessageRecipients,
editMessage: EditMessage? = this.editMessage,
unknownFields: ByteString = this.unknownFields,
): Sent = Sent(destinationE164, destinationServiceId, timestamp, message,
expirationStartTimestamp, unidentifiedStatus, isRecipientUpdate, storyMessage,
storyMessageRecipients, editMessage, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var destinationE164: String? = null
@JvmField
public var destinationServiceId: String? = null
@JvmField
public var timestamp: Long? = null
@JvmField
public var message: DataMessage? = null
@JvmField
public var expirationStartTimestamp: Long? = null
@JvmField
public var unidentifiedStatus: List = emptyList()
@JvmField
public var isRecipientUpdate: Boolean? = null
@JvmField
public var storyMessage: StoryMessage? = null
@JvmField
public var storyMessageRecipients: List = emptyList()
@JvmField
public var editMessage: EditMessage? = null
public fun destinationE164(destinationE164: String?): Builder {
this.destinationE164 = destinationE164
return this
}
public fun destinationServiceId(destinationServiceId: String?): Builder {
this.destinationServiceId = destinationServiceId
return this
}
public fun timestamp(timestamp: Long?): Builder {
this.timestamp = timestamp
return this
}
public fun message(message: DataMessage?): Builder {
this.message = message
return this
}
public fun expirationStartTimestamp(expirationStartTimestamp: Long?): Builder {
this.expirationStartTimestamp = expirationStartTimestamp
return this
}
public fun unidentifiedStatus(unidentifiedStatus: List): Builder {
checkElementsNotNull(unidentifiedStatus)
this.unidentifiedStatus = unidentifiedStatus
return this
}
public fun isRecipientUpdate(isRecipientUpdate: Boolean?): Builder {
this.isRecipientUpdate = isRecipientUpdate
return this
}
public fun storyMessage(storyMessage: StoryMessage?): Builder {
this.storyMessage = storyMessage
return this
}
public fun storyMessageRecipients(storyMessageRecipients: List):
Builder {
checkElementsNotNull(storyMessageRecipients)
this.storyMessageRecipients = storyMessageRecipients
return this
}
public fun editMessage(editMessage: EditMessage?): Builder {
this.editMessage = editMessage
return this
}
public override fun build(): Sent = Sent(
destinationE164 = destinationE164,
destinationServiceId = destinationServiceId,
timestamp = timestamp,
message = message,
expirationStartTimestamp = expirationStartTimestamp,
unidentifiedStatus = unidentifiedStatus,
isRecipientUpdate = isRecipientUpdate,
storyMessage = storyMessage,
storyMessageRecipients = storyMessageRecipients,
editMessage = editMessage,
unknownFields = buildUnknownFields()
)
}
public companion object {
public const val DEFAULT_ISRECIPIENTUPDATE: Boolean = false
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
Sent::class,
"type.googleapis.com/signalservice.SyncMessage.Sent",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: Sent): Int {
var size = value.unknownFields.size
size += ProtoAdapter.STRING.encodedSizeWithTag(1, value.destinationE164)
size += ProtoAdapter.STRING.encodedSizeWithTag(7, value.destinationServiceId)
size += ProtoAdapter.UINT64.encodedSizeWithTag(2, value.timestamp)
size += DataMessage.ADAPTER.encodedSizeWithTag(3, value.message)
size += ProtoAdapter.UINT64.encodedSizeWithTag(4, value.expirationStartTimestamp)
size += UnidentifiedDeliveryStatus.ADAPTER.asRepeated().encodedSizeWithTag(5,
value.unidentifiedStatus)
size += ProtoAdapter.BOOL.encodedSizeWithTag(6, value.isRecipientUpdate)
size += StoryMessage.ADAPTER.encodedSizeWithTag(8, value.storyMessage)
size += StoryMessageRecipient.ADAPTER.asRepeated().encodedSizeWithTag(9,
value.storyMessageRecipients)
size += EditMessage.ADAPTER.encodedSizeWithTag(10, value.editMessage)
return size
}
public override fun encode(writer: ProtoWriter, `value`: Sent): Unit {
ProtoAdapter.STRING.encodeWithTag(writer, 1, value.destinationE164)
ProtoAdapter.STRING.encodeWithTag(writer, 7, value.destinationServiceId)
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.timestamp)
DataMessage.ADAPTER.encodeWithTag(writer, 3, value.message)
ProtoAdapter.UINT64.encodeWithTag(writer, 4, value.expirationStartTimestamp)
UnidentifiedDeliveryStatus.ADAPTER.asRepeated().encodeWithTag(writer, 5,
value.unidentifiedStatus)
ProtoAdapter.BOOL.encodeWithTag(writer, 6, value.isRecipientUpdate)
StoryMessage.ADAPTER.encodeWithTag(writer, 8, value.storyMessage)
StoryMessageRecipient.ADAPTER.asRepeated().encodeWithTag(writer, 9,
value.storyMessageRecipients)
EditMessage.ADAPTER.encodeWithTag(writer, 10, value.editMessage)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: Sent): Unit {
writer.writeBytes(value.unknownFields)
EditMessage.ADAPTER.encodeWithTag(writer, 10, value.editMessage)
StoryMessageRecipient.ADAPTER.asRepeated().encodeWithTag(writer, 9,
value.storyMessageRecipients)
StoryMessage.ADAPTER.encodeWithTag(writer, 8, value.storyMessage)
ProtoAdapter.BOOL.encodeWithTag(writer, 6, value.isRecipientUpdate)
UnidentifiedDeliveryStatus.ADAPTER.asRepeated().encodeWithTag(writer, 5,
value.unidentifiedStatus)
ProtoAdapter.UINT64.encodeWithTag(writer, 4, value.expirationStartTimestamp)
DataMessage.ADAPTER.encodeWithTag(writer, 3, value.message)
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.timestamp)
ProtoAdapter.STRING.encodeWithTag(writer, 7, value.destinationServiceId)
ProtoAdapter.STRING.encodeWithTag(writer, 1, value.destinationE164)
}
public override fun decode(reader: ProtoReader): Sent {
var destinationE164: String? = null
var destinationServiceId: String? = null
var timestamp: Long? = null
var message: DataMessage? = null
var expirationStartTimestamp: Long? = null
val unidentifiedStatus = mutableListOf()
var isRecipientUpdate: Boolean? = null
var storyMessage: StoryMessage? = null
val storyMessageRecipients = mutableListOf()
var editMessage: EditMessage? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> destinationE164 = ProtoAdapter.STRING.decode(reader)
7 -> destinationServiceId = ProtoAdapter.STRING.decode(reader)
2 -> timestamp = ProtoAdapter.UINT64.decode(reader)
3 -> message = DataMessage.ADAPTER.decode(reader)
4 -> expirationStartTimestamp = ProtoAdapter.UINT64.decode(reader)
5 -> unidentifiedStatus.add(UnidentifiedDeliveryStatus.ADAPTER.decode(reader))
6 -> isRecipientUpdate = ProtoAdapter.BOOL.decode(reader)
8 -> storyMessage = StoryMessage.ADAPTER.decode(reader)
9 -> storyMessageRecipients.add(StoryMessageRecipient.ADAPTER.decode(reader))
10 -> editMessage = EditMessage.ADAPTER.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return Sent(
destinationE164 = destinationE164,
destinationServiceId = destinationServiceId,
timestamp = timestamp,
message = message,
expirationStartTimestamp = expirationStartTimestamp,
unidentifiedStatus = unidentifiedStatus,
isRecipientUpdate = isRecipientUpdate,
storyMessage = storyMessage,
storyMessageRecipients = storyMessageRecipients,
editMessage = editMessage,
unknownFields = unknownFields
)
}
public override fun redact(`value`: Sent): Sent = value.copy(
message = value.message?.let(DataMessage.ADAPTER::redact),
unidentifiedStatus =
value.unidentifiedStatus.redactElements(UnidentifiedDeliveryStatus.ADAPTER),
storyMessage = value.storyMessage?.let(StoryMessage.ADAPTER::redact),
storyMessageRecipients =
value.storyMessageRecipients.redactElements(StoryMessageRecipient.ADAPTER),
editMessage = value.editMessage?.let(EditMessage.ADAPTER::redact),
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
public class UnidentifiedDeliveryStatus(
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
)
@JvmField
public val destinationServiceId: String? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
)
@JvmField
public val unidentified: Boolean? = null,
@field:WireField(
tag = 5,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val destinationIdentityKey: ByteString? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER,
unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.destinationServiceId = destinationServiceId
builder.unidentified = unidentified
builder.destinationIdentityKey = destinationIdentityKey
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is UnidentifiedDeliveryStatus) return false
if (unknownFields != other.unknownFields) return false
if (destinationServiceId != other.destinationServiceId) return false
if (unidentified != other.unidentified) return false
if (destinationIdentityKey != other.destinationIdentityKey) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (destinationServiceId?.hashCode() ?: 0)
result = result * 37 + (unidentified?.hashCode() ?: 0)
result = result * 37 + (destinationIdentityKey?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (destinationServiceId != null) result +=
"""destinationServiceId=${sanitize(destinationServiceId)}"""
if (unidentified != null) result += """unidentified=$unidentified"""
if (destinationIdentityKey != null) result +=
"""destinationIdentityKey=$destinationIdentityKey"""
return result.joinToString(prefix = "UnidentifiedDeliveryStatus{", separator = ", ", postfix
= "}")
}
public fun copy(
destinationServiceId: String? = this.destinationServiceId,
unidentified: Boolean? = this.unidentified,
destinationIdentityKey: ByteString? = this.destinationIdentityKey,
unknownFields: ByteString = this.unknownFields,
): UnidentifiedDeliveryStatus = UnidentifiedDeliveryStatus(destinationServiceId, unidentified,
destinationIdentityKey, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var destinationServiceId: String? = null
@JvmField
public var unidentified: Boolean? = null
@JvmField
public var destinationIdentityKey: ByteString? = null
public fun destinationServiceId(destinationServiceId: String?): Builder {
this.destinationServiceId = destinationServiceId
return this
}
public fun unidentified(unidentified: Boolean?): Builder {
this.unidentified = unidentified
return this
}
public fun destinationIdentityKey(destinationIdentityKey: ByteString?): Builder {
this.destinationIdentityKey = destinationIdentityKey
return this
}
public override fun build(): UnidentifiedDeliveryStatus = UnidentifiedDeliveryStatus(
destinationServiceId = destinationServiceId,
unidentified = unidentified,
destinationIdentityKey = destinationIdentityKey,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object :
ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
UnidentifiedDeliveryStatus::class,
"type.googleapis.com/signalservice.SyncMessage.Sent.UnidentifiedDeliveryStatus",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: UnidentifiedDeliveryStatus): Int {
var size = value.unknownFields.size
size += ProtoAdapter.STRING.encodedSizeWithTag(3, value.destinationServiceId)
size += ProtoAdapter.BOOL.encodedSizeWithTag(2, value.unidentified)
size += ProtoAdapter.BYTES.encodedSizeWithTag(5, value.destinationIdentityKey)
return size
}
public override fun encode(writer: ProtoWriter, `value`: UnidentifiedDeliveryStatus):
Unit {
ProtoAdapter.STRING.encodeWithTag(writer, 3, value.destinationServiceId)
ProtoAdapter.BOOL.encodeWithTag(writer, 2, value.unidentified)
ProtoAdapter.BYTES.encodeWithTag(writer, 5, value.destinationIdentityKey)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter,
`value`: UnidentifiedDeliveryStatus): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.BYTES.encodeWithTag(writer, 5, value.destinationIdentityKey)
ProtoAdapter.BOOL.encodeWithTag(writer, 2, value.unidentified)
ProtoAdapter.STRING.encodeWithTag(writer, 3, value.destinationServiceId)
}
public override fun decode(reader: ProtoReader): UnidentifiedDeliveryStatus {
var destinationServiceId: String? = null
var unidentified: Boolean? = null
var destinationIdentityKey: ByteString? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
3 -> destinationServiceId = ProtoAdapter.STRING.decode(reader)
2 -> unidentified = ProtoAdapter.BOOL.decode(reader)
5 -> destinationIdentityKey = ProtoAdapter.BYTES.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return UnidentifiedDeliveryStatus(
destinationServiceId = destinationServiceId,
unidentified = unidentified,
destinationIdentityKey = destinationIdentityKey,
unknownFields = unknownFields
)
}
public override fun redact(`value`: UnidentifiedDeliveryStatus):
UnidentifiedDeliveryStatus = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
public class StoryMessageRecipient(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
)
@JvmField
public val destinationServiceId: String? = null,
distributionListIds: List = emptyList(),
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
)
@JvmField
public val isAllowedToReply: Boolean? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.REPEATED,
)
@JvmField
public val distributionListIds: List = immutableCopyOf("distributionListIds",
distributionListIds)
public override fun newBuilder(): Builder {
val builder = Builder()
builder.destinationServiceId = destinationServiceId
builder.distributionListIds = distributionListIds
builder.isAllowedToReply = isAllowedToReply
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is StoryMessageRecipient) return false
if (unknownFields != other.unknownFields) return false
if (destinationServiceId != other.destinationServiceId) return false
if (distributionListIds != other.distributionListIds) return false
if (isAllowedToReply != other.isAllowedToReply) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (destinationServiceId?.hashCode() ?: 0)
result = result * 37 + distributionListIds.hashCode()
result = result * 37 + (isAllowedToReply?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (destinationServiceId != null) result +=
"""destinationServiceId=${sanitize(destinationServiceId)}"""
if (distributionListIds.isNotEmpty()) result +=
"""distributionListIds=${sanitize(distributionListIds)}"""
if (isAllowedToReply != null) result += """isAllowedToReply=$isAllowedToReply"""
return result.joinToString(prefix = "StoryMessageRecipient{", separator = ", ", postfix =
"}")
}
public fun copy(
destinationServiceId: String? = this.destinationServiceId,
distributionListIds: List = this.distributionListIds,
isAllowedToReply: Boolean? = this.isAllowedToReply,
unknownFields: ByteString = this.unknownFields,
): StoryMessageRecipient = StoryMessageRecipient(destinationServiceId, distributionListIds,
isAllowedToReply, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var destinationServiceId: String? = null
@JvmField
public var distributionListIds: List = emptyList()
@JvmField
public var isAllowedToReply: Boolean? = null
public fun destinationServiceId(destinationServiceId: String?): Builder {
this.destinationServiceId = destinationServiceId
return this
}
public fun distributionListIds(distributionListIds: List): Builder {
checkElementsNotNull(distributionListIds)
this.distributionListIds = distributionListIds
return this
}
public fun isAllowedToReply(isAllowedToReply: Boolean?): Builder {
this.isAllowedToReply = isAllowedToReply
return this
}
public override fun build(): StoryMessageRecipient = StoryMessageRecipient(
destinationServiceId = destinationServiceId,
distributionListIds = distributionListIds,
isAllowedToReply = isAllowedToReply,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object :
ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
StoryMessageRecipient::class,
"type.googleapis.com/signalservice.SyncMessage.Sent.StoryMessageRecipient",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: StoryMessageRecipient): Int {
var size = value.unknownFields.size
size += ProtoAdapter.STRING.encodedSizeWithTag(1, value.destinationServiceId)
size += ProtoAdapter.STRING.asRepeated().encodedSizeWithTag(2,
value.distributionListIds)
size += ProtoAdapter.BOOL.encodedSizeWithTag(3, value.isAllowedToReply)
return size
}
public override fun encode(writer: ProtoWriter, `value`: StoryMessageRecipient): Unit {
ProtoAdapter.STRING.encodeWithTag(writer, 1, value.destinationServiceId)
ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 2, value.distributionListIds)
ProtoAdapter.BOOL.encodeWithTag(writer, 3, value.isAllowedToReply)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: StoryMessageRecipient):
Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.BOOL.encodeWithTag(writer, 3, value.isAllowedToReply)
ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 2, value.distributionListIds)
ProtoAdapter.STRING.encodeWithTag(writer, 1, value.destinationServiceId)
}
public override fun decode(reader: ProtoReader): StoryMessageRecipient {
var destinationServiceId: String? = null
val distributionListIds = mutableListOf()
var isAllowedToReply: Boolean? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> destinationServiceId = ProtoAdapter.STRING.decode(reader)
2 -> distributionListIds.add(ProtoAdapter.STRING.decode(reader))
3 -> isAllowedToReply = ProtoAdapter.BOOL.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return StoryMessageRecipient(
destinationServiceId = destinationServiceId,
distributionListIds = distributionListIds,
isAllowedToReply = isAllowedToReply,
unknownFields = unknownFields
)
}
public override fun redact(`value`: StoryMessageRecipient): StoryMessageRecipient =
value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
}
public class Contacts(
@field:WireField(
tag = 1,
adapter = "org.whispersystems.signalservice.internal.push.AttachmentPointer#ADAPTER",
)
@JvmField
public val blob: AttachmentPointer? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
)
@JvmField
public val complete: Boolean? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.blob = blob
builder.complete = complete
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is Contacts) return false
if (unknownFields != other.unknownFields) return false
if (blob != other.blob) return false
if (complete != other.complete) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (blob?.hashCode() ?: 0)
result = result * 37 + (complete?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (blob != null) result += """blob=$blob"""
if (complete != null) result += """complete=$complete"""
return result.joinToString(prefix = "Contacts{", separator = ", ", postfix = "}")
}
public fun copy(
blob: AttachmentPointer? = this.blob,
complete: Boolean? = this.complete,
unknownFields: ByteString = this.unknownFields,
): Contacts = Contacts(blob, complete, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var blob: AttachmentPointer? = null
@JvmField
public var complete: Boolean? = null
public fun blob(blob: AttachmentPointer?): Builder {
this.blob = blob
return this
}
public fun complete(complete: Boolean?): Builder {
this.complete = complete
return this
}
public override fun build(): Contacts = Contacts(
blob = blob,
complete = complete,
unknownFields = buildUnknownFields()
)
}
public companion object {
public const val DEFAULT_COMPLETE: Boolean = false
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
Contacts::class,
"type.googleapis.com/signalservice.SyncMessage.Contacts",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: Contacts): Int {
var size = value.unknownFields.size
size += AttachmentPointer.ADAPTER.encodedSizeWithTag(1, value.blob)
size += ProtoAdapter.BOOL.encodedSizeWithTag(2, value.complete)
return size
}
public override fun encode(writer: ProtoWriter, `value`: Contacts): Unit {
AttachmentPointer.ADAPTER.encodeWithTag(writer, 1, value.blob)
ProtoAdapter.BOOL.encodeWithTag(writer, 2, value.complete)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: Contacts): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.BOOL.encodeWithTag(writer, 2, value.complete)
AttachmentPointer.ADAPTER.encodeWithTag(writer, 1, value.blob)
}
public override fun decode(reader: ProtoReader): Contacts {
var blob: AttachmentPointer? = null
var complete: Boolean? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> blob = AttachmentPointer.ADAPTER.decode(reader)
2 -> complete = ProtoAdapter.BOOL.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return Contacts(
blob = blob,
complete = complete,
unknownFields = unknownFields
)
}
public override fun redact(`value`: Contacts): Contacts = value.copy(
blob = value.blob?.let(AttachmentPointer.ADAPTER::redact),
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
public class Groups(
@field:WireField(
tag = 1,
adapter = "org.whispersystems.signalservice.internal.push.AttachmentPointer#ADAPTER",
)
@JvmField
public val blob: AttachmentPointer? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.blob = blob
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is Groups) return false
if (unknownFields != other.unknownFields) return false
if (blob != other.blob) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (blob?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (blob != null) result += """blob=$blob"""
return result.joinToString(prefix = "Groups{", separator = ", ", postfix = "}")
}
public fun copy(blob: AttachmentPointer? = this.blob, unknownFields: ByteString =
this.unknownFields): Groups = Groups(blob, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var blob: AttachmentPointer? = null
public fun blob(blob: AttachmentPointer?): Builder {
this.blob = blob
return this
}
public override fun build(): Groups = Groups(
blob = blob,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
Groups::class,
"type.googleapis.com/signalservice.SyncMessage.Groups",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: Groups): Int {
var size = value.unknownFields.size
size += AttachmentPointer.ADAPTER.encodedSizeWithTag(1, value.blob)
return size
}
public override fun encode(writer: ProtoWriter, `value`: Groups): Unit {
AttachmentPointer.ADAPTER.encodeWithTag(writer, 1, value.blob)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: Groups): Unit {
writer.writeBytes(value.unknownFields)
AttachmentPointer.ADAPTER.encodeWithTag(writer, 1, value.blob)
}
public override fun decode(reader: ProtoReader): Groups {
var blob: AttachmentPointer? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> blob = AttachmentPointer.ADAPTER.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return Groups(
blob = blob,
unknownFields = unknownFields
)
}
public override fun redact(`value`: Groups): Groups = value.copy(
blob = value.blob?.let(AttachmentPointer.ADAPTER::redact),
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
public class Blocked(
numbers: List = emptyList(),
acis: List = emptyList(),
groupIds: List = emptyList(),
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.REPEATED,
)
@JvmField
public val numbers: List = immutableCopyOf("numbers", numbers)
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.REPEATED,
)
@JvmField
public val acis: List = immutableCopyOf("acis", acis)
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
label = WireField.Label.REPEATED,
)
@JvmField
public val groupIds: List = immutableCopyOf("groupIds", groupIds)
public override fun newBuilder(): Builder {
val builder = Builder()
builder.numbers = numbers
builder.acis = acis
builder.groupIds = groupIds
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is Blocked) return false
if (unknownFields != other.unknownFields) return false
if (numbers != other.numbers) return false
if (acis != other.acis) return false
if (groupIds != other.groupIds) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + numbers.hashCode()
result = result * 37 + acis.hashCode()
result = result * 37 + groupIds.hashCode()
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (numbers.isNotEmpty()) result += """numbers=${sanitize(numbers)}"""
if (acis.isNotEmpty()) result += """acis=${sanitize(acis)}"""
if (groupIds.isNotEmpty()) result += """groupIds=$groupIds"""
return result.joinToString(prefix = "Blocked{", separator = ", ", postfix = "}")
}
public fun copy(
numbers: List = this.numbers,
acis: List = this.acis,
groupIds: List = this.groupIds,
unknownFields: ByteString = this.unknownFields,
): Blocked = Blocked(numbers, acis, groupIds, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var numbers: List = emptyList()
@JvmField
public var acis: List = emptyList()
@JvmField
public var groupIds: List = emptyList()
public fun numbers(numbers: List): Builder {
checkElementsNotNull(numbers)
this.numbers = numbers
return this
}
public fun acis(acis: List): Builder {
checkElementsNotNull(acis)
this.acis = acis
return this
}
public fun groupIds(groupIds: List): Builder {
checkElementsNotNull(groupIds)
this.groupIds = groupIds
return this
}
public override fun build(): Blocked = Blocked(
numbers = numbers,
acis = acis,
groupIds = groupIds,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
Blocked::class,
"type.googleapis.com/signalservice.SyncMessage.Blocked",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: Blocked): Int {
var size = value.unknownFields.size
size += ProtoAdapter.STRING.asRepeated().encodedSizeWithTag(1, value.numbers)
size += ProtoAdapter.STRING.asRepeated().encodedSizeWithTag(3, value.acis)
size += ProtoAdapter.BYTES.asRepeated().encodedSizeWithTag(2, value.groupIds)
return size
}
public override fun encode(writer: ProtoWriter, `value`: Blocked): Unit {
ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 1, value.numbers)
ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 3, value.acis)
ProtoAdapter.BYTES.asRepeated().encodeWithTag(writer, 2, value.groupIds)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: Blocked): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.BYTES.asRepeated().encodeWithTag(writer, 2, value.groupIds)
ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 3, value.acis)
ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 1, value.numbers)
}
public override fun decode(reader: ProtoReader): Blocked {
val numbers = mutableListOf()
val acis = mutableListOf()
val groupIds = mutableListOf()
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> numbers.add(ProtoAdapter.STRING.decode(reader))
3 -> acis.add(ProtoAdapter.STRING.decode(reader))
2 -> groupIds.add(ProtoAdapter.BYTES.decode(reader))
else -> reader.readUnknownField(tag)
}
}
return Blocked(
numbers = numbers,
acis = acis,
groupIds = groupIds,
unknownFields = unknownFields
)
}
public override fun redact(`value`: Blocked): Blocked = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
public class Request(
@field:WireField(
tag = 1,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}Request${'$'}Type#ADAPTER",
)
@JvmField
public val type: Type? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.type = type
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is Request) return false
if (unknownFields != other.unknownFields) return false
if (type != other.type) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (type?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (type != null) result += """type=$type"""
return result.joinToString(prefix = "Request{", separator = ", ", postfix = "}")
}
public fun copy(type: Type? = this.type, unknownFields: ByteString = this.unknownFields):
Request = Request(type, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var type: Type? = null
public fun type(type: Type?): Builder {
this.type = type
return this
}
public override fun build(): Request = Request(
type = type,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
Request::class,
"type.googleapis.com/signalservice.SyncMessage.Request",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: Request): Int {
var size = value.unknownFields.size
size += Type.ADAPTER.encodedSizeWithTag(1, value.type)
return size
}
public override fun encode(writer: ProtoWriter, `value`: Request): Unit {
Type.ADAPTER.encodeWithTag(writer, 1, value.type)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: Request): Unit {
writer.writeBytes(value.unknownFields)
Type.ADAPTER.encodeWithTag(writer, 1, value.type)
}
public override fun decode(reader: ProtoReader): Request {
var type: Type? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> try {
type = Type.ADAPTER.decode(reader)
} catch (e: ProtoAdapter.EnumConstantNotFoundException) {
reader.addUnknownField(tag, FieldEncoding.VARINT, e.value.toLong())
}
else -> reader.readUnknownField(tag)
}
}
return Request(
type = type,
unknownFields = unknownFields
)
}
public override fun redact(`value`: Request): Request = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
public enum class Type(
public override val `value`: Int,
) : WireEnum {
UNKNOWN(0),
CONTACTS(1),
GROUPS(2),
BLOCKED(3),
CONFIGURATION(4),
KEYS(5),
PNI_IDENTITY(6),
;
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : EnumAdapter(
Type::class,
PROTO_2,
Type.UNKNOWN
) {
public override fun fromValue(`value`: Int): Type? = Type.fromValue(value)
}
@JvmStatic
public fun fromValue(`value`: Int): Type? = when (value) {
0 -> UNKNOWN
1 -> CONTACTS
2 -> GROUPS
3 -> BLOCKED
4 -> CONFIGURATION
5 -> KEYS
6 -> PNI_IDENTITY
else -> null
}
}
}
}
public class Read(
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
)
@JvmField
public val senderAci: String? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#UINT64",
)
@JvmField
public val timestamp: Long? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.senderAci = senderAci
builder.timestamp = timestamp
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is Read) return false
if (unknownFields != other.unknownFields) return false
if (senderAci != other.senderAci) return false
if (timestamp != other.timestamp) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (senderAci?.hashCode() ?: 0)
result = result * 37 + (timestamp?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (senderAci != null) result += """senderAci=${sanitize(senderAci)}"""
if (timestamp != null) result += """timestamp=$timestamp"""
return result.joinToString(prefix = "Read{", separator = ", ", postfix = "}")
}
public fun copy(
senderAci: String? = this.senderAci,
timestamp: Long? = this.timestamp,
unknownFields: ByteString = this.unknownFields,
): Read = Read(senderAci, timestamp, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var senderAci: String? = null
@JvmField
public var timestamp: Long? = null
public fun senderAci(senderAci: String?): Builder {
this.senderAci = senderAci
return this
}
public fun timestamp(timestamp: Long?): Builder {
this.timestamp = timestamp
return this
}
public override fun build(): Read = Read(
senderAci = senderAci,
timestamp = timestamp,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
Read::class,
"type.googleapis.com/signalservice.SyncMessage.Read",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: Read): Int {
var size = value.unknownFields.size
size += ProtoAdapter.STRING.encodedSizeWithTag(3, value.senderAci)
size += ProtoAdapter.UINT64.encodedSizeWithTag(2, value.timestamp)
return size
}
public override fun encode(writer: ProtoWriter, `value`: Read): Unit {
ProtoAdapter.STRING.encodeWithTag(writer, 3, value.senderAci)
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.timestamp)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: Read): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.timestamp)
ProtoAdapter.STRING.encodeWithTag(writer, 3, value.senderAci)
}
public override fun decode(reader: ProtoReader): Read {
var senderAci: String? = null
var timestamp: Long? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
3 -> senderAci = ProtoAdapter.STRING.decode(reader)
2 -> timestamp = ProtoAdapter.UINT64.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return Read(
senderAci = senderAci,
timestamp = timestamp,
unknownFields = unknownFields
)
}
public override fun redact(`value`: Read): Read = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
public class Viewed(
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
)
@JvmField
public val senderAci: String? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#UINT64",
)
@JvmField
public val timestamp: Long? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.senderAci = senderAci
builder.timestamp = timestamp
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is Viewed) return false
if (unknownFields != other.unknownFields) return false
if (senderAci != other.senderAci) return false
if (timestamp != other.timestamp) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (senderAci?.hashCode() ?: 0)
result = result * 37 + (timestamp?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (senderAci != null) result += """senderAci=${sanitize(senderAci)}"""
if (timestamp != null) result += """timestamp=$timestamp"""
return result.joinToString(prefix = "Viewed{", separator = ", ", postfix = "}")
}
public fun copy(
senderAci: String? = this.senderAci,
timestamp: Long? = this.timestamp,
unknownFields: ByteString = this.unknownFields,
): Viewed = Viewed(senderAci, timestamp, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var senderAci: String? = null
@JvmField
public var timestamp: Long? = null
public fun senderAci(senderAci: String?): Builder {
this.senderAci = senderAci
return this
}
public fun timestamp(timestamp: Long?): Builder {
this.timestamp = timestamp
return this
}
public override fun build(): Viewed = Viewed(
senderAci = senderAci,
timestamp = timestamp,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
Viewed::class,
"type.googleapis.com/signalservice.SyncMessage.Viewed",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: Viewed): Int {
var size = value.unknownFields.size
size += ProtoAdapter.STRING.encodedSizeWithTag(3, value.senderAci)
size += ProtoAdapter.UINT64.encodedSizeWithTag(2, value.timestamp)
return size
}
public override fun encode(writer: ProtoWriter, `value`: Viewed): Unit {
ProtoAdapter.STRING.encodeWithTag(writer, 3, value.senderAci)
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.timestamp)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: Viewed): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.timestamp)
ProtoAdapter.STRING.encodeWithTag(writer, 3, value.senderAci)
}
public override fun decode(reader: ProtoReader): Viewed {
var senderAci: String? = null
var timestamp: Long? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
3 -> senderAci = ProtoAdapter.STRING.decode(reader)
2 -> timestamp = ProtoAdapter.UINT64.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return Viewed(
senderAci = senderAci,
timestamp = timestamp,
unknownFields = unknownFields
)
}
public override fun redact(`value`: Viewed): Viewed = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
public class Configuration(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
)
@JvmField
public val readReceipts: Boolean? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
)
@JvmField
public val unidentifiedDeliveryIndicators: Boolean? = null,
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
)
@JvmField
public val typingIndicators: Boolean? = null,
@field:WireField(
tag = 5,
adapter = "com.squareup.wire.ProtoAdapter#UINT32",
)
@JvmField
public val provisioningVersion: Int? = null,
@field:WireField(
tag = 6,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
)
@JvmField
public val linkPreviews: Boolean? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.readReceipts = readReceipts
builder.unidentifiedDeliveryIndicators = unidentifiedDeliveryIndicators
builder.typingIndicators = typingIndicators
builder.provisioningVersion = provisioningVersion
builder.linkPreviews = linkPreviews
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is Configuration) return false
if (unknownFields != other.unknownFields) return false
if (readReceipts != other.readReceipts) return false
if (unidentifiedDeliveryIndicators != other.unidentifiedDeliveryIndicators) return false
if (typingIndicators != other.typingIndicators) return false
if (provisioningVersion != other.provisioningVersion) return false
if (linkPreviews != other.linkPreviews) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (readReceipts?.hashCode() ?: 0)
result = result * 37 + (unidentifiedDeliveryIndicators?.hashCode() ?: 0)
result = result * 37 + (typingIndicators?.hashCode() ?: 0)
result = result * 37 + (provisioningVersion?.hashCode() ?: 0)
result = result * 37 + (linkPreviews?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (readReceipts != null) result += """readReceipts=$readReceipts"""
if (unidentifiedDeliveryIndicators != null) result +=
"""unidentifiedDeliveryIndicators=$unidentifiedDeliveryIndicators"""
if (typingIndicators != null) result += """typingIndicators=$typingIndicators"""
if (provisioningVersion != null) result += """provisioningVersion=$provisioningVersion"""
if (linkPreviews != null) result += """linkPreviews=$linkPreviews"""
return result.joinToString(prefix = "Configuration{", separator = ", ", postfix = "}")
}
public fun copy(
readReceipts: Boolean? = this.readReceipts,
unidentifiedDeliveryIndicators: Boolean? = this.unidentifiedDeliveryIndicators,
typingIndicators: Boolean? = this.typingIndicators,
provisioningVersion: Int? = this.provisioningVersion,
linkPreviews: Boolean? = this.linkPreviews,
unknownFields: ByteString = this.unknownFields,
): Configuration = Configuration(readReceipts, unidentifiedDeliveryIndicators, typingIndicators,
provisioningVersion, linkPreviews, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var readReceipts: Boolean? = null
@JvmField
public var unidentifiedDeliveryIndicators: Boolean? = null
@JvmField
public var typingIndicators: Boolean? = null
@JvmField
public var provisioningVersion: Int? = null
@JvmField
public var linkPreviews: Boolean? = null
public fun readReceipts(readReceipts: Boolean?): Builder {
this.readReceipts = readReceipts
return this
}
public fun unidentifiedDeliveryIndicators(unidentifiedDeliveryIndicators: Boolean?): Builder {
this.unidentifiedDeliveryIndicators = unidentifiedDeliveryIndicators
return this
}
public fun typingIndicators(typingIndicators: Boolean?): Builder {
this.typingIndicators = typingIndicators
return this
}
public fun provisioningVersion(provisioningVersion: Int?): Builder {
this.provisioningVersion = provisioningVersion
return this
}
public fun linkPreviews(linkPreviews: Boolean?): Builder {
this.linkPreviews = linkPreviews
return this
}
public override fun build(): Configuration = Configuration(
readReceipts = readReceipts,
unidentifiedDeliveryIndicators = unidentifiedDeliveryIndicators,
typingIndicators = typingIndicators,
provisioningVersion = provisioningVersion,
linkPreviews = linkPreviews,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
Configuration::class,
"type.googleapis.com/signalservice.SyncMessage.Configuration",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: Configuration): Int {
var size = value.unknownFields.size
size += ProtoAdapter.BOOL.encodedSizeWithTag(1, value.readReceipts)
size += ProtoAdapter.BOOL.encodedSizeWithTag(2, value.unidentifiedDeliveryIndicators)
size += ProtoAdapter.BOOL.encodedSizeWithTag(3, value.typingIndicators)
size += ProtoAdapter.UINT32.encodedSizeWithTag(5, value.provisioningVersion)
size += ProtoAdapter.BOOL.encodedSizeWithTag(6, value.linkPreviews)
return size
}
public override fun encode(writer: ProtoWriter, `value`: Configuration): Unit {
ProtoAdapter.BOOL.encodeWithTag(writer, 1, value.readReceipts)
ProtoAdapter.BOOL.encodeWithTag(writer, 2, value.unidentifiedDeliveryIndicators)
ProtoAdapter.BOOL.encodeWithTag(writer, 3, value.typingIndicators)
ProtoAdapter.UINT32.encodeWithTag(writer, 5, value.provisioningVersion)
ProtoAdapter.BOOL.encodeWithTag(writer, 6, value.linkPreviews)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: Configuration): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.BOOL.encodeWithTag(writer, 6, value.linkPreviews)
ProtoAdapter.UINT32.encodeWithTag(writer, 5, value.provisioningVersion)
ProtoAdapter.BOOL.encodeWithTag(writer, 3, value.typingIndicators)
ProtoAdapter.BOOL.encodeWithTag(writer, 2, value.unidentifiedDeliveryIndicators)
ProtoAdapter.BOOL.encodeWithTag(writer, 1, value.readReceipts)
}
public override fun decode(reader: ProtoReader): Configuration {
var readReceipts: Boolean? = null
var unidentifiedDeliveryIndicators: Boolean? = null
var typingIndicators: Boolean? = null
var provisioningVersion: Int? = null
var linkPreviews: Boolean? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> readReceipts = ProtoAdapter.BOOL.decode(reader)
2 -> unidentifiedDeliveryIndicators = ProtoAdapter.BOOL.decode(reader)
3 -> typingIndicators = ProtoAdapter.BOOL.decode(reader)
5 -> provisioningVersion = ProtoAdapter.UINT32.decode(reader)
6 -> linkPreviews = ProtoAdapter.BOOL.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return Configuration(
readReceipts = readReceipts,
unidentifiedDeliveryIndicators = unidentifiedDeliveryIndicators,
typingIndicators = typingIndicators,
provisioningVersion = provisioningVersion,
linkPreviews = linkPreviews,
unknownFields = unknownFields
)
}
public override fun redact(`value`: Configuration): Configuration = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
public class StickerPackOperation(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val packId: ByteString? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val packKey: ByteString? = null,
@field:WireField(
tag = 3,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}StickerPackOperation${'$'}Type#ADAPTER",
)
@JvmField
public val type: Type? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.packId = packId
builder.packKey = packKey
builder.type = type
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is StickerPackOperation) return false
if (unknownFields != other.unknownFields) return false
if (packId != other.packId) return false
if (packKey != other.packKey) return false
if (type != other.type) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (packId?.hashCode() ?: 0)
result = result * 37 + (packKey?.hashCode() ?: 0)
result = result * 37 + (type?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (packId != null) result += """packId=$packId"""
if (packKey != null) result += """packKey=$packKey"""
if (type != null) result += """type=$type"""
return result.joinToString(prefix = "StickerPackOperation{", separator = ", ", postfix = "}")
}
public fun copy(
packId: ByteString? = this.packId,
packKey: ByteString? = this.packKey,
type: Type? = this.type,
unknownFields: ByteString = this.unknownFields,
): StickerPackOperation = StickerPackOperation(packId, packKey, type, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var packId: ByteString? = null
@JvmField
public var packKey: ByteString? = null
@JvmField
public var type: Type? = null
public fun packId(packId: ByteString?): Builder {
this.packId = packId
return this
}
public fun packKey(packKey: ByteString?): Builder {
this.packKey = packKey
return this
}
public fun type(type: Type?): Builder {
this.type = type
return this
}
public override fun build(): StickerPackOperation = StickerPackOperation(
packId = packId,
packKey = packKey,
type = type,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object :
ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
StickerPackOperation::class,
"type.googleapis.com/signalservice.SyncMessage.StickerPackOperation",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: StickerPackOperation): Int {
var size = value.unknownFields.size
size += ProtoAdapter.BYTES.encodedSizeWithTag(1, value.packId)
size += ProtoAdapter.BYTES.encodedSizeWithTag(2, value.packKey)
size += Type.ADAPTER.encodedSizeWithTag(3, value.type)
return size
}
public override fun encode(writer: ProtoWriter, `value`: StickerPackOperation): Unit {
ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.packId)
ProtoAdapter.BYTES.encodeWithTag(writer, 2, value.packKey)
Type.ADAPTER.encodeWithTag(writer, 3, value.type)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: StickerPackOperation):
Unit {
writer.writeBytes(value.unknownFields)
Type.ADAPTER.encodeWithTag(writer, 3, value.type)
ProtoAdapter.BYTES.encodeWithTag(writer, 2, value.packKey)
ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.packId)
}
public override fun decode(reader: ProtoReader): StickerPackOperation {
var packId: ByteString? = null
var packKey: ByteString? = null
var type: Type? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> packId = ProtoAdapter.BYTES.decode(reader)
2 -> packKey = ProtoAdapter.BYTES.decode(reader)
3 -> try {
type = Type.ADAPTER.decode(reader)
} catch (e: ProtoAdapter.EnumConstantNotFoundException) {
reader.addUnknownField(tag, FieldEncoding.VARINT, e.value.toLong())
}
else -> reader.readUnknownField(tag)
}
}
return StickerPackOperation(
packId = packId,
packKey = packKey,
type = type,
unknownFields = unknownFields
)
}
public override fun redact(`value`: StickerPackOperation): StickerPackOperation =
value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
public enum class Type(
public override val `value`: Int,
) : WireEnum {
INSTALL(0),
REMOVE(1),
;
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : EnumAdapter(
Type::class,
PROTO_2,
Type.INSTALL
) {
public override fun fromValue(`value`: Int): Type? = Type.fromValue(value)
}
@JvmStatic
public fun fromValue(`value`: Int): Type? = when (value) {
0 -> INSTALL
1 -> REMOVE
else -> null
}
}
}
}
public class ViewOnceOpen(
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
)
@JvmField
public val senderAci: String? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#UINT64",
)
@JvmField
public val timestamp: Long? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.senderAci = senderAci
builder.timestamp = timestamp
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is ViewOnceOpen) return false
if (unknownFields != other.unknownFields) return false
if (senderAci != other.senderAci) return false
if (timestamp != other.timestamp) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (senderAci?.hashCode() ?: 0)
result = result * 37 + (timestamp?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (senderAci != null) result += """senderAci=${sanitize(senderAci)}"""
if (timestamp != null) result += """timestamp=$timestamp"""
return result.joinToString(prefix = "ViewOnceOpen{", separator = ", ", postfix = "}")
}
public fun copy(
senderAci: String? = this.senderAci,
timestamp: Long? = this.timestamp,
unknownFields: ByteString = this.unknownFields,
): ViewOnceOpen = ViewOnceOpen(senderAci, timestamp, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var senderAci: String? = null
@JvmField
public var timestamp: Long? = null
public fun senderAci(senderAci: String?): Builder {
this.senderAci = senderAci
return this
}
public fun timestamp(timestamp: Long?): Builder {
this.timestamp = timestamp
return this
}
public override fun build(): ViewOnceOpen = ViewOnceOpen(
senderAci = senderAci,
timestamp = timestamp,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
ViewOnceOpen::class,
"type.googleapis.com/signalservice.SyncMessage.ViewOnceOpen",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: ViewOnceOpen): Int {
var size = value.unknownFields.size
size += ProtoAdapter.STRING.encodedSizeWithTag(3, value.senderAci)
size += ProtoAdapter.UINT64.encodedSizeWithTag(2, value.timestamp)
return size
}
public override fun encode(writer: ProtoWriter, `value`: ViewOnceOpen): Unit {
ProtoAdapter.STRING.encodeWithTag(writer, 3, value.senderAci)
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.timestamp)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: ViewOnceOpen): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.timestamp)
ProtoAdapter.STRING.encodeWithTag(writer, 3, value.senderAci)
}
public override fun decode(reader: ProtoReader): ViewOnceOpen {
var senderAci: String? = null
var timestamp: Long? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
3 -> senderAci = ProtoAdapter.STRING.decode(reader)
2 -> timestamp = ProtoAdapter.UINT64.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return ViewOnceOpen(
senderAci = senderAci,
timestamp = timestamp,
unknownFields = unknownFields
)
}
public override fun redact(`value`: ViewOnceOpen): ViewOnceOpen = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
public class FetchLatest(
@field:WireField(
tag = 1,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}FetchLatest${'$'}Type#ADAPTER",
)
@JvmField
public val type: Type? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.type = type
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is FetchLatest) return false
if (unknownFields != other.unknownFields) return false
if (type != other.type) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (type?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (type != null) result += """type=$type"""
return result.joinToString(prefix = "FetchLatest{", separator = ", ", postfix = "}")
}
public fun copy(type: Type? = this.type, unknownFields: ByteString = this.unknownFields):
FetchLatest = FetchLatest(type, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var type: Type? = null
public fun type(type: Type?): Builder {
this.type = type
return this
}
public override fun build(): FetchLatest = FetchLatest(
type = type,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
FetchLatest::class,
"type.googleapis.com/signalservice.SyncMessage.FetchLatest",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: FetchLatest): Int {
var size = value.unknownFields.size
size += Type.ADAPTER.encodedSizeWithTag(1, value.type)
return size
}
public override fun encode(writer: ProtoWriter, `value`: FetchLatest): Unit {
Type.ADAPTER.encodeWithTag(writer, 1, value.type)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: FetchLatest): Unit {
writer.writeBytes(value.unknownFields)
Type.ADAPTER.encodeWithTag(writer, 1, value.type)
}
public override fun decode(reader: ProtoReader): FetchLatest {
var type: Type? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> try {
type = Type.ADAPTER.decode(reader)
} catch (e: ProtoAdapter.EnumConstantNotFoundException) {
reader.addUnknownField(tag, FieldEncoding.VARINT, e.value.toLong())
}
else -> reader.readUnknownField(tag)
}
}
return FetchLatest(
type = type,
unknownFields = unknownFields
)
}
public override fun redact(`value`: FetchLatest): FetchLatest = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
public enum class Type(
public override val `value`: Int,
) : WireEnum {
UNKNOWN(0),
LOCAL_PROFILE(1),
STORAGE_MANIFEST(2),
SUBSCRIPTION_STATUS(3),
;
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : EnumAdapter(
Type::class,
PROTO_2,
Type.UNKNOWN
) {
public override fun fromValue(`value`: Int): Type? = Type.fromValue(value)
}
@JvmStatic
public fun fromValue(`value`: Int): Type? = when (value) {
0 -> UNKNOWN
1 -> LOCAL_PROFILE
2 -> STORAGE_MANIFEST
3 -> SUBSCRIPTION_STATUS
else -> null
}
}
}
}
public class Keys(
/**
* @deprecated
*/
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val storageService: ByteString? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val master: ByteString? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.storageService = storageService
builder.master = master
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is Keys) return false
if (unknownFields != other.unknownFields) return false
if (storageService != other.storageService) return false
if (master != other.master) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (storageService?.hashCode() ?: 0)
result = result * 37 + (master?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (storageService != null) result += """storageService=$storageService"""
if (master != null) result += """master=$master"""
return result.joinToString(prefix = "Keys{", separator = ", ", postfix = "}")
}
public fun copy(
storageService: ByteString? = this.storageService,
master: ByteString? = this.master,
unknownFields: ByteString = this.unknownFields,
): Keys = Keys(storageService, master, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var storageService: ByteString? = null
@JvmField
public var master: ByteString? = null
/**
* @deprecated
*/
public fun storageService(storageService: ByteString?): Builder {
this.storageService = storageService
return this
}
public fun master(master: ByteString?): Builder {
this.master = master
return this
}
public override fun build(): Keys = Keys(
storageService = storageService,
master = master,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
Keys::class,
"type.googleapis.com/signalservice.SyncMessage.Keys",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: Keys): Int {
var size = value.unknownFields.size
size += ProtoAdapter.BYTES.encodedSizeWithTag(1, value.storageService)
size += ProtoAdapter.BYTES.encodedSizeWithTag(2, value.master)
return size
}
public override fun encode(writer: ProtoWriter, `value`: Keys): Unit {
ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.storageService)
ProtoAdapter.BYTES.encodeWithTag(writer, 2, value.master)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: Keys): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.BYTES.encodeWithTag(writer, 2, value.master)
ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.storageService)
}
public override fun decode(reader: ProtoReader): Keys {
var storageService: ByteString? = null
var master: ByteString? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> storageService = ProtoAdapter.BYTES.decode(reader)
2 -> master = ProtoAdapter.BYTES.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return Keys(
storageService = storageService,
master = master,
unknownFields = unknownFields
)
}
public override fun redact(`value`: Keys): Keys = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
public class MessageRequestResponse(
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
)
@JvmField
public val threadAci: String? = null,
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val groupId: ByteString? = null,
@field:WireField(
tag = 4,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}MessageRequestResponse${'$'}Type#ADAPTER",
)
@JvmField
public val type: Type? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.threadAci = threadAci
builder.groupId = groupId
builder.type = type
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is MessageRequestResponse) return false
if (unknownFields != other.unknownFields) return false
if (threadAci != other.threadAci) return false
if (groupId != other.groupId) return false
if (type != other.type) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (threadAci?.hashCode() ?: 0)
result = result * 37 + (groupId?.hashCode() ?: 0)
result = result * 37 + (type?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (threadAci != null) result += """threadAci=${sanitize(threadAci)}"""
if (groupId != null) result += """groupId=$groupId"""
if (type != null) result += """type=$type"""
return result.joinToString(prefix = "MessageRequestResponse{", separator = ", ", postfix =
"}")
}
public fun copy(
threadAci: String? = this.threadAci,
groupId: ByteString? = this.groupId,
type: Type? = this.type,
unknownFields: ByteString = this.unknownFields,
): MessageRequestResponse = MessageRequestResponse(threadAci, groupId, type, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var threadAci: String? = null
@JvmField
public var groupId: ByteString? = null
@JvmField
public var type: Type? = null
public fun threadAci(threadAci: String?): Builder {
this.threadAci = threadAci
return this
}
public fun groupId(groupId: ByteString?): Builder {
this.groupId = groupId
return this
}
public fun type(type: Type?): Builder {
this.type = type
return this
}
public override fun build(): MessageRequestResponse = MessageRequestResponse(
threadAci = threadAci,
groupId = groupId,
type = type,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object :
ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
MessageRequestResponse::class,
"type.googleapis.com/signalservice.SyncMessage.MessageRequestResponse",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: MessageRequestResponse): Int {
var size = value.unknownFields.size
size += ProtoAdapter.STRING.encodedSizeWithTag(2, value.threadAci)
size += ProtoAdapter.BYTES.encodedSizeWithTag(3, value.groupId)
size += Type.ADAPTER.encodedSizeWithTag(4, value.type)
return size
}
public override fun encode(writer: ProtoWriter, `value`: MessageRequestResponse): Unit {
ProtoAdapter.STRING.encodeWithTag(writer, 2, value.threadAci)
ProtoAdapter.BYTES.encodeWithTag(writer, 3, value.groupId)
Type.ADAPTER.encodeWithTag(writer, 4, value.type)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: MessageRequestResponse):
Unit {
writer.writeBytes(value.unknownFields)
Type.ADAPTER.encodeWithTag(writer, 4, value.type)
ProtoAdapter.BYTES.encodeWithTag(writer, 3, value.groupId)
ProtoAdapter.STRING.encodeWithTag(writer, 2, value.threadAci)
}
public override fun decode(reader: ProtoReader): MessageRequestResponse {
var threadAci: String? = null
var groupId: ByteString? = null
var type: Type? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
2 -> threadAci = ProtoAdapter.STRING.decode(reader)
3 -> groupId = ProtoAdapter.BYTES.decode(reader)
4 -> try {
type = Type.ADAPTER.decode(reader)
} catch (e: ProtoAdapter.EnumConstantNotFoundException) {
reader.addUnknownField(tag, FieldEncoding.VARINT, e.value.toLong())
}
else -> reader.readUnknownField(tag)
}
}
return MessageRequestResponse(
threadAci = threadAci,
groupId = groupId,
type = type,
unknownFields = unknownFields
)
}
public override fun redact(`value`: MessageRequestResponse): MessageRequestResponse =
value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
public enum class Type(
public override val `value`: Int,
) : WireEnum {
UNKNOWN(0),
ACCEPT(1),
DELETE(2),
BLOCK(3),
BLOCK_AND_DELETE(4),
SPAM(5),
BLOCK_AND_SPAM(6),
;
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : EnumAdapter(
Type::class,
PROTO_2,
Type.UNKNOWN
) {
public override fun fromValue(`value`: Int): Type? = Type.fromValue(value)
}
@JvmStatic
public fun fromValue(`value`: Int): Type? = when (value) {
0 -> UNKNOWN
1 -> ACCEPT
2 -> DELETE
3 -> BLOCK
4 -> BLOCK_AND_DELETE
5 -> SPAM
6 -> BLOCK_AND_SPAM
else -> null
}
}
}
}
public class OutgoingPayment(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
)
@JvmField
public val recipientServiceId: String? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
)
@JvmField
public val note: String? = null,
@field:WireField(
tag = 3,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}OutgoingPayment${'$'}MobileCoin#ADAPTER",
oneofName = "paymentDetail",
)
@JvmField
public val mobileCoin: MobileCoin? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
init {
}
public override fun newBuilder(): Builder {
val builder = Builder()
builder.recipientServiceId = recipientServiceId
builder.note = note
builder.mobileCoin = mobileCoin
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is OutgoingPayment) return false
if (unknownFields != other.unknownFields) return false
if (recipientServiceId != other.recipientServiceId) return false
if (note != other.note) return false
if (mobileCoin != other.mobileCoin) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (recipientServiceId?.hashCode() ?: 0)
result = result * 37 + (note?.hashCode() ?: 0)
result = result * 37 + (mobileCoin?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (recipientServiceId != null) result +=
"""recipientServiceId=${sanitize(recipientServiceId)}"""
if (note != null) result += """note=${sanitize(note)}"""
if (mobileCoin != null) result += """mobileCoin=$mobileCoin"""
return result.joinToString(prefix = "OutgoingPayment{", separator = ", ", postfix = "}")
}
public fun copy(
recipientServiceId: String? = this.recipientServiceId,
note: String? = this.note,
mobileCoin: MobileCoin? = this.mobileCoin,
unknownFields: ByteString = this.unknownFields,
): OutgoingPayment = OutgoingPayment(recipientServiceId, note, mobileCoin, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var recipientServiceId: String? = null
@JvmField
public var note: String? = null
@JvmField
public var mobileCoin: MobileCoin? = null
public fun recipientServiceId(recipientServiceId: String?): Builder {
this.recipientServiceId = recipientServiceId
return this
}
public fun note(note: String?): Builder {
this.note = note
return this
}
public fun mobileCoin(mobileCoin: MobileCoin?): Builder {
this.mobileCoin = mobileCoin
return this
}
public override fun build(): OutgoingPayment = OutgoingPayment(
recipientServiceId = recipientServiceId,
note = note,
mobileCoin = mobileCoin,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
OutgoingPayment::class,
"type.googleapis.com/signalservice.SyncMessage.OutgoingPayment",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: OutgoingPayment): Int {
var size = value.unknownFields.size
size += ProtoAdapter.STRING.encodedSizeWithTag(1, value.recipientServiceId)
size += ProtoAdapter.STRING.encodedSizeWithTag(2, value.note)
size += MobileCoin.ADAPTER.encodedSizeWithTag(3, value.mobileCoin)
return size
}
public override fun encode(writer: ProtoWriter, `value`: OutgoingPayment): Unit {
ProtoAdapter.STRING.encodeWithTag(writer, 1, value.recipientServiceId)
ProtoAdapter.STRING.encodeWithTag(writer, 2, value.note)
MobileCoin.ADAPTER.encodeWithTag(writer, 3, value.mobileCoin)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: OutgoingPayment): Unit {
writer.writeBytes(value.unknownFields)
MobileCoin.ADAPTER.encodeWithTag(writer, 3, value.mobileCoin)
ProtoAdapter.STRING.encodeWithTag(writer, 2, value.note)
ProtoAdapter.STRING.encodeWithTag(writer, 1, value.recipientServiceId)
}
public override fun decode(reader: ProtoReader): OutgoingPayment {
var recipientServiceId: String? = null
var note: String? = null
var mobileCoin: MobileCoin? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> recipientServiceId = ProtoAdapter.STRING.decode(reader)
2 -> note = ProtoAdapter.STRING.decode(reader)
3 -> mobileCoin = MobileCoin.ADAPTER.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return OutgoingPayment(
recipientServiceId = recipientServiceId,
note = note,
mobileCoin = mobileCoin,
unknownFields = unknownFields
)
}
public override fun redact(`value`: OutgoingPayment): OutgoingPayment = value.copy(
mobileCoin = value.mobileCoin?.let(MobileCoin.ADAPTER::redact),
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
public class MobileCoin(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val recipientAddress: ByteString? = null,
/**
* @required
*/
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#UINT64",
)
@JvmField
public val amountPicoMob: Long? = null,
/**
* @required
*/
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#UINT64",
)
@JvmField
public val feePicoMob: Long? = null,
@field:WireField(
tag = 4,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val receipt: ByteString? = null,
@field:WireField(
tag = 5,
adapter = "com.squareup.wire.ProtoAdapter#UINT64",
)
@JvmField
public val ledgerBlockTimestamp: Long? = null,
/**
* @required
*/
@field:WireField(
tag = 6,
adapter = "com.squareup.wire.ProtoAdapter#UINT64",
)
@JvmField
public val ledgerBlockIndex: Long? = null,
spentKeyImages: List = emptyList(),
outputPublicKeys: List = emptyList(),
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
@field:WireField(
tag = 7,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
label = WireField.Label.REPEATED,
)
@JvmField
public val spentKeyImages: List = immutableCopyOf("spentKeyImages",
spentKeyImages)
@field:WireField(
tag = 8,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
label = WireField.Label.REPEATED,
)
@JvmField
public val outputPublicKeys: List = immutableCopyOf("outputPublicKeys",
outputPublicKeys)
public override fun newBuilder(): Builder {
val builder = Builder()
builder.recipientAddress = recipientAddress
builder.amountPicoMob = amountPicoMob
builder.feePicoMob = feePicoMob
builder.receipt = receipt
builder.ledgerBlockTimestamp = ledgerBlockTimestamp
builder.ledgerBlockIndex = ledgerBlockIndex
builder.spentKeyImages = spentKeyImages
builder.outputPublicKeys = outputPublicKeys
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is MobileCoin) return false
if (unknownFields != other.unknownFields) return false
if (recipientAddress != other.recipientAddress) return false
if (amountPicoMob != other.amountPicoMob) return false
if (feePicoMob != other.feePicoMob) return false
if (receipt != other.receipt) return false
if (ledgerBlockTimestamp != other.ledgerBlockTimestamp) return false
if (ledgerBlockIndex != other.ledgerBlockIndex) return false
if (spentKeyImages != other.spentKeyImages) return false
if (outputPublicKeys != other.outputPublicKeys) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (recipientAddress?.hashCode() ?: 0)
result = result * 37 + (amountPicoMob?.hashCode() ?: 0)
result = result * 37 + (feePicoMob?.hashCode() ?: 0)
result = result * 37 + (receipt?.hashCode() ?: 0)
result = result * 37 + (ledgerBlockTimestamp?.hashCode() ?: 0)
result = result * 37 + (ledgerBlockIndex?.hashCode() ?: 0)
result = result * 37 + spentKeyImages.hashCode()
result = result * 37 + outputPublicKeys.hashCode()
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (recipientAddress != null) result += """recipientAddress=$recipientAddress"""
if (amountPicoMob != null) result += """amountPicoMob=$amountPicoMob"""
if (feePicoMob != null) result += """feePicoMob=$feePicoMob"""
if (receipt != null) result += """receipt=$receipt"""
if (ledgerBlockTimestamp != null) result += """ledgerBlockTimestamp=$ledgerBlockTimestamp"""
if (ledgerBlockIndex != null) result += """ledgerBlockIndex=$ledgerBlockIndex"""
if (spentKeyImages.isNotEmpty()) result += """spentKeyImages=$spentKeyImages"""
if (outputPublicKeys.isNotEmpty()) result += """outputPublicKeys=$outputPublicKeys"""
return result.joinToString(prefix = "MobileCoin{", separator = ", ", postfix = "}")
}
public fun copy(
recipientAddress: ByteString? = this.recipientAddress,
amountPicoMob: Long? = this.amountPicoMob,
feePicoMob: Long? = this.feePicoMob,
receipt: ByteString? = this.receipt,
ledgerBlockTimestamp: Long? = this.ledgerBlockTimestamp,
ledgerBlockIndex: Long? = this.ledgerBlockIndex,
spentKeyImages: List = this.spentKeyImages,
outputPublicKeys: List = this.outputPublicKeys,
unknownFields: ByteString = this.unknownFields,
): MobileCoin = MobileCoin(recipientAddress, amountPicoMob, feePicoMob, receipt,
ledgerBlockTimestamp, ledgerBlockIndex, spentKeyImages, outputPublicKeys, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var recipientAddress: ByteString? = null
@JvmField
public var amountPicoMob: Long? = null
@JvmField
public var feePicoMob: Long? = null
@JvmField
public var receipt: ByteString? = null
@JvmField
public var ledgerBlockTimestamp: Long? = null
@JvmField
public var ledgerBlockIndex: Long? = null
@JvmField
public var spentKeyImages: List = emptyList()
@JvmField
public var outputPublicKeys: List = emptyList()
public fun recipientAddress(recipientAddress: ByteString?): Builder {
this.recipientAddress = recipientAddress
return this
}
/**
* @required
*/
public fun amountPicoMob(amountPicoMob: Long?): Builder {
this.amountPicoMob = amountPicoMob
return this
}
/**
* @required
*/
public fun feePicoMob(feePicoMob: Long?): Builder {
this.feePicoMob = feePicoMob
return this
}
public fun receipt(receipt: ByteString?): Builder {
this.receipt = receipt
return this
}
public fun ledgerBlockTimestamp(ledgerBlockTimestamp: Long?): Builder {
this.ledgerBlockTimestamp = ledgerBlockTimestamp
return this
}
/**
* @required
*/
public fun ledgerBlockIndex(ledgerBlockIndex: Long?): Builder {
this.ledgerBlockIndex = ledgerBlockIndex
return this
}
public fun spentKeyImages(spentKeyImages: List): Builder {
checkElementsNotNull(spentKeyImages)
this.spentKeyImages = spentKeyImages
return this
}
public fun outputPublicKeys(outputPublicKeys: List): Builder {
checkElementsNotNull(outputPublicKeys)
this.outputPublicKeys = outputPublicKeys
return this
}
public override fun build(): MobileCoin = MobileCoin(
recipientAddress = recipientAddress,
amountPicoMob = amountPicoMob,
feePicoMob = feePicoMob,
receipt = receipt,
ledgerBlockTimestamp = ledgerBlockTimestamp,
ledgerBlockIndex = ledgerBlockIndex,
spentKeyImages = spentKeyImages,
outputPublicKeys = outputPublicKeys,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
MobileCoin::class,
"type.googleapis.com/signalservice.SyncMessage.OutgoingPayment.MobileCoin",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: MobileCoin): Int {
var size = value.unknownFields.size
size += ProtoAdapter.BYTES.encodedSizeWithTag(1, value.recipientAddress)
size += ProtoAdapter.UINT64.encodedSizeWithTag(2, value.amountPicoMob)
size += ProtoAdapter.UINT64.encodedSizeWithTag(3, value.feePicoMob)
size += ProtoAdapter.BYTES.encodedSizeWithTag(4, value.receipt)
size += ProtoAdapter.UINT64.encodedSizeWithTag(5, value.ledgerBlockTimestamp)
size += ProtoAdapter.UINT64.encodedSizeWithTag(6, value.ledgerBlockIndex)
size += ProtoAdapter.BYTES.asRepeated().encodedSizeWithTag(7, value.spentKeyImages)
size += ProtoAdapter.BYTES.asRepeated().encodedSizeWithTag(8, value.outputPublicKeys)
return size
}
public override fun encode(writer: ProtoWriter, `value`: MobileCoin): Unit {
ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.recipientAddress)
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.amountPicoMob)
ProtoAdapter.UINT64.encodeWithTag(writer, 3, value.feePicoMob)
ProtoAdapter.BYTES.encodeWithTag(writer, 4, value.receipt)
ProtoAdapter.UINT64.encodeWithTag(writer, 5, value.ledgerBlockTimestamp)
ProtoAdapter.UINT64.encodeWithTag(writer, 6, value.ledgerBlockIndex)
ProtoAdapter.BYTES.asRepeated().encodeWithTag(writer, 7, value.spentKeyImages)
ProtoAdapter.BYTES.asRepeated().encodeWithTag(writer, 8, value.outputPublicKeys)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: MobileCoin): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.BYTES.asRepeated().encodeWithTag(writer, 8, value.outputPublicKeys)
ProtoAdapter.BYTES.asRepeated().encodeWithTag(writer, 7, value.spentKeyImages)
ProtoAdapter.UINT64.encodeWithTag(writer, 6, value.ledgerBlockIndex)
ProtoAdapter.UINT64.encodeWithTag(writer, 5, value.ledgerBlockTimestamp)
ProtoAdapter.BYTES.encodeWithTag(writer, 4, value.receipt)
ProtoAdapter.UINT64.encodeWithTag(writer, 3, value.feePicoMob)
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.amountPicoMob)
ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.recipientAddress)
}
public override fun decode(reader: ProtoReader): MobileCoin {
var recipientAddress: ByteString? = null
var amountPicoMob: Long? = null
var feePicoMob: Long? = null
var receipt: ByteString? = null
var ledgerBlockTimestamp: Long? = null
var ledgerBlockIndex: Long? = null
val spentKeyImages = mutableListOf()
val outputPublicKeys = mutableListOf()
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> recipientAddress = ProtoAdapter.BYTES.decode(reader)
2 -> amountPicoMob = ProtoAdapter.UINT64.decode(reader)
3 -> feePicoMob = ProtoAdapter.UINT64.decode(reader)
4 -> receipt = ProtoAdapter.BYTES.decode(reader)
5 -> ledgerBlockTimestamp = ProtoAdapter.UINT64.decode(reader)
6 -> ledgerBlockIndex = ProtoAdapter.UINT64.decode(reader)
7 -> spentKeyImages.add(ProtoAdapter.BYTES.decode(reader))
8 -> outputPublicKeys.add(ProtoAdapter.BYTES.decode(reader))
else -> reader.readUnknownField(tag)
}
}
return MobileCoin(
recipientAddress = recipientAddress,
amountPicoMob = amountPicoMob,
feePicoMob = feePicoMob,
receipt = receipt,
ledgerBlockTimestamp = ledgerBlockTimestamp,
ledgerBlockIndex = ledgerBlockIndex,
spentKeyImages = spentKeyImages,
outputPublicKeys = outputPublicKeys,
unknownFields = unknownFields
)
}
public override fun redact(`value`: MobileCoin): MobileCoin = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
}
public class PniChangeNumber(
/**
* Serialized libsignal-client IdentityKeyPair
*/
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val identityKeyPair: ByteString? = null,
/**
* Serialized libsignal-client SignedPreKeyRecord
*/
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val signedPreKey: ByteString? = null,
/**
* Serialized libsignal-client KyberPreKeyRecord
*/
@field:WireField(
tag = 5,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val lastResortKyberPreKey: ByteString? = null,
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#UINT32",
)
@JvmField
public val registrationId: Int? = null,
/**
* The e164 we have changed our number to
*/
@field:WireField(
tag = 4,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
)
@JvmField
public val newE164: String? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.identityKeyPair = identityKeyPair
builder.signedPreKey = signedPreKey
builder.lastResortKyberPreKey = lastResortKyberPreKey
builder.registrationId = registrationId
builder.newE164 = newE164
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is PniChangeNumber) return false
if (unknownFields != other.unknownFields) return false
if (identityKeyPair != other.identityKeyPair) return false
if (signedPreKey != other.signedPreKey) return false
if (lastResortKyberPreKey != other.lastResortKyberPreKey) return false
if (registrationId != other.registrationId) return false
if (newE164 != other.newE164) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (identityKeyPair?.hashCode() ?: 0)
result = result * 37 + (signedPreKey?.hashCode() ?: 0)
result = result * 37 + (lastResortKyberPreKey?.hashCode() ?: 0)
result = result * 37 + (registrationId?.hashCode() ?: 0)
result = result * 37 + (newE164?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (identityKeyPair != null) result += """identityKeyPair=$identityKeyPair"""
if (signedPreKey != null) result += """signedPreKey=$signedPreKey"""
if (lastResortKyberPreKey != null) result +=
"""lastResortKyberPreKey=$lastResortKyberPreKey"""
if (registrationId != null) result += """registrationId=$registrationId"""
if (newE164 != null) result += """newE164=${sanitize(newE164)}"""
return result.joinToString(prefix = "PniChangeNumber{", separator = ", ", postfix = "}")
}
public fun copy(
identityKeyPair: ByteString? = this.identityKeyPair,
signedPreKey: ByteString? = this.signedPreKey,
lastResortKyberPreKey: ByteString? = this.lastResortKyberPreKey,
registrationId: Int? = this.registrationId,
newE164: String? = this.newE164,
unknownFields: ByteString = this.unknownFields,
): PniChangeNumber = PniChangeNumber(identityKeyPair, signedPreKey, lastResortKyberPreKey,
registrationId, newE164, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var identityKeyPair: ByteString? = null
@JvmField
public var signedPreKey: ByteString? = null
@JvmField
public var lastResortKyberPreKey: ByteString? = null
@JvmField
public var registrationId: Int? = null
@JvmField
public var newE164: String? = null
/**
* Serialized libsignal-client IdentityKeyPair
*/
public fun identityKeyPair(identityKeyPair: ByteString?): Builder {
this.identityKeyPair = identityKeyPair
return this
}
/**
* Serialized libsignal-client SignedPreKeyRecord
*/
public fun signedPreKey(signedPreKey: ByteString?): Builder {
this.signedPreKey = signedPreKey
return this
}
/**
* Serialized libsignal-client KyberPreKeyRecord
*/
public fun lastResortKyberPreKey(lastResortKyberPreKey: ByteString?): Builder {
this.lastResortKyberPreKey = lastResortKyberPreKey
return this
}
public fun registrationId(registrationId: Int?): Builder {
this.registrationId = registrationId
return this
}
/**
* The e164 we have changed our number to
*/
public fun newE164(newE164: String?): Builder {
this.newE164 = newE164
return this
}
public override fun build(): PniChangeNumber = PniChangeNumber(
identityKeyPair = identityKeyPair,
signedPreKey = signedPreKey,
lastResortKyberPreKey = lastResortKyberPreKey,
registrationId = registrationId,
newE164 = newE164,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
PniChangeNumber::class,
"type.googleapis.com/signalservice.SyncMessage.PniChangeNumber",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: PniChangeNumber): Int {
var size = value.unknownFields.size
size += ProtoAdapter.BYTES.encodedSizeWithTag(1, value.identityKeyPair)
size += ProtoAdapter.BYTES.encodedSizeWithTag(2, value.signedPreKey)
size += ProtoAdapter.BYTES.encodedSizeWithTag(5, value.lastResortKyberPreKey)
size += ProtoAdapter.UINT32.encodedSizeWithTag(3, value.registrationId)
size += ProtoAdapter.STRING.encodedSizeWithTag(4, value.newE164)
return size
}
public override fun encode(writer: ProtoWriter, `value`: PniChangeNumber): Unit {
ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.identityKeyPair)
ProtoAdapter.BYTES.encodeWithTag(writer, 2, value.signedPreKey)
ProtoAdapter.BYTES.encodeWithTag(writer, 5, value.lastResortKyberPreKey)
ProtoAdapter.UINT32.encodeWithTag(writer, 3, value.registrationId)
ProtoAdapter.STRING.encodeWithTag(writer, 4, value.newE164)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: PniChangeNumber): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.STRING.encodeWithTag(writer, 4, value.newE164)
ProtoAdapter.UINT32.encodeWithTag(writer, 3, value.registrationId)
ProtoAdapter.BYTES.encodeWithTag(writer, 5, value.lastResortKyberPreKey)
ProtoAdapter.BYTES.encodeWithTag(writer, 2, value.signedPreKey)
ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.identityKeyPair)
}
public override fun decode(reader: ProtoReader): PniChangeNumber {
var identityKeyPair: ByteString? = null
var signedPreKey: ByteString? = null
var lastResortKyberPreKey: ByteString? = null
var registrationId: Int? = null
var newE164: String? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> identityKeyPair = ProtoAdapter.BYTES.decode(reader)
2 -> signedPreKey = ProtoAdapter.BYTES.decode(reader)
5 -> lastResortKyberPreKey = ProtoAdapter.BYTES.decode(reader)
3 -> registrationId = ProtoAdapter.UINT32.decode(reader)
4 -> newE164 = ProtoAdapter.STRING.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return PniChangeNumber(
identityKeyPair = identityKeyPair,
signedPreKey = signedPreKey,
lastResortKyberPreKey = lastResortKyberPreKey,
registrationId = registrationId,
newE164 = newE164,
unknownFields = unknownFields
)
}
public override fun redact(`value`: PniChangeNumber): PniChangeNumber = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
public class CallEvent(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val conversationId: ByteString? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#UINT64",
)
@JvmField
public val id: Long? = null,
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#UINT64",
)
@JvmField
public val timestamp: Long? = null,
@field:WireField(
tag = 4,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}CallEvent${'$'}Type#ADAPTER",
)
@JvmField
public val type: Type? = null,
@field:WireField(
tag = 5,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}CallEvent${'$'}Direction#ADAPTER",
)
@JvmField
public val direction: Direction? = null,
@field:WireField(
tag = 6,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}CallEvent${'$'}Event#ADAPTER",
)
@JvmField
public val event: Event? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.conversationId = conversationId
builder.id = id
builder.timestamp = timestamp
builder.type = type
builder.direction = direction
builder.event = event
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is CallEvent) return false
if (unknownFields != other.unknownFields) return false
if (conversationId != other.conversationId) return false
if (id != other.id) return false
if (timestamp != other.timestamp) return false
if (type != other.type) return false
if (direction != other.direction) return false
if (event != other.event) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (conversationId?.hashCode() ?: 0)
result = result * 37 + (id?.hashCode() ?: 0)
result = result * 37 + (timestamp?.hashCode() ?: 0)
result = result * 37 + (type?.hashCode() ?: 0)
result = result * 37 + (direction?.hashCode() ?: 0)
result = result * 37 + (event?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (conversationId != null) result += """conversationId=$conversationId"""
if (id != null) result += """id=$id"""
if (timestamp != null) result += """timestamp=$timestamp"""
if (type != null) result += """type=$type"""
if (direction != null) result += """direction=$direction"""
if (event != null) result += """event=$event"""
return result.joinToString(prefix = "CallEvent{", separator = ", ", postfix = "}")
}
public fun copy(
conversationId: ByteString? = this.conversationId,
id: Long? = this.id,
timestamp: Long? = this.timestamp,
type: Type? = this.type,
direction: Direction? = this.direction,
event: Event? = this.event,
unknownFields: ByteString = this.unknownFields,
): CallEvent = CallEvent(conversationId, id, timestamp, type, direction, event, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var conversationId: ByteString? = null
@JvmField
public var id: Long? = null
@JvmField
public var timestamp: Long? = null
@JvmField
public var type: Type? = null
@JvmField
public var direction: Direction? = null
@JvmField
public var event: Event? = null
public fun conversationId(conversationId: ByteString?): Builder {
this.conversationId = conversationId
return this
}
public fun id(id: Long?): Builder {
this.id = id
return this
}
public fun timestamp(timestamp: Long?): Builder {
this.timestamp = timestamp
return this
}
public fun type(type: Type?): Builder {
this.type = type
return this
}
public fun direction(direction: Direction?): Builder {
this.direction = direction
return this
}
public fun event(event: Event?): Builder {
this.event = event
return this
}
public override fun build(): CallEvent = CallEvent(
conversationId = conversationId,
id = id,
timestamp = timestamp,
type = type,
direction = direction,
event = event,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
CallEvent::class,
"type.googleapis.com/signalservice.SyncMessage.CallEvent",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: CallEvent): Int {
var size = value.unknownFields.size
size += ProtoAdapter.BYTES.encodedSizeWithTag(1, value.conversationId)
size += ProtoAdapter.UINT64.encodedSizeWithTag(2, value.id)
size += ProtoAdapter.UINT64.encodedSizeWithTag(3, value.timestamp)
size += Type.ADAPTER.encodedSizeWithTag(4, value.type)
size += Direction.ADAPTER.encodedSizeWithTag(5, value.direction)
size += Event.ADAPTER.encodedSizeWithTag(6, value.event)
return size
}
public override fun encode(writer: ProtoWriter, `value`: CallEvent): Unit {
ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.conversationId)
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.id)
ProtoAdapter.UINT64.encodeWithTag(writer, 3, value.timestamp)
Type.ADAPTER.encodeWithTag(writer, 4, value.type)
Direction.ADAPTER.encodeWithTag(writer, 5, value.direction)
Event.ADAPTER.encodeWithTag(writer, 6, value.event)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: CallEvent): Unit {
writer.writeBytes(value.unknownFields)
Event.ADAPTER.encodeWithTag(writer, 6, value.event)
Direction.ADAPTER.encodeWithTag(writer, 5, value.direction)
Type.ADAPTER.encodeWithTag(writer, 4, value.type)
ProtoAdapter.UINT64.encodeWithTag(writer, 3, value.timestamp)
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.id)
ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.conversationId)
}
public override fun decode(reader: ProtoReader): CallEvent {
var conversationId: ByteString? = null
var id: Long? = null
var timestamp: Long? = null
var type: Type? = null
var direction: Direction? = null
var event: Event? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> conversationId = ProtoAdapter.BYTES.decode(reader)
2 -> id = ProtoAdapter.UINT64.decode(reader)
3 -> timestamp = ProtoAdapter.UINT64.decode(reader)
4 -> try {
type = Type.ADAPTER.decode(reader)
} catch (e: ProtoAdapter.EnumConstantNotFoundException) {
reader.addUnknownField(tag, FieldEncoding.VARINT, e.value.toLong())
}
5 -> try {
direction = Direction.ADAPTER.decode(reader)
} catch (e: ProtoAdapter.EnumConstantNotFoundException) {
reader.addUnknownField(tag, FieldEncoding.VARINT, e.value.toLong())
}
6 -> try {
event = Event.ADAPTER.decode(reader)
} catch (e: ProtoAdapter.EnumConstantNotFoundException) {
reader.addUnknownField(tag, FieldEncoding.VARINT, e.value.toLong())
}
else -> reader.readUnknownField(tag)
}
}
return CallEvent(
conversationId = conversationId,
id = id,
timestamp = timestamp,
type = type,
direction = direction,
event = event,
unknownFields = unknownFields
)
}
public override fun redact(`value`: CallEvent): CallEvent = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
public enum class Type(
public override val `value`: Int,
) : WireEnum {
UNKNOWN_TYPE(0),
AUDIO_CALL(1),
VIDEO_CALL(2),
GROUP_CALL(3),
AD_HOC_CALL(4),
;
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : EnumAdapter(
Type::class,
PROTO_2,
Type.UNKNOWN_TYPE
) {
public override fun fromValue(`value`: Int): Type? = Type.fromValue(value)
}
@JvmStatic
public fun fromValue(`value`: Int): Type? = when (value) {
0 -> UNKNOWN_TYPE
1 -> AUDIO_CALL
2 -> VIDEO_CALL
3 -> GROUP_CALL
4 -> AD_HOC_CALL
else -> null
}
}
}
public enum class Direction(
public override val `value`: Int,
) : WireEnum {
UNKNOWN_DIRECTION(0),
INCOMING(1),
OUTGOING(2),
;
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : EnumAdapter(
Direction::class,
PROTO_2,
Direction.UNKNOWN_DIRECTION
) {
public override fun fromValue(`value`: Int): Direction? = Direction.fromValue(value)
}
@JvmStatic
public fun fromValue(`value`: Int): Direction? = when (value) {
0 -> UNKNOWN_DIRECTION
1 -> INCOMING
2 -> OUTGOING
else -> null
}
}
}
public enum class Event(
public override val `value`: Int,
) : WireEnum {
UNKNOWN_ACTION(0),
ACCEPTED(1),
NOT_ACCEPTED(2),
DELETE(3),
OBSERVED(4),
;
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : EnumAdapter(
Event::class,
PROTO_2,
Event.UNKNOWN_ACTION
) {
public override fun fromValue(`value`: Int): Event? = Event.fromValue(value)
}
@JvmStatic
public fun fromValue(`value`: Int): Event? = when (value) {
0 -> UNKNOWN_ACTION
1 -> ACCEPTED
2 -> NOT_ACCEPTED
3 -> DELETE
4 -> OBSERVED
else -> null
}
}
}
}
public class CallLinkUpdate(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val rootKey: ByteString? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val adminPassKey: ByteString? = null,
@field:WireField(
tag = 3,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}CallLinkUpdate${'$'}Type#ADAPTER",
)
@JvmField
public val type: Type? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.rootKey = rootKey
builder.adminPassKey = adminPassKey
builder.type = type
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is CallLinkUpdate) return false
if (unknownFields != other.unknownFields) return false
if (rootKey != other.rootKey) return false
if (adminPassKey != other.adminPassKey) return false
if (type != other.type) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (rootKey?.hashCode() ?: 0)
result = result * 37 + (adminPassKey?.hashCode() ?: 0)
result = result * 37 + (type?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (rootKey != null) result += """rootKey=$rootKey"""
if (adminPassKey != null) result += """adminPassKey=$adminPassKey"""
if (type != null) result += """type=$type"""
return result.joinToString(prefix = "CallLinkUpdate{", separator = ", ", postfix = "}")
}
public fun copy(
rootKey: ByteString? = this.rootKey,
adminPassKey: ByteString? = this.adminPassKey,
type: Type? = this.type,
unknownFields: ByteString = this.unknownFields,
): CallLinkUpdate = CallLinkUpdate(rootKey, adminPassKey, type, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var rootKey: ByteString? = null
@JvmField
public var adminPassKey: ByteString? = null
@JvmField
public var type: Type? = null
public fun rootKey(rootKey: ByteString?): Builder {
this.rootKey = rootKey
return this
}
public fun adminPassKey(adminPassKey: ByteString?): Builder {
this.adminPassKey = adminPassKey
return this
}
public fun type(type: Type?): Builder {
this.type = type
return this
}
public override fun build(): CallLinkUpdate = CallLinkUpdate(
rootKey = rootKey,
adminPassKey = adminPassKey,
type = type,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
CallLinkUpdate::class,
"type.googleapis.com/signalservice.SyncMessage.CallLinkUpdate",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: CallLinkUpdate): Int {
var size = value.unknownFields.size
size += ProtoAdapter.BYTES.encodedSizeWithTag(1, value.rootKey)
size += ProtoAdapter.BYTES.encodedSizeWithTag(2, value.adminPassKey)
size += Type.ADAPTER.encodedSizeWithTag(3, value.type)
return size
}
public override fun encode(writer: ProtoWriter, `value`: CallLinkUpdate): Unit {
ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.rootKey)
ProtoAdapter.BYTES.encodeWithTag(writer, 2, value.adminPassKey)
Type.ADAPTER.encodeWithTag(writer, 3, value.type)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: CallLinkUpdate): Unit {
writer.writeBytes(value.unknownFields)
Type.ADAPTER.encodeWithTag(writer, 3, value.type)
ProtoAdapter.BYTES.encodeWithTag(writer, 2, value.adminPassKey)
ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.rootKey)
}
public override fun decode(reader: ProtoReader): CallLinkUpdate {
var rootKey: ByteString? = null
var adminPassKey: ByteString? = null
var type: Type? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> rootKey = ProtoAdapter.BYTES.decode(reader)
2 -> adminPassKey = ProtoAdapter.BYTES.decode(reader)
3 -> try {
type = Type.ADAPTER.decode(reader)
} catch (e: ProtoAdapter.EnumConstantNotFoundException) {
reader.addUnknownField(tag, FieldEncoding.VARINT, e.value.toLong())
}
else -> reader.readUnknownField(tag)
}
}
return CallLinkUpdate(
rootKey = rootKey,
adminPassKey = adminPassKey,
type = type,
unknownFields = unknownFields
)
}
public override fun redact(`value`: CallLinkUpdate): CallLinkUpdate = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
public enum class Type(
public override val `value`: Int,
) : WireEnum {
UPDATE(0),
DELETE(1),
;
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : EnumAdapter(
Type::class,
PROTO_2,
Type.UPDATE
) {
public override fun fromValue(`value`: Int): Type? = Type.fromValue(value)
}
@JvmStatic
public fun fromValue(`value`: Int): Type? = when (value) {
0 -> UPDATE
1 -> DELETE
else -> null
}
}
}
}
public class CallLogEvent(
@field:WireField(
tag = 1,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}CallLogEvent${'$'}Type#ADAPTER",
)
@JvmField
public val type: Type? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#UINT64",
)
@JvmField
public val timestamp: Long? = null,
/**
* Data identifying a conversation. The service ID for 1:1, the group ID for
* group, or the room ID for an ad-hoc call. See also
* `CallEvent/conversationId`.
*/
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val conversationId: ByteString? = null,
/**
* An identifier for a call. Generated directly for 1:1, or derived from
* the era ID for group and ad-hoc calls. See also `CallEvent/callId`.
*/
@field:WireField(
tag = 4,
adapter = "com.squareup.wire.ProtoAdapter#UINT64",
)
@JvmField
public val callId: Long? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.type = type
builder.timestamp = timestamp
builder.conversationId = conversationId
builder.callId = callId
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is CallLogEvent) return false
if (unknownFields != other.unknownFields) return false
if (type != other.type) return false
if (timestamp != other.timestamp) return false
if (conversationId != other.conversationId) return false
if (callId != other.callId) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (type?.hashCode() ?: 0)
result = result * 37 + (timestamp?.hashCode() ?: 0)
result = result * 37 + (conversationId?.hashCode() ?: 0)
result = result * 37 + (callId?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (type != null) result += """type=$type"""
if (timestamp != null) result += """timestamp=$timestamp"""
if (conversationId != null) result += """conversationId=$conversationId"""
if (callId != null) result += """callId=$callId"""
return result.joinToString(prefix = "CallLogEvent{", separator = ", ", postfix = "}")
}
public fun copy(
type: Type? = this.type,
timestamp: Long? = this.timestamp,
conversationId: ByteString? = this.conversationId,
callId: Long? = this.callId,
unknownFields: ByteString = this.unknownFields,
): CallLogEvent = CallLogEvent(type, timestamp, conversationId, callId, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var type: Type? = null
@JvmField
public var timestamp: Long? = null
@JvmField
public var conversationId: ByteString? = null
@JvmField
public var callId: Long? = null
public fun type(type: Type?): Builder {
this.type = type
return this
}
public fun timestamp(timestamp: Long?): Builder {
this.timestamp = timestamp
return this
}
/**
* Data identifying a conversation. The service ID for 1:1, the group ID for
* group, or the room ID for an ad-hoc call. See also
* `CallEvent/conversationId`.
*/
public fun conversationId(conversationId: ByteString?): Builder {
this.conversationId = conversationId
return this
}
/**
* An identifier for a call. Generated directly for 1:1, or derived from
* the era ID for group and ad-hoc calls. See also `CallEvent/callId`.
*/
public fun callId(callId: Long?): Builder {
this.callId = callId
return this
}
public override fun build(): CallLogEvent = CallLogEvent(
type = type,
timestamp = timestamp,
conversationId = conversationId,
callId = callId,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
CallLogEvent::class,
"type.googleapis.com/signalservice.SyncMessage.CallLogEvent",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: CallLogEvent): Int {
var size = value.unknownFields.size
size += Type.ADAPTER.encodedSizeWithTag(1, value.type)
size += ProtoAdapter.UINT64.encodedSizeWithTag(2, value.timestamp)
size += ProtoAdapter.BYTES.encodedSizeWithTag(3, value.conversationId)
size += ProtoAdapter.UINT64.encodedSizeWithTag(4, value.callId)
return size
}
public override fun encode(writer: ProtoWriter, `value`: CallLogEvent): Unit {
Type.ADAPTER.encodeWithTag(writer, 1, value.type)
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.timestamp)
ProtoAdapter.BYTES.encodeWithTag(writer, 3, value.conversationId)
ProtoAdapter.UINT64.encodeWithTag(writer, 4, value.callId)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: CallLogEvent): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.UINT64.encodeWithTag(writer, 4, value.callId)
ProtoAdapter.BYTES.encodeWithTag(writer, 3, value.conversationId)
ProtoAdapter.UINT64.encodeWithTag(writer, 2, value.timestamp)
Type.ADAPTER.encodeWithTag(writer, 1, value.type)
}
public override fun decode(reader: ProtoReader): CallLogEvent {
var type: Type? = null
var timestamp: Long? = null
var conversationId: ByteString? = null
var callId: Long? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> try {
type = Type.ADAPTER.decode(reader)
} catch (e: ProtoAdapter.EnumConstantNotFoundException) {
reader.addUnknownField(tag, FieldEncoding.VARINT, e.value.toLong())
}
2 -> timestamp = ProtoAdapter.UINT64.decode(reader)
3 -> conversationId = ProtoAdapter.BYTES.decode(reader)
4 -> callId = ProtoAdapter.UINT64.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return CallLogEvent(
type = type,
timestamp = timestamp,
conversationId = conversationId,
callId = callId,
unknownFields = unknownFields
)
}
public override fun redact(`value`: CallLogEvent): CallLogEvent = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
public enum class Type(
public override val `value`: Int,
) : WireEnum {
CLEAR(0),
MARKED_AS_READ(1),
MARKED_AS_READ_IN_CONVERSATION(2),
;
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : EnumAdapter(
Type::class,
PROTO_2,
Type.CLEAR
) {
public override fun fromValue(`value`: Int): Type? = Type.fromValue(value)
}
@JvmStatic
public fun fromValue(`value`: Int): Type? = when (value) {
0 -> CLEAR
1 -> MARKED_AS_READ
2 -> MARKED_AS_READ_IN_CONVERSATION
else -> null
}
}
}
}
public class DeleteForMe(
messageDeletes: List = emptyList(),
conversationDeletes: List = emptyList(),
localOnlyConversationDeletes: List = emptyList(),
attachmentDeletes: List = emptyList(),
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
@field:WireField(
tag = 1,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}DeleteForMe${'$'}MessageDeletes#ADAPTER",
label = WireField.Label.REPEATED,
)
@JvmField
public val messageDeletes: List = immutableCopyOf("messageDeletes",
messageDeletes)
@field:WireField(
tag = 2,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}DeleteForMe${'$'}ConversationDelete#ADAPTER",
label = WireField.Label.REPEATED,
)
@JvmField
public val conversationDeletes: List =
immutableCopyOf("conversationDeletes", conversationDeletes)
@field:WireField(
tag = 3,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}DeleteForMe${'$'}LocalOnlyConversationDelete#ADAPTER",
label = WireField.Label.REPEATED,
)
@JvmField
public val localOnlyConversationDeletes: List =
immutableCopyOf("localOnlyConversationDeletes", localOnlyConversationDeletes)
@field:WireField(
tag = 4,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}DeleteForMe${'$'}AttachmentDelete#ADAPTER",
label = WireField.Label.REPEATED,
)
@JvmField
public val attachmentDeletes: List = immutableCopyOf("attachmentDeletes",
attachmentDeletes)
public override fun newBuilder(): Builder {
val builder = Builder()
builder.messageDeletes = messageDeletes
builder.conversationDeletes = conversationDeletes
builder.localOnlyConversationDeletes = localOnlyConversationDeletes
builder.attachmentDeletes = attachmentDeletes
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is DeleteForMe) return false
if (unknownFields != other.unknownFields) return false
if (messageDeletes != other.messageDeletes) return false
if (conversationDeletes != other.conversationDeletes) return false
if (localOnlyConversationDeletes != other.localOnlyConversationDeletes) return false
if (attachmentDeletes != other.attachmentDeletes) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + messageDeletes.hashCode()
result = result * 37 + conversationDeletes.hashCode()
result = result * 37 + localOnlyConversationDeletes.hashCode()
result = result * 37 + attachmentDeletes.hashCode()
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (messageDeletes.isNotEmpty()) result += """messageDeletes=$messageDeletes"""
if (conversationDeletes.isNotEmpty()) result += """conversationDeletes=$conversationDeletes"""
if (localOnlyConversationDeletes.isNotEmpty()) result +=
"""localOnlyConversationDeletes=$localOnlyConversationDeletes"""
if (attachmentDeletes.isNotEmpty()) result += """attachmentDeletes=$attachmentDeletes"""
return result.joinToString(prefix = "DeleteForMe{", separator = ", ", postfix = "}")
}
public fun copy(
messageDeletes: List = this.messageDeletes,
conversationDeletes: List = this.conversationDeletes,
localOnlyConversationDeletes: List =
this.localOnlyConversationDeletes,
attachmentDeletes: List = this.attachmentDeletes,
unknownFields: ByteString = this.unknownFields,
): DeleteForMe = DeleteForMe(messageDeletes, conversationDeletes, localOnlyConversationDeletes,
attachmentDeletes, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var messageDeletes: List = emptyList()
@JvmField
public var conversationDeletes: List = emptyList()
@JvmField
public var localOnlyConversationDeletes: List = emptyList()
@JvmField
public var attachmentDeletes: List = emptyList()
public fun messageDeletes(messageDeletes: List): Builder {
checkElementsNotNull(messageDeletes)
this.messageDeletes = messageDeletes
return this
}
public fun conversationDeletes(conversationDeletes: List): Builder {
checkElementsNotNull(conversationDeletes)
this.conversationDeletes = conversationDeletes
return this
}
public
fun localOnlyConversationDeletes(localOnlyConversationDeletes: List):
Builder {
checkElementsNotNull(localOnlyConversationDeletes)
this.localOnlyConversationDeletes = localOnlyConversationDeletes
return this
}
public fun attachmentDeletes(attachmentDeletes: List): Builder {
checkElementsNotNull(attachmentDeletes)
this.attachmentDeletes = attachmentDeletes
return this
}
public override fun build(): DeleteForMe = DeleteForMe(
messageDeletes = messageDeletes,
conversationDeletes = conversationDeletes,
localOnlyConversationDeletes = localOnlyConversationDeletes,
attachmentDeletes = attachmentDeletes,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
DeleteForMe::class,
"type.googleapis.com/signalservice.SyncMessage.DeleteForMe",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: DeleteForMe): Int {
var size = value.unknownFields.size
size += MessageDeletes.ADAPTER.asRepeated().encodedSizeWithTag(1, value.messageDeletes)
size += ConversationDelete.ADAPTER.asRepeated().encodedSizeWithTag(2,
value.conversationDeletes)
size += LocalOnlyConversationDelete.ADAPTER.asRepeated().encodedSizeWithTag(3,
value.localOnlyConversationDeletes)
size += AttachmentDelete.ADAPTER.asRepeated().encodedSizeWithTag(4,
value.attachmentDeletes)
return size
}
public override fun encode(writer: ProtoWriter, `value`: DeleteForMe): Unit {
MessageDeletes.ADAPTER.asRepeated().encodeWithTag(writer, 1, value.messageDeletes)
ConversationDelete.ADAPTER.asRepeated().encodeWithTag(writer, 2,
value.conversationDeletes)
LocalOnlyConversationDelete.ADAPTER.asRepeated().encodeWithTag(writer, 3,
value.localOnlyConversationDeletes)
AttachmentDelete.ADAPTER.asRepeated().encodeWithTag(writer, 4, value.attachmentDeletes)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: DeleteForMe): Unit {
writer.writeBytes(value.unknownFields)
AttachmentDelete.ADAPTER.asRepeated().encodeWithTag(writer, 4, value.attachmentDeletes)
LocalOnlyConversationDelete.ADAPTER.asRepeated().encodeWithTag(writer, 3,
value.localOnlyConversationDeletes)
ConversationDelete.ADAPTER.asRepeated().encodeWithTag(writer, 2,
value.conversationDeletes)
MessageDeletes.ADAPTER.asRepeated().encodeWithTag(writer, 1, value.messageDeletes)
}
public override fun decode(reader: ProtoReader): DeleteForMe {
val messageDeletes = mutableListOf()
val conversationDeletes = mutableListOf()
val localOnlyConversationDeletes = mutableListOf()
val attachmentDeletes = mutableListOf()
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> messageDeletes.add(MessageDeletes.ADAPTER.decode(reader))
2 -> conversationDeletes.add(ConversationDelete.ADAPTER.decode(reader))
3 ->
localOnlyConversationDeletes.add(LocalOnlyConversationDelete.ADAPTER.decode(reader))
4 -> attachmentDeletes.add(AttachmentDelete.ADAPTER.decode(reader))
else -> reader.readUnknownField(tag)
}
}
return DeleteForMe(
messageDeletes = messageDeletes,
conversationDeletes = conversationDeletes,
localOnlyConversationDeletes = localOnlyConversationDeletes,
attachmentDeletes = attachmentDeletes,
unknownFields = unknownFields
)
}
public override fun redact(`value`: DeleteForMe): DeleteForMe = value.copy(
messageDeletes = value.messageDeletes.redactElements(MessageDeletes.ADAPTER),
conversationDeletes =
value.conversationDeletes.redactElements(ConversationDelete.ADAPTER),
localOnlyConversationDeletes =
value.localOnlyConversationDeletes.redactElements(LocalOnlyConversationDelete.ADAPTER),
attachmentDeletes = value.attachmentDeletes.redactElements(AttachmentDelete.ADAPTER),
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
public class ConversationIdentifier(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
oneofName = "identifier",
)
@JvmField
public val threadServiceId: String? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
oneofName = "identifier",
)
@JvmField
public val threadGroupId: ByteString? = null,
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
oneofName = "identifier",
)
@JvmField
public val threadE164: String? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
init {
require(countNonDefa(threadServiceId, threadGroupId, threadE164) <= 1) {
"At most one of threadServiceId, threadGroupId, threadE164 may be non-null"
}
}
public override fun newBuilder(): Builder {
val builder = Builder()
builder.threadServiceId = threadServiceId
builder.threadGroupId = threadGroupId
builder.threadE164 = threadE164
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is ConversationIdentifier) return false
if (unknownFields != other.unknownFields) return false
if (threadServiceId != other.threadServiceId) return false
if (threadGroupId != other.threadGroupId) return false
if (threadE164 != other.threadE164) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (threadServiceId?.hashCode() ?: 0)
result = result * 37 + (threadGroupId?.hashCode() ?: 0)
result = result * 37 + (threadE164?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (threadServiceId != null) result += """threadServiceId=${sanitize(threadServiceId)}"""
if (threadGroupId != null) result += """threadGroupId=$threadGroupId"""
if (threadE164 != null) result += """threadE164=${sanitize(threadE164)}"""
return result.joinToString(prefix = "ConversationIdentifier{", separator = ", ", postfix =
"}")
}
public fun copy(
threadServiceId: String? = this.threadServiceId,
threadGroupId: ByteString? = this.threadGroupId,
threadE164: String? = this.threadE164,
unknownFields: ByteString = this.unknownFields,
): ConversationIdentifier = ConversationIdentifier(threadServiceId, threadGroupId, threadE164,
unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var threadServiceId: String? = null
@JvmField
public var threadGroupId: ByteString? = null
@JvmField
public var threadE164: String? = null
public fun threadServiceId(threadServiceId: String?): Builder {
this.threadServiceId = threadServiceId
this.threadGroupId = null
this.threadE164 = null
return this
}
public fun threadGroupId(threadGroupId: ByteString?): Builder {
this.threadGroupId = threadGroupId
this.threadServiceId = null
this.threadE164 = null
return this
}
public fun threadE164(threadE164: String?): Builder {
this.threadE164 = threadE164
this.threadServiceId = null
this.threadGroupId = null
return this
}
public override fun build(): ConversationIdentifier = ConversationIdentifier(
threadServiceId = threadServiceId,
threadGroupId = threadGroupId,
threadE164 = threadE164,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object :
ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
ConversationIdentifier::class,
"type.googleapis.com/signalservice.SyncMessage.DeleteForMe.ConversationIdentifier",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: ConversationIdentifier): Int {
var size = value.unknownFields.size
size += ProtoAdapter.STRING.encodedSizeWithTag(1, value.threadServiceId)
size += ProtoAdapter.BYTES.encodedSizeWithTag(2, value.threadGroupId)
size += ProtoAdapter.STRING.encodedSizeWithTag(3, value.threadE164)
return size
}
public override fun encode(writer: ProtoWriter, `value`: ConversationIdentifier): Unit {
ProtoAdapter.STRING.encodeWithTag(writer, 1, value.threadServiceId)
ProtoAdapter.BYTES.encodeWithTag(writer, 2, value.threadGroupId)
ProtoAdapter.STRING.encodeWithTag(writer, 3, value.threadE164)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: ConversationIdentifier):
Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.STRING.encodeWithTag(writer, 3, value.threadE164)
ProtoAdapter.BYTES.encodeWithTag(writer, 2, value.threadGroupId)
ProtoAdapter.STRING.encodeWithTag(writer, 1, value.threadServiceId)
}
public override fun decode(reader: ProtoReader): ConversationIdentifier {
var threadServiceId: String? = null
var threadGroupId: ByteString? = null
var threadE164: String? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> threadServiceId = ProtoAdapter.STRING.decode(reader)
2 -> threadGroupId = ProtoAdapter.BYTES.decode(reader)
3 -> threadE164 = ProtoAdapter.STRING.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return ConversationIdentifier(
threadServiceId = threadServiceId,
threadGroupId = threadGroupId,
threadE164 = threadE164,
unknownFields = unknownFields
)
}
public override fun redact(`value`: ConversationIdentifier): ConversationIdentifier =
value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
public class AddressableMessage(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
oneofName = "author",
)
@JvmField
public val authorServiceId: String? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
oneofName = "author",
)
@JvmField
public val authorE164: String? = null,
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#UINT64",
)
@JvmField
public val sentTimestamp: Long? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
init {
require(countNonDefa(authorServiceId, authorE164) <= 1) {
"At most one of authorServiceId, authorE164 may be non-null"
}
}
public override fun newBuilder(): Builder {
val builder = Builder()
builder.authorServiceId = authorServiceId
builder.authorE164 = authorE164
builder.sentTimestamp = sentTimestamp
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is AddressableMessage) return false
if (unknownFields != other.unknownFields) return false
if (authorServiceId != other.authorServiceId) return false
if (authorE164 != other.authorE164) return false
if (sentTimestamp != other.sentTimestamp) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (authorServiceId?.hashCode() ?: 0)
result = result * 37 + (authorE164?.hashCode() ?: 0)
result = result * 37 + (sentTimestamp?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (authorServiceId != null) result += """authorServiceId=${sanitize(authorServiceId)}"""
if (authorE164 != null) result += """authorE164=${sanitize(authorE164)}"""
if (sentTimestamp != null) result += """sentTimestamp=$sentTimestamp"""
return result.joinToString(prefix = "AddressableMessage{", separator = ", ", postfix = "}")
}
public fun copy(
authorServiceId: String? = this.authorServiceId,
authorE164: String? = this.authorE164,
sentTimestamp: Long? = this.sentTimestamp,
unknownFields: ByteString = this.unknownFields,
): AddressableMessage = AddressableMessage(authorServiceId, authorE164, sentTimestamp,
unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var authorServiceId: String? = null
@JvmField
public var authorE164: String? = null
@JvmField
public var sentTimestamp: Long? = null
public fun sentTimestamp(sentTimestamp: Long?): Builder {
this.sentTimestamp = sentTimestamp
return this
}
public fun authorServiceId(authorServiceId: String?): Builder {
this.authorServiceId = authorServiceId
this.authorE164 = null
return this
}
public fun authorE164(authorE164: String?): Builder {
this.authorE164 = authorE164
this.authorServiceId = null
return this
}
public override fun build(): AddressableMessage = AddressableMessage(
authorServiceId = authorServiceId,
authorE164 = authorE164,
sentTimestamp = sentTimestamp,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object :
ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
AddressableMessage::class,
"type.googleapis.com/signalservice.SyncMessage.DeleteForMe.AddressableMessage",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: AddressableMessage): Int {
var size = value.unknownFields.size
size += ProtoAdapter.STRING.encodedSizeWithTag(1, value.authorServiceId)
size += ProtoAdapter.STRING.encodedSizeWithTag(2, value.authorE164)
size += ProtoAdapter.UINT64.encodedSizeWithTag(3, value.sentTimestamp)
return size
}
public override fun encode(writer: ProtoWriter, `value`: AddressableMessage): Unit {
ProtoAdapter.UINT64.encodeWithTag(writer, 3, value.sentTimestamp)
ProtoAdapter.STRING.encodeWithTag(writer, 1, value.authorServiceId)
ProtoAdapter.STRING.encodeWithTag(writer, 2, value.authorE164)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: AddressableMessage):
Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.STRING.encodeWithTag(writer, 2, value.authorE164)
ProtoAdapter.STRING.encodeWithTag(writer, 1, value.authorServiceId)
ProtoAdapter.UINT64.encodeWithTag(writer, 3, value.sentTimestamp)
}
public override fun decode(reader: ProtoReader): AddressableMessage {
var authorServiceId: String? = null
var authorE164: String? = null
var sentTimestamp: Long? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> authorServiceId = ProtoAdapter.STRING.decode(reader)
2 -> authorE164 = ProtoAdapter.STRING.decode(reader)
3 -> sentTimestamp = ProtoAdapter.UINT64.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return AddressableMessage(
authorServiceId = authorServiceId,
authorE164 = authorE164,
sentTimestamp = sentTimestamp,
unknownFields = unknownFields
)
}
public override fun redact(`value`: AddressableMessage): AddressableMessage = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
public class MessageDeletes(
@field:WireField(
tag = 1,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}DeleteForMe${'$'}ConversationIdentifier#ADAPTER",
)
@JvmField
public val conversation: ConversationIdentifier? = null,
messages: List = emptyList(),
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
@field:WireField(
tag = 2,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}DeleteForMe${'$'}AddressableMessage#ADAPTER",
label = WireField.Label.REPEATED,
)
@JvmField
public val messages: List = immutableCopyOf("messages", messages)
public override fun newBuilder(): Builder {
val builder = Builder()
builder.conversation = conversation
builder.messages = messages
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is MessageDeletes) return false
if (unknownFields != other.unknownFields) return false
if (conversation != other.conversation) return false
if (messages != other.messages) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (conversation?.hashCode() ?: 0)
result = result * 37 + messages.hashCode()
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (conversation != null) result += """conversation=$conversation"""
if (messages.isNotEmpty()) result += """messages=$messages"""
return result.joinToString(prefix = "MessageDeletes{", separator = ", ", postfix = "}")
}
public fun copy(
conversation: ConversationIdentifier? = this.conversation,
messages: List = this.messages,
unknownFields: ByteString = this.unknownFields,
): MessageDeletes = MessageDeletes(conversation, messages, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var conversation: ConversationIdentifier? = null
@JvmField
public var messages: List = emptyList()
public fun conversation(conversation: ConversationIdentifier?): Builder {
this.conversation = conversation
return this
}
public fun messages(messages: List): Builder {
checkElementsNotNull(messages)
this.messages = messages
return this
}
public override fun build(): MessageDeletes = MessageDeletes(
conversation = conversation,
messages = messages,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
MessageDeletes::class,
"type.googleapis.com/signalservice.SyncMessage.DeleteForMe.MessageDeletes",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: MessageDeletes): Int {
var size = value.unknownFields.size
size += ConversationIdentifier.ADAPTER.encodedSizeWithTag(1, value.conversation)
size += AddressableMessage.ADAPTER.asRepeated().encodedSizeWithTag(2, value.messages)
return size
}
public override fun encode(writer: ProtoWriter, `value`: MessageDeletes): Unit {
ConversationIdentifier.ADAPTER.encodeWithTag(writer, 1, value.conversation)
AddressableMessage.ADAPTER.asRepeated().encodeWithTag(writer, 2, value.messages)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: MessageDeletes): Unit {
writer.writeBytes(value.unknownFields)
AddressableMessage.ADAPTER.asRepeated().encodeWithTag(writer, 2, value.messages)
ConversationIdentifier.ADAPTER.encodeWithTag(writer, 1, value.conversation)
}
public override fun decode(reader: ProtoReader): MessageDeletes {
var conversation: ConversationIdentifier? = null
val messages = mutableListOf()
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> conversation = ConversationIdentifier.ADAPTER.decode(reader)
2 -> messages.add(AddressableMessage.ADAPTER.decode(reader))
else -> reader.readUnknownField(tag)
}
}
return MessageDeletes(
conversation = conversation,
messages = messages,
unknownFields = unknownFields
)
}
public override fun redact(`value`: MessageDeletes): MessageDeletes = value.copy(
conversation = value.conversation?.let(ConversationIdentifier.ADAPTER::redact),
messages = value.messages.redactElements(AddressableMessage.ADAPTER),
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
public class AttachmentDelete(
@field:WireField(
tag = 1,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}DeleteForMe${'$'}ConversationIdentifier#ADAPTER",
)
@JvmField
public val conversation: ConversationIdentifier? = null,
@field:WireField(
tag = 2,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}DeleteForMe${'$'}AddressableMessage#ADAPTER",
)
@JvmField
public val targetMessage: AddressableMessage? = null,
/**
* The `uuid` from the `Attachment`.
*/
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val uuid: ByteString? = null,
@field:WireField(
tag = 4,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val fallbackDigest: ByteString? = null,
@field:WireField(
tag = 5,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
)
@JvmField
public val fallbackPlaintextHash: ByteString? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.conversation = conversation
builder.targetMessage = targetMessage
builder.uuid = uuid
builder.fallbackDigest = fallbackDigest
builder.fallbackPlaintextHash = fallbackPlaintextHash
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is AttachmentDelete) return false
if (unknownFields != other.unknownFields) return false
if (conversation != other.conversation) return false
if (targetMessage != other.targetMessage) return false
if (uuid != other.uuid) return false
if (fallbackDigest != other.fallbackDigest) return false
if (fallbackPlaintextHash != other.fallbackPlaintextHash) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (conversation?.hashCode() ?: 0)
result = result * 37 + (targetMessage?.hashCode() ?: 0)
result = result * 37 + (uuid?.hashCode() ?: 0)
result = result * 37 + (fallbackDigest?.hashCode() ?: 0)
result = result * 37 + (fallbackPlaintextHash?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (conversation != null) result += """conversation=$conversation"""
if (targetMessage != null) result += """targetMessage=$targetMessage"""
if (uuid != null) result += """uuid=$uuid"""
if (fallbackDigest != null) result += """fallbackDigest=$fallbackDigest"""
if (fallbackPlaintextHash != null) result +=
"""fallbackPlaintextHash=$fallbackPlaintextHash"""
return result.joinToString(prefix = "AttachmentDelete{", separator = ", ", postfix = "}")
}
public fun copy(
conversation: ConversationIdentifier? = this.conversation,
targetMessage: AddressableMessage? = this.targetMessage,
uuid: ByteString? = this.uuid,
fallbackDigest: ByteString? = this.fallbackDigest,
fallbackPlaintextHash: ByteString? = this.fallbackPlaintextHash,
unknownFields: ByteString = this.unknownFields,
): AttachmentDelete = AttachmentDelete(conversation, targetMessage, uuid, fallbackDigest,
fallbackPlaintextHash, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var conversation: ConversationIdentifier? = null
@JvmField
public var targetMessage: AddressableMessage? = null
@JvmField
public var uuid: ByteString? = null
@JvmField
public var fallbackDigest: ByteString? = null
@JvmField
public var fallbackPlaintextHash: ByteString? = null
public fun conversation(conversation: ConversationIdentifier?): Builder {
this.conversation = conversation
return this
}
public fun targetMessage(targetMessage: AddressableMessage?): Builder {
this.targetMessage = targetMessage
return this
}
/**
* The `uuid` from the `Attachment`.
*/
public fun uuid(uuid: ByteString?): Builder {
this.uuid = uuid
return this
}
public fun fallbackDigest(fallbackDigest: ByteString?): Builder {
this.fallbackDigest = fallbackDigest
return this
}
public fun fallbackPlaintextHash(fallbackPlaintextHash: ByteString?): Builder {
this.fallbackPlaintextHash = fallbackPlaintextHash
return this
}
public override fun build(): AttachmentDelete = AttachmentDelete(
conversation = conversation,
targetMessage = targetMessage,
uuid = uuid,
fallbackDigest = fallbackDigest,
fallbackPlaintextHash = fallbackPlaintextHash,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object :
ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
AttachmentDelete::class,
"type.googleapis.com/signalservice.SyncMessage.DeleteForMe.AttachmentDelete",
PROTO_2,
null,
"SignalService.proto"
) {
public override fun encodedSize(`value`: AttachmentDelete): Int {
var size = value.unknownFields.size
size += ConversationIdentifier.ADAPTER.encodedSizeWithTag(1, value.conversation)
size += AddressableMessage.ADAPTER.encodedSizeWithTag(2, value.targetMessage)
size += ProtoAdapter.BYTES.encodedSizeWithTag(3, value.uuid)
size += ProtoAdapter.BYTES.encodedSizeWithTag(4, value.fallbackDigest)
size += ProtoAdapter.BYTES.encodedSizeWithTag(5, value.fallbackPlaintextHash)
return size
}
public override fun encode(writer: ProtoWriter, `value`: AttachmentDelete): Unit {
ConversationIdentifier.ADAPTER.encodeWithTag(writer, 1, value.conversation)
AddressableMessage.ADAPTER.encodeWithTag(writer, 2, value.targetMessage)
ProtoAdapter.BYTES.encodeWithTag(writer, 3, value.uuid)
ProtoAdapter.BYTES.encodeWithTag(writer, 4, value.fallbackDigest)
ProtoAdapter.BYTES.encodeWithTag(writer, 5, value.fallbackPlaintextHash)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: AttachmentDelete): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.BYTES.encodeWithTag(writer, 5, value.fallbackPlaintextHash)
ProtoAdapter.BYTES.encodeWithTag(writer, 4, value.fallbackDigest)
ProtoAdapter.BYTES.encodeWithTag(writer, 3, value.uuid)
AddressableMessage.ADAPTER.encodeWithTag(writer, 2, value.targetMessage)
ConversationIdentifier.ADAPTER.encodeWithTag(writer, 1, value.conversation)
}
public override fun decode(reader: ProtoReader): AttachmentDelete {
var conversation: ConversationIdentifier? = null
var targetMessage: AddressableMessage? = null
var uuid: ByteString? = null
var fallbackDigest: ByteString? = null
var fallbackPlaintextHash: ByteString? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> conversation = ConversationIdentifier.ADAPTER.decode(reader)
2 -> targetMessage = AddressableMessage.ADAPTER.decode(reader)
3 -> uuid = ProtoAdapter.BYTES.decode(reader)
4 -> fallbackDigest = ProtoAdapter.BYTES.decode(reader)
5 -> fallbackPlaintextHash = ProtoAdapter.BYTES.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return AttachmentDelete(
conversation = conversation,
targetMessage = targetMessage,
uuid = uuid,
fallbackDigest = fallbackDigest,
fallbackPlaintextHash = fallbackPlaintextHash,
unknownFields = unknownFields
)
}
public override fun redact(`value`: AttachmentDelete): AttachmentDelete = value.copy(
conversation = value.conversation?.let(ConversationIdentifier.ADAPTER::redact),
targetMessage = value.targetMessage?.let(AddressableMessage.ADAPTER::redact),
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
public class ConversationDelete(
@field:WireField(
tag = 1,
adapter =
"org.whispersystems.signalservice.internal.push.SyncMessage${'$'}DeleteForMe${'$'}ConversationIdentifier#ADAPTER",
)
@JvmField
public val conversation: ConversationIdentifier? = null,
mostRecentMessages: List = emptyList(),
mostRecentNonExpiringMessages: List = emptyList(),
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
)
@JvmField
public val isFullDelete: Boolean? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message