# 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 presence_pb2 as presence__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.StartTyping = channel.unary_unary(
                '/dialog.Presence/StartTyping',
                request_serializer=presence__pb2.RequestStartTyping.SerializeToString,
                response_deserializer=miscellaneous__pb2.ResponseVoid.FromString,
                )
        self.StopTyping = channel.unary_unary(
                '/dialog.Presence/StopTyping',
                request_serializer=presence__pb2.RequestStopTyping.SerializeToString,
                response_deserializer=miscellaneous__pb2.ResponseVoid.FromString,
                )
        self.SetOnline = channel.unary_unary(
                '/dialog.Presence/SetOnline',
                request_serializer=presence__pb2.RequestSetOnline.SerializeToString,
                response_deserializer=miscellaneous__pb2.ResponseVoid.FromString,
                )
        self.GetUserLastPresence = channel.unary_unary(
                '/dialog.Presence/GetUserLastPresence',
                request_serializer=presence__pb2.RequestGetUserLastPresence.SerializeToString,
                response_deserializer=presence__pb2.ResponseUserLastPresence.FromString,
                )


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

    def StartTyping(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 StopTyping(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 SetOnline(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 GetUserLastPresence(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_PresenceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'StartTyping': grpc.unary_unary_rpc_method_handler(
                    servicer.StartTyping,
                    request_deserializer=presence__pb2.RequestStartTyping.FromString,
                    response_serializer=miscellaneous__pb2.ResponseVoid.SerializeToString,
            ),
            'StopTyping': grpc.unary_unary_rpc_method_handler(
                    servicer.StopTyping,
                    request_deserializer=presence__pb2.RequestStopTyping.FromString,
                    response_serializer=miscellaneous__pb2.ResponseVoid.SerializeToString,
            ),
            'SetOnline': grpc.unary_unary_rpc_method_handler(
                    servicer.SetOnline,
                    request_deserializer=presence__pb2.RequestSetOnline.FromString,
                    response_serializer=miscellaneous__pb2.ResponseVoid.SerializeToString,
            ),
            'GetUserLastPresence': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUserLastPresence,
                    request_deserializer=presence__pb2.RequestGetUserLastPresence.FromString,
                    response_serializer=presence__pb2.ResponseUserLastPresence.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dialog.Presence', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def StartTyping(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.Presence/StartTyping',
            presence__pb2.RequestStartTyping.SerializeToString,
            miscellaneous__pb2.ResponseVoid.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StopTyping(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.Presence/StopTyping',
            presence__pb2.RequestStopTyping.SerializeToString,
            miscellaneous__pb2.ResponseVoid.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetOnline(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.Presence/SetOnline',
            presence__pb2.RequestSetOnline.SerializeToString,
            miscellaneous__pb2.ResponseVoid.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetUserLastPresence(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.Presence/GetUserLastPresence',
            presence__pb2.RequestGetUserLastPresence.SerializeToString,
            presence__pb2.ResponseUserLastPresence.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
