# 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
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
import olcarpc.generated.olca_pb2 as olca__pb2
import olcarpc.generated.result_service_pb2 as result__service__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Calculate = channel.unary_unary(
                '/protolca.services.ResultService/Calculate',
                request_serializer=result__service__pb2.ProtoCalculationSetup.SerializeToString,
                response_deserializer=result__service__pb2.ProtoResultRef.FromString,
                )
        self.GetTechFlows = channel.unary_stream(
                '/protolca.services.ResultService/GetTechFlows',
                request_serializer=result__service__pb2.ProtoResultRef.SerializeToString,
                response_deserializer=commons__pb2.ProtoTechFlow.FromString,
                )
        self.GetEnviFlows = channel.unary_stream(
                '/protolca.services.ResultService/GetEnviFlows',
                request_serializer=result__service__pb2.ProtoResultRef.SerializeToString,
                response_deserializer=commons__pb2.ProtoEnviFlow.FromString,
                )
        self.GetImpactCategories = channel.unary_stream(
                '/protolca.services.ResultService/GetImpactCategories',
                request_serializer=result__service__pb2.ProtoResultRef.SerializeToString,
                response_deserializer=olca__pb2.ProtoRef.FromString,
                )
        self.GetTotalInventory = channel.unary_stream(
                '/protolca.services.ResultService/GetTotalInventory',
                request_serializer=result__service__pb2.ProtoResultRef.SerializeToString,
                response_deserializer=result__service__pb2.ResultValue.FromString,
                )
        self.GetTotalImpacts = channel.unary_stream(
                '/protolca.services.ResultService/GetTotalImpacts',
                request_serializer=result__service__pb2.ProtoResultRef.SerializeToString,
                response_deserializer=result__service__pb2.ResultValue.FromString,
                )
        self.GetDirectContribution = channel.unary_unary(
                '/protolca.services.ResultService/GetDirectContribution',
                request_serializer=result__service__pb2.TechFlowContributionRequest.SerializeToString,
                response_deserializer=result__service__pb2.ResultValue.FromString,
                )
        self.GetTotalContribution = channel.unary_unary(
                '/protolca.services.ResultService/GetTotalContribution',
                request_serializer=result__service__pb2.TechFlowContributionRequest.SerializeToString,
                response_deserializer=result__service__pb2.ResultValue.FromString,
                )
        self.GetTotalContributionOfOne = channel.unary_unary(
                '/protolca.services.ResultService/GetTotalContributionOfOne',
                request_serializer=result__service__pb2.TechFlowContributionRequest.SerializeToString,
                response_deserializer=result__service__pb2.ResultValue.FromString,
                )
        self.GetImpactFactors = channel.unary_stream(
                '/protolca.services.ResultService/GetImpactFactors',
                request_serializer=result__service__pb2.ImpactFactorRequest.SerializeToString,
                response_deserializer=result__service__pb2.ImpactFactorResponse.FromString,
                )
        self.Dispose = channel.unary_unary(
                '/protolca.services.ResultService/Dispose',
                request_serializer=result__service__pb2.ProtoResultRef.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


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

    def Calculate(self, request, context):
        """Calculates a result for the given calculation setup.
        """
        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 of the underlying product system of the given
        result.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetEnviFlows(self, request, context):
        """Get the environmental flows of the given result.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetImpactCategories(self, request, context):
        """Get the impact categories of the given result.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTotalInventory(self, request, context):
        """Get the inventory of the given result.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTotalImpacts(self, request, context):
        """Get the total impact assessment result of the given result.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDirectContribution(self, request, context):
        """Get the direct contribution of a TechFlow to a flow, impact, or cost
        result. 'Direct' means that this is only the contribution that is
        directly associated with the production of a product or treatment of
        a waste flow excluding contributions of upstream and downstream processes.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTotalContribution(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 GetTotalContributionOfOne(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 GetImpactFactors(self, request, context):
        """Get the used impact factors of a result. The request can be for:

        * an indicator: returns the non-zero factors of that indicator
        * a flow: returns the factors of that flow for all indicators (including
        zero values)
        * an indicator and flow: returns the factor for that flow which may be zero

        Nothing is returned if no indicator and flow is given or if the result does
        not have an impact assessment result.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Dispose(self, request, context):
        """Disposes the given result on the server side.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ResultServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Calculate': grpc.unary_unary_rpc_method_handler(
                    servicer.Calculate,
                    request_deserializer=result__service__pb2.ProtoCalculationSetup.FromString,
                    response_serializer=result__service__pb2.ProtoResultRef.SerializeToString,
            ),
            'GetTechFlows': grpc.unary_stream_rpc_method_handler(
                    servicer.GetTechFlows,
                    request_deserializer=result__service__pb2.ProtoResultRef.FromString,
                    response_serializer=commons__pb2.ProtoTechFlow.SerializeToString,
            ),
            'GetEnviFlows': grpc.unary_stream_rpc_method_handler(
                    servicer.GetEnviFlows,
                    request_deserializer=result__service__pb2.ProtoResultRef.FromString,
                    response_serializer=commons__pb2.ProtoEnviFlow.SerializeToString,
            ),
            'GetImpactCategories': grpc.unary_stream_rpc_method_handler(
                    servicer.GetImpactCategories,
                    request_deserializer=result__service__pb2.ProtoResultRef.FromString,
                    response_serializer=olca__pb2.ProtoRef.SerializeToString,
            ),
            'GetTotalInventory': grpc.unary_stream_rpc_method_handler(
                    servicer.GetTotalInventory,
                    request_deserializer=result__service__pb2.ProtoResultRef.FromString,
                    response_serializer=result__service__pb2.ResultValue.SerializeToString,
            ),
            'GetTotalImpacts': grpc.unary_stream_rpc_method_handler(
                    servicer.GetTotalImpacts,
                    request_deserializer=result__service__pb2.ProtoResultRef.FromString,
                    response_serializer=result__service__pb2.ResultValue.SerializeToString,
            ),
            'GetDirectContribution': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDirectContribution,
                    request_deserializer=result__service__pb2.TechFlowContributionRequest.FromString,
                    response_serializer=result__service__pb2.ResultValue.SerializeToString,
            ),
            'GetTotalContribution': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTotalContribution,
                    request_deserializer=result__service__pb2.TechFlowContributionRequest.FromString,
                    response_serializer=result__service__pb2.ResultValue.SerializeToString,
            ),
            'GetTotalContributionOfOne': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTotalContributionOfOne,
                    request_deserializer=result__service__pb2.TechFlowContributionRequest.FromString,
                    response_serializer=result__service__pb2.ResultValue.SerializeToString,
            ),
            'GetImpactFactors': grpc.unary_stream_rpc_method_handler(
                    servicer.GetImpactFactors,
                    request_deserializer=result__service__pb2.ImpactFactorRequest.FromString,
                    response_serializer=result__service__pb2.ImpactFactorResponse.SerializeToString,
            ),
            'Dispose': grpc.unary_unary_rpc_method_handler(
                    servicer.Dispose,
                    request_deserializer=result__service__pb2.ProtoResultRef.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'protolca.services.ResultService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Calculate(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.ResultService/Calculate',
            result__service__pb2.ProtoCalculationSetup.SerializeToString,
            result__service__pb2.ProtoResultRef.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.ResultService/GetTechFlows',
            result__service__pb2.ProtoResultRef.SerializeToString,
            commons__pb2.ProtoTechFlow.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetEnviFlows(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.ResultService/GetEnviFlows',
            result__service__pb2.ProtoResultRef.SerializeToString,
            commons__pb2.ProtoEnviFlow.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetImpactCategories(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.ResultService/GetImpactCategories',
            result__service__pb2.ProtoResultRef.SerializeToString,
            olca__pb2.ProtoRef.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetTotalInventory(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.ResultService/GetTotalInventory',
            result__service__pb2.ProtoResultRef.SerializeToString,
            result__service__pb2.ResultValue.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetTotalImpacts(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.ResultService/GetTotalImpacts',
            result__service__pb2.ProtoResultRef.SerializeToString,
            result__service__pb2.ResultValue.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDirectContribution(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.ResultService/GetDirectContribution',
            result__service__pb2.TechFlowContributionRequest.SerializeToString,
            result__service__pb2.ResultValue.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetTotalContribution(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.ResultService/GetTotalContribution',
            result__service__pb2.TechFlowContributionRequest.SerializeToString,
            result__service__pb2.ResultValue.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetTotalContributionOfOne(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.ResultService/GetTotalContributionOfOne',
            result__service__pb2.TechFlowContributionRequest.SerializeToString,
            result__service__pb2.ResultValue.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetImpactFactors(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.ResultService/GetImpactFactors',
            result__service__pb2.ImpactFactorRequest.SerializeToString,
            result__service__pb2.ImpactFactorResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Dispose(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.ResultService/Dispose',
            result__service__pb2.ProtoResultRef.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
