# 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 apexnova.entity import entity_service_pb2 as apexnova_dot_entity_dot_entity__service__pb2

GRPC_GENERATED_VERSION = '1.72.1'
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 apexnova/entity/entity_service_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 EntityServiceStub(object):
    """Service definition for managing entities.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateEntityUploadLink = channel.unary_unary(
                '/entity.EntityService/CreateEntityUploadLink',
                request_serializer=apexnova_dot_entity_dot_entity__service__pb2.CreateEntityUploadLinkRequest.SerializeToString,
                response_deserializer=apexnova_dot_entity_dot_entity__service__pb2.CreateEntityUploadLinkResponse.FromString,
                _registered_method=True)
        self.ReadEntity = channel.unary_unary(
                '/entity.EntityService/ReadEntity',
                request_serializer=apexnova_dot_entity_dot_entity__service__pb2.ReadEntityRequest.SerializeToString,
                response_deserializer=apexnova_dot_entity_dot_entity__service__pb2.ReadEntityResponse.FromString,
                _registered_method=True)
        self.UpdateEntity = channel.unary_unary(
                '/entity.EntityService/UpdateEntity',
                request_serializer=apexnova_dot_entity_dot_entity__service__pb2.UpdateEntityRequest.SerializeToString,
                response_deserializer=apexnova_dot_entity_dot_entity__service__pb2.UpdateEntityResponse.FromString,
                _registered_method=True)
        self.DeleteEntity = channel.unary_unary(
                '/entity.EntityService/DeleteEntity',
                request_serializer=apexnova_dot_entity_dot_entity__service__pb2.DeleteEntityRequest.SerializeToString,
                response_deserializer=apexnova_dot_entity_dot_entity__service__pb2.DeleteEntityResponse.FromString,
                _registered_method=True)
        self.FilterEntities = channel.unary_unary(
                '/entity.EntityService/FilterEntities',
                request_serializer=apexnova_dot_entity_dot_entity__service__pb2.FilterEntitiesRequest.SerializeToString,
                response_deserializer=apexnova_dot_entity_dot_entity__service__pb2.FilterEntitiesResponse.FromString,
                _registered_method=True)
        self.UpdateEntities = channel.unary_stream(
                '/entity.EntityService/UpdateEntities',
                request_serializer=apexnova_dot_entity_dot_entity__service__pb2.UpdateEntitiesRequest.SerializeToString,
                response_deserializer=apexnova_dot_entity_dot_entity__service__pb2.UpdateEntityResponse.FromString,
                _registered_method=True)
        self.DeleteEntities = channel.unary_stream(
                '/entity.EntityService/DeleteEntities',
                request_serializer=apexnova_dot_entity_dot_entity__service__pb2.DeleteEntitiesRequest.SerializeToString,
                response_deserializer=apexnova_dot_entity_dot_entity__service__pb2.DeleteEntityResponse.FromString,
                _registered_method=True)


class EntityServiceServicer(object):
    """Service definition for managing entities.
    """

    def CreateEntityUploadLink(self, request, context):
        """Creates an upload link for an entity.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ReadEntity(self, request, context):
        """Reads an entity by its ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateEntity(self, request, context):
        """Updates an entity's details.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteEntity(self, request, context):
        """Deletes an entity by its ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def FilterEntities(self, request, context):
        """Filters entities with pagination support.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateEntities(self, request, context):
        """Updates multiple entities in a batch operation.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteEntities(self, request, context):
        """Deletes multiple entities in a batch operation.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_EntityServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateEntityUploadLink': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateEntityUploadLink,
                    request_deserializer=apexnova_dot_entity_dot_entity__service__pb2.CreateEntityUploadLinkRequest.FromString,
                    response_serializer=apexnova_dot_entity_dot_entity__service__pb2.CreateEntityUploadLinkResponse.SerializeToString,
            ),
            'ReadEntity': grpc.unary_unary_rpc_method_handler(
                    servicer.ReadEntity,
                    request_deserializer=apexnova_dot_entity_dot_entity__service__pb2.ReadEntityRequest.FromString,
                    response_serializer=apexnova_dot_entity_dot_entity__service__pb2.ReadEntityResponse.SerializeToString,
            ),
            'UpdateEntity': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateEntity,
                    request_deserializer=apexnova_dot_entity_dot_entity__service__pb2.UpdateEntityRequest.FromString,
                    response_serializer=apexnova_dot_entity_dot_entity__service__pb2.UpdateEntityResponse.SerializeToString,
            ),
            'DeleteEntity': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteEntity,
                    request_deserializer=apexnova_dot_entity_dot_entity__service__pb2.DeleteEntityRequest.FromString,
                    response_serializer=apexnova_dot_entity_dot_entity__service__pb2.DeleteEntityResponse.SerializeToString,
            ),
            'FilterEntities': grpc.unary_unary_rpc_method_handler(
                    servicer.FilterEntities,
                    request_deserializer=apexnova_dot_entity_dot_entity__service__pb2.FilterEntitiesRequest.FromString,
                    response_serializer=apexnova_dot_entity_dot_entity__service__pb2.FilterEntitiesResponse.SerializeToString,
            ),
            'UpdateEntities': grpc.unary_stream_rpc_method_handler(
                    servicer.UpdateEntities,
                    request_deserializer=apexnova_dot_entity_dot_entity__service__pb2.UpdateEntitiesRequest.FromString,
                    response_serializer=apexnova_dot_entity_dot_entity__service__pb2.UpdateEntityResponse.SerializeToString,
            ),
            'DeleteEntities': grpc.unary_stream_rpc_method_handler(
                    servicer.DeleteEntities,
                    request_deserializer=apexnova_dot_entity_dot_entity__service__pb2.DeleteEntitiesRequest.FromString,
                    response_serializer=apexnova_dot_entity_dot_entity__service__pb2.DeleteEntityResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'entity.EntityService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('entity.EntityService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class EntityService(object):
    """Service definition for managing entities.
    """

    @staticmethod
    def CreateEntityUploadLink(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,
            '/entity.EntityService/CreateEntityUploadLink',
            apexnova_dot_entity_dot_entity__service__pb2.CreateEntityUploadLinkRequest.SerializeToString,
            apexnova_dot_entity_dot_entity__service__pb2.CreateEntityUploadLinkResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ReadEntity(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,
            '/entity.EntityService/ReadEntity',
            apexnova_dot_entity_dot_entity__service__pb2.ReadEntityRequest.SerializeToString,
            apexnova_dot_entity_dot_entity__service__pb2.ReadEntityResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateEntity(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,
            '/entity.EntityService/UpdateEntity',
            apexnova_dot_entity_dot_entity__service__pb2.UpdateEntityRequest.SerializeToString,
            apexnova_dot_entity_dot_entity__service__pb2.UpdateEntityResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteEntity(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,
            '/entity.EntityService/DeleteEntity',
            apexnova_dot_entity_dot_entity__service__pb2.DeleteEntityRequest.SerializeToString,
            apexnova_dot_entity_dot_entity__service__pb2.DeleteEntityResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def FilterEntities(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,
            '/entity.EntityService/FilterEntities',
            apexnova_dot_entity_dot_entity__service__pb2.FilterEntitiesRequest.SerializeToString,
            apexnova_dot_entity_dot_entity__service__pb2.FilterEntitiesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateEntities(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,
            '/entity.EntityService/UpdateEntities',
            apexnova_dot_entity_dot_entity__service__pb2.UpdateEntitiesRequest.SerializeToString,
            apexnova_dot_entity_dot_entity__service__pb2.UpdateEntityResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteEntities(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,
            '/entity.EntityService/DeleteEntities',
            apexnova_dot_entity_dot_entity__service__pb2.DeleteEntitiesRequest.SerializeToString,
            apexnova_dot_entity_dot_entity__service__pb2.DeleteEntityResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
