commonMain.media.edge.GetRoomStateResponse.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: media.edge.GetRoomStateResponse in media/client_edge.proto
package media.edge
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`.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 kotlin.collections.List
import okio.ByteString
/**
* *****************************************************************************************
* ********************************* Message Sub-Responses *********************************
* *****************************************************************************************
* GetRoomStateResponse contains the room state sent by the hub
*/
public class GetRoomStateResponse(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "displayTitle",
)
public val display_title: String = "",
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "lockedMode",
)
public val locked_mode: Boolean = false,
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "roomUuid",
)
public val room_uuid: String = "",
@field:WireField(
tag = 4,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "roomName",
)
public val room_name: String = "",
@field:WireField(
tag = 5,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "currentPeerId",
)
public val current_peer_id: String = "",
@field:WireField(
tag = 6,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
jsonName = "isRecording",
)
public val is_recording: Boolean? = null,
@field:WireField(
tag = 7,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
jsonName = "recorderParticipantId",
)
public val recorder_participant_id: String? = null,
pinned_peer_ids: List = emptyList(),
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
@field:WireField(
tag = 8,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.REPEATED,
jsonName = "pinnedPeerIds",
)
public val pinned_peer_ids: List = immutableCopyOf("pinned_peer_ids", pinned_peer_ids)
@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 GetRoomStateResponse) return false
if (unknownFields != other.unknownFields) return false
if (display_title != other.display_title) return false
if (locked_mode != other.locked_mode) return false
if (room_uuid != other.room_uuid) return false
if (room_name != other.room_name) return false
if (current_peer_id != other.current_peer_id) return false
if (is_recording != other.is_recording) return false
if (recorder_participant_id != other.recorder_participant_id) return false
if (pinned_peer_ids != other.pinned_peer_ids) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + display_title.hashCode()
result = result * 37 + locked_mode.hashCode()
result = result * 37 + room_uuid.hashCode()
result = result * 37 + room_name.hashCode()
result = result * 37 + current_peer_id.hashCode()
result = result * 37 + (is_recording?.hashCode() ?: 0)
result = result * 37 + (recorder_participant_id?.hashCode() ?: 0)
result = result * 37 + pinned_peer_ids.hashCode()
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
result += """display_title=${sanitize(display_title)}"""
result += """locked_mode=$locked_mode"""
result += """room_uuid=${sanitize(room_uuid)}"""
result += """room_name=${sanitize(room_name)}"""
result += """current_peer_id=${sanitize(current_peer_id)}"""
if (is_recording != null) result += """is_recording=$is_recording"""
if (recorder_participant_id != null) result +=
"""recorder_participant_id=${sanitize(recorder_participant_id)}"""
if (pinned_peer_ids.isNotEmpty()) result += """pinned_peer_ids=${sanitize(pinned_peer_ids)}"""
return result.joinToString(prefix = "GetRoomStateResponse{", separator = ", ", postfix = "}")
}
public fun copy(
display_title: String = this.display_title,
locked_mode: Boolean = this.locked_mode,
room_uuid: String = this.room_uuid,
room_name: String = this.room_name,
current_peer_id: String = this.current_peer_id,
is_recording: Boolean? = this.is_recording,
recorder_participant_id: String? = this.recorder_participant_id,
pinned_peer_ids: List = this.pinned_peer_ids,
unknownFields: ByteString = this.unknownFields,
): GetRoomStateResponse = GetRoomStateResponse(display_title, locked_mode, room_uuid, room_name,
current_peer_id, is_recording, recorder_participant_id, pinned_peer_ids, unknownFields)
public companion object {
public val ADAPTER: ProtoAdapter = object :
ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
GetRoomStateResponse::class,
"type.googleapis.com/media.edge.GetRoomStateResponse",
PROTO_3,
null,
"media/client_edge.proto"
) {
public override fun encodedSize(`value`: GetRoomStateResponse): Int {
var size = value.unknownFields.size
if (value.display_title != "") size += ProtoAdapter.STRING.encodedSizeWithTag(1,
value.display_title)
if (value.locked_mode != false) size += ProtoAdapter.BOOL.encodedSizeWithTag(2,
value.locked_mode)
if (value.room_uuid != "") size += ProtoAdapter.STRING.encodedSizeWithTag(3,
value.room_uuid)
if (value.room_name != "") size += ProtoAdapter.STRING.encodedSizeWithTag(4,
value.room_name)
if (value.current_peer_id != "") size += ProtoAdapter.STRING.encodedSizeWithTag(5,
value.current_peer_id)
size += ProtoAdapter.BOOL.encodedSizeWithTag(6, value.is_recording)
size += ProtoAdapter.STRING.encodedSizeWithTag(7, value.recorder_participant_id)
size += ProtoAdapter.STRING.asRepeated().encodedSizeWithTag(8, value.pinned_peer_ids)
return size
}
public override fun encode(writer: ProtoWriter, `value`: GetRoomStateResponse): Unit {
if (value.display_title != "") ProtoAdapter.STRING.encodeWithTag(writer, 1,
value.display_title)
if (value.locked_mode != false) ProtoAdapter.BOOL.encodeWithTag(writer, 2,
value.locked_mode)
if (value.room_uuid != "") ProtoAdapter.STRING.encodeWithTag(writer, 3, value.room_uuid)
if (value.room_name != "") ProtoAdapter.STRING.encodeWithTag(writer, 4, value.room_name)
if (value.current_peer_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 5,
value.current_peer_id)
ProtoAdapter.BOOL.encodeWithTag(writer, 6, value.is_recording)
ProtoAdapter.STRING.encodeWithTag(writer, 7, value.recorder_participant_id)
ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 8, value.pinned_peer_ids)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: GetRoomStateResponse): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 8, value.pinned_peer_ids)
ProtoAdapter.STRING.encodeWithTag(writer, 7, value.recorder_participant_id)
ProtoAdapter.BOOL.encodeWithTag(writer, 6, value.is_recording)
if (value.current_peer_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 5,
value.current_peer_id)
if (value.room_name != "") ProtoAdapter.STRING.encodeWithTag(writer, 4, value.room_name)
if (value.room_uuid != "") ProtoAdapter.STRING.encodeWithTag(writer, 3, value.room_uuid)
if (value.locked_mode != false) ProtoAdapter.BOOL.encodeWithTag(writer, 2,
value.locked_mode)
if (value.display_title != "") ProtoAdapter.STRING.encodeWithTag(writer, 1,
value.display_title)
}
public override fun decode(reader: ProtoReader): GetRoomStateResponse {
var display_title: String = ""
var locked_mode: Boolean = false
var room_uuid: String = ""
var room_name: String = ""
var current_peer_id: String = ""
var is_recording: Boolean? = null
var recorder_participant_id: String? = null
val pinned_peer_ids = mutableListOf()
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> display_title = ProtoAdapter.STRING.decode(reader)
2 -> locked_mode = ProtoAdapter.BOOL.decode(reader)
3 -> room_uuid = ProtoAdapter.STRING.decode(reader)
4 -> room_name = ProtoAdapter.STRING.decode(reader)
5 -> current_peer_id = ProtoAdapter.STRING.decode(reader)
6 -> is_recording = ProtoAdapter.BOOL.decode(reader)
7 -> recorder_participant_id = ProtoAdapter.STRING.decode(reader)
8 -> pinned_peer_ids.add(ProtoAdapter.STRING.decode(reader))
else -> reader.readUnknownField(tag)
}
}
return GetRoomStateResponse(
display_title = display_title,
locked_mode = locked_mode,
room_uuid = room_uuid,
room_name = room_name,
current_peer_id = current_peer_id,
is_recording = is_recording,
recorder_participant_id = recorder_participant_id,
pinned_peer_ids = pinned_peer_ids,
unknownFields = unknownFields
)
}
public override fun redact(`value`: GetRoomStateResponse): GetRoomStateResponse = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}