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

from eventsourcing_grpc.protos import (
    application_pb2 as eventsourcing__grpc_dot_protos_dot_application__pb2,
)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Ping = channel.unary_unary(
            "/eventsourcing_grpc.Application/Ping",
            request_serializer=eventsourcing__grpc_dot_protos_dot_application__pb2.Empty.SerializeToString,
            response_deserializer=eventsourcing__grpc_dot_protos_dot_application__pb2.Empty.FromString,
        )
        self.CallApplicationMethod = channel.unary_unary(
            "/eventsourcing_grpc.Application/CallApplicationMethod",
            request_serializer=eventsourcing__grpc_dot_protos_dot_application__pb2.MethodRequest.SerializeToString,
            response_deserializer=eventsourcing__grpc_dot_protos_dot_application__pb2.MethodReply.FromString,
        )
        self.Prompt = channel.unary_unary(
            "/eventsourcing_grpc.Application/Prompt",
            request_serializer=eventsourcing__grpc_dot_protos_dot_application__pb2.PromptRequest.SerializeToString,
            response_deserializer=eventsourcing__grpc_dot_protos_dot_application__pb2.Empty.FromString,
        )
        self.GetNotifications = channel.unary_unary(
            "/eventsourcing_grpc.Application/GetNotifications",
            request_serializer=eventsourcing__grpc_dot_protos_dot_application__pb2.NotificationsRequest.SerializeToString,
            response_deserializer=eventsourcing__grpc_dot_protos_dot_application__pb2.NotificationsReply.FromString,
        )


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

    def Ping(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 CallApplicationMethod(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 Prompt(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 GetNotifications(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_ApplicationServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "Ping": grpc.unary_unary_rpc_method_handler(
            servicer.Ping,
            request_deserializer=eventsourcing__grpc_dot_protos_dot_application__pb2.Empty.FromString,
            response_serializer=eventsourcing__grpc_dot_protos_dot_application__pb2.Empty.SerializeToString,
        ),
        "CallApplicationMethod": grpc.unary_unary_rpc_method_handler(
            servicer.CallApplicationMethod,
            request_deserializer=eventsourcing__grpc_dot_protos_dot_application__pb2.MethodRequest.FromString,
            response_serializer=eventsourcing__grpc_dot_protos_dot_application__pb2.MethodReply.SerializeToString,
        ),
        "Prompt": grpc.unary_unary_rpc_method_handler(
            servicer.Prompt,
            request_deserializer=eventsourcing__grpc_dot_protos_dot_application__pb2.PromptRequest.FromString,
            response_serializer=eventsourcing__grpc_dot_protos_dot_application__pb2.Empty.SerializeToString,
        ),
        "GetNotifications": grpc.unary_unary_rpc_method_handler(
            servicer.GetNotifications,
            request_deserializer=eventsourcing__grpc_dot_protos_dot_application__pb2.NotificationsRequest.FromString,
            response_serializer=eventsourcing__grpc_dot_protos_dot_application__pb2.NotificationsReply.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "eventsourcing_grpc.Application", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Ping(
        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,
            "/eventsourcing_grpc.Application/Ping",
            eventsourcing__grpc_dot_protos_dot_application__pb2.Empty.SerializeToString,
            eventsourcing__grpc_dot_protos_dot_application__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def CallApplicationMethod(
        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,
            "/eventsourcing_grpc.Application/CallApplicationMethod",
            eventsourcing__grpc_dot_protos_dot_application__pb2.MethodRequest.SerializeToString,
            eventsourcing__grpc_dot_protos_dot_application__pb2.MethodReply.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def Prompt(
        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,
            "/eventsourcing_grpc.Application/Prompt",
            eventsourcing__grpc_dot_protos_dot_application__pb2.PromptRequest.SerializeToString,
            eventsourcing__grpc_dot_protos_dot_application__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetNotifications(
        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,
            "/eventsourcing_grpc.Application/GetNotifications",
            eventsourcing__grpc_dot_protos_dot_application__pb2.NotificationsRequest.SerializeToString,
            eventsourcing__grpc_dot_protos_dot_application__pb2.NotificationsReply.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
