# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from Testing_protos import AddAltTypes_pb2 as Testing__protos_dot_AddAltTypes__pb2
from Testing_protos import AddTypes_pb2 as Testing__protos_dot_AddTypes__pb2


class AdditionStub(object):
    """A service for adding integer numbers
    """

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.AddOne = channel.unary_unary(
                '/Testing.Addition/AddOne',
                request_serializer=Testing__protos_dot_AddAltTypes__pb2.Addend.SerializeToString,
                response_deserializer=Testing__protos_dot_AddAltTypes__pb2.Sum.FromString,
                )
        self.AddOnes = channel.unary_stream(
                '/Testing.Addition/AddOnes',
                request_serializer=Testing__protos_dot_AddAltTypes__pb2.Addend.SerializeToString,
                response_deserializer=Testing__protos_dot_AddAltTypes__pb2.Sum.FromString,
                )
        self.AddsOne = channel.stream_unary(
                '/Testing.Addition/AddsOne',
                request_serializer=Testing__protos_dot_AddAltTypes__pb2.Addend.SerializeToString,
                response_deserializer=Testing__protos_dot_AddAltTypes__pb2.Sum.FromString,
                )
        self.AddsOnes = channel.stream_stream(
                '/Testing.Addition/AddsOnes',
                request_serializer=Testing__protos_dot_AddAltTypes__pb2.Addend.SerializeToString,
                response_deserializer=Testing__protos_dot_AddAltTypes__pb2.Sum.FromString,
                )
        self.Status = channel.unary_unary(
                '/Testing.Addition/Status',
                request_serializer=Testing__protos_dot_AddTypes__pb2.StatusQuery.SerializeToString,
                response_deserializer=Testing__protos_dot_AddTypes__pb2.StatusResponse.FromString,
                )


class AdditionServicer(object):
    """A service for adding integer numbers
    """

    def AddOne(self, request, context):
        """Add 1 to a number
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddOnes(self, request, context):
        """Add 1 to a number multiple times
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddsOne(self, request_iterator, context):
        """Add 1 to a sum of numbers
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddsOnes(self, request_iterator, context):
        """Add 1 to multiple numbers
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Status(self, request, context):
        """Introspect the service
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AdditionServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AddOne': grpc.unary_unary_rpc_method_handler(
                    servicer.AddOne,
                    request_deserializer=Testing__protos_dot_AddAltTypes__pb2.Addend.FromString,
                    response_serializer=Testing__protos_dot_AddAltTypes__pb2.Sum.SerializeToString,
            ),
            'AddOnes': grpc.unary_stream_rpc_method_handler(
                    servicer.AddOnes,
                    request_deserializer=Testing__protos_dot_AddAltTypes__pb2.Addend.FromString,
                    response_serializer=Testing__protos_dot_AddAltTypes__pb2.Sum.SerializeToString,
            ),
            'AddsOne': grpc.stream_unary_rpc_method_handler(
                    servicer.AddsOne,
                    request_deserializer=Testing__protos_dot_AddAltTypes__pb2.Addend.FromString,
                    response_serializer=Testing__protos_dot_AddAltTypes__pb2.Sum.SerializeToString,
            ),
            'AddsOnes': grpc.stream_stream_rpc_method_handler(
                    servicer.AddsOnes,
                    request_deserializer=Testing__protos_dot_AddAltTypes__pb2.Addend.FromString,
                    response_serializer=Testing__protos_dot_AddAltTypes__pb2.Sum.SerializeToString,
            ),
            'Status': grpc.unary_unary_rpc_method_handler(
                    servicer.Status,
                    request_deserializer=Testing__protos_dot_AddTypes__pb2.StatusQuery.FromString,
                    response_serializer=Testing__protos_dot_AddTypes__pb2.StatusResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'Testing.Addition', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Addition(object):
    """A service for adding integer numbers
    """

    @staticmethod
    def AddOne(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/Testing.Addition/AddOne',
            Testing__protos_dot_AddAltTypes__pb2.Addend.SerializeToString,
            Testing__protos_dot_AddAltTypes__pb2.Sum.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddOnes(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_stream(request, target, '/Testing.Addition/AddOnes',
            Testing__protos_dot_AddAltTypes__pb2.Addend.SerializeToString,
            Testing__protos_dot_AddAltTypes__pb2.Sum.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddsOne(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(request_iterator, target, '/Testing.Addition/AddsOne',
            Testing__protos_dot_AddAltTypes__pb2.Addend.SerializeToString,
            Testing__protos_dot_AddAltTypes__pb2.Sum.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddsOnes(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/Testing.Addition/AddsOnes',
            Testing__protos_dot_AddAltTypes__pb2.Addend.SerializeToString,
            Testing__protos_dot_AddAltTypes__pb2.Sum.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Status(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/Testing.Addition/Status',
            Testing__protos_dot_AddTypes__pb2.StatusQuery.SerializeToString,
            Testing__protos_dot_AddTypes__pb2.StatusResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
