<gh_stars>10-100
# Generated by the Protocol Buffers compiler. DO NOT EDIT!
# source: examples/cluster_grain_hello_world/messages/protos.proto
# plugin: grpclib.plugin.main
import abc
import typing

import grpclib.const
import grpclib.client
if typing.TYPE_CHECKING:
    import grpclib.server

import examples.cluster_grain_hello_world.messages.protos_pb2


class HelloGrainBase(abc.ABC):

    @abc.abstractmethod
    async def SayHello(self, stream: 'grpclib.server.Stream[examples.cluster_grain_hello_world.messages.protos_pb2.HelloRequest, examples.cluster_grain_hello_world.messages.protos_pb2.HelloResponse]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/messages.HelloGrain/SayHello': grpclib.const.Handler(
                self.SayHello,
                grpclib.const.Cardinality.UNARY_UNARY,
                examples.cluster_grain_hello_world.messages.protos_pb2.HelloRequest,
                examples.cluster_grain_hello_world.messages.protos_pb2.HelloResponse,
            ),
        }


class HelloGrainStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.SayHello = grpclib.client.UnaryUnaryMethod(
            channel,
            '/messages.HelloGrain/SayHello',
            examples.cluster_grain_hello_world.messages.protos_pb2.HelloRequest,
            examples.cluster_grain_hello_world.messages.protos_pb2.HelloResponse,
        )

# Generated by the Protocol Buffers compiler. DO NOT EDIT!
# source: examples/cluster_grain_hello_world/messages/protos.proto
# plugin: grpclib.plugin.main
import abc
import typing

import grpclib.const
import grpclib.client
if typing.TYPE_CHECKING:
    import grpclib.server

import examples.cluster_grain_hello_world.messages.protos_pb2


class HelloGrainBase(abc.ABC):

    @abc.abstractmethod
    async def SayHello(self, stream: 'grpclib.server.Stream[examples.cluster_grain_hello_world.messages.protos_pb2.HelloRequest, examples.cluster_grain_hello_world.messages.protos_pb2.HelloResponse]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/messages.HelloGrain/SayHello': grpclib.const.Handler(
                self.SayHello,
                grpclib.const.Cardinality.UNARY_UNARY,
                examples.cluster_grain_hello_world.messages.protos_pb2.HelloRequest,
                examples.cluster_grain_hello_world.messages.protos_pb2.HelloResponse,
            ),
        }


class HelloGrainStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.SayHello = grpclib.client.UnaryUnaryMethod(
            channel,
            '/messages.HelloGrain/SayHello',
            examples.cluster_grain_hello_world.messages.protos_pb2.HelloRequest,
            examples.cluster_grain_hello_world.messages.protos_pb2.HelloResponse,
        )
# Generated by the Protocol Buffers compiler. DO NOT EDIT! # source: examples/cluster_grain_hello_world/messages/protos.proto # plugin: grpclib.plugin.main