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

import olcarpc.generated.commons_pb2 as commons__pb2
import olcarpc.generated.data_fetch_service_pb2 as data__fetch__service__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
import olcarpc.generated.olca_pb2 as olca__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Get = channel.unary_unary(
                '/protolca.services.DataFetchService/Get',
                request_serializer=data__fetch__service__pb2.GetRequest.SerializeToString,
                response_deserializer=commons__pb2.ProtoDataSet.FromString,
                )
        self.Find = channel.unary_unary(
                '/protolca.services.DataFetchService/Find',
                request_serializer=data__fetch__service__pb2.FindRequest.SerializeToString,
                response_deserializer=commons__pb2.ProtoDataSet.FromString,
                )
        self.GetAll = channel.unary_unary(
                '/protolca.services.DataFetchService/GetAll',
                request_serializer=data__fetch__service__pb2.GetAllRequest.SerializeToString,
                response_deserializer=data__fetch__service__pb2.GetAllResponse.FromString,
                )
        self.GetCount = channel.unary_unary(
                '/protolca.services.DataFetchService/GetCount',
                request_serializer=data__fetch__service__pb2.GetCountRequest.SerializeToString,
                response_deserializer=data__fetch__service__pb2.GetCountResponse.FromString,
                )
        self.GetDescriptors = channel.unary_stream(
                '/protolca.services.DataFetchService/GetDescriptors',
                request_serializer=data__fetch__service__pb2.GetDescriptorsRequest.SerializeToString,
                response_deserializer=olca__pb2.ProtoRef.FromString,
                )
        self.Search = channel.unary_stream(
                '/protolca.services.DataFetchService/Search',
                request_serializer=data__fetch__service__pb2.SearchRequest.SerializeToString,
                response_deserializer=olca__pb2.ProtoRef.FromString,
                )
        self.GetCategoryContent = channel.unary_stream(
                '/protolca.services.DataFetchService/GetCategoryContent',
                request_serializer=data__fetch__service__pb2.GetCategoryContentRequest.SerializeToString,
                response_deserializer=olca__pb2.ProtoRef.FromString,
                )
        self.GetCategoryTree = channel.unary_unary(
                '/protolca.services.DataFetchService/GetCategoryTree',
                request_serializer=data__fetch__service__pb2.GetCategoryTreeRequest.SerializeToString,
                response_deserializer=data__fetch__service__pb2.CategoryTree.FromString,
                )
        self.GetProvidersFor = channel.unary_stream(
                '/protolca.services.DataFetchService/GetProvidersFor',
                request_serializer=olca__pb2.ProtoRef.SerializeToString,
                response_deserializer=olca__pb2.ProtoRef.FromString,
                )
        self.GetTechFlows = channel.unary_stream(
                '/protolca.services.DataFetchService/GetTechFlows',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=commons__pb2.ProtoTechFlow.FromString,
                )


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

    def Get(self, request, context):
        """Get a data set by ID. You use this method if you are sure that a data set
        of the requested type and ID exists in the database. An error is returned
        if this is not the case.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Find(self, request, context):
        """Get a data set by ID or name. Returns an empty data set if there is no such
        data set in the database. If there are multiple data sets with the same
        name in the database it returns the first of these data sets.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAll(self, request, context):
        """Get (a page of) all data sets of a given type. If no page size is given
        (page <= 0) it defaults to 100. An unset page (page <= 0) defaults to the
        first page.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetCount(self, request, context):
        """Get the number of data sets of the given model type
        that are stored in the database.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDescriptors(self, request, context):
        """Get all descriptors that match the given request.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Search(self, request, context):
        """Search for data sets.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetCategoryContent(self, request, context):
        """Get the descriptors of the data sets that are contained in a given
        category. The category can be identified by its full path or its ID where
        an empty string or "/" identifies the root category (or "none-category") of
        the respective model type.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetCategoryTree(self, request, context):
        """Get the full category tree for the given model type.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetProvidersFor(self, request, context):
        """Get possible providers for the given flow. For products these are processes
        with that product on the output side and for waste flows processes with
        that waste flow on the input side. For elementary flows, an empty stream is
        returned.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTechFlows(self, request, context):
        """Get all technosphere flows from the database. These are all process-flow
        pairs that can be used as providers for product inputs or waste outputs in
        other processes or product systems.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_DataFetchServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=data__fetch__service__pb2.GetRequest.FromString,
                    response_serializer=commons__pb2.ProtoDataSet.SerializeToString,
            ),
            'Find': grpc.unary_unary_rpc_method_handler(
                    servicer.Find,
                    request_deserializer=data__fetch__service__pb2.FindRequest.FromString,
                    response_serializer=commons__pb2.ProtoDataSet.SerializeToString,
            ),
            'GetAll': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAll,
                    request_deserializer=data__fetch__service__pb2.GetAllRequest.FromString,
                    response_serializer=data__fetch__service__pb2.GetAllResponse.SerializeToString,
            ),
            'GetCount': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCount,
                    request_deserializer=data__fetch__service__pb2.GetCountRequest.FromString,
                    response_serializer=data__fetch__service__pb2.GetCountResponse.SerializeToString,
            ),
            'GetDescriptors': grpc.unary_stream_rpc_method_handler(
                    servicer.GetDescriptors,
                    request_deserializer=data__fetch__service__pb2.GetDescriptorsRequest.FromString,
                    response_serializer=olca__pb2.ProtoRef.SerializeToString,
            ),
            'Search': grpc.unary_stream_rpc_method_handler(
                    servicer.Search,
                    request_deserializer=data__fetch__service__pb2.SearchRequest.FromString,
                    response_serializer=olca__pb2.ProtoRef.SerializeToString,
            ),
            'GetCategoryContent': grpc.unary_stream_rpc_method_handler(
                    servicer.GetCategoryContent,
                    request_deserializer=data__fetch__service__pb2.GetCategoryContentRequest.FromString,
                    response_serializer=olca__pb2.ProtoRef.SerializeToString,
            ),
            'GetCategoryTree': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCategoryTree,
                    request_deserializer=data__fetch__service__pb2.GetCategoryTreeRequest.FromString,
                    response_serializer=data__fetch__service__pb2.CategoryTree.SerializeToString,
            ),
            'GetProvidersFor': grpc.unary_stream_rpc_method_handler(
                    servicer.GetProvidersFor,
                    request_deserializer=olca__pb2.ProtoRef.FromString,
                    response_serializer=olca__pb2.ProtoRef.SerializeToString,
            ),
            'GetTechFlows': grpc.unary_stream_rpc_method_handler(
                    servicer.GetTechFlows,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=commons__pb2.ProtoTechFlow.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'protolca.services.DataFetchService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Get(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, '/protolca.services.DataFetchService/Get',
            data__fetch__service__pb2.GetRequest.SerializeToString,
            commons__pb2.ProtoDataSet.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Find(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, '/protolca.services.DataFetchService/Find',
            data__fetch__service__pb2.FindRequest.SerializeToString,
            commons__pb2.ProtoDataSet.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetAll(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, '/protolca.services.DataFetchService/GetAll',
            data__fetch__service__pb2.GetAllRequest.SerializeToString,
            data__fetch__service__pb2.GetAllResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetCount(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, '/protolca.services.DataFetchService/GetCount',
            data__fetch__service__pb2.GetCountRequest.SerializeToString,
            data__fetch__service__pb2.GetCountResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDescriptors(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, '/protolca.services.DataFetchService/GetDescriptors',
            data__fetch__service__pb2.GetDescriptorsRequest.SerializeToString,
            olca__pb2.ProtoRef.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Search(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, '/protolca.services.DataFetchService/Search',
            data__fetch__service__pb2.SearchRequest.SerializeToString,
            olca__pb2.ProtoRef.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetCategoryContent(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, '/protolca.services.DataFetchService/GetCategoryContent',
            data__fetch__service__pb2.GetCategoryContentRequest.SerializeToString,
            olca__pb2.ProtoRef.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetCategoryTree(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, '/protolca.services.DataFetchService/GetCategoryTree',
            data__fetch__service__pb2.GetCategoryTreeRequest.SerializeToString,
            data__fetch__service__pb2.CategoryTree.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetProvidersFor(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, '/protolca.services.DataFetchService/GetProvidersFor',
            olca__pb2.ProtoRef.SerializeToString,
            olca__pb2.ProtoRef.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetTechFlows(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, '/protolca.services.DataFetchService/GetTechFlows',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            commons__pb2.ProtoTechFlow.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
