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

from agentuniverse.agent_serve.web.rpc.grpc import \
    agentuniverse_service_pb2 as agentuniverse__service__pb2


class AgentUniverseServiceStub(object):
    """RPC 服务定义
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.service_run = channel.unary_unary(
                '/agentuniverse.AgentUniverseService/service_run',
                request_serializer=agentuniverse__service__pb2.AgentServiceRequest.SerializeToString,
                response_deserializer=agentuniverse__service__pb2.AgentServiceResponse.FromString,
                )
        self.service_run_async = channel.unary_unary(
                '/agentuniverse.AgentUniverseService/service_run_async',
                request_serializer=agentuniverse__service__pb2.AgentServiceRequest.SerializeToString,
                response_deserializer=agentuniverse__service__pb2.AgentServiceResponse.FromString,
                )
        self.service_run_result = channel.unary_unary(
                '/agentuniverse.AgentUniverseService/service_run_result',
                request_serializer=agentuniverse__service__pb2.AgentResultRequest.SerializeToString,
                response_deserializer=agentuniverse__service__pb2.AgentServiceResponse.FromString,
                )


class AgentUniverseServiceServicer(object):
    """RPC 服务定义
    """

    def service_run(self, request, context):
        """方法定义
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def service_run_async(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 service_run_result(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_AgentUniverseServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'service_run': grpc.unary_unary_rpc_method_handler(
                    servicer.service_run,
                    request_deserializer=agentuniverse__service__pb2.AgentServiceRequest.FromString,
                    response_serializer=agentuniverse__service__pb2.AgentServiceResponse.SerializeToString,
            ),
            'service_run_async': grpc.unary_unary_rpc_method_handler(
                    servicer.service_run_async,
                    request_deserializer=agentuniverse__service__pb2.AgentServiceRequest.FromString,
                    response_serializer=agentuniverse__service__pb2.AgentServiceResponse.SerializeToString,
            ),
            'service_run_result': grpc.unary_unary_rpc_method_handler(
                    servicer.service_run_result,
                    request_deserializer=agentuniverse__service__pb2.AgentResultRequest.FromString,
                    response_serializer=agentuniverse__service__pb2.AgentServiceResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'agentuniverse.AgentUniverseService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class AgentUniverseService(object):
    """RPC 服务定义
    """

    @staticmethod
    def service_run(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, '/agentuniverse.AgentUniverseService/service_run',
            agentuniverse__service__pb2.AgentServiceRequest.SerializeToString,
            agentuniverse__service__pb2.AgentServiceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def service_run_async(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, '/agentuniverse.AgentUniverseService/service_run_async',
            agentuniverse__service__pb2.AgentServiceRequest.SerializeToString,
            agentuniverse__service__pb2.AgentServiceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def service_run_result(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, '/agentuniverse.AgentUniverseService/service_run_result',
            agentuniverse__service__pb2.AgentResultRequest.SerializeToString,
            agentuniverse__service__pb2.AgentServiceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
