
commonMain.socket.chat.GetPaginatedChatMessageRoomRequest.kt Maven / Gradle / Ivy
// Code generated by Wire protocol buffer compiler, do not edit.
// Source: socket.chat.GetPaginatedChatMessageRoomRequest 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 GetPaginatedChatMessageRoomRequest(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#UINT64",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "timeStamp",
)
public val time_stamp: Long = 0L,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#INT32",
label = WireField.Label.OMIT_IDENTITY,
)
public val size: Int = 0,
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#INT32",
label = WireField.Label.OMIT_IDENTITY,
)
public val from: Int = 0,
@field:WireField(
tag = 4,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
label = WireField.Label.OMIT_IDENTITY,
)
public val reversed: Boolean = false,
@field:WireField(
tag = 5,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
jsonName = "channelId",
)
public val channel_id: String? = null,
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 GetPaginatedChatMessageRoomRequest) return false
if (unknownFields != other.unknownFields) return false
if (time_stamp != other.time_stamp) return false
if (size != other.size) return false
if (from != other.from) return false
if (reversed != other.reversed) return false
if (channel_id != other.channel_id) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + time_stamp.hashCode()
result = result * 37 + size.hashCode()
result = result * 37 + from.hashCode()
result = result * 37 + reversed.hashCode()
result = result * 37 + (channel_id?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
result += """time_stamp=$time_stamp"""
result += """size=$size"""
result += """from=$from"""
result += """reversed=$reversed"""
if (channel_id != null) result += """channel_id=${sanitize(channel_id)}"""
return result.joinToString(prefix = "GetPaginatedChatMessageRoomRequest{", separator = ", ",
postfix = "}")
}
public fun copy(
time_stamp: Long = this.time_stamp,
size: Int = this.size,
from: Int = this.from,
reversed: Boolean = this.reversed,
channel_id: String? = this.channel_id,
unknownFields: ByteString = this.unknownFields,
): GetPaginatedChatMessageRoomRequest = GetPaginatedChatMessageRoomRequest(time_stamp, size, from,
reversed, channel_id, unknownFields)
public companion object {
public val ADAPTER: ProtoAdapter = object :
ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
GetPaginatedChatMessageRoomRequest::class,
"type.googleapis.com/socket.chat.GetPaginatedChatMessageRoomRequest",
PROTO_3,
null,
"socket/chat.proto"
) {
public override fun encodedSize(`value`: GetPaginatedChatMessageRoomRequest): Int {
var size_ = value.unknownFields.size
if (value.time_stamp != 0L) size_ += ProtoAdapter.UINT64.encodedSizeWithTag(1,
value.time_stamp)
if (value.size != 0) size_ += ProtoAdapter.INT32.encodedSizeWithTag(2, value.size)
if (value.from != 0) size_ += ProtoAdapter.INT32.encodedSizeWithTag(3, value.from)
if (value.reversed != false) size_ += ProtoAdapter.BOOL.encodedSizeWithTag(4,
value.reversed)
size_ += ProtoAdapter.STRING.encodedSizeWithTag(5, value.channel_id)
return size_
}
public override fun encode(writer: ProtoWriter, `value`: GetPaginatedChatMessageRoomRequest):
Unit {
if (value.time_stamp != 0L) ProtoAdapter.UINT64.encodeWithTag(writer, 1, value.time_stamp)
if (value.size != 0) ProtoAdapter.INT32.encodeWithTag(writer, 2, value.size)
if (value.from != 0) ProtoAdapter.INT32.encodeWithTag(writer, 3, value.from)
if (value.reversed != false) ProtoAdapter.BOOL.encodeWithTag(writer, 4, value.reversed)
ProtoAdapter.STRING.encodeWithTag(writer, 5, value.channel_id)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter,
`value`: GetPaginatedChatMessageRoomRequest): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.STRING.encodeWithTag(writer, 5, value.channel_id)
if (value.reversed != false) ProtoAdapter.BOOL.encodeWithTag(writer, 4, value.reversed)
if (value.from != 0) ProtoAdapter.INT32.encodeWithTag(writer, 3, value.from)
if (value.size != 0) ProtoAdapter.INT32.encodeWithTag(writer, 2, value.size)
if (value.time_stamp != 0L) ProtoAdapter.UINT64.encodeWithTag(writer, 1, value.time_stamp)
}
public override fun decode(reader: ProtoReader): GetPaginatedChatMessageRoomRequest {
var time_stamp: Long = 0L
var size: Int = 0
var from: Int = 0
var reversed: Boolean = false
var channel_id: String? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> time_stamp = ProtoAdapter.UINT64.decode(reader)
2 -> size = ProtoAdapter.INT32.decode(reader)
3 -> from = ProtoAdapter.INT32.decode(reader)
4 -> reversed = ProtoAdapter.BOOL.decode(reader)
5 -> channel_id = ProtoAdapter.STRING.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return GetPaginatedChatMessageRoomRequest(
time_stamp = time_stamp,
size = size,
from = from,
reversed = reversed,
channel_id = channel_id,
unknownFields = unknownFields
)
}
public override fun redact(`value`: GetPaginatedChatMessageRoomRequest):
GetPaginatedChatMessageRoomRequest = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy