# Generated by the Protocol Buffers compiler. DO NOT EDIT!
# source: adder/v1/adder.proto
# plugin: grpclib.plugin.main
import abc
import typing

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

import google.api.annotations_pb2
import adder.v1.adder_pb2


class AdderBase(abc.ABC):

    @abc.abstractmethod
    async def Add(self, stream: 'grpclib.server.Stream[adder.v1.adder_pb2.AddRequest, adder.v1.adder_pb2.AddResponse]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/distributedcalculator.adder.v1.Adder/Add': grpclib.const.Handler(
                self.Add,
                grpclib.const.Cardinality.UNARY_UNARY,
                adder.v1.adder_pb2.AddRequest,
                adder.v1.adder_pb2.AddResponse,
            ),
        }


class AdderStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.Add = grpclib.client.UnaryUnaryMethod(
            channel,
            '/distributedcalculator.adder.v1.Adder/Add',
            adder.v1.adder_pb2.AddRequest,
            adder.v1.adder_pb2.AddResponse,
        )

# Generated by the Protocol Buffers compiler. DO NOT EDIT!
# source: adder/v1/adder.proto
# plugin: grpclib.plugin.main
import abc
import typing

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

import google.api.annotations_pb2
import adder.v1.adder_pb2


class AdderBase(abc.ABC):

    @abc.abstractmethod
    async def Add(self, stream: 'grpclib.server.Stream[adder.v1.adder_pb2.AddRequest, adder.v1.adder_pb2.AddResponse]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/distributedcalculator.adder.v1.Adder/Add': grpclib.const.Handler(
                self.Add,
                grpclib.const.Cardinality.UNARY_UNARY,
                adder.v1.adder_pb2.AddRequest,
                adder.v1.adder_pb2.AddResponse,
            ),
        }


class AdderStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.Add = grpclib.client.UnaryUnaryMethod(
            channel,
            '/distributedcalculator.adder.v1.Adder/Add',
            adder.v1.adder_pb2.AddRequest,
            adder.v1.adder_pb2.AddResponse,
        )

# Generated by the Protocol Buffers compiler. DO NOT EDIT! # source: adder/v1/adder.proto # plugin: grpclib.plugin.main