# 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 google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from engram.v1 import agent_pb2 as engram_dot_v1_dot_agent__pb2

GRPC_GENERATED_VERSION = '1.76.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},'
        + ' but the generated code in proto/v1/agent_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 AgentServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateAgent = channel.unary_unary(
                '/dura.api.v1.AgentService/CreateAgent',
                request_serializer=engram_dot_v1_dot_agent__pb2.CreateAgentRequest.SerializeToString,
                response_deserializer=engram_dot_v1_dot_agent__pb2.CreateAgentResponse.FromString,
                _registered_method=True)
        self.GetAgent = channel.unary_unary(
                '/dura.api.v1.AgentService/GetAgent',
                request_serializer=engram_dot_v1_dot_agent__pb2.GetAgentRequest.SerializeToString,
                response_deserializer=engram_dot_v1_dot_agent__pb2.Agent.FromString,
                _registered_method=True)
        self.ListAgents = channel.unary_unary(
                '/dura.api.v1.AgentService/ListAgents',
                request_serializer=engram_dot_v1_dot_agent__pb2.ListAgentsRequest.SerializeToString,
                response_deserializer=engram_dot_v1_dot_agent__pb2.ListAgentsResponse.FromString,
                _registered_method=True)
        self.DeleteAgent = channel.unary_unary(
                '/dura.api.v1.AgentService/DeleteAgent',
                request_serializer=engram_dot_v1_dot_agent__pb2.DeleteAgentRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.ControlAgent = channel.unary_unary(
                '/dura.api.v1.AgentService/ControlAgent',
                request_serializer=engram_dot_v1_dot_agent__pb2.ControlAgentRequest.SerializeToString,
                response_deserializer=engram_dot_v1_dot_agent__pb2.ControlAgentResponse.FromString,
                _registered_method=True)
        self.Chat = channel.stream_stream(
                '/dura.api.v1.AgentService/Chat',
                request_serializer=engram_dot_v1_dot_agent__pb2.ClientMessage.SerializeToString,
                response_deserializer=engram_dot_v1_dot_agent__pb2.ServerMessage.FromString,
                _registered_method=True)
        self.Replay = channel.unary_stream(
                '/dura.api.v1.AgentService/Replay',
                request_serializer=engram_dot_v1_dot_agent__pb2.ReplayRequest.SerializeToString,
                response_deserializer=engram_dot_v1_dot_agent__pb2.ServerMessage.FromString,
                _registered_method=True)
        self.SetAgentStatus = channel.unary_unary(
                '/dura.api.v1.AgentService/SetAgentStatus',
                request_serializer=engram_dot_v1_dot_agent__pb2.SetAgentStatusRequest.SerializeToString,
                response_deserializer=engram_dot_v1_dot_agent__pb2.SetAgentStatusResponse.FromString,
                _registered_method=True)


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

    def CreateAgent(self, request, context):
        """Create a new durable agent
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAgent(self, request, context):
        """Get current agent state and metadata
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListAgents(self, request, context):
        """List all agents (with filters)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteAgent(self, request, context):
        """Delete agent (with safety)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ControlAgent(self, request, context):
        """Control commands (pause, resume, etc.)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Chat(self, request_iterator, context):
        """Primary real-time bidirectional interaction stream
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Replay(self, request, context):
        """Optional: replay historical stream from a point in time
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetAgentStatus(self, request, context):
        """Set agent status directly (for worker/internal use)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AgentServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateAgent,
                    request_deserializer=engram_dot_v1_dot_agent__pb2.CreateAgentRequest.FromString,
                    response_serializer=engram_dot_v1_dot_agent__pb2.CreateAgentResponse.SerializeToString,
            ),
            'GetAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAgent,
                    request_deserializer=engram_dot_v1_dot_agent__pb2.GetAgentRequest.FromString,
                    response_serializer=engram_dot_v1_dot_agent__pb2.Agent.SerializeToString,
            ),
            'ListAgents': grpc.unary_unary_rpc_method_handler(
                    servicer.ListAgents,
                    request_deserializer=engram_dot_v1_dot_agent__pb2.ListAgentsRequest.FromString,
                    response_serializer=engram_dot_v1_dot_agent__pb2.ListAgentsResponse.SerializeToString,
            ),
            'DeleteAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteAgent,
                    request_deserializer=engram_dot_v1_dot_agent__pb2.DeleteAgentRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'ControlAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.ControlAgent,
                    request_deserializer=engram_dot_v1_dot_agent__pb2.ControlAgentRequest.FromString,
                    response_serializer=engram_dot_v1_dot_agent__pb2.ControlAgentResponse.SerializeToString,
            ),
            'Chat': grpc.stream_stream_rpc_method_handler(
                    servicer.Chat,
                    request_deserializer=engram_dot_v1_dot_agent__pb2.ClientMessage.FromString,
                    response_serializer=engram_dot_v1_dot_agent__pb2.ServerMessage.SerializeToString,
            ),
            'Replay': grpc.unary_stream_rpc_method_handler(
                    servicer.Replay,
                    request_deserializer=engram_dot_v1_dot_agent__pb2.ReplayRequest.FromString,
                    response_serializer=engram_dot_v1_dot_agent__pb2.ServerMessage.SerializeToString,
            ),
            'SetAgentStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.SetAgentStatus,
                    request_deserializer=engram_dot_v1_dot_agent__pb2.SetAgentStatusRequest.FromString,
                    response_serializer=engram_dot_v1_dot_agent__pb2.SetAgentStatusResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dura.api.v1.AgentService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('dura.api.v1.AgentService', rpc_method_handlers)


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

    @staticmethod
    def CreateAgent(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,
            '/dura.api.v1.AgentService/CreateAgent',
            engram_dot_v1_dot_agent__pb2.CreateAgentRequest.SerializeToString,
            engram_dot_v1_dot_agent__pb2.CreateAgentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetAgent(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,
            '/dura.api.v1.AgentService/GetAgent',
            engram_dot_v1_dot_agent__pb2.GetAgentRequest.SerializeToString,
            engram_dot_v1_dot_agent__pb2.Agent.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListAgents(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,
            '/dura.api.v1.AgentService/ListAgents',
            engram_dot_v1_dot_agent__pb2.ListAgentsRequest.SerializeToString,
            engram_dot_v1_dot_agent__pb2.ListAgentsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteAgent(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,
            '/dura.api.v1.AgentService/DeleteAgent',
            engram_dot_v1_dot_agent__pb2.DeleteAgentRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ControlAgent(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,
            '/dura.api.v1.AgentService/ControlAgent',
            engram_dot_v1_dot_agent__pb2.ControlAgentRequest.SerializeToString,
            engram_dot_v1_dot_agent__pb2.ControlAgentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Chat(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(
            request_iterator,
            target,
            '/dura.api.v1.AgentService/Chat',
            engram_dot_v1_dot_agent__pb2.ClientMessage.SerializeToString,
            engram_dot_v1_dot_agent__pb2.ServerMessage.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Replay(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,
            '/dura.api.v1.AgentService/Replay',
            engram_dot_v1_dot_agent__pb2.ReplayRequest.SerializeToString,
            engram_dot_v1_dot_agent__pb2.ServerMessage.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetAgentStatus(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,
            '/dura.api.v1.AgentService/SetAgentStatus',
            engram_dot_v1_dot_agent__pb2.SetAgentStatusRequest.SerializeToString,
            engram_dot_v1_dot_agent__pb2.SetAgentStatusResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
