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

from angzarr_client.proto.angzarr import aggregate_pb2 as angzarr_dot_aggregate__pb2
from angzarr_client.proto.angzarr import process_manager_pb2 as angzarr_dot_process__manager__pb2
from angzarr_client.proto.angzarr import types_pb2 as angzarr_dot_types__pb2


class AggregateServiceStub(object):
    """AggregateService: client logic that processes commands and emits events
    Also known as Command Handler in CQRS terminology
    client logic doesn't care about sync - coordinator decides
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetDescriptor = channel.unary_unary(
                '/angzarr.AggregateService/GetDescriptor',
                request_serializer=angzarr_dot_types__pb2.GetDescriptorRequest.SerializeToString,
                response_deserializer=angzarr_dot_types__pb2.ComponentDescriptor.FromString,
                _registered_method=True)
        self.Handle = channel.unary_unary(
                '/angzarr.AggregateService/Handle',
                request_serializer=angzarr_dot_types__pb2.ContextualCommand.SerializeToString,
                response_deserializer=angzarr_dot_types__pb2.BusinessResponse.FromString,
                _registered_method=True)


class AggregateServiceServicer(object):
    """AggregateService: client logic that processes commands and emits events
    Also known as Command Handler in CQRS terminology
    client logic doesn't care about sync - coordinator decides
    """

    def GetDescriptor(self, request, context):
        """Self-description: component type, subscribed domains, handled command types
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Handle(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_AggregateServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetDescriptor': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDescriptor,
                    request_deserializer=angzarr_dot_types__pb2.GetDescriptorRequest.FromString,
                    response_serializer=angzarr_dot_types__pb2.ComponentDescriptor.SerializeToString,
            ),
            'Handle': grpc.unary_unary_rpc_method_handler(
                    servicer.Handle,
                    request_deserializer=angzarr_dot_types__pb2.ContextualCommand.FromString,
                    response_serializer=angzarr_dot_types__pb2.BusinessResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'angzarr.AggregateService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('angzarr.AggregateService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class AggregateService(object):
    """AggregateService: client logic that processes commands and emits events
    Also known as Command Handler in CQRS terminology
    client logic doesn't care about sync - coordinator decides
    """

    @staticmethod
    def GetDescriptor(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,
            '/angzarr.AggregateService/GetDescriptor',
            angzarr_dot_types__pb2.GetDescriptorRequest.SerializeToString,
            angzarr_dot_types__pb2.ComponentDescriptor.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Handle(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,
            '/angzarr.AggregateService/Handle',
            angzarr_dot_types__pb2.ContextualCommand.SerializeToString,
            angzarr_dot_types__pb2.BusinessResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


class AggregateCoordinatorServiceStub(object):
    """AggregateCoordinatorService: orchestrates command processing for aggregates
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Handle = channel.unary_unary(
                '/angzarr.AggregateCoordinatorService/Handle',
                request_serializer=angzarr_dot_types__pb2.CommandBook.SerializeToString,
                response_deserializer=angzarr_dot_types__pb2.CommandResponse.FromString,
                _registered_method=True)
        self.HandleSync = channel.unary_unary(
                '/angzarr.AggregateCoordinatorService/HandleSync',
                request_serializer=angzarr_dot_types__pb2.SyncCommandBook.SerializeToString,
                response_deserializer=angzarr_dot_types__pb2.CommandResponse.FromString,
                _registered_method=True)
        self.DryRunHandle = channel.unary_unary(
                '/angzarr.AggregateCoordinatorService/DryRunHandle',
                request_serializer=angzarr_dot_types__pb2.DryRunRequest.SerializeToString,
                response_deserializer=angzarr_dot_types__pb2.CommandResponse.FromString,
                _registered_method=True)


class AggregateCoordinatorServiceServicer(object):
    """AggregateCoordinatorService: orchestrates command processing for aggregates
    """

    def Handle(self, request, context):
        """Async processing - fire and forget
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def HandleSync(self, request, context):
        """Sync processing - waits for completion based on sync_mode
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DryRunHandle(self, request, context):
        """Dry-run: execute against temporal state without persisting.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AggregateCoordinatorServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Handle': grpc.unary_unary_rpc_method_handler(
                    servicer.Handle,
                    request_deserializer=angzarr_dot_types__pb2.CommandBook.FromString,
                    response_serializer=angzarr_dot_types__pb2.CommandResponse.SerializeToString,
            ),
            'HandleSync': grpc.unary_unary_rpc_method_handler(
                    servicer.HandleSync,
                    request_deserializer=angzarr_dot_types__pb2.SyncCommandBook.FromString,
                    response_serializer=angzarr_dot_types__pb2.CommandResponse.SerializeToString,
            ),
            'DryRunHandle': grpc.unary_unary_rpc_method_handler(
                    servicer.DryRunHandle,
                    request_deserializer=angzarr_dot_types__pb2.DryRunRequest.FromString,
                    response_serializer=angzarr_dot_types__pb2.CommandResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'angzarr.AggregateCoordinatorService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('angzarr.AggregateCoordinatorService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class AggregateCoordinatorService(object):
    """AggregateCoordinatorService: orchestrates command processing for aggregates
    """

    @staticmethod
    def Handle(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,
            '/angzarr.AggregateCoordinatorService/Handle',
            angzarr_dot_types__pb2.CommandBook.SerializeToString,
            angzarr_dot_types__pb2.CommandResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def HandleSync(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,
            '/angzarr.AggregateCoordinatorService/HandleSync',
            angzarr_dot_types__pb2.SyncCommandBook.SerializeToString,
            angzarr_dot_types__pb2.CommandResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DryRunHandle(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,
            '/angzarr.AggregateCoordinatorService/DryRunHandle',
            angzarr_dot_types__pb2.DryRunRequest.SerializeToString,
            angzarr_dot_types__pb2.CommandResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


class SpeculativeServiceStub(object):
    """Speculative execution service - execute without persisting side effects.
    Supports "what-if" scenarios for commands, projectors, sagas, and process managers.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.DryRunCommand = channel.unary_unary(
                '/angzarr.SpeculativeService/DryRunCommand',
                request_serializer=angzarr_dot_types__pb2.DryRunRequest.SerializeToString,
                response_deserializer=angzarr_dot_types__pb2.CommandResponse.FromString,
                _registered_method=True)
        self.SpeculateProjector = channel.unary_unary(
                '/angzarr.SpeculativeService/SpeculateProjector',
                request_serializer=angzarr_dot_aggregate__pb2.SpeculateProjectorRequest.SerializeToString,
                response_deserializer=angzarr_dot_types__pb2.Projection.FromString,
                _registered_method=True)
        self.SpeculateSaga = channel.unary_unary(
                '/angzarr.SpeculativeService/SpeculateSaga',
                request_serializer=angzarr_dot_aggregate__pb2.SpeculateSagaRequest.SerializeToString,
                response_deserializer=angzarr_dot_types__pb2.SagaResponse.FromString,
                _registered_method=True)
        self.SpeculateProcessManager = channel.unary_unary(
                '/angzarr.SpeculativeService/SpeculateProcessManager',
                request_serializer=angzarr_dot_aggregate__pb2.SpeculatePmRequest.SerializeToString,
                response_deserializer=angzarr_dot_process__manager__pb2.ProcessManagerHandleResponse.FromString,
                _registered_method=True)


class SpeculativeServiceServicer(object):
    """Speculative execution service - execute without persisting side effects.
    Supports "what-if" scenarios for commands, projectors, sagas, and process managers.
    """

    def DryRunCommand(self, request, context):
        """Execute command against temporal state without persisting.
        Returns speculative events only — no side effects.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SpeculateProjector(self, request, context):
        """Execute projector against provided events without persisting.
        Returns projection result.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SpeculateSaga(self, request, context):
        """Execute saga against provided events without persisting.
        Returns commands that would be produced.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SpeculateProcessManager(self, request, context):
        """Execute process manager against provided context without persisting.
        Returns commands and PM events that would be produced.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SpeculativeServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'DryRunCommand': grpc.unary_unary_rpc_method_handler(
                    servicer.DryRunCommand,
                    request_deserializer=angzarr_dot_types__pb2.DryRunRequest.FromString,
                    response_serializer=angzarr_dot_types__pb2.CommandResponse.SerializeToString,
            ),
            'SpeculateProjector': grpc.unary_unary_rpc_method_handler(
                    servicer.SpeculateProjector,
                    request_deserializer=angzarr_dot_aggregate__pb2.SpeculateProjectorRequest.FromString,
                    response_serializer=angzarr_dot_types__pb2.Projection.SerializeToString,
            ),
            'SpeculateSaga': grpc.unary_unary_rpc_method_handler(
                    servicer.SpeculateSaga,
                    request_deserializer=angzarr_dot_aggregate__pb2.SpeculateSagaRequest.FromString,
                    response_serializer=angzarr_dot_types__pb2.SagaResponse.SerializeToString,
            ),
            'SpeculateProcessManager': grpc.unary_unary_rpc_method_handler(
                    servicer.SpeculateProcessManager,
                    request_deserializer=angzarr_dot_aggregate__pb2.SpeculatePmRequest.FromString,
                    response_serializer=angzarr_dot_process__manager__pb2.ProcessManagerHandleResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'angzarr.SpeculativeService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('angzarr.SpeculativeService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class SpeculativeService(object):
    """Speculative execution service - execute without persisting side effects.
    Supports "what-if" scenarios for commands, projectors, sagas, and process managers.
    """

    @staticmethod
    def DryRunCommand(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,
            '/angzarr.SpeculativeService/DryRunCommand',
            angzarr_dot_types__pb2.DryRunRequest.SerializeToString,
            angzarr_dot_types__pb2.CommandResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SpeculateProjector(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,
            '/angzarr.SpeculativeService/SpeculateProjector',
            angzarr_dot_aggregate__pb2.SpeculateProjectorRequest.SerializeToString,
            angzarr_dot_types__pb2.Projection.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SpeculateSaga(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,
            '/angzarr.SpeculativeService/SpeculateSaga',
            angzarr_dot_aggregate__pb2.SpeculateSagaRequest.SerializeToString,
            angzarr_dot_types__pb2.SagaResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SpeculateProcessManager(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,
            '/angzarr.SpeculativeService/SpeculateProcessManager',
            angzarr_dot_aggregate__pb2.SpeculatePmRequest.SerializeToString,
            angzarr_dot_process__manager__pb2.ProcessManagerHandleResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
