wtclientrpc.WatchtowerClientClient.scala Maven / Gradle / Ivy
The newest version!
// Generated by Pekko gRPC. DO NOT EDIT.
package wtclientrpc
import scala.concurrent.ExecutionContext
import org.apache.pekko
import pekko.actor.ClassicActorSystemProvider
import pekko.grpc.GrpcChannel
import pekko.grpc.GrpcClientCloseException
import pekko.grpc.GrpcClientSettings
import pekko.grpc.scaladsl.PekkoGrpcClient
import pekko.grpc.internal.NettyClientUtils
import pekko.grpc.PekkoGrpcGenerated
import pekko.grpc.scaladsl.SingleResponseRequestBuilder
import pekko.grpc.internal.ScalaUnaryRequestBuilder
// Not sealed so users can extend to write their stubs
@PekkoGrpcGenerated
trait WatchtowerClientClient extends WatchtowerClient with WatchtowerClientClientPowerApi with PekkoGrpcClient
@PekkoGrpcGenerated
object WatchtowerClientClient {
def apply(settings: GrpcClientSettings)(implicit sys: ClassicActorSystemProvider): WatchtowerClientClient =
new DefaultWatchtowerClientClient(GrpcChannel(settings), isChannelOwned = true)
def apply(channel: GrpcChannel)(implicit sys: ClassicActorSystemProvider): WatchtowerClientClient =
new DefaultWatchtowerClientClient(channel, isChannelOwned = false)
private class DefaultWatchtowerClientClient(channel: GrpcChannel, isChannelOwned: Boolean)(implicit sys: ClassicActorSystemProvider) extends WatchtowerClientClient {
import WatchtowerClient.MethodDescriptors._
private implicit val ex: ExecutionContext = sys.classicSystem.dispatcher
private val settings = channel.settings
private val options = NettyClientUtils.callOptions(settings)
private def addTowerRequestBuilder(channel: pekko.grpc.internal.InternalChannel) =
new ScalaUnaryRequestBuilder(addTowerDescriptor, channel, options, settings)
private def removeTowerRequestBuilder(channel: pekko.grpc.internal.InternalChannel) =
new ScalaUnaryRequestBuilder(removeTowerDescriptor, channel, options, settings)
private def listTowersRequestBuilder(channel: pekko.grpc.internal.InternalChannel) =
new ScalaUnaryRequestBuilder(listTowersDescriptor, channel, options, settings)
private def getTowerInfoRequestBuilder(channel: pekko.grpc.internal.InternalChannel) =
new ScalaUnaryRequestBuilder(getTowerInfoDescriptor, channel, options, settings)
private def statsRequestBuilder(channel: pekko.grpc.internal.InternalChannel) =
new ScalaUnaryRequestBuilder(statsDescriptor, channel, options, settings)
private def policyRequestBuilder(channel: pekko.grpc.internal.InternalChannel) =
new ScalaUnaryRequestBuilder(policyDescriptor, channel, options, settings)
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer addTower(wtclientrpc.AddTowerRequest) if possible.
*/
override def addTower(): SingleResponseRequestBuilder[wtclientrpc.AddTowerRequest, wtclientrpc.AddTowerResponse] =
addTowerRequestBuilder(channel.internalChannel)
/**
* For access to method metadata use the parameterless version of addTower
*/
def addTower(in: wtclientrpc.AddTowerRequest): scala.concurrent.Future[wtclientrpc.AddTowerResponse] =
addTower().invoke(in)
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer removeTower(wtclientrpc.RemoveTowerRequest) if possible.
*/
override def removeTower(): SingleResponseRequestBuilder[wtclientrpc.RemoveTowerRequest, wtclientrpc.RemoveTowerResponse] =
removeTowerRequestBuilder(channel.internalChannel)
/**
* For access to method metadata use the parameterless version of removeTower
*/
def removeTower(in: wtclientrpc.RemoveTowerRequest): scala.concurrent.Future[wtclientrpc.RemoveTowerResponse] =
removeTower().invoke(in)
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer listTowers(wtclientrpc.ListTowersRequest) if possible.
*/
override def listTowers(): SingleResponseRequestBuilder[wtclientrpc.ListTowersRequest, wtclientrpc.ListTowersResponse] =
listTowersRequestBuilder(channel.internalChannel)
/**
* For access to method metadata use the parameterless version of listTowers
*/
def listTowers(in: wtclientrpc.ListTowersRequest): scala.concurrent.Future[wtclientrpc.ListTowersResponse] =
listTowers().invoke(in)
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer getTowerInfo(wtclientrpc.GetTowerInfoRequest) if possible.
*/
override def getTowerInfo(): SingleResponseRequestBuilder[wtclientrpc.GetTowerInfoRequest, wtclientrpc.Tower] =
getTowerInfoRequestBuilder(channel.internalChannel)
/**
* For access to method metadata use the parameterless version of getTowerInfo
*/
def getTowerInfo(in: wtclientrpc.GetTowerInfoRequest): scala.concurrent.Future[wtclientrpc.Tower] =
getTowerInfo().invoke(in)
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer stats(wtclientrpc.StatsRequest) if possible.
*/
override def stats(): SingleResponseRequestBuilder[wtclientrpc.StatsRequest, wtclientrpc.StatsResponse] =
statsRequestBuilder(channel.internalChannel)
/**
* For access to method metadata use the parameterless version of stats
*/
def stats(in: wtclientrpc.StatsRequest): scala.concurrent.Future[wtclientrpc.StatsResponse] =
stats().invoke(in)
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer policy(wtclientrpc.PolicyRequest) if possible.
*/
override def policy(): SingleResponseRequestBuilder[wtclientrpc.PolicyRequest, wtclientrpc.PolicyResponse] =
policyRequestBuilder(channel.internalChannel)
/**
* For access to method metadata use the parameterless version of policy
*/
def policy(in: wtclientrpc.PolicyRequest): scala.concurrent.Future[wtclientrpc.PolicyResponse] =
policy().invoke(in)
override def close(): scala.concurrent.Future[pekko.Done] =
if (isChannelOwned) channel.close()
else throw new GrpcClientCloseException()
override def closed: scala.concurrent.Future[pekko.Done] = channel.closed()
}
}
@PekkoGrpcGenerated
trait WatchtowerClientClientPowerApi {
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer addTower(wtclientrpc.AddTowerRequest) if possible.
*/
def addTower(): SingleResponseRequestBuilder[wtclientrpc.AddTowerRequest, wtclientrpc.AddTowerResponse] = ???
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer removeTower(wtclientrpc.RemoveTowerRequest) if possible.
*/
def removeTower(): SingleResponseRequestBuilder[wtclientrpc.RemoveTowerRequest, wtclientrpc.RemoveTowerResponse] = ???
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer listTowers(wtclientrpc.ListTowersRequest) if possible.
*/
def listTowers(): SingleResponseRequestBuilder[wtclientrpc.ListTowersRequest, wtclientrpc.ListTowersResponse] = ???
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer getTowerInfo(wtclientrpc.GetTowerInfoRequest) if possible.
*/
def getTowerInfo(): SingleResponseRequestBuilder[wtclientrpc.GetTowerInfoRequest, wtclientrpc.Tower] = ???
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer stats(wtclientrpc.StatsRequest) if possible.
*/
def stats(): SingleResponseRequestBuilder[wtclientrpc.StatsRequest, wtclientrpc.StatsResponse] = ???
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer policy(wtclientrpc.PolicyRequest) if possible.
*/
def policy(): SingleResponseRequestBuilder[wtclientrpc.PolicyRequest, wtclientrpc.PolicyResponse] = ???
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy