
commonMain.socket.chat.MarkChannelIndexAsReadRequest.kt Maven / Gradle / Ivy
// Code generated by Wire protocol buffer compiler, do not edit.
// Source: socket.chat.MarkChannelIndexAsReadRequest in socket/chat.proto
package socket.chat
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.PROTO_3
import com.squareup.wire.WireField
import com.squareup.wire.`internal`.sanitize
import kotlin.Any
import kotlin.AssertionError
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.DeprecationLevel
import kotlin.Int
import kotlin.Long
import kotlin.Nothing
import kotlin.String
import kotlin.Unit
import okio.ByteString
public class MarkChannelIndexAsReadRequest(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "channelId",
)
public val channel_id: String = "",
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "userId",
)
public val user_id: String = "",
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "channelIndex",
)
public val channel_index: String = "",
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
@Deprecated(
message = "Shouldn't be used in Kotlin",
level = DeprecationLevel.HIDDEN,
)
public override fun newBuilder(): Nothing = throw
AssertionError("Builders are deprecated and only available in a javaInterop build; see https://square.github.io/wire/wire_compiler/#kotlin")
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is MarkChannelIndexAsReadRequest) return false
if (unknownFields != other.unknownFields) return false
if (channel_id != other.channel_id) return false
if (user_id != other.user_id) return false
if (channel_index != other.channel_index) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + channel_id.hashCode()
result = result * 37 + user_id.hashCode()
result = result * 37 + channel_index.hashCode()
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
result += """channel_id=${sanitize(channel_id)}"""
result += """user_id=${sanitize(user_id)}"""
result += """channel_index=${sanitize(channel_index)}"""
return result.joinToString(prefix = "MarkChannelIndexAsReadRequest{", separator = ", ", postfix
= "}")
}
public fun copy(
channel_id: String = this.channel_id,
user_id: String = this.user_id,
channel_index: String = this.channel_index,
unknownFields: ByteString = this.unknownFields,
): MarkChannelIndexAsReadRequest = MarkChannelIndexAsReadRequest(channel_id, user_id,
channel_index, unknownFields)
public companion object {
public val ADAPTER: ProtoAdapter = object :
ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
MarkChannelIndexAsReadRequest::class,
"type.googleapis.com/socket.chat.MarkChannelIndexAsReadRequest",
PROTO_3,
null,
"socket/chat.proto"
) {
public override fun encodedSize(`value`: MarkChannelIndexAsReadRequest): Int {
var size = value.unknownFields.size
if (value.channel_id != "") size += ProtoAdapter.STRING.encodedSizeWithTag(1,
value.channel_id)
if (value.user_id != "") size += ProtoAdapter.STRING.encodedSizeWithTag(2, value.user_id)
if (value.channel_index != "") size += ProtoAdapter.STRING.encodedSizeWithTag(3,
value.channel_index)
return size
}
public override fun encode(writer: ProtoWriter, `value`: MarkChannelIndexAsReadRequest):
Unit {
if (value.channel_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.channel_id)
if (value.user_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 2, value.user_id)
if (value.channel_index != "") ProtoAdapter.STRING.encodeWithTag(writer, 3,
value.channel_index)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter,
`value`: MarkChannelIndexAsReadRequest): Unit {
writer.writeBytes(value.unknownFields)
if (value.channel_index != "") ProtoAdapter.STRING.encodeWithTag(writer, 3,
value.channel_index)
if (value.user_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 2, value.user_id)
if (value.channel_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.channel_id)
}
public override fun decode(reader: ProtoReader): MarkChannelIndexAsReadRequest {
var channel_id: String = ""
var user_id: String = ""
var channel_index: String = ""
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> channel_id = ProtoAdapter.STRING.decode(reader)
2 -> user_id = ProtoAdapter.STRING.decode(reader)
3 -> channel_index = ProtoAdapter.STRING.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return MarkChannelIndexAsReadRequest(
channel_id = channel_id,
user_id = user_id,
channel_index = channel_index,
unknownFields = unknownFields
)
}
public override fun redact(`value`: MarkChannelIndexAsReadRequest):
MarkChannelIndexAsReadRequest = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy