
ibc.core.channel.v1.TxGrpcKt.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grpc-kotlin Show documentation
Show all versions of grpc-kotlin Show documentation
Terra Core Protobuf Builds
The newest version!
package ibc.core.channel.v1
import ibc.core.channel.v1.MsgGrpc.getServiceDescriptor
import io.grpc.CallOptions
import io.grpc.CallOptions.DEFAULT
import io.grpc.Channel
import io.grpc.Metadata
import io.grpc.MethodDescriptor
import io.grpc.ServerServiceDefinition
import io.grpc.ServerServiceDefinition.builder
import io.grpc.ServiceDescriptor
import io.grpc.Status
import io.grpc.Status.UNIMPLEMENTED
import io.grpc.StatusException
import io.grpc.kotlin.AbstractCoroutineServerImpl
import io.grpc.kotlin.AbstractCoroutineStub
import io.grpc.kotlin.ClientCalls
import io.grpc.kotlin.ClientCalls.unaryRpc
import io.grpc.kotlin.ServerCalls
import io.grpc.kotlin.ServerCalls.unaryServerMethodDefinition
import io.grpc.kotlin.StubFor
import kotlin.String
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.EmptyCoroutineContext
import kotlin.jvm.JvmOverloads
import kotlin.jvm.JvmStatic
/**
* Holder for Kotlin coroutine-based client and server APIs for ibc.core.channel.v1.Msg.
*/
public object MsgGrpcKt {
public const val SERVICE_NAME: String = MsgGrpc.SERVICE_NAME
@JvmStatic
public val serviceDescriptor: ServiceDescriptor
get() = MsgGrpc.getServiceDescriptor()
public val channelOpenInitMethod:
MethodDescriptor
@JvmStatic
get() = MsgGrpc.getChannelOpenInitMethod()
public val channelOpenTryMethod:
MethodDescriptor
@JvmStatic
get() = MsgGrpc.getChannelOpenTryMethod()
public val channelOpenAckMethod:
MethodDescriptor
@JvmStatic
get() = MsgGrpc.getChannelOpenAckMethod()
public val channelOpenConfirmMethod:
MethodDescriptor
@JvmStatic
get() = MsgGrpc.getChannelOpenConfirmMethod()
public val channelCloseInitMethod:
MethodDescriptor
@JvmStatic
get() = MsgGrpc.getChannelCloseInitMethod()
public val channelCloseConfirmMethod:
MethodDescriptor
@JvmStatic
get() = MsgGrpc.getChannelCloseConfirmMethod()
public val recvPacketMethod: MethodDescriptor
@JvmStatic
get() = MsgGrpc.getRecvPacketMethod()
public val timeoutMethod: MethodDescriptor
@JvmStatic
get() = MsgGrpc.getTimeoutMethod()
public val timeoutOnCloseMethod:
MethodDescriptor
@JvmStatic
get() = MsgGrpc.getTimeoutOnCloseMethod()
public val acknowledgementMethod:
MethodDescriptor
@JvmStatic
get() = MsgGrpc.getAcknowledgementMethod()
/**
* A stub for issuing RPCs to a(n) ibc.core.channel.v1.Msg service as suspending coroutines.
*/
@StubFor(MsgGrpc::class)
public class MsgCoroutineStub @JvmOverloads constructor(
channel: Channel,
callOptions: CallOptions = DEFAULT,
) : AbstractCoroutineStub(channel, callOptions) {
public override fun build(channel: Channel, callOptions: CallOptions): MsgCoroutineStub =
MsgCoroutineStub(channel, callOptions)
/**
* Executes this RPC and returns the response message, suspending until the RPC completes
* with [`Status.OK`][Status]. If the RPC completes with another status, a corresponding
* [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled
* with the corresponding exception as a cause.
*
* @param request The request message to send to the server.
*
* @param headers Metadata to attach to the request. Most users will not need this.
*
* @return The single response from the server.
*/
public suspend fun channelOpenInit(request: Tx.MsgChannelOpenInit, headers: Metadata =
Metadata()): Tx.MsgChannelOpenInitResponse = unaryRpc(
channel,
MsgGrpc.getChannelOpenInitMethod(),
request,
callOptions,
headers
)
/**
* Executes this RPC and returns the response message, suspending until the RPC completes
* with [`Status.OK`][Status]. If the RPC completes with another status, a corresponding
* [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled
* with the corresponding exception as a cause.
*
* @param request The request message to send to the server.
*
* @param headers Metadata to attach to the request. Most users will not need this.
*
* @return The single response from the server.
*/
public suspend fun channelOpenTry(request: Tx.MsgChannelOpenTry, headers: Metadata =
Metadata()): Tx.MsgChannelOpenTryResponse = unaryRpc(
channel,
MsgGrpc.getChannelOpenTryMethod(),
request,
callOptions,
headers
)
/**
* Executes this RPC and returns the response message, suspending until the RPC completes
* with [`Status.OK`][Status]. If the RPC completes with another status, a corresponding
* [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled
* with the corresponding exception as a cause.
*
* @param request The request message to send to the server.
*
* @param headers Metadata to attach to the request. Most users will not need this.
*
* @return The single response from the server.
*/
public suspend fun channelOpenAck(request: Tx.MsgChannelOpenAck, headers: Metadata =
Metadata()): Tx.MsgChannelOpenAckResponse = unaryRpc(
channel,
MsgGrpc.getChannelOpenAckMethod(),
request,
callOptions,
headers
)
/**
* Executes this RPC and returns the response message, suspending until the RPC completes
* with [`Status.OK`][Status]. If the RPC completes with another status, a corresponding
* [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled
* with the corresponding exception as a cause.
*
* @param request The request message to send to the server.
*
* @param headers Metadata to attach to the request. Most users will not need this.
*
* @return The single response from the server.
*/
public suspend fun channelOpenConfirm(request: Tx.MsgChannelOpenConfirm, headers: Metadata =
Metadata()): Tx.MsgChannelOpenConfirmResponse = unaryRpc(
channel,
MsgGrpc.getChannelOpenConfirmMethod(),
request,
callOptions,
headers
)
/**
* Executes this RPC and returns the response message, suspending until the RPC completes
* with [`Status.OK`][Status]. If the RPC completes with another status, a corresponding
* [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled
* with the corresponding exception as a cause.
*
* @param request The request message to send to the server.
*
* @param headers Metadata to attach to the request. Most users will not need this.
*
* @return The single response from the server.
*/
public suspend fun channelCloseInit(request: Tx.MsgChannelCloseInit, headers: Metadata =
Metadata()): Tx.MsgChannelCloseInitResponse = unaryRpc(
channel,
MsgGrpc.getChannelCloseInitMethod(),
request,
callOptions,
headers
)
/**
* Executes this RPC and returns the response message, suspending until the RPC completes
* with [`Status.OK`][Status]. If the RPC completes with another status, a corresponding
* [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled
* with the corresponding exception as a cause.
*
* @param request The request message to send to the server.
*
* @param headers Metadata to attach to the request. Most users will not need this.
*
* @return The single response from the server.
*/
public suspend fun channelCloseConfirm(request: Tx.MsgChannelCloseConfirm, headers: Metadata =
Metadata()): Tx.MsgChannelCloseConfirmResponse = unaryRpc(
channel,
MsgGrpc.getChannelCloseConfirmMethod(),
request,
callOptions,
headers
)
/**
* Executes this RPC and returns the response message, suspending until the RPC completes
* with [`Status.OK`][Status]. If the RPC completes with another status, a corresponding
* [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled
* with the corresponding exception as a cause.
*
* @param request The request message to send to the server.
*
* @param headers Metadata to attach to the request. Most users will not need this.
*
* @return The single response from the server.
*/
public suspend fun recvPacket(request: Tx.MsgRecvPacket, headers: Metadata = Metadata()):
Tx.MsgRecvPacketResponse = unaryRpc(
channel,
MsgGrpc.getRecvPacketMethod(),
request,
callOptions,
headers
)
/**
* Executes this RPC and returns the response message, suspending until the RPC completes
* with [`Status.OK`][Status]. If the RPC completes with another status, a corresponding
* [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled
* with the corresponding exception as a cause.
*
* @param request The request message to send to the server.
*
* @param headers Metadata to attach to the request. Most users will not need this.
*
* @return The single response from the server.
*/
public suspend fun timeout(request: Tx.MsgTimeout, headers: Metadata = Metadata()):
Tx.MsgTimeoutResponse = unaryRpc(
channel,
MsgGrpc.getTimeoutMethod(),
request,
callOptions,
headers
)
/**
* Executes this RPC and returns the response message, suspending until the RPC completes
* with [`Status.OK`][Status]. If the RPC completes with another status, a corresponding
* [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled
* with the corresponding exception as a cause.
*
* @param request The request message to send to the server.
*
* @param headers Metadata to attach to the request. Most users will not need this.
*
* @return The single response from the server.
*/
public suspend fun timeoutOnClose(request: Tx.MsgTimeoutOnClose, headers: Metadata =
Metadata()): Tx.MsgTimeoutOnCloseResponse = unaryRpc(
channel,
MsgGrpc.getTimeoutOnCloseMethod(),
request,
callOptions,
headers
)
/**
* Executes this RPC and returns the response message, suspending until the RPC completes
* with [`Status.OK`][Status]. If the RPC completes with another status, a corresponding
* [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled
* with the corresponding exception as a cause.
*
* @param request The request message to send to the server.
*
* @param headers Metadata to attach to the request. Most users will not need this.
*
* @return The single response from the server.
*/
public suspend fun acknowledgement(request: Tx.MsgAcknowledgement, headers: Metadata =
Metadata()): Tx.MsgAcknowledgementResponse = unaryRpc(
channel,
MsgGrpc.getAcknowledgementMethod(),
request,
callOptions,
headers
)
}
/**
* Skeletal implementation of the ibc.core.channel.v1.Msg service based on Kotlin coroutines.
*/
public abstract class MsgCoroutineImplBase(
coroutineContext: CoroutineContext = EmptyCoroutineContext,
) : AbstractCoroutineServerImpl(coroutineContext) {
/**
* Returns the response to an RPC for ibc.core.channel.v1.Msg.ChannelOpenInit.
*
* If this method fails with a [StatusException], the RPC will fail with the corresponding
* [Status]. If this method fails with a [java.util.concurrent.CancellationException], the RPC
* will fail
* with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will
* fail with `Status.UNKNOWN` with the exception as a cause.
*
* @param request The request from the client.
*/
public open suspend fun channelOpenInit(request: Tx.MsgChannelOpenInit):
Tx.MsgChannelOpenInitResponse = throw
StatusException(UNIMPLEMENTED.withDescription("Method ibc.core.channel.v1.Msg.ChannelOpenInit is unimplemented"))
/**
* Returns the response to an RPC for ibc.core.channel.v1.Msg.ChannelOpenTry.
*
* If this method fails with a [StatusException], the RPC will fail with the corresponding
* [Status]. If this method fails with a [java.util.concurrent.CancellationException], the RPC
* will fail
* with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will
* fail with `Status.UNKNOWN` with the exception as a cause.
*
* @param request The request from the client.
*/
public open suspend fun channelOpenTry(request: Tx.MsgChannelOpenTry):
Tx.MsgChannelOpenTryResponse = throw
StatusException(UNIMPLEMENTED.withDescription("Method ibc.core.channel.v1.Msg.ChannelOpenTry is unimplemented"))
/**
* Returns the response to an RPC for ibc.core.channel.v1.Msg.ChannelOpenAck.
*
* If this method fails with a [StatusException], the RPC will fail with the corresponding
* [Status]. If this method fails with a [java.util.concurrent.CancellationException], the RPC
* will fail
* with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will
* fail with `Status.UNKNOWN` with the exception as a cause.
*
* @param request The request from the client.
*/
public open suspend fun channelOpenAck(request: Tx.MsgChannelOpenAck):
Tx.MsgChannelOpenAckResponse = throw
StatusException(UNIMPLEMENTED.withDescription("Method ibc.core.channel.v1.Msg.ChannelOpenAck is unimplemented"))
/**
* Returns the response to an RPC for ibc.core.channel.v1.Msg.ChannelOpenConfirm.
*
* If this method fails with a [StatusException], the RPC will fail with the corresponding
* [Status]. If this method fails with a [java.util.concurrent.CancellationException], the RPC
* will fail
* with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will
* fail with `Status.UNKNOWN` with the exception as a cause.
*
* @param request The request from the client.
*/
public open suspend fun channelOpenConfirm(request: Tx.MsgChannelOpenConfirm):
Tx.MsgChannelOpenConfirmResponse = throw
StatusException(UNIMPLEMENTED.withDescription("Method ibc.core.channel.v1.Msg.ChannelOpenConfirm is unimplemented"))
/**
* Returns the response to an RPC for ibc.core.channel.v1.Msg.ChannelCloseInit.
*
* If this method fails with a [StatusException], the RPC will fail with the corresponding
* [Status]. If this method fails with a [java.util.concurrent.CancellationException], the RPC
* will fail
* with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will
* fail with `Status.UNKNOWN` with the exception as a cause.
*
* @param request The request from the client.
*/
public open suspend fun channelCloseInit(request: Tx.MsgChannelCloseInit):
Tx.MsgChannelCloseInitResponse = throw
StatusException(UNIMPLEMENTED.withDescription("Method ibc.core.channel.v1.Msg.ChannelCloseInit is unimplemented"))
/**
* Returns the response to an RPC for ibc.core.channel.v1.Msg.ChannelCloseConfirm.
*
* If this method fails with a [StatusException], the RPC will fail with the corresponding
* [Status]. If this method fails with a [java.util.concurrent.CancellationException], the RPC
* will fail
* with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will
* fail with `Status.UNKNOWN` with the exception as a cause.
*
* @param request The request from the client.
*/
public open suspend fun channelCloseConfirm(request: Tx.MsgChannelCloseConfirm):
Tx.MsgChannelCloseConfirmResponse = throw
StatusException(UNIMPLEMENTED.withDescription("Method ibc.core.channel.v1.Msg.ChannelCloseConfirm is unimplemented"))
/**
* Returns the response to an RPC for ibc.core.channel.v1.Msg.RecvPacket.
*
* If this method fails with a [StatusException], the RPC will fail with the corresponding
* [Status]. If this method fails with a [java.util.concurrent.CancellationException], the RPC
* will fail
* with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will
* fail with `Status.UNKNOWN` with the exception as a cause.
*
* @param request The request from the client.
*/
public open suspend fun recvPacket(request: Tx.MsgRecvPacket): Tx.MsgRecvPacketResponse = throw
StatusException(UNIMPLEMENTED.withDescription("Method ibc.core.channel.v1.Msg.RecvPacket is unimplemented"))
/**
* Returns the response to an RPC for ibc.core.channel.v1.Msg.Timeout.
*
* If this method fails with a [StatusException], the RPC will fail with the corresponding
* [Status]. If this method fails with a [java.util.concurrent.CancellationException], the RPC
* will fail
* with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will
* fail with `Status.UNKNOWN` with the exception as a cause.
*
* @param request The request from the client.
*/
public open suspend fun timeout(request: Tx.MsgTimeout): Tx.MsgTimeoutResponse = throw
StatusException(UNIMPLEMENTED.withDescription("Method ibc.core.channel.v1.Msg.Timeout is unimplemented"))
/**
* Returns the response to an RPC for ibc.core.channel.v1.Msg.TimeoutOnClose.
*
* If this method fails with a [StatusException], the RPC will fail with the corresponding
* [Status]. If this method fails with a [java.util.concurrent.CancellationException], the RPC
* will fail
* with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will
* fail with `Status.UNKNOWN` with the exception as a cause.
*
* @param request The request from the client.
*/
public open suspend fun timeoutOnClose(request: Tx.MsgTimeoutOnClose):
Tx.MsgTimeoutOnCloseResponse = throw
StatusException(UNIMPLEMENTED.withDescription("Method ibc.core.channel.v1.Msg.TimeoutOnClose is unimplemented"))
/**
* Returns the response to an RPC for ibc.core.channel.v1.Msg.Acknowledgement.
*
* If this method fails with a [StatusException], the RPC will fail with the corresponding
* [Status]. If this method fails with a [java.util.concurrent.CancellationException], the RPC
* will fail
* with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will
* fail with `Status.UNKNOWN` with the exception as a cause.
*
* @param request The request from the client.
*/
public open suspend fun acknowledgement(request: Tx.MsgAcknowledgement):
Tx.MsgAcknowledgementResponse = throw
StatusException(UNIMPLEMENTED.withDescription("Method ibc.core.channel.v1.Msg.Acknowledgement is unimplemented"))
public final override fun bindService(): ServerServiceDefinition =
builder(getServiceDescriptor())
.addMethod(unaryServerMethodDefinition(
context = this.context,
descriptor = MsgGrpc.getChannelOpenInitMethod(),
implementation = ::channelOpenInit
))
.addMethod(unaryServerMethodDefinition(
context = this.context,
descriptor = MsgGrpc.getChannelOpenTryMethod(),
implementation = ::channelOpenTry
))
.addMethod(unaryServerMethodDefinition(
context = this.context,
descriptor = MsgGrpc.getChannelOpenAckMethod(),
implementation = ::channelOpenAck
))
.addMethod(unaryServerMethodDefinition(
context = this.context,
descriptor = MsgGrpc.getChannelOpenConfirmMethod(),
implementation = ::channelOpenConfirm
))
.addMethod(unaryServerMethodDefinition(
context = this.context,
descriptor = MsgGrpc.getChannelCloseInitMethod(),
implementation = ::channelCloseInit
))
.addMethod(unaryServerMethodDefinition(
context = this.context,
descriptor = MsgGrpc.getChannelCloseConfirmMethod(),
implementation = ::channelCloseConfirm
))
.addMethod(unaryServerMethodDefinition(
context = this.context,
descriptor = MsgGrpc.getRecvPacketMethod(),
implementation = ::recvPacket
))
.addMethod(unaryServerMethodDefinition(
context = this.context,
descriptor = MsgGrpc.getTimeoutMethod(),
implementation = ::timeout
))
.addMethod(unaryServerMethodDefinition(
context = this.context,
descriptor = MsgGrpc.getTimeoutOnCloseMethod(),
implementation = ::timeoutOnClose
))
.addMethod(unaryServerMethodDefinition(
context = this.context,
descriptor = MsgGrpc.getAcknowledgementMethod(),
implementation = ::acknowledgement
)).build()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy