commonMain.ai.gateway.PeerResponse.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: ai.gateway.PeerResponse in ai/gateway.proto
package ai.gateway
import com.squareup.wire.AnyMessage
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
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 PeerResponse(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "peerId",
)
public val peer_id: String = "",
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "userId",
)
public val user_id: String = "",
@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",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "roomUuid",
)
public val room_uuid: String = "",
@field:WireField(
tag = 5,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "organizationId",
)
public val organization_id: String = "",
@field:WireField(
tag = 6,
adapter = "com.squareup.wire.AnyMessage#ADAPTER",
label = WireField.Label.OMIT_IDENTITY,
)
public val permission: AnyMessage? = null,
@field:WireField(
tag = 7,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "customParticipantId",
)
public val custom_participant_id: String = "",
@field:WireField(
tag = 8,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "presetId",
)
public val preset_id: String = "",
@field:WireField(
tag = 9,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "displayPictureUrl",
)
public val display_picture_url: String = "",
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 PeerResponse) return false
if (unknownFields != other.unknownFields) return false
if (peer_id != other.peer_id) return false
if (user_id != other.user_id) return false
if (display_name != other.display_name) return false
if (room_uuid != other.room_uuid) return false
if (organization_id != other.organization_id) return false
if (permission != other.permission) return false
if (custom_participant_id != other.custom_participant_id) return false
if (preset_id != other.preset_id) return false
if (display_picture_url != other.display_picture_url) 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 + user_id.hashCode()
result = result * 37 + display_name.hashCode()
result = result * 37 + room_uuid.hashCode()
result = result * 37 + organization_id.hashCode()
result = result * 37 + (permission?.hashCode() ?: 0)
result = result * 37 + custom_participant_id.hashCode()
result = result * 37 + preset_id.hashCode()
result = result * 37 + display_picture_url.hashCode()
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
result += """peer_id=${sanitize(peer_id)}"""
result += """user_id=${sanitize(user_id)}"""
result += """display_name=${sanitize(display_name)}"""
result += """room_uuid=${sanitize(room_uuid)}"""
result += """organization_id=${sanitize(organization_id)}"""
if (permission != null) result += """permission=$permission"""
result += """custom_participant_id=${sanitize(custom_participant_id)}"""
result += """preset_id=${sanitize(preset_id)}"""
result += """display_picture_url=${sanitize(display_picture_url)}"""
return result.joinToString(prefix = "PeerResponse{", separator = ", ", postfix = "}")
}
public fun copy(
peer_id: String = this.peer_id,
user_id: String = this.user_id,
display_name: String = this.display_name,
room_uuid: String = this.room_uuid,
organization_id: String = this.organization_id,
permission: AnyMessage? = this.permission,
custom_participant_id: String = this.custom_participant_id,
preset_id: String = this.preset_id,
display_picture_url: String = this.display_picture_url,
unknownFields: ByteString = this.unknownFields,
): PeerResponse = PeerResponse(peer_id, user_id, display_name, room_uuid, organization_id,
permission, custom_participant_id, preset_id, display_picture_url, unknownFields)
public companion object {
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
PeerResponse::class,
"type.googleapis.com/ai.gateway.PeerResponse",
PROTO_3,
null,
"ai/gateway.proto"
) {
public override fun encodedSize(`value`: PeerResponse): Int {
var size = value.unknownFields.size
if (value.peer_id != "") size += ProtoAdapter.STRING.encodedSizeWithTag(1, value.peer_id)
if (value.user_id != "") size += ProtoAdapter.STRING.encodedSizeWithTag(2, value.user_id)
if (value.display_name != "") size += ProtoAdapter.STRING.encodedSizeWithTag(3,
value.display_name)
if (value.room_uuid != "") size += ProtoAdapter.STRING.encodedSizeWithTag(4,
value.room_uuid)
if (value.organization_id != "") size += ProtoAdapter.STRING.encodedSizeWithTag(5,
value.organization_id)
if (value.permission != null) size += AnyMessage.ADAPTER.encodedSizeWithTag(6,
value.permission)
if (value.custom_participant_id != "") size += ProtoAdapter.STRING.encodedSizeWithTag(7,
value.custom_participant_id)
if (value.preset_id != "") size += ProtoAdapter.STRING.encodedSizeWithTag(8,
value.preset_id)
if (value.display_picture_url != "") size += ProtoAdapter.STRING.encodedSizeWithTag(9,
value.display_picture_url)
return size
}
public override fun encode(writer: ProtoWriter, `value`: PeerResponse): Unit {
if (value.peer_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.peer_id)
if (value.user_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 2, value.user_id)
if (value.display_name != "") ProtoAdapter.STRING.encodeWithTag(writer, 3,
value.display_name)
if (value.room_uuid != "") ProtoAdapter.STRING.encodeWithTag(writer, 4, value.room_uuid)
if (value.organization_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 5,
value.organization_id)
if (value.permission != null) AnyMessage.ADAPTER.encodeWithTag(writer, 6, value.permission)
if (value.custom_participant_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 7,
value.custom_participant_id)
if (value.preset_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 8, value.preset_id)
if (value.display_picture_url != "") ProtoAdapter.STRING.encodeWithTag(writer, 9,
value.display_picture_url)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: PeerResponse): Unit {
writer.writeBytes(value.unknownFields)
if (value.display_picture_url != "") ProtoAdapter.STRING.encodeWithTag(writer, 9,
value.display_picture_url)
if (value.preset_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 8, value.preset_id)
if (value.custom_participant_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 7,
value.custom_participant_id)
if (value.permission != null) AnyMessage.ADAPTER.encodeWithTag(writer, 6, value.permission)
if (value.organization_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 5,
value.organization_id)
if (value.room_uuid != "") ProtoAdapter.STRING.encodeWithTag(writer, 4, value.room_uuid)
if (value.display_name != "") ProtoAdapter.STRING.encodeWithTag(writer, 3,
value.display_name)
if (value.user_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 2, value.user_id)
if (value.peer_id != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.peer_id)
}
public override fun decode(reader: ProtoReader): PeerResponse {
var peer_id: String = ""
var user_id: String = ""
var display_name: String = ""
var room_uuid: String = ""
var organization_id: String = ""
var permission: AnyMessage? = null
var custom_participant_id: String = ""
var preset_id: String = ""
var display_picture_url: String = ""
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> peer_id = ProtoAdapter.STRING.decode(reader)
2 -> user_id = ProtoAdapter.STRING.decode(reader)
3 -> display_name = ProtoAdapter.STRING.decode(reader)
4 -> room_uuid = ProtoAdapter.STRING.decode(reader)
5 -> organization_id = ProtoAdapter.STRING.decode(reader)
6 -> permission = AnyMessage.ADAPTER.decode(reader)
7 -> custom_participant_id = ProtoAdapter.STRING.decode(reader)
8 -> preset_id = ProtoAdapter.STRING.decode(reader)
9 -> display_picture_url = ProtoAdapter.STRING.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return PeerResponse(
peer_id = peer_id,
user_id = user_id,
display_name = display_name,
room_uuid = room_uuid,
organization_id = organization_id,
permission = permission,
custom_participant_id = custom_participant_id,
preset_id = preset_id,
display_picture_url = display_picture_url,
unknownFields = unknownFields
)
}
public override fun redact(`value`: PeerResponse): PeerResponse = value.copy(
permission = value.permission?.let(AnyMessage.ADAPTER::redact),
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
public class Preset(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.AnyMessage#ADAPTER",
label = WireField.Label.OMIT_IDENTITY,
)
public val permission: AnyMessage? = null,
@field:WireField(
tag = 2,
adapter = "com.squareup.wire.AnyMessage#ADAPTER",
label = WireField.Label.OMIT_IDENTITY,
)
public val theme: AnyMessage? = null,
@field:WireField(
tag = 3,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
)
public val version: String = "",
@field:WireField(
tag = 4,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
label = WireField.Label.OMIT_IDENTITY,
jsonName = "presetName",
)
public val preset_name: String = "",
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 Preset) return false
if (unknownFields != other.unknownFields) return false
if (permission != other.permission) return false
if (theme != other.theme) return false
if (version != other.version) return false
if (preset_name != other.preset_name) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (permission?.hashCode() ?: 0)
result = result * 37 + (theme?.hashCode() ?: 0)
result = result * 37 + version.hashCode()
result = result * 37 + preset_name.hashCode()
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (permission != null) result += """permission=$permission"""
if (theme != null) result += """theme=$theme"""
result += """version=${sanitize(version)}"""
result += """preset_name=${sanitize(preset_name)}"""
return result.joinToString(prefix = "Preset{", separator = ", ", postfix = "}")
}
public fun copy(
permission: AnyMessage? = this.permission,
theme: AnyMessage? = this.theme,
version: String = this.version,
preset_name: String = this.preset_name,
unknownFields: ByteString = this.unknownFields,
): Preset = Preset(permission, theme, version, preset_name, unknownFields)
public companion object {
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
Preset::class,
"type.googleapis.com/ai.gateway.PeerResponse.Preset",
PROTO_3,
null,
"ai/gateway.proto"
) {
public override fun encodedSize(`value`: Preset): Int {
var size = value.unknownFields.size
if (value.permission != null) size += AnyMessage.ADAPTER.encodedSizeWithTag(1,
value.permission)
if (value.theme != null) size += AnyMessage.ADAPTER.encodedSizeWithTag(2, value.theme)
if (value.version != "") size += ProtoAdapter.STRING.encodedSizeWithTag(3, value.version)
if (value.preset_name != "") size += ProtoAdapter.STRING.encodedSizeWithTag(4,
value.preset_name)
return size
}
public override fun encode(writer: ProtoWriter, `value`: Preset): Unit {
if (value.permission != null) AnyMessage.ADAPTER.encodeWithTag(writer, 1,
value.permission)
if (value.theme != null) AnyMessage.ADAPTER.encodeWithTag(writer, 2, value.theme)
if (value.version != "") ProtoAdapter.STRING.encodeWithTag(writer, 3, value.version)
if (value.preset_name != "") ProtoAdapter.STRING.encodeWithTag(writer, 4,
value.preset_name)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: Preset): Unit {
writer.writeBytes(value.unknownFields)
if (value.preset_name != "") ProtoAdapter.STRING.encodeWithTag(writer, 4,
value.preset_name)
if (value.version != "") ProtoAdapter.STRING.encodeWithTag(writer, 3, value.version)
if (value.theme != null) AnyMessage.ADAPTER.encodeWithTag(writer, 2, value.theme)
if (value.permission != null) AnyMessage.ADAPTER.encodeWithTag(writer, 1,
value.permission)
}
public override fun decode(reader: ProtoReader): Preset {
var permission: AnyMessage? = null
var theme: AnyMessage? = null
var version: String = ""
var preset_name: String = ""
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> permission = AnyMessage.ADAPTER.decode(reader)
2 -> theme = AnyMessage.ADAPTER.decode(reader)
3 -> version = ProtoAdapter.STRING.decode(reader)
4 -> preset_name = ProtoAdapter.STRING.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return Preset(
permission = permission,
theme = theme,
version = version,
preset_name = preset_name,
unknownFields = unknownFields
)
}
public override fun redact(`value`: Preset): Preset = value.copy(
permission = value.permission?.let(AnyMessage.ADAPTER::redact),
theme = value.theme?.let(AnyMessage.ADAPTER::redact),
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
}