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

from ..common import agent_common_pb2 as agent__common__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateResultsMetaData = channel.unary_unary(
                '/armonik.api.grpc.v1.agent.Agent/CreateResultsMetaData',
                request_serializer=agent__common__pb2.CreateResultsMetaDataRequest.SerializeToString,
                response_deserializer=agent__common__pb2.CreateResultsMetaDataResponse.FromString,
                )
        self.CreateResults = channel.unary_unary(
                '/armonik.api.grpc.v1.agent.Agent/CreateResults',
                request_serializer=agent__common__pb2.CreateResultsRequest.SerializeToString,
                response_deserializer=agent__common__pb2.CreateResultsResponse.FromString,
                )
        self.UploadResultData = channel.stream_unary(
                '/armonik.api.grpc.v1.agent.Agent/UploadResultData',
                request_serializer=agent__common__pb2.UploadResultDataRequest.SerializeToString,
                response_deserializer=agent__common__pb2.UploadResultDataResponse.FromString,
                )
        self.SubmitTasks = channel.unary_unary(
                '/armonik.api.grpc.v1.agent.Agent/SubmitTasks',
                request_serializer=agent__common__pb2.SubmitTasksRequest.SerializeToString,
                response_deserializer=agent__common__pb2.SubmitTasksResponse.FromString,
                )
        self.CreateTask = channel.stream_unary(
                '/armonik.api.grpc.v1.agent.Agent/CreateTask',
                request_serializer=agent__common__pb2.CreateTaskRequest.SerializeToString,
                response_deserializer=agent__common__pb2.CreateTaskReply.FromString,
                )
        self.GetResourceData = channel.unary_stream(
                '/armonik.api.grpc.v1.agent.Agent/GetResourceData',
                request_serializer=agent__common__pb2.DataRequest.SerializeToString,
                response_deserializer=agent__common__pb2.DataReply.FromString,
                )
        self.GetCommonData = channel.unary_stream(
                '/armonik.api.grpc.v1.agent.Agent/GetCommonData',
                request_serializer=agent__common__pb2.DataRequest.SerializeToString,
                response_deserializer=agent__common__pb2.DataReply.FromString,
                )
        self.GetDirectData = channel.unary_stream(
                '/armonik.api.grpc.v1.agent.Agent/GetDirectData',
                request_serializer=agent__common__pb2.DataRequest.SerializeToString,
                response_deserializer=agent__common__pb2.DataReply.FromString,
                )
        self.SendResult = channel.stream_unary(
                '/armonik.api.grpc.v1.agent.Agent/SendResult',
                request_serializer=agent__common__pb2.Result.SerializeToString,
                response_deserializer=agent__common__pb2.ResultReply.FromString,
                )


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

    def CreateResultsMetaData(self, request, context):
        """*
        Create the metadata of multiple results at once
        Data have to be uploaded separately
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateResults(self, request, context):
        """*
        Create one result with data included in the request
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UploadResultData(self, request_iterator, context):
        """*
        Upload data for result with stream
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SubmitTasks(self, request, context):
        """*
        Create tasks metadata and submit task for processing.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateTask(self, request_iterator, 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 GetResourceData(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 GetCommonData(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 GetDirectData(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 SendResult(self, request_iterator, 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_AgentServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateResultsMetaData': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateResultsMetaData,
                    request_deserializer=agent__common__pb2.CreateResultsMetaDataRequest.FromString,
                    response_serializer=agent__common__pb2.CreateResultsMetaDataResponse.SerializeToString,
            ),
            'CreateResults': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateResults,
                    request_deserializer=agent__common__pb2.CreateResultsRequest.FromString,
                    response_serializer=agent__common__pb2.CreateResultsResponse.SerializeToString,
            ),
            'UploadResultData': grpc.stream_unary_rpc_method_handler(
                    servicer.UploadResultData,
                    request_deserializer=agent__common__pb2.UploadResultDataRequest.FromString,
                    response_serializer=agent__common__pb2.UploadResultDataResponse.SerializeToString,
            ),
            'SubmitTasks': grpc.unary_unary_rpc_method_handler(
                    servicer.SubmitTasks,
                    request_deserializer=agent__common__pb2.SubmitTasksRequest.FromString,
                    response_serializer=agent__common__pb2.SubmitTasksResponse.SerializeToString,
            ),
            'CreateTask': grpc.stream_unary_rpc_method_handler(
                    servicer.CreateTask,
                    request_deserializer=agent__common__pb2.CreateTaskRequest.FromString,
                    response_serializer=agent__common__pb2.CreateTaskReply.SerializeToString,
            ),
            'GetResourceData': grpc.unary_stream_rpc_method_handler(
                    servicer.GetResourceData,
                    request_deserializer=agent__common__pb2.DataRequest.FromString,
                    response_serializer=agent__common__pb2.DataReply.SerializeToString,
            ),
            'GetCommonData': grpc.unary_stream_rpc_method_handler(
                    servicer.GetCommonData,
                    request_deserializer=agent__common__pb2.DataRequest.FromString,
                    response_serializer=agent__common__pb2.DataReply.SerializeToString,
            ),
            'GetDirectData': grpc.unary_stream_rpc_method_handler(
                    servicer.GetDirectData,
                    request_deserializer=agent__common__pb2.DataRequest.FromString,
                    response_serializer=agent__common__pb2.DataReply.SerializeToString,
            ),
            'SendResult': grpc.stream_unary_rpc_method_handler(
                    servicer.SendResult,
                    request_deserializer=agent__common__pb2.Result.FromString,
                    response_serializer=agent__common__pb2.ResultReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'armonik.api.grpc.v1.agent.Agent', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CreateResultsMetaData(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, '/armonik.api.grpc.v1.agent.Agent/CreateResultsMetaData',
            agent__common__pb2.CreateResultsMetaDataRequest.SerializeToString,
            agent__common__pb2.CreateResultsMetaDataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateResults(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, '/armonik.api.grpc.v1.agent.Agent/CreateResults',
            agent__common__pb2.CreateResultsRequest.SerializeToString,
            agent__common__pb2.CreateResultsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UploadResultData(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(request_iterator, target, '/armonik.api.grpc.v1.agent.Agent/UploadResultData',
            agent__common__pb2.UploadResultDataRequest.SerializeToString,
            agent__common__pb2.UploadResultDataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SubmitTasks(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, '/armonik.api.grpc.v1.agent.Agent/SubmitTasks',
            agent__common__pb2.SubmitTasksRequest.SerializeToString,
            agent__common__pb2.SubmitTasksResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateTask(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(request_iterator, target, '/armonik.api.grpc.v1.agent.Agent/CreateTask',
            agent__common__pb2.CreateTaskRequest.SerializeToString,
            agent__common__pb2.CreateTaskReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetResourceData(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, '/armonik.api.grpc.v1.agent.Agent/GetResourceData',
            agent__common__pb2.DataRequest.SerializeToString,
            agent__common__pb2.DataReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetCommonData(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, '/armonik.api.grpc.v1.agent.Agent/GetCommonData',
            agent__common__pb2.DataRequest.SerializeToString,
            agent__common__pb2.DataReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDirectData(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, '/armonik.api.grpc.v1.agent.Agent/GetDirectData',
            agent__common__pb2.DataRequest.SerializeToString,
            agent__common__pb2.DataReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SendResult(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(request_iterator, target, '/armonik.api.grpc.v1.agent.Agent/SendResult',
            agent__common__pb2.Result.SerializeToString,
            agent__common__pb2.ResultReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
