All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.ai.gateway.SessionSettings.kt Maven / Gradle / Ivy

Go to download

KMP package which exports compiled protobuf entities to be used by other repos

There is a newer version: 2.89.0
Show newest version
// Code generated by Wire protocol buffer compiler, do not edit.
// Source: ai.gateway.SessionSettings in ai/gateway.proto
package ai.gateway

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 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 SessionSettings(
  @field:WireField(
    tag = 1,
    adapter = "com.squareup.wire.ProtoAdapter#BOOL",
    jsonName = "recordOnStart",
  )
  public val record_on_start: Boolean? = null,
  @field:WireField(
    tag = 2,
    adapter = "com.squareup.wire.ProtoAdapter#BOOL",
    jsonName = "livestreamOnStart",
  )
  public val livestream_on_start: Boolean? = null,
  @field:WireField(
    tag = 3,
    adapter = "com.squareup.wire.ProtoAdapter#BOOL",
    jsonName = "summarizeOnEnd",
  )
  public val summarize_on_end: Boolean? = 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 SessionSettings) return false
    if (unknownFields != other.unknownFields) return false
    if (record_on_start != other.record_on_start) return false
    if (livestream_on_start != other.livestream_on_start) return false
    if (summarize_on_end != other.summarize_on_end) return false
    return true
  }

  public override fun hashCode(): Int {
    var result = super.hashCode
    if (result == 0) {
      result = unknownFields.hashCode()
      result = result * 37 + (record_on_start?.hashCode() ?: 0)
      result = result * 37 + (livestream_on_start?.hashCode() ?: 0)
      result = result * 37 + (summarize_on_end?.hashCode() ?: 0)
      super.hashCode = result
    }
    return result
  }

  public override fun toString(): String {
    val result = mutableListOf()
    if (record_on_start != null) result += """record_on_start=$record_on_start"""
    if (livestream_on_start != null) result += """livestream_on_start=$livestream_on_start"""
    if (summarize_on_end != null) result += """summarize_on_end=$summarize_on_end"""
    return result.joinToString(prefix = "SessionSettings{", separator = ", ", postfix = "}")
  }

  public fun copy(
    record_on_start: Boolean? = this.record_on_start,
    livestream_on_start: Boolean? = this.livestream_on_start,
    summarize_on_end: Boolean? = this.summarize_on_end,
    unknownFields: ByteString = this.unknownFields,
  ): SessionSettings = SessionSettings(record_on_start, livestream_on_start, summarize_on_end,
      unknownFields)

  public companion object {
    public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
      FieldEncoding.LENGTH_DELIMITED, 
      SessionSettings::class, 
      "type.googleapis.com/ai.gateway.SessionSettings", 
      PROTO_3, 
      null, 
      "ai/gateway.proto"
    ) {
      public override fun encodedSize(`value`: SessionSettings): Int {
        var size = value.unknownFields.size
        size += ProtoAdapter.BOOL.encodedSizeWithTag(1, value.record_on_start)
        size += ProtoAdapter.BOOL.encodedSizeWithTag(2, value.livestream_on_start)
        size += ProtoAdapter.BOOL.encodedSizeWithTag(3, value.summarize_on_end)
        return size
      }

      public override fun encode(writer: ProtoWriter, `value`: SessionSettings): Unit {
        ProtoAdapter.BOOL.encodeWithTag(writer, 1, value.record_on_start)
        ProtoAdapter.BOOL.encodeWithTag(writer, 2, value.livestream_on_start)
        ProtoAdapter.BOOL.encodeWithTag(writer, 3, value.summarize_on_end)
        writer.writeBytes(value.unknownFields)
      }

      public override fun encode(writer: ReverseProtoWriter, `value`: SessionSettings): Unit {
        writer.writeBytes(value.unknownFields)
        ProtoAdapter.BOOL.encodeWithTag(writer, 3, value.summarize_on_end)
        ProtoAdapter.BOOL.encodeWithTag(writer, 2, value.livestream_on_start)
        ProtoAdapter.BOOL.encodeWithTag(writer, 1, value.record_on_start)
      }

      public override fun decode(reader: ProtoReader): SessionSettings {
        var record_on_start: Boolean? = null
        var livestream_on_start: Boolean? = null
        var summarize_on_end: Boolean? = null
        val unknownFields = reader.forEachTag { tag ->
          when (tag) {
            1 -> record_on_start = ProtoAdapter.BOOL.decode(reader)
            2 -> livestream_on_start = ProtoAdapter.BOOL.decode(reader)
            3 -> summarize_on_end = ProtoAdapter.BOOL.decode(reader)
            else -> reader.readUnknownField(tag)
          }
        }
        return SessionSettings(
          record_on_start = record_on_start,
          livestream_on_start = livestream_on_start,
          summarize_on_end = summarize_on_end,
          unknownFields = unknownFields
        )
      }

      public override fun redact(`value`: SessionSettings): SessionSettings = value.copy(
        unknownFields = ByteString.EMPTY
      )
    }

    private const val serialVersionUID: Long = 0L
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy