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

from . import blocking_pb2 as blocking__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.BlockUser = channel.unary_unary(
                '/org.couchers.blocking.Blocking/BlockUser',
                request_serializer=blocking__pb2.BlockUserReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.UnblockUser = channel.unary_unary(
                '/org.couchers.blocking.Blocking/UnblockUser',
                request_serializer=blocking__pb2.UnblockUserReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.GetBlockedUsers = channel.unary_unary(
                '/org.couchers.blocking.Blocking/GetBlockedUsers',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=blocking__pb2.GetBlockedUsersRes.FromString,
                )


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

    def BlockUser(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 UnblockUser(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 GetBlockedUsers(self, request, context):
        """Returns all users blocked by a given account
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_BlockingServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'BlockUser': grpc.unary_unary_rpc_method_handler(
                    servicer.BlockUser,
                    request_deserializer=blocking__pb2.BlockUserReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'UnblockUser': grpc.unary_unary_rpc_method_handler(
                    servicer.UnblockUser,
                    request_deserializer=blocking__pb2.UnblockUserReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetBlockedUsers': grpc.unary_unary_rpc_method_handler(
                    servicer.GetBlockedUsers,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=blocking__pb2.GetBlockedUsersRes.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.couchers.blocking.Blocking', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def BlockUser(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, '/org.couchers.blocking.Blocking/BlockUser',
            blocking__pb2.BlockUserReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UnblockUser(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, '/org.couchers.blocking.Blocking/UnblockUser',
            blocking__pb2.UnblockUserReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetBlockedUsers(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, '/org.couchers.blocking.Blocking/GetBlockedUsers',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            blocking__pb2.GetBlockedUsersRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
