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

from avikom.assistance import issue_pb2 as avikom_dot_assistance_dot_issue__pb2
from avikom.assistance import issue_query_pb2 as avikom_dot_assistance_dot_issue__query__pb2
from avikom.generic import result_pb2 as avikom_dot_generic_dot_result__pb2


class IssueServiceStub(object):
    """*
    This service manages issues. It should also communicate with `IssueStorageService` behind the scene for persisten issue management.
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.StartIssue = channel.unary_unary(
                '/avikom.assistance.IssueService/StartIssue',
                request_serializer=avikom_dot_assistance_dot_issue__query__pb2.IssueQuery.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )
        self.GetIssue = channel.unary_unary(
                '/avikom.assistance.IssueService/GetIssue',
                request_serializer=avikom_dot_assistance_dot_issue__query__pb2.IssueQuery.SerializeToString,
                response_deserializer=avikom_dot_assistance_dot_issue__pb2.IssueList.FromString,
                )


class IssueServiceServicer(object):
    """*
    This service manages issues. It should also communicate with `IssueStorageService` behind the scene for persisten issue management.
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    def StartIssue(self, request, context):
        """/ Starts a process for the queried issue.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetIssue(self, request, context):
        """/ Returns a list of issues filtered by `IssueQuery`.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_IssueServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'StartIssue': grpc.unary_unary_rpc_method_handler(
                    servicer.StartIssue,
                    request_deserializer=avikom_dot_assistance_dot_issue__query__pb2.IssueQuery.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
            'GetIssue': grpc.unary_unary_rpc_method_handler(
                    servicer.GetIssue,
                    request_deserializer=avikom_dot_assistance_dot_issue__query__pb2.IssueQuery.FromString,
                    response_serializer=avikom_dot_assistance_dot_issue__pb2.IssueList.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'avikom.assistance.IssueService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class IssueService(object):
    """*
    This service manages issues. It should also communicate with `IssueStorageService` behind the scene for persisten issue management.
    @author Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    @staticmethod
    def StartIssue(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, '/avikom.assistance.IssueService/StartIssue',
            avikom_dot_assistance_dot_issue__query__pb2.IssueQuery.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetIssue(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, '/avikom.assistance.IssueService/GetIssue',
            avikom_dot_assistance_dot_issue__query__pb2.IssueQuery.SerializeToString,
            avikom_dot_assistance_dot_issue__pb2.IssueList.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
