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

commonMain.terra.dyncomm.v1beta1.dyncomm.kt Maven / Gradle / Ivy

There is a newer version: 3.1.6-4
Show newest version
// Transform from terra/dyncomm/v1beta1/dyncomm.proto
@file:GeneratorVersion(version = "0.5.2")

package terra.dyncomm.v1beta1

import kotlin.OptIn
import kotlin.String
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.KSerializer
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.Serializer
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
import kr.jadekim.protobuf.`annotation`.GeneratorVersion
import kr.jadekim.protobuf.`annotation`.ProtobufIndex
import kr.jadekim.protobuf.kotlinx.ProtobufConverterDecoder
import kr.jadekim.protobuf.kotlinx.ProtobufConverterEncoder
import kr.jadekim.protobuf.`annotation`.ProtobufMessage as AnnotationProtobufMessage
import kr.jadekim.protobuf.type.ProtobufMessage as TypeProtobufMessage

@AnnotationProtobufMessage(typeUrl = Params.TYPE_URL)
@Serializable(with = Params.KotlinxSerializer::class)
@SerialName(value = Params.TYPE_URL)
public data class Params(
  @ProtobufIndex(index = 1)
  public val maxZero: String = "",
  @ProtobufIndex(index = 2)
  public val slopeBase: String = "",
  @ProtobufIndex(index = 3)
  public val slopeVpImpact: String = "",
  @ProtobufIndex(index = 4)
  public val cap: String = "",
) : TypeProtobufMessage {
  public companion object {
    public const val TYPE_URL: String = "/terra.dyncomm.v1beta1.Params"
  }

  @OptIn(ExperimentalSerializationApi::class)
  @Serializer(forClass = Params::class)
  private object ReflectSerializer

  public object KotlinxSerializer : KSerializer {
    private val delegator: KSerializer = ReflectSerializer

    override val descriptor: SerialDescriptor = delegator.descriptor

    override fun serialize(encoder: Encoder, `value`: Params) {
      if (encoder is ProtobufConverterEncoder) {
        encoder.serialize(ParamsConverter, value)
        return
      }
      delegator.serialize(encoder, value)
    }

    override fun deserialize(decoder: Decoder): Params {
      if (decoder is ProtobufConverterDecoder) {
        return decoder.deserialize(ParamsConverter)
      }
      return delegator.deserialize(decoder)
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy