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

import unified_planning_pb2 as unified__planning__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.planOneShot = channel.unary_stream(
                '/UnifiedPlanning/planOneShot',
                request_serializer=unified__planning__pb2.PlanRequest.SerializeToString,
                response_deserializer=unified__planning__pb2.PlanGenerationResult.FromString,
                )


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

    def planOneShot(self, request, context):
        """A plan request to the planner.
        The planner replies with a stream of N `Answer` messages where:
        - the first (N-1) message are of type `IntermediateReport`
        - the last message is of type `FinalReport`
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_UnifiedPlanningServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'planOneShot': grpc.unary_stream_rpc_method_handler(
                    servicer.planOneShot,
                    request_deserializer=unified__planning__pb2.PlanRequest.FromString,
                    response_serializer=unified__planning__pb2.PlanGenerationResult.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'UnifiedPlanning', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def planOneShot(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, '/UnifiedPlanning/planOneShot',
            unified__planning__pb2.PlanRequest.SerializeToString,
            unified__planning__pb2.PlanGenerationResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
