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

grpc.health.v1.HealthGrpc.scala Maven / Gradle / Ivy

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

package grpc.health.v1


object HealthGrpc {
  val METHOD_CHECK: _root_.io.grpc.MethodDescriptor[grpc.health.v1.HealthCheckRequest, grpc.health.v1.HealthCheckResponse] =
    _root_.io.grpc.MethodDescriptor.newBuilder()
      .setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY)
      .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("grpc.health.v1.Health", "Check"))
      .setSampledToLocalTracing(true)
      .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[grpc.health.v1.HealthCheckRequest])
      .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[grpc.health.v1.HealthCheckResponse])
      .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(grpc.health.v1.HealthRpcProto.javaDescriptor.getServices().get(0).getMethods().get(0)))
      .build()
  
  val METHOD_WATCH: _root_.io.grpc.MethodDescriptor[grpc.health.v1.HealthCheckRequest, grpc.health.v1.HealthCheckResponse] =
    _root_.io.grpc.MethodDescriptor.newBuilder()
      .setType(_root_.io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
      .setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("grpc.health.v1.Health", "Watch"))
      .setSampledToLocalTracing(true)
      .setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[grpc.health.v1.HealthCheckRequest])
      .setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[grpc.health.v1.HealthCheckResponse])
      .setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(grpc.health.v1.HealthRpcProto.javaDescriptor.getServices().get(0).getMethods().get(1)))
      .build()
  
  val SERVICE: _root_.io.grpc.ServiceDescriptor =
    _root_.io.grpc.ServiceDescriptor.newBuilder("grpc.health.v1.Health")
      .setSchemaDescriptor(new _root_.scalapb.grpc.ConcreteProtoFileDescriptorSupplier(grpc.health.v1.HealthRpcProto.javaDescriptor))
      .addMethod(METHOD_CHECK)
      .addMethod(METHOD_WATCH)
      .build()
  
  trait Health extends _root_.scalapb.grpc.AbstractService {
    override def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[Health] = Health
    def check(request: grpc.health.v1.HealthCheckRequest): scala.concurrent.Future[grpc.health.v1.HealthCheckResponse]
    def watch(request: grpc.health.v1.HealthCheckRequest, responseObserver: _root_.io.grpc.stub.StreamObserver[grpc.health.v1.HealthCheckResponse]): _root_.scala.Unit
  }
  
  object Health extends _root_.scalapb.grpc.ServiceCompanion[Health] {
    implicit def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[Health] = this
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = grpc.health.v1.HealthRpcProto.javaDescriptor.getServices().get(0)
    def scalaDescriptor: _root_.scalapb.descriptors.ServiceDescriptor = grpc.health.v1.HealthRpcProto.scalaDescriptor.services(0)
    def bindService(serviceImpl: Health, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition =
      _root_.io.grpc.ServerServiceDefinition.builder(SERVICE)
      .addMethod(
        METHOD_CHECK,
        _root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: grpc.health.v1.HealthCheckRequest, observer: _root_.io.grpc.stub.StreamObserver[grpc.health.v1.HealthCheckResponse]) => {
          serviceImpl.check(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))(
            executionContext)
        }))
      .addMethod(
        METHOD_WATCH,
        _root_.io.grpc.stub.ServerCalls.asyncServerStreamingCall((request: grpc.health.v1.HealthCheckRequest, observer: _root_.io.grpc.stub.StreamObserver[grpc.health.v1.HealthCheckResponse]) => {
          serviceImpl.watch(request, observer)
        }))
      .build()
  }
  
  trait HealthBlockingClient {
    def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[Health] = Health
    def check(request: grpc.health.v1.HealthCheckRequest): grpc.health.v1.HealthCheckResponse
    def watch(request: grpc.health.v1.HealthCheckRequest): scala.collection.Iterator[grpc.health.v1.HealthCheckResponse]
  }
  
  class HealthBlockingStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[HealthBlockingStub](channel, options) with HealthBlockingClient {
    override def check(request: grpc.health.v1.HealthCheckRequest): grpc.health.v1.HealthCheckResponse = {
      _root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_CHECK, options, request)
    }
    
    override def watch(request: grpc.health.v1.HealthCheckRequest): scala.collection.Iterator[grpc.health.v1.HealthCheckResponse] = {
      _root_.scalapb.grpc.ClientCalls.blockingServerStreamingCall(channel, METHOD_WATCH, options, request)
    }
    
    override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): HealthBlockingStub = new HealthBlockingStub(channel, options)
  }
  
  class HealthStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[HealthStub](channel, options) with Health {
    override def check(request: grpc.health.v1.HealthCheckRequest): scala.concurrent.Future[grpc.health.v1.HealthCheckResponse] = {
      _root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_CHECK, options, request)
    }
    
    override def watch(request: grpc.health.v1.HealthCheckRequest, responseObserver: _root_.io.grpc.stub.StreamObserver[grpc.health.v1.HealthCheckResponse]): _root_.scala.Unit = {
      _root_.scalapb.grpc.ClientCalls.asyncServerStreamingCall(channel, METHOD_WATCH, options, request, responseObserver)
    }
    
    override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): HealthStub = new HealthStub(channel, options)
  }
  
  object HealthStub extends _root_.io.grpc.stub.AbstractStub.StubFactory[HealthStub] {
    override def newStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): HealthStub = new HealthStub(channel, options)
    
    implicit val stubFactory: _root_.io.grpc.stub.AbstractStub.StubFactory[HealthStub] = this
  }
  
  def bindService(serviceImpl: Health, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = Health.bindService(serviceImpl, executionContext)
  
  def blockingStub(channel: _root_.io.grpc.Channel): HealthBlockingStub = new HealthBlockingStub(channel)
  
  def stub(channel: _root_.io.grpc.Channel): HealthStub = new HealthStub(channel)
  
  def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = grpc.health.v1.HealthRpcProto.javaDescriptor.getServices().get(0)
  
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy