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

from . import add_voter_pb2 as add__voter__pb2


class RaftAdminStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.AddVoter = channel.unary_unary(
                '/RaftAdmin/AddVoter',
                request_serializer=add__voter__pb2.AddVoterRequest.SerializeToString,
                response_deserializer=add__voter__pb2.Future.FromString,
                )
        self.Await = channel.unary_unary(
                '/RaftAdmin/Await',
                request_serializer=add__voter__pb2.Future.SerializeToString,
                response_deserializer=add__voter__pb2.AwaitResponse.FromString,
                )
        self.Forget = channel.unary_unary(
                '/RaftAdmin/Forget',
                request_serializer=add__voter__pb2.Future.SerializeToString,
                response_deserializer=add__voter__pb2.ForgetResponse.FromString,
                )


class RaftAdminServicer(object):
    """Missing associated documentation comment in .proto file."""

    def AddVoter(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Await(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Forget(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_RaftAdminServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AddVoter': grpc.unary_unary_rpc_method_handler(
                    servicer.AddVoter,
                    request_deserializer=add__voter__pb2.AddVoterRequest.FromString,
                    response_serializer=add__voter__pb2.Future.SerializeToString,
            ),
            'Await': grpc.unary_unary_rpc_method_handler(
                    servicer.Await,
                    request_deserializer=add__voter__pb2.Future.FromString,
                    response_serializer=add__voter__pb2.AwaitResponse.SerializeToString,
            ),
            'Forget': grpc.unary_unary_rpc_method_handler(
                    servicer.Forget,
                    request_deserializer=add__voter__pb2.Future.FromString,
                    response_serializer=add__voter__pb2.ForgetResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'RaftAdmin', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class RaftAdmin(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def AddVoter(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, '/RaftAdmin/AddVoter',
            add__voter__pb2.AddVoterRequest.SerializeToString,
            add__voter__pb2.Future.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Await(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, '/RaftAdmin/Await',
            add__voter__pb2.Future.SerializeToString,
            add__voter__pb2.AwaitResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Forget(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, '/RaftAdmin/Forget',
            add__voter__pb2.Future.SerializeToString,
            add__voter__pb2.ForgetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
