commonMain.socket.room.GetConnectedRoomsDumpResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-entities Show documentation
Show all versions of proto-entities Show documentation
KMP package which exports compiled protobuf entities to be used by other repos
// Code generated by Wire protocol buffer compiler, do not edit.
// Source: socket.room.GetConnectedRoomsDumpResponse in socket/room.proto
package socket.room
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`.immutableCopyOf
import com.squareup.wire.`internal`.redactElements
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 kotlin.collections.List
import okio.ByteString
public class GetConnectedRoomsDumpResponse(
@field:WireField(
tag = 1,
adapter = "socket.room.ConnectedMeetingDump#ADAPTER",
jsonName = "parentMeeting",
)
public val parent_meeting: ConnectedMeetingDump? = null,
meetings: List = emptyList(),
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
@field:WireField(
tag = 2,
adapter = "socket.room.ConnectedMeetingDump#ADAPTER",
label = WireField.Label.REPEATED,
)
public val meetings: List = immutableCopyOf("meetings", meetings)
@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 GetConnectedRoomsDumpResponse) return false
if (unknownFields != other.unknownFields) return false
if (parent_meeting != other.parent_meeting) return false
if (meetings != other.meetings) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (parent_meeting?.hashCode() ?: 0)
result = result * 37 + meetings.hashCode()
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (parent_meeting != null) result += """parent_meeting=$parent_meeting"""
if (meetings.isNotEmpty()) result += """meetings=$meetings"""
return result.joinToString(prefix = "GetConnectedRoomsDumpResponse{", separator = ", ", postfix
= "}")
}
public fun copy(
parent_meeting: ConnectedMeetingDump? = this.parent_meeting,
meetings: List = this.meetings,
unknownFields: ByteString = this.unknownFields,
): GetConnectedRoomsDumpResponse = GetConnectedRoomsDumpResponse(parent_meeting, meetings,
unknownFields)
public companion object {
public val ADAPTER: ProtoAdapter = object :
ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
GetConnectedRoomsDumpResponse::class,
"type.googleapis.com/socket.room.GetConnectedRoomsDumpResponse",
PROTO_3,
null,
"socket/room.proto"
) {
public override fun encodedSize(`value`: GetConnectedRoomsDumpResponse): Int {
var size = value.unknownFields.size
size += ConnectedMeetingDump.ADAPTER.encodedSizeWithTag(1, value.parent_meeting)
size += ConnectedMeetingDump.ADAPTER.asRepeated().encodedSizeWithTag(2, value.meetings)
return size
}
public override fun encode(writer: ProtoWriter, `value`: GetConnectedRoomsDumpResponse):
Unit {
ConnectedMeetingDump.ADAPTER.encodeWithTag(writer, 1, value.parent_meeting)
ConnectedMeetingDump.ADAPTER.asRepeated().encodeWithTag(writer, 2, value.meetings)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter,
`value`: GetConnectedRoomsDumpResponse): Unit {
writer.writeBytes(value.unknownFields)
ConnectedMeetingDump.ADAPTER.asRepeated().encodeWithTag(writer, 2, value.meetings)
ConnectedMeetingDump.ADAPTER.encodeWithTag(writer, 1, value.parent_meeting)
}
public override fun decode(reader: ProtoReader): GetConnectedRoomsDumpResponse {
var parent_meeting: ConnectedMeetingDump? = null
val meetings = mutableListOf()
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> parent_meeting = ConnectedMeetingDump.ADAPTER.decode(reader)
2 -> meetings.add(ConnectedMeetingDump.ADAPTER.decode(reader))
else -> reader.readUnknownField(tag)
}
}
return GetConnectedRoomsDumpResponse(
parent_meeting = parent_meeting,
meetings = meetings,
unknownFields = unknownFields
)
}
public override fun redact(`value`: GetConnectedRoomsDumpResponse):
GetConnectedRoomsDumpResponse = value.copy(
parent_meeting = value.parent_meeting?.let(ConnectedMeetingDump.ADAPTER::redact),
meetings = value.meetings.redactElements(ConnectedMeetingDump.ADAPTER),
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}