commonMain.terra.tx.v1beta1.service.kt Maven / Gradle / Ivy
// Transform from terra/tx/v1beta1/service.proto
@file:GeneratorVersion(version = "0.5.2")
package terra.tx.v1beta1
import cosmos.base.v1beta1.Coin
import cosmos.tx.v1beta1.Tx
import kotlin.ByteArray
import kotlin.Deprecated
import kotlin.DeprecationLevel
import kotlin.OptIn
import kotlin.ReplaceWith
import kotlin.String
import kotlin.byteArrayOf
import kotlin.collections.List
import kotlin.collections.emptyList
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.type.ProtobufService
import kr.jadekim.protobuf.`annotation`.ProtobufMessage as AnnotationProtobufMessage
import kr.jadekim.protobuf.type.ProtobufMessage as TypeProtobufMessage
@AnnotationProtobufMessage(typeUrl = ComputeTaxRequest.TYPE_URL)
@Serializable(with = ComputeTaxRequest.KotlinxSerializer::class)
@SerialName(value = ComputeTaxRequest.TYPE_URL)
public data class ComputeTaxRequest(
@Deprecated(
message = "",
replaceWith = ReplaceWith(""),
level = DeprecationLevel.WARNING,
)
@ProtobufIndex(index = 1)
public val tx: Tx = Tx(),
@ProtobufIndex(index = 2)
public val txBytes: ByteArray = byteArrayOf(),
) : TypeProtobufMessage {
public companion object {
public const val TYPE_URL: String = "/terra.tx.v1beta1.ComputeTaxRequest"
}
@OptIn(ExperimentalSerializationApi::class)
@Serializer(forClass = ComputeTaxRequest::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`: ComputeTaxRequest) {
if (encoder is ProtobufConverterEncoder) {
encoder.serialize(ComputeTaxRequestConverter, value)
return
}
delegator.serialize(encoder, value)
}
override fun deserialize(decoder: Decoder): ComputeTaxRequest {
if (decoder is ProtobufConverterDecoder) {
return decoder.deserialize(ComputeTaxRequestConverter)
}
return delegator.deserialize(decoder)
}
}
}
@AnnotationProtobufMessage(typeUrl = ComputeTaxResponse.TYPE_URL)
@Serializable(with = ComputeTaxResponse.KotlinxSerializer::class)
@SerialName(value = ComputeTaxResponse.TYPE_URL)
public data class ComputeTaxResponse(
@ProtobufIndex(index = 1)
public val taxAmount: List = emptyList(),
) : TypeProtobufMessage {
public companion object {
public const val TYPE_URL: String = "/terra.tx.v1beta1.ComputeTaxResponse"
}
@OptIn(ExperimentalSerializationApi::class)
@Serializer(forClass = ComputeTaxResponse::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`: ComputeTaxResponse) {
if (encoder is ProtobufConverterEncoder) {
encoder.serialize(ComputeTaxResponseConverter, value)
return
}
delegator.serialize(encoder, value)
}
override fun deserialize(decoder: Decoder): ComputeTaxResponse {
if (decoder is ProtobufConverterDecoder) {
return decoder.deserialize(ComputeTaxResponseConverter)
}
return delegator.deserialize(decoder)
}
}
}
public interface Service : ProtobufService {
public suspend fun computeTax(request: ComputeTaxRequest): ComputeTaxResponse
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy