# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from epl.protobuf.v1 import stac_pb2 as epl_dot_protobuf_dot_v1_dot_stac__pb2


class StacServiceStub(object):
    """
    gRPC Interfaces for working with stac metadata
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SearchItems = channel.unary_stream(
                '/epl.protobuf.v1.StacService/SearchItems',
                request_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacRequest.SerializeToString,
                response_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.FromString,
                )
        self.InsertItems = channel.stream_stream(
                '/epl.protobuf.v1.StacService/InsertItems',
                request_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.SerializeToString,
                response_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
                )
        self.UpdateItems = channel.stream_stream(
                '/epl.protobuf.v1.StacService/UpdateItems',
                request_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.SerializeToString,
                response_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
                )
        self.CountItems = channel.unary_unary(
                '/epl.protobuf.v1.StacService/CountItems',
                request_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacRequest.SerializeToString,
                response_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
                )
        self.DeleteOneItem = channel.unary_unary(
                '/epl.protobuf.v1.StacService/DeleteOneItem',
                request_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.SerializeToString,
                response_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
                )
        self.SearchOneItem = channel.unary_unary(
                '/epl.protobuf.v1.StacService/SearchOneItem',
                request_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacRequest.SerializeToString,
                response_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.FromString,
                )
        self.InsertOneItem = channel.unary_unary(
                '/epl.protobuf.v1.StacService/InsertOneItem',
                request_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.SerializeToString,
                response_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
                )
        self.UpdateOneItem = channel.unary_unary(
                '/epl.protobuf.v1.StacService/UpdateOneItem',
                request_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.SerializeToString,
                response_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
                )
        self.SearchCollections = channel.unary_stream(
                '/epl.protobuf.v1.StacService/SearchCollections',
                request_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.CollectionRequest.SerializeToString,
                response_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.Collection.FromString,
                )
        self.InsertOneCollection = channel.unary_unary(
                '/epl.protobuf.v1.StacService/InsertOneCollection',
                request_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.Collection.SerializeToString,
                response_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
                )
        self.UpdateCollection = channel.unary_unary(
                '/epl.protobuf.v1.StacService/UpdateCollection',
                request_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.Collection.SerializeToString,
                response_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
                )


class StacServiceServicer(object):
    """
    gRPC Interfaces for working with stac metadata
    """

    def SearchItems(self, request, context):
        """
        using a search request, stream all the results that match the search filter
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def InsertItems(self, request_iterator, context):
        """
        insert a stream of items into the STAC service
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateItems(self, request_iterator, context):
        """
        update a stream of items in the STAC service
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CountItems(self, request, context):
        """
        count all the items in the Stac service according to the StacRequest filter
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteOneItem(self, request, context):
        """
        delete an item from the STAC service
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SearchOneItem(self, request, context):
        """
        using a search request get the first item that matches the request
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def InsertOneItem(self, request, context):
        """
        Insert one item into the STAC service
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateOneItem(self, request, context):
        """
        Update one item in the STAC service
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SearchCollections(self, request, context):
        """
        Search existing Collections
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

    def UpdateCollection(self, request, context):
        """
        Update an existing Collection's metadata and/or footprint
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_StacServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SearchItems': grpc.unary_stream_rpc_method_handler(
                    servicer.SearchItems,
                    request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacRequest.FromString,
                    response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.SerializeToString,
            ),
            'InsertItems': grpc.stream_stream_rpc_method_handler(
                    servicer.InsertItems,
                    request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.FromString,
                    response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.SerializeToString,
            ),
            'UpdateItems': grpc.stream_stream_rpc_method_handler(
                    servicer.UpdateItems,
                    request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.FromString,
                    response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.SerializeToString,
            ),
            'CountItems': grpc.unary_unary_rpc_method_handler(
                    servicer.CountItems,
                    request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacRequest.FromString,
                    response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.SerializeToString,
            ),
            'DeleteOneItem': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteOneItem,
                    request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.FromString,
                    response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.SerializeToString,
            ),
            'SearchOneItem': grpc.unary_unary_rpc_method_handler(
                    servicer.SearchOneItem,
                    request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacRequest.FromString,
                    response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.SerializeToString,
            ),
            'InsertOneItem': grpc.unary_unary_rpc_method_handler(
                    servicer.InsertOneItem,
                    request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.FromString,
                    response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.SerializeToString,
            ),
            'UpdateOneItem': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateOneItem,
                    request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.FromString,
                    response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.SerializeToString,
            ),
            'SearchCollections': grpc.unary_stream_rpc_method_handler(
                    servicer.SearchCollections,
                    request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.CollectionRequest.FromString,
                    response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.Collection.SerializeToString,
            ),
            'InsertOneCollection': grpc.unary_unary_rpc_method_handler(
                    servicer.InsertOneCollection,
                    request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.Collection.FromString,
                    response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.SerializeToString,
            ),
            'UpdateCollection': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateCollection,
                    request_deserializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.Collection.FromString,
                    response_serializer=epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'epl.protobuf.v1.StacService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class StacService(object):
    """
    gRPC Interfaces for working with stac metadata
    """

    @staticmethod
    def SearchItems(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_stream(request, target, '/epl.protobuf.v1.StacService/SearchItems',
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacRequest.SerializeToString,
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InsertItems(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/epl.protobuf.v1.StacService/InsertItems',
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.SerializeToString,
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateItems(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/epl.protobuf.v1.StacService/UpdateItems',
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.SerializeToString,
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CountItems(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/epl.protobuf.v1.StacService/CountItems',
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacRequest.SerializeToString,
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteOneItem(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/epl.protobuf.v1.StacService/DeleteOneItem',
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.SerializeToString,
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SearchOneItem(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/epl.protobuf.v1.StacService/SearchOneItem',
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacRequest.SerializeToString,
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InsertOneItem(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/epl.protobuf.v1.StacService/InsertOneItem',
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.SerializeToString,
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateOneItem(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/epl.protobuf.v1.StacService/UpdateOneItem',
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacItem.SerializeToString,
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SearchCollections(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_stream(request, target, '/epl.protobuf.v1.StacService/SearchCollections',
            epl_dot_protobuf_dot_v1_dot_stac__pb2.CollectionRequest.SerializeToString,
            epl_dot_protobuf_dot_v1_dot_stac__pb2.Collection.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InsertOneCollection(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/epl.protobuf.v1.StacService/InsertOneCollection',
            epl_dot_protobuf_dot_v1_dot_stac__pb2.Collection.SerializeToString,
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateCollection(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/epl.protobuf.v1.StacService/UpdateCollection',
            epl_dot_protobuf_dot_v1_dot_stac__pb2.Collection.SerializeToString,
            epl_dot_protobuf_dot_v1_dot_stac__pb2.StacDbResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)
