# 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 terrascope_api.models import aoi_catalog_pb2 as aoi__catalog__pb2

GRPC_GENERATED_VERSION = '1.65.4'
GRPC_VERSION = grpc.__version__
EXPECTED_ERROR_RELEASE = '1.66.0'
SCHEDULED_RELEASE_DATE = 'August 6, 2024'
_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:
    warnings.warn(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in aoi_catalog_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}.'
        + f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
        + f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
        RuntimeWarning
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.get_aoi_stats = channel.unary_unary(
                '/oi.papi.AOICatalogApi/get_aoi_stats',
                request_serializer=aoi__catalog__pb2.AOIStatsGetRequest.SerializeToString,
                response_deserializer=aoi__catalog__pb2.AOIStatsGetResponse.FromString,
                _registered_method=True)
        self.get_aoi_clusters = channel.unary_unary(
                '/oi.papi.AOICatalogApi/get_aoi_clusters',
                request_serializer=aoi__catalog__pb2.AOIClusterGetRequest.SerializeToString,
                response_deserializer=aoi__catalog__pb2.AOIClusterGetResponse.FromString,
                _registered_method=True)
        self.add_aoi_to_catalog = channel.unary_unary(
                '/oi.papi.AOICatalogApi/add_aoi_to_catalog',
                request_serializer=aoi__catalog__pb2.AOICatalogAddRequest.SerializeToString,
                response_deserializer=aoi__catalog__pb2.AOICatalogAddResponse.FromString,
                _registered_method=True)
        self.delete_aoi_from_catalog = channel.unary_unary(
                '/oi.papi.AOICatalogApi/delete_aoi_from_catalog',
                request_serializer=aoi__catalog__pb2.AOICatalogDeleteRequest.SerializeToString,
                response_deserializer=aoi__catalog__pb2.AOICatalogDeleteResponse.FromString,
                _registered_method=True)
        self.get_private_catalog_collection = channel.unary_unary(
                '/oi.papi.AOICatalogApi/get_private_catalog_collection',
                request_serializer=aoi__catalog__pb2.AOICatalogGetPrivateCatalogRequest.SerializeToString,
                response_deserializer=aoi__catalog__pb2.AOICatalogGetPrivateCatalogResponse.FromString,
                _registered_method=True)


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

    def get_aoi_stats(self, request, context):
        """
        Get the clustered counts of AOIs at different points across the provided bounding box.
        The algorithm determining the lat,long at which the clusters converge is purely controlled by the server.
        Please use help endpoint for more info on the filters.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def get_aoi_clusters(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_aoi_to_catalog(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 delete_aoi_from_catalog(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 get_private_catalog_collection(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_AOICatalogApiServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'get_aoi_stats': grpc.unary_unary_rpc_method_handler(
                    servicer.get_aoi_stats,
                    request_deserializer=aoi__catalog__pb2.AOIStatsGetRequest.FromString,
                    response_serializer=aoi__catalog__pb2.AOIStatsGetResponse.SerializeToString,
            ),
            'get_aoi_clusters': grpc.unary_unary_rpc_method_handler(
                    servicer.get_aoi_clusters,
                    request_deserializer=aoi__catalog__pb2.AOIClusterGetRequest.FromString,
                    response_serializer=aoi__catalog__pb2.AOIClusterGetResponse.SerializeToString,
            ),
            'add_aoi_to_catalog': grpc.unary_unary_rpc_method_handler(
                    servicer.add_aoi_to_catalog,
                    request_deserializer=aoi__catalog__pb2.AOICatalogAddRequest.FromString,
                    response_serializer=aoi__catalog__pb2.AOICatalogAddResponse.SerializeToString,
            ),
            'delete_aoi_from_catalog': grpc.unary_unary_rpc_method_handler(
                    servicer.delete_aoi_from_catalog,
                    request_deserializer=aoi__catalog__pb2.AOICatalogDeleteRequest.FromString,
                    response_serializer=aoi__catalog__pb2.AOICatalogDeleteResponse.SerializeToString,
            ),
            'get_private_catalog_collection': grpc.unary_unary_rpc_method_handler(
                    servicer.get_private_catalog_collection,
                    request_deserializer=aoi__catalog__pb2.AOICatalogGetPrivateCatalogRequest.FromString,
                    response_serializer=aoi__catalog__pb2.AOICatalogGetPrivateCatalogResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'oi.papi.AOICatalogApi', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('oi.papi.AOICatalogApi', rpc_method_handlers)


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

    @staticmethod
    def get_aoi_stats(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,
            '/oi.papi.AOICatalogApi/get_aoi_stats',
            aoi__catalog__pb2.AOIStatsGetRequest.SerializeToString,
            aoi__catalog__pb2.AOIStatsGetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def get_aoi_clusters(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,
            '/oi.papi.AOICatalogApi/get_aoi_clusters',
            aoi__catalog__pb2.AOIClusterGetRequest.SerializeToString,
            aoi__catalog__pb2.AOIClusterGetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def add_aoi_to_catalog(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,
            '/oi.papi.AOICatalogApi/add_aoi_to_catalog',
            aoi__catalog__pb2.AOICatalogAddRequest.SerializeToString,
            aoi__catalog__pb2.AOICatalogAddResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def delete_aoi_from_catalog(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,
            '/oi.papi.AOICatalogApi/delete_aoi_from_catalog',
            aoi__catalog__pb2.AOICatalogDeleteRequest.SerializeToString,
            aoi__catalog__pb2.AOICatalogDeleteResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def get_private_catalog_collection(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,
            '/oi.papi.AOICatalogApi/get_private_catalog_collection',
            aoi__catalog__pb2.AOICatalogGetPrivateCatalogRequest.SerializeToString,
            aoi__catalog__pb2.AOICatalogGetPrivateCatalogResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
