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

from . import listener_pb2 as proto_dot_listener__pb2
from . import response_pb2 as proto_dot_response__pb2

GRPC_GENERATED_VERSION = '1.73.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in proto/listener_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListenFateArk = channel.unary_stream(
                '/fateark.proto.listener.ListenerService/ListenFateArk',
                request_serializer=proto_dot_listener__pb2.ListenFateArkRequest.SerializeToString,
                response_deserializer=proto_dot_listener__pb2.Output.FromString,
                _registered_method=True)
        self.ListenPackets = channel.unary_stream(
                '/fateark.proto.listener.ListenerService/ListenPackets',
                request_serializer=proto_dot_listener__pb2.ListenPacketsRequest.SerializeToString,
                response_deserializer=proto_dot_listener__pb2.Packet.FromString,
                _registered_method=True)
        self.ListenTypedPacket = channel.unary_unary(
                '/fateark.proto.listener.ListenerService/ListenTypedPacket',
                request_serializer=proto_dot_listener__pb2.ListenTypedPacketRequest.SerializeToString,
                response_deserializer=proto_dot_response__pb2.GeneralResponse.FromString,
                _registered_method=True)
        self.ListenPlayerChange = channel.unary_stream(
                '/fateark.proto.listener.ListenerService/ListenPlayerChange',
                request_serializer=proto_dot_listener__pb2.ListenPlayerChangeRequest.SerializeToString,
                response_deserializer=proto_dot_listener__pb2.PlayerAction.FromString,
                _registered_method=True)
        self.ListenChat = channel.unary_stream(
                '/fateark.proto.listener.ListenerService/ListenChat',
                request_serializer=proto_dot_listener__pb2.ListenChatRequest.SerializeToString,
                response_deserializer=proto_dot_listener__pb2.Chat.FromString,
                _registered_method=True)
        self.ListenCommandBlock = channel.unary_stream(
                '/fateark.proto.listener.ListenerService/ListenCommandBlock',
                request_serializer=proto_dot_listener__pb2.ListenCommandBlockRequest.SerializeToString,
                response_deserializer=proto_dot_listener__pb2.Chat.FromString,
                _registered_method=True)


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

    def ListenFateArk(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 ListenPackets(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 ListenTypedPacket(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 ListenPlayerChange(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 ListenChat(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 ListenCommandBlock(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_ListenerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListenFateArk': grpc.unary_stream_rpc_method_handler(
                    servicer.ListenFateArk,
                    request_deserializer=proto_dot_listener__pb2.ListenFateArkRequest.FromString,
                    response_serializer=proto_dot_listener__pb2.Output.SerializeToString,
            ),
            'ListenPackets': grpc.unary_stream_rpc_method_handler(
                    servicer.ListenPackets,
                    request_deserializer=proto_dot_listener__pb2.ListenPacketsRequest.FromString,
                    response_serializer=proto_dot_listener__pb2.Packet.SerializeToString,
            ),
            'ListenTypedPacket': grpc.unary_unary_rpc_method_handler(
                    servicer.ListenTypedPacket,
                    request_deserializer=proto_dot_listener__pb2.ListenTypedPacketRequest.FromString,
                    response_serializer=proto_dot_response__pb2.GeneralResponse.SerializeToString,
            ),
            'ListenPlayerChange': grpc.unary_stream_rpc_method_handler(
                    servicer.ListenPlayerChange,
                    request_deserializer=proto_dot_listener__pb2.ListenPlayerChangeRequest.FromString,
                    response_serializer=proto_dot_listener__pb2.PlayerAction.SerializeToString,
            ),
            'ListenChat': grpc.unary_stream_rpc_method_handler(
                    servicer.ListenChat,
                    request_deserializer=proto_dot_listener__pb2.ListenChatRequest.FromString,
                    response_serializer=proto_dot_listener__pb2.Chat.SerializeToString,
            ),
            'ListenCommandBlock': grpc.unary_stream_rpc_method_handler(
                    servicer.ListenCommandBlock,
                    request_deserializer=proto_dot_listener__pb2.ListenCommandBlockRequest.FromString,
                    response_serializer=proto_dot_listener__pb2.Chat.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'fateark.proto.listener.ListenerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('fateark.proto.listener.ListenerService', rpc_method_handlers)


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

    @staticmethod
    def ListenFateArk(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_stream(
            request,
            target,
            '/fateark.proto.listener.ListenerService/ListenFateArk',
            proto_dot_listener__pb2.ListenFateArkRequest.SerializeToString,
            proto_dot_listener__pb2.Output.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListenPackets(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_stream(
            request,
            target,
            '/fateark.proto.listener.ListenerService/ListenPackets',
            proto_dot_listener__pb2.ListenPacketsRequest.SerializeToString,
            proto_dot_listener__pb2.Packet.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListenTypedPacket(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,
            '/fateark.proto.listener.ListenerService/ListenTypedPacket',
            proto_dot_listener__pb2.ListenTypedPacketRequest.SerializeToString,
            proto_dot_response__pb2.GeneralResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListenPlayerChange(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_stream(
            request,
            target,
            '/fateark.proto.listener.ListenerService/ListenPlayerChange',
            proto_dot_listener__pb2.ListenPlayerChangeRequest.SerializeToString,
            proto_dot_listener__pb2.PlayerAction.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListenChat(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_stream(
            request,
            target,
            '/fateark.proto.listener.ListenerService/ListenChat',
            proto_dot_listener__pb2.ListenChatRequest.SerializeToString,
            proto_dot_listener__pb2.Chat.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListenCommandBlock(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_stream(
            request,
            target,
            '/fateark.proto.listener.ListenerService/ListenCommandBlock',
            proto_dot_listener__pb2.ListenCommandBlockRequest.SerializeToString,
            proto_dot_listener__pb2.Chat.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
