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

org.plasmalabs.node.services.RegtestRpcGrpc.scala Maven / Gradle / Ivy

The newest version!
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package org.plasmalabs.node.services


object RegtestRpcGrpc {
  val METHOD_MAKE_BLOCKS: _root_.io.grpc.MethodDescriptor[org.plasmalabs.node.services.MakeBlocksReq, org.plasmalabs.node.services.MakeBlocksRes] =
    _root_.io.grpc.MethodDescriptor.newBuilder()
      .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY)
      .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("org.plasmalabs.node.services.RegtestRpc", "MakeBlocks"))
      .setSampledToLocalTracing(true)
      .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[org.plasmalabs.node.services.MakeBlocksReq])
      .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[org.plasmalabs.node.services.MakeBlocksRes])
      .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(org.plasmalabs.node.services.RegtestProto.javaDescriptor.getServices().get(0).getMethods().get(0)))
      .build()
  
  val METHOD_SET_VOTING: _root_.io.grpc.MethodDescriptor[org.plasmalabs.node.services.SetVotingReq, org.plasmalabs.node.services.SetVotingRes] =
    _root_.io.grpc.MethodDescriptor.newBuilder()
      .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY)
      .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("org.plasmalabs.node.services.RegtestRpc", "SetVoting"))
      .setSampledToLocalTracing(true)
      .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[org.plasmalabs.node.services.SetVotingReq])
      .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[org.plasmalabs.node.services.SetVotingRes])
      .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(org.plasmalabs.node.services.RegtestProto.javaDescriptor.getServices().get(0).getMethods().get(1)))
      .build()
  
  val SERVICE: _root_.io.grpc.ServiceDescriptor =
    _root_.io.grpc.ServiceDescriptor.newBuilder("org.plasmalabs.node.services.RegtestRpc")
      .setSchemaDescriptor(new _root_.scalapb.grpc.ConcreteProtoFileDescriptorSupplier(org.plasmalabs.node.services.RegtestProto.javaDescriptor))
      .addMethod(METHOD_MAKE_BLOCKS)
      .addMethod(METHOD_SET_VOTING)
      .build()
  
  trait RegtestRpc extends _root_.scalapb.grpc.AbstractService {
    override def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[RegtestRpc] = RegtestRpc
    /** Instruct the node to make new blocks
      */
    def makeBlocks(request: org.plasmalabs.node.services.MakeBlocksReq): scala.concurrent.Future[org.plasmalabs.node.services.MakeBlocksRes]
    def setVoting(request: org.plasmalabs.node.services.SetVotingReq): scala.concurrent.Future[org.plasmalabs.node.services.SetVotingRes]
  }
  
  object RegtestRpc extends _root_.scalapb.grpc.ServiceCompanion[RegtestRpc] {
    implicit def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[RegtestRpc] = this
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = org.plasmalabs.node.services.RegtestProto.javaDescriptor.getServices().get(0)
    def scalaDescriptor: _root_.scalapb.descriptors.ServiceDescriptor = org.plasmalabs.node.services.RegtestProto.scalaDescriptor.services(0)
    def bindService(serviceImpl: RegtestRpc, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition =
      _root_.io.grpc.ServerServiceDefinition.builder(SERVICE)
      .addMethod(
        METHOD_MAKE_BLOCKS,
        _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: org.plasmalabs.node.services.MakeBlocksReq, observer: _root_.io.grpc.stub.StreamObserver[org.plasmalabs.node.services.MakeBlocksRes]) => {
          serviceImpl.makeBlocks(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))(
            executionContext)
        }))
      .addMethod(
        METHOD_SET_VOTING,
        _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: org.plasmalabs.node.services.SetVotingReq, observer: _root_.io.grpc.stub.StreamObserver[org.plasmalabs.node.services.SetVotingRes]) => {
          serviceImpl.setVoting(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))(
            executionContext)
        }))
      .build()
  }
  
  trait RegtestRpcBlockingClient {
    def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[RegtestRpc] = RegtestRpc
    /** Instruct the node to make new blocks
      */
    def makeBlocks(request: org.plasmalabs.node.services.MakeBlocksReq): org.plasmalabs.node.services.MakeBlocksRes
    def setVoting(request: org.plasmalabs.node.services.SetVotingReq): org.plasmalabs.node.services.SetVotingRes
  }
  
  class RegtestRpcBlockingStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[RegtestRpcBlockingStub](channel, options) with RegtestRpcBlockingClient {
    /** Instruct the node to make new blocks
      */
    override def makeBlocks(request: org.plasmalabs.node.services.MakeBlocksReq): org.plasmalabs.node.services.MakeBlocksRes = {
      _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_MAKE_BLOCKS, options, request)
    }
    
    override def setVoting(request: org.plasmalabs.node.services.SetVotingReq): org.plasmalabs.node.services.SetVotingRes = {
      _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_SET_VOTING, options, request)
    }
    
    override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): RegtestRpcBlockingStub = new RegtestRpcBlockingStub(channel, options)
  }
  
  class RegtestRpcStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[RegtestRpcStub](channel, options) with RegtestRpc {
    /** Instruct the node to make new blocks
      */
    override def makeBlocks(request: org.plasmalabs.node.services.MakeBlocksReq): scala.concurrent.Future[org.plasmalabs.node.services.MakeBlocksRes] = {
      _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_MAKE_BLOCKS, options, request)
    }
    
    override def setVoting(request: org.plasmalabs.node.services.SetVotingReq): scala.concurrent.Future[org.plasmalabs.node.services.SetVotingRes] = {
      _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_SET_VOTING, options, request)
    }
    
    override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): RegtestRpcStub = new RegtestRpcStub(channel, options)
  }
  
  object RegtestRpcStub extends _root_.io.grpc.stub.AbstractStub.StubFactory[RegtestRpcStub] {
    override def newStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): RegtestRpcStub = new RegtestRpcStub(channel, options)
    
    implicit val stubFactory: _root_.io.grpc.stub.AbstractStub.StubFactory[RegtestRpcStub] = this
  }
  
  def bindService(serviceImpl: RegtestRpc, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = RegtestRpc.bindService(serviceImpl, executionContext)
  
  def blockingStub(channel: _root_.io.grpc.Channel): RegtestRpcBlockingStub = new RegtestRpcBlockingStub(channel)
  
  def stub(channel: _root_.io.grpc.Channel): RegtestRpcStub = new RegtestRpcStub(channel)
  
  def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = org.plasmalabs.node.services.RegtestProto.javaDescriptor.getServices().get(0)
  
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy