commonMain.media.edge.RoomParticipants.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.RoomParticipants 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`.redactElements
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 media.PeerRtpCapabilitites
import media.ProducerState
import okio.ByteString
public class RoomParticipants(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "peerId",
)
public val peer_id: String = "",
producer_states: List = emptyList(),
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "displayName",
)
public val display_name: String = "",
@field:WireField(
tag = 4,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
jsonName = "userId",
)
public val user_id: String? = null,
@field:WireField(
tag = 5,
adapter = "media.PeerRtpCapabilitites#ADAPTER",
)
public val capabilities: PeerRtpCapabilitites? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
@field:WireField(
tag = 2,
adapter = "media.ProducerState#ADAPTER",
label = WireField.Label.REPEATED,
jsonName = "producerStates",
)
public val producer_states: List = immutableCopyOf("producer_states",
producer_states)
@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 RoomParticipants) return false
if (unknownFields != other.unknownFields) return false
if (peer_id != other.peer_id) return false
if (producer_states != other.producer_states) return false
if (display_name != other.display_name) return false
if (user_id != other.user_id) return false
if (capabilities != other.capabilities) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + peer_id.hashCode()
result = result * 37 + producer_states.hashCode()
result = result * 37 + display_name.hashCode()
result = result * 37 + (user_id?.hashCode() ?: 0)
result = result * 37 + (capabilities?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
result += """peer_id=${sanitize(peer_id)}"""
if (producer_states.isNotEmpty()) result += """producer_states=$producer_states"""
result += """display_name=${sanitize(display_name)}"""
if (user_id != null) result += """user_id=${sanitize(user_id)}"""
if (capabilities != null) result += """capabilities=$capabilities"""
return result.joinToString(prefix = "RoomParticipants{", separator = ", ", postfix = "}")
}
public fun copy(
peer_id: String = this.peer_id,
producer_states: List = this.producer_states,
display_name: String = this.display_name,
user_id: String? = this.user_id,
capabilities: PeerRtpCapabilitites? = this.capabilities,
unknownFields: ByteString = this.unknownFields,
): RoomParticipants = RoomParticipants(peer_id, producer_states, display_name, user_id,
capabilities, unknownFields)
public companion object {
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
RoomParticipants::class,
"type.googleapis.com/media.edge.RoomParticipants",
PROTO_3,
null,
"media/client_edge.proto"
) {
public override fun encodedSize(`value`: RoomParticipants): Int {
var size = value.unknownFields.size
if (value.peer_id != "") size += ProtoAdapter.STRING.encodedSizeWithTag(1, value.peer_id)
size += ProducerState.ADAPTER.asRepeated().encodedSizeWithTag(2, value.producer_states)
if (value.display_name != "") size += ProtoAdapter.STRING.encodedSizeWithTag(3,
value.display_name)
size += ProtoAdapter.STRING.encodedSizeWithTag(4, value.user_id)
size += PeerRtpCapabilitites.ADAPTER.encodedSizeWithTag(5, value.capabilities)
return size
}
public override fun encode(writer: ProtoWriter, `value`: RoomParticipants): Unit {
if (value.peer_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.peer_id)
ProducerState.ADAPTER.asRepeated().encodeWithTag(writer, 2, value.producer_states)
if (value.display_name != "") ProtoAdapter.STRING.encodeWithTag(writer, 3,
value.display_name)
ProtoAdapter.STRING.encodeWithTag(writer, 4, value.user_id)
PeerRtpCapabilitites.ADAPTER.encodeWithTag(writer, 5, value.capabilities)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: RoomParticipants): Unit {
writer.writeBytes(value.unknownFields)
PeerRtpCapabilitites.ADAPTER.encodeWithTag(writer, 5, value.capabilities)
ProtoAdapter.STRING.encodeWithTag(writer, 4, value.user_id)
if (value.display_name != "") ProtoAdapter.STRING.encodeWithTag(writer, 3,
value.display_name)
ProducerState.ADAPTER.asRepeated().encodeWithTag(writer, 2, value.producer_states)
if (value.peer_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.peer_id)
}
public override fun decode(reader: ProtoReader): RoomParticipants {
var peer_id: String = ""
val producer_states = mutableListOf()
var display_name: String = ""
var user_id: String? = null
var capabilities: PeerRtpCapabilitites? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> peer_id = ProtoAdapter.STRING.decode(reader)
2 -> producer_states.add(ProducerState.ADAPTER.decode(reader))
3 -> display_name = ProtoAdapter.STRING.decode(reader)
4 -> user_id = ProtoAdapter.STRING.decode(reader)
5 -> capabilities = PeerRtpCapabilitites.ADAPTER.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return RoomParticipants(
peer_id = peer_id,
producer_states = producer_states,
display_name = display_name,
user_id = user_id,
capabilities = capabilities,
unknownFields = unknownFields
)
}
public override fun redact(`value`: RoomParticipants): RoomParticipants = value.copy(
producer_states = value.producer_states.redactElements(ProducerState.ADAPTER),
capabilities = value.capabilities?.let(PeerRtpCapabilitites.ADAPTER::redact),
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}