xyz.block.ftl.v1.VerbServiceWireGrpc.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ftl-runtime Show documentation
Show all versions of ftl-runtime Show documentation
Towards a 𝝺-calculus for large-scale systems
// Code generated by Wire protocol buffer compiler, do not edit.
// Source: xyz.block.ftl.v1.VerbService in xyz/block/ftl/v1/ftl.proto
@file:Suppress("DEPRECATION")
package xyz.block.ftl.v1
import com.google.protobuf.DescriptorProtos
import com.google.protobuf.Descriptors
import com.squareup.wire.kotlin.grpcserver.WireBindableService
import com.squareup.wire.kotlin.grpcserver.WireMethodMarshaller
import io.grpc.CallOptions
import io.grpc.Channel
import io.grpc.MethodDescriptor
import io.grpc.ServerServiceDefinition
import io.grpc.ServiceDescriptor
import io.grpc.ServiceDescriptor.newBuilder
import io.grpc.stub.AbstractStub
import io.grpc.stub.ClientCalls.blockingUnaryCall
import io.grpc.stub.StreamObserver
import java.io.InputStream
import java.lang.Class
import java.lang.UnsupportedOperationException
import java.util.concurrent.ExecutorService
import kotlin.Array
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.collections.Set
import kotlin.jvm.Volatile
import io.grpc.stub.ClientCalls.asyncUnaryCall as clientCallsAsyncUnaryCall
import io.grpc.stub.ServerCalls.asyncUnaryCall as serverCallsAsyncUnaryCall
public object VerbServiceWireGrpc {
public const val SERVICE_NAME: String = "xyz.block.ftl.v1.VerbService"
@Volatile
private var serviceDescriptor: ServiceDescriptor? = null
private val descriptorMap: Map =
createDescriptorMap0()
@Volatile
private var getPingMethod: MethodDescriptor? = null
@Volatile
private var getCallMethod: MethodDescriptor? = null
private fun descriptorFor(`data`: Array): DescriptorProtos.FileDescriptorProto {
val str = data.fold(java.lang.StringBuilder()) { b, s -> b.append(s) }.toString()
val bytes = java.util.Base64.getDecoder().decode(str)
return DescriptorProtos.FileDescriptorProto.parseFrom(bytes)
}
private fun fileDescriptor(path: String, visited: Set): Descriptors.FileDescriptor {
val proto = descriptorMap[path]!!
val deps = proto.dependencyList.filter { !visited.contains(it) }.map { fileDescriptor(it,
visited + path) }
return Descriptors.FileDescriptor.buildFrom(proto, deps.toTypedArray())
}
private fun createDescriptorMap0(): Map {
val subMap = mapOf(
"xyz/block/ftl/v1/ftl.proto" to descriptorFor(arrayOf(
"Chp4eXovYmxvY2svZnRsL3YxL2Z0bC5wcm90bxIQeHl6LmJsb2NrLmZ0bC52MRokeHl6L2Jsb2NrL2Z0",
"bC92MS9zY2hlbWEvc2NoZW1hLnByb3RvIg0KC1BpbmdSZXF1ZXN0IjQKDFBpbmdSZXNwb25zZRIWCglu",
"b3RfcmVhZHkYASABKAmIAQFIAEIMCgpfbm90X3JlYWR5Il8KCE1ldGFkYXRhEi8KBnZhbHVlcxgBIAMo",
"CzIfLnh5ei5ibG9jay5mdGwudjEuTWV0YWRhdGEuUGFpchoiCgRQYWlyEgsKA2tleRgBIAEoCRINCgV2",
"YWx1ZRgCIAEoCSJ1CgtDYWxsUmVxdWVzdBIsCghtZXRhZGF0YRgBIAEoCzIaLnh5ei5ibG9jay5mdGwu",
"djEuTWV0YWRhdGESKgoEdmVyYhgEIAEoCzIcLnh5ei5ibG9jay5mdGwudjEuc2NoZW1hLlJlZhIMCgRi",
"b2R5GAMgASgMIpkBCgxDYWxsUmVzcG9uc2USDgoEYm9keRgBIAEoDEgAEjUKBWVycm9yGAIgASgLMiQu",
"eHl6LmJsb2NrLmZ0bC52MS5DYWxsUmVzcG9uc2UuRXJyb3JIABo2CgVFcnJvchIPCgdtZXNzYWdlGAEg",
"ASgJEhIKBXN0YWNrGAIgASgJiAEBSABCCAoGX3N0YWNrQgoKCHJlc3BvbnNlMqABCgtWZXJiU2Vydmlj",
"ZRJKCgRQaW5nEh0ueHl6LmJsb2NrLmZ0bC52MS5QaW5nUmVxdWVzdBoeLnh5ei5ibG9jay5mdGwudjEu",
"UGluZ1Jlc3BvbnNlIgOQAgESRQoEQ2FsbBIdLnh5ei5ibG9jay5mdGwudjEu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ASgLMh0ueHl6LmJsb2NrLmZ0bC52MS5zY2hlbWEuQm9vbEgAEi0KBHRpbWUYBiABKAsyHS54",
"eXouYmxvY2suZnRsLnYxLnNjaGVtYS5UaW1lSAASLwoFYXJyYXkYByABKAsyHi54eXouYmxvY2suZnRs",
"LnYxLnNjaGVtYS5BcnJheUgAEisKA21hcBgIIAEoCzIcLnh5ei5ibG9jay5mdGwudjEuc2NoZW1hLk1h",
"cEgAEisKA2FueRgJIAEoCzIcLnh5ei5ibG9jay5mdGwudjEuc2NoZW1hLkFueUgAEi0KBHVuaXQYCiAB",
"KAsyHS54eXouYmxvY2suZnRsLnYxLnNjaGVtYS5Vbml0SAASKwoDcmVmGAsgASgLMhwueHl6LmJsb2Nr",
"LmZ0bC52MS5zY2hlbWEuUmVmSAASNQoIb3B0aW9uYWwYDCABKAsyIS54eXouYmxvY2suZnRsLnYxLnNj",
"aGVtYS5PcHRpb25hbEgAQgcKBXZhbHVlIkMKBFVuaXQSMwoDcG9zGAEgASgLMiEueHl6LmJsb2NrLmZ0",
"bC52MS5zY2hlbWEuUG9zaXRpb26IAQFIAEIGCgRfcG9zQk5QAVpKZ2l0aHViLmNvbS9UQkQ1NDU2Njk3",
"NS9mdGwvYmFja2VuZC9wcm90b3MveHl6L2Jsb2NrL2Z0bC92MS9zY2hlbWE7c2NoZW1hcGJiBnByb3Rv",
"Mw==",
)),
)
return subMap
}
public fun getServiceDescriptor(): ServiceDescriptor? {
var result = serviceDescriptor
if (result == null) {
synchronized(VerbServiceWireGrpc::class) {
result = serviceDescriptor
if (result == null) {
result = newBuilder(SERVICE_NAME)
.addMethod(getPingMethod())
.addMethod(getCallMethod())
.setSchemaDescriptor(io.grpc.protobuf.ProtoFileDescriptorSupplier {
fileDescriptor("xyz/block/ftl/v1/ftl.proto", emptySet())
})
.build()
serviceDescriptor = result
}
}
}
return result
}
public fun getPingMethod(): MethodDescriptor {
var result: MethodDescriptor? = getPingMethod
if (result == null) {
synchronized(VerbServiceWireGrpc::class) {
result = getPingMethod
if (result == null) {
getPingMethod = MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
MethodDescriptor.generateFullMethodName(
"xyz.block.ftl.v1.VerbService", "Ping"
)
)
.setSampledToLocalTracing(true)
.setRequestMarshaller(VerbServiceImplBase.PingRequestMarshaller())
.setResponseMarshaller(VerbServiceImplBase.PingResponseMarshaller())
.build()
}
}
}
return getPingMethod!!
}
public fun getCallMethod(): MethodDescriptor {
var result: MethodDescriptor? = getCallMethod
if (result == null) {
synchronized(VerbServiceWireGrpc::class) {
result = getCallMethod
if (result == null) {
getCallMethod = MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
MethodDescriptor.generateFullMethodName(
"xyz.block.ftl.v1.VerbService", "Call"
)
)
.setSampledToLocalTracing(true)
.setRequestMarshaller(VerbServiceImplBase.CallRequestMarshaller())
.setResponseMarshaller(VerbServiceImplBase.CallResponseMarshaller())
.build()
}
}
}
return getCallMethod!!
}
public fun newStub(channel: Channel): VerbServiceStub = VerbServiceStub(channel)
public fun newBlockingStub(channel: Channel): VerbServiceBlockingStub =
VerbServiceBlockingStub(channel)
public abstract class VerbServiceImplBase : WireBindableService {
public open fun Ping(request: PingRequest, response: StreamObserver): Unit = throw
UnsupportedOperationException()
public open fun Call(request: CallRequest, response: StreamObserver): Unit = throw
UnsupportedOperationException()
override fun bindService(): ServerServiceDefinition =
ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(
getPingMethod(),
serverCallsAsyncUnaryCall(this@VerbServiceImplBase::Ping)
).addMethod(
getCallMethod(),
serverCallsAsyncUnaryCall(this@VerbServiceImplBase::Call)
).build()
public class PingRequestMarshaller : WireMethodMarshaller {
override fun stream(`value`: PingRequest): InputStream =
PingRequest.ADAPTER.encode(value).inputStream()
override fun marshalledClass(): Class = PingRequest::class.java
override fun parse(stream: InputStream): PingRequest = PingRequest.ADAPTER.decode(stream)
}
public class PingResponseMarshaller : WireMethodMarshaller {
override fun stream(`value`: PingResponse): InputStream =
PingResponse.ADAPTER.encode(value).inputStream()
override fun marshalledClass(): Class = PingResponse::class.java
override fun parse(stream: InputStream): PingResponse = PingResponse.ADAPTER.decode(stream)
}
public class CallRequestMarshaller : WireMethodMarshaller {
override fun stream(`value`: CallRequest): InputStream =
CallRequest.ADAPTER.encode(value).inputStream()
override fun marshalledClass(): Class = CallRequest::class.java
override fun parse(stream: InputStream): CallRequest = CallRequest.ADAPTER.decode(stream)
}
public class CallResponseMarshaller : WireMethodMarshaller {
override fun stream(`value`: CallResponse): InputStream =
CallResponse.ADAPTER.encode(value).inputStream()
override fun marshalledClass(): Class = CallResponse::class.java
override fun parse(stream: InputStream): CallResponse = CallResponse.ADAPTER.decode(stream)
}
}
public class BindableAdapter(
private val streamExecutor: ExecutorService,
private val service: () -> VerbServiceBlockingServer,
) : VerbServiceImplBase() {
override fun Ping(request: PingRequest, response: StreamObserver) {
response.onNext(service().Ping(request))
response.onCompleted()
}
override fun Call(request: CallRequest, response: StreamObserver) {
response.onNext(service().Call(request))
response.onCompleted()
}
}
public class VerbServiceStub : AbstractStub {
internal constructor(channel: Channel) : super(channel)
internal constructor(channel: Channel, callOptions: CallOptions) : super(channel, callOptions)
override fun build(channel: Channel, callOptions: CallOptions): VerbServiceStub =
VerbServiceStub(channel, callOptions)
public fun Ping(request: PingRequest, response: StreamObserver) {
clientCallsAsyncUnaryCall(channel.newCall(getPingMethod(), callOptions), request, response)
}
public fun Call(request: CallRequest, response: StreamObserver) {
clientCallsAsyncUnaryCall(channel.newCall(getCallMethod(), callOptions), request, response)
}
}
public class VerbServiceBlockingStub : AbstractStub {
internal constructor(channel: Channel) : super(channel)
internal constructor(channel: Channel, callOptions: CallOptions) : super(channel, callOptions)
override fun build(channel: Channel, callOptions: CallOptions): VerbServiceStub =
VerbServiceStub(channel, callOptions)
public fun Ping(request: PingRequest): PingResponse = blockingUnaryCall(channel,
getPingMethod(), callOptions, request)
public fun Call(request: CallRequest): CallResponse = blockingUnaryCall(channel,
getCallMethod(), callOptions, request)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy