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

from . import admin_pb2 as admin__pb2
from . import communities_pb2 as communities__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetUserEmailByUsername = channel.unary_unary(
                '/org.couchers.api.admin.Admin/GetUserEmailByUsername',
                request_serializer=admin__pb2.GetUserEmailByUsernameReq.SerializeToString,
                response_deserializer=admin__pb2.GetUserEmailRes.FromString,
                )
        self.GetUserEmailById = channel.unary_unary(
                '/org.couchers.api.admin.Admin/GetUserEmailById',
                request_serializer=admin__pb2.GetUserEmailByIdReq.SerializeToString,
                response_deserializer=admin__pb2.GetUserEmailRes.FromString,
                )
        self.CreateCommunity = channel.unary_unary(
                '/org.couchers.api.admin.Admin/CreateCommunity',
                request_serializer=admin__pb2.CreateCommunityReq.SerializeToString,
                response_deserializer=communities__pb2.Community.FromString,
                )
        self.BanUser = channel.unary_unary(
                '/org.couchers.api.admin.Admin/BanUser',
                request_serializer=admin__pb2.BanUserReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.DeleteUser = channel.unary_unary(
                '/org.couchers.api.admin.Admin/DeleteUser',
                request_serializer=admin__pb2.DeleteUserReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


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

    def GetUserEmailByUsername(self, request, context):
        """Gets user email based user_name
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetUserEmailById(self, request, context):
        """Gets user email based user_id
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateCommunity(self, request, context):
        """Creates a new community
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def BanUser(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 DeleteUser(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_AdminServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetUserEmailByUsername': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUserEmailByUsername,
                    request_deserializer=admin__pb2.GetUserEmailByUsernameReq.FromString,
                    response_serializer=admin__pb2.GetUserEmailRes.SerializeToString,
            ),
            'GetUserEmailById': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUserEmailById,
                    request_deserializer=admin__pb2.GetUserEmailByIdReq.FromString,
                    response_serializer=admin__pb2.GetUserEmailRes.SerializeToString,
            ),
            'CreateCommunity': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateCommunity,
                    request_deserializer=admin__pb2.CreateCommunityReq.FromString,
                    response_serializer=communities__pb2.Community.SerializeToString,
            ),
            'BanUser': grpc.unary_unary_rpc_method_handler(
                    servicer.BanUser,
                    request_deserializer=admin__pb2.BanUserReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'DeleteUser': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteUser,
                    request_deserializer=admin__pb2.DeleteUserReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.couchers.api.admin.Admin', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetUserEmailByUsername(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.api.admin.Admin/GetUserEmailByUsername',
            admin__pb2.GetUserEmailByUsernameReq.SerializeToString,
            admin__pb2.GetUserEmailRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetUserEmailById(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.api.admin.Admin/GetUserEmailById',
            admin__pb2.GetUserEmailByIdReq.SerializeToString,
            admin__pb2.GetUserEmailRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateCommunity(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.api.admin.Admin/CreateCommunity',
            admin__pb2.CreateCommunityReq.SerializeToString,
            communities__pb2.Community.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def BanUser(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.api.admin.Admin/BanUser',
            admin__pb2.BanUserReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteUser(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.api.admin.Admin/DeleteUser',
            admin__pb2.DeleteUserReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
