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

from . import miscellaneous_pb2 as miscellaneous__pb2
from . import users_pb2 as users__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.EditUserLocalName = channel.unary_unary(
                '/dialog.Users/EditUserLocalName',
                request_serializer=users__pb2.RequestEditUserLocalName.SerializeToString,
                response_deserializer=miscellaneous__pb2.ResponseSeq.FromString,
                )
        self.LoadFullUsers = channel.unary_unary(
                '/dialog.Users/LoadFullUsers',
                request_serializer=users__pb2.RequestLoadFullUsers.SerializeToString,
                response_deserializer=users__pb2.ResponseLoadFullUsers.FromString,
                )
        self.LoadUserData = channel.unary_unary(
                '/dialog.Users/LoadUserData',
                request_serializer=users__pb2.RequestLoadUserData.SerializeToString,
                response_deserializer=users__pb2.ResponseLoadUserData.FromString,
                )


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

    def EditUserLocalName(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 LoadFullUsers(self, request, context):
        """/ Deprecated
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def LoadUserData(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_UsersServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'EditUserLocalName': grpc.unary_unary_rpc_method_handler(
                    servicer.EditUserLocalName,
                    request_deserializer=users__pb2.RequestEditUserLocalName.FromString,
                    response_serializer=miscellaneous__pb2.ResponseSeq.SerializeToString,
            ),
            'LoadFullUsers': grpc.unary_unary_rpc_method_handler(
                    servicer.LoadFullUsers,
                    request_deserializer=users__pb2.RequestLoadFullUsers.FromString,
                    response_serializer=users__pb2.ResponseLoadFullUsers.SerializeToString,
            ),
            'LoadUserData': grpc.unary_unary_rpc_method_handler(
                    servicer.LoadUserData,
                    request_deserializer=users__pb2.RequestLoadUserData.FromString,
                    response_serializer=users__pb2.ResponseLoadUserData.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dialog.Users', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def EditUserLocalName(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, '/dialog.Users/EditUserLocalName',
            users__pb2.RequestEditUserLocalName.SerializeToString,
            miscellaneous__pb2.ResponseSeq.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def LoadFullUsers(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, '/dialog.Users/LoadFullUsers',
            users__pb2.RequestLoadFullUsers.SerializeToString,
            users__pb2.ResponseLoadFullUsers.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def LoadUserData(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, '/dialog.Users/LoadUserData',
            users__pb2.RequestLoadUserData.SerializeToString,
            users__pb2.ResponseLoadUserData.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
