commonMain.media.edge.ProducerCreateRequest.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.ProducerCreateRequest 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`.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 media.SessionDescription
import okio.ByteString
public class ProducerCreateRequest(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
)
public val kind: String = "",
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
label = WireField.Label.OMIT_IDENTITY,
)
public val paused: Boolean = false,
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "screenShare",
)
public val screen_share: Boolean = false,
@field:WireField(
tag = 4,
adapter = "media.SessionDescription#ADAPTER",
label = WireField.Label.OMIT_IDENTITY,
)
public val description: SessionDescription? = null,
@field:WireField(
tag = 5,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
)
public val msid: String = "",
/**
* JSON stringified
*/
@field:WireField(
tag = 6,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
jsonName = "appData",
)
public val app_data: String? = null,
@field:WireField(
tag = 7,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
jsonName = "mimeType",
)
public val mime_type: 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 ProducerCreateRequest) return false
if (unknownFields != other.unknownFields) return false
if (kind != other.kind) return false
if (paused != other.paused) return false
if (screen_share != other.screen_share) return false
if (description != other.description) return false
if (msid != other.msid) return false
if (app_data != other.app_data) return false
if (mime_type != other.mime_type) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + kind.hashCode()
result = result * 37 + paused.hashCode()
result = result * 37 + screen_share.hashCode()
result = result * 37 + (description?.hashCode() ?: 0)
result = result * 37 + msid.hashCode()
result = result * 37 + (app_data?.hashCode() ?: 0)
result = result * 37 + (mime_type?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
result += """kind=${sanitize(kind)}"""
result += """paused=$paused"""
result += """screen_share=$screen_share"""
if (description != null) result += """description=$description"""
result += """msid=${sanitize(msid)}"""
if (app_data != null) result += """app_data=${sanitize(app_data)}"""
if (mime_type != null) result += """mime_type=${sanitize(mime_type)}"""
return result.joinToString(prefix = "ProducerCreateRequest{", separator = ", ", postfix = "}")
}
public fun copy(
kind: String = this.kind,
paused: Boolean = this.paused,
screen_share: Boolean = this.screen_share,
description: SessionDescription? = this.description,
msid: String = this.msid,
app_data: String? = this.app_data,
mime_type: String? = this.mime_type,
unknownFields: ByteString = this.unknownFields,
): ProducerCreateRequest = ProducerCreateRequest(kind, paused, screen_share, description, msid,
app_data, mime_type, unknownFields)
public companion object {
public val ADAPTER: ProtoAdapter = object :
ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
ProducerCreateRequest::class,
"type.googleapis.com/media.edge.ProducerCreateRequest",
PROTO_3,
null,
"media/client_edge.proto"
) {
public override fun encodedSize(`value`: ProducerCreateRequest): Int {
var size = value.unknownFields.size
if (value.kind != "") size += ProtoAdapter.STRING.encodedSizeWithTag(1, value.kind)
if (value.paused != false) size += ProtoAdapter.BOOL.encodedSizeWithTag(2, value.paused)
if (value.screen_share != false) size += ProtoAdapter.BOOL.encodedSizeWithTag(3,
value.screen_share)
if (value.description != null) size += SessionDescription.ADAPTER.encodedSizeWithTag(4,
value.description)
if (value.msid != "") size += ProtoAdapter.STRING.encodedSizeWithTag(5, value.msid)
size += ProtoAdapter.STRING.encodedSizeWithTag(6, value.app_data)
size += ProtoAdapter.STRING.encodedSizeWithTag(7, value.mime_type)
return size
}
public override fun encode(writer: ProtoWriter, `value`: ProducerCreateRequest): Unit {
if (value.kind != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.kind)
if (value.paused != false) ProtoAdapter.BOOL.encodeWithTag(writer, 2, value.paused)
if (value.screen_share != false) ProtoAdapter.BOOL.encodeWithTag(writer, 3,
value.screen_share)
if (value.description != null) SessionDescription.ADAPTER.encodeWithTag(writer, 4,
value.description)
if (value.msid != "") ProtoAdapter.STRING.encodeWithTag(writer, 5, value.msid)
ProtoAdapter.STRING.encodeWithTag(writer, 6, value.app_data)
ProtoAdapter.STRING.encodeWithTag(writer, 7, value.mime_type)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: ProducerCreateRequest): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.STRING.encodeWithTag(writer, 7, value.mime_type)
ProtoAdapter.STRING.encodeWithTag(writer, 6, value.app_data)
if (value.msid != "") ProtoAdapter.STRING.encodeWithTag(writer, 5, value.msid)
if (value.description != null) SessionDescription.ADAPTER.encodeWithTag(writer, 4,
value.description)
if (value.screen_share != false) ProtoAdapter.BOOL.encodeWithTag(writer, 3,
value.screen_share)
if (value.paused != false) ProtoAdapter.BOOL.encodeWithTag(writer, 2, value.paused)
if (value.kind != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.kind)
}
public override fun decode(reader: ProtoReader): ProducerCreateRequest {
var kind: String = ""
var paused: Boolean = false
var screen_share: Boolean = false
var description: SessionDescription? = null
var msid: String = ""
var app_data: String? = null
var mime_type: String? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> kind = ProtoAdapter.STRING.decode(reader)
2 -> paused = ProtoAdapter.BOOL.decode(reader)
3 -> screen_share = ProtoAdapter.BOOL.decode(reader)
4 -> description = SessionDescription.ADAPTER.decode(reader)
5 -> msid = ProtoAdapter.STRING.decode(reader)
6 -> app_data = ProtoAdapter.STRING.decode(reader)
7 -> mime_type = ProtoAdapter.STRING.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return ProducerCreateRequest(
kind = kind,
paused = paused,
screen_share = screen_share,
description = description,
msid = msid,
app_data = app_data,
mime_type = mime_type,
unknownFields = unknownFields
)
}
public override fun redact(`value`: ProducerCreateRequest): ProducerCreateRequest =
value.copy(
description = value.description?.let(SessionDescription.ADAPTER::redact),
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}