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

from . import analyze_pb2 as analyze_dot_v2_dot_analyze__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.initRepo = channel.unary_unary(
                '/analysis.Analyzer/initRepo',
                request_serializer=analyze_dot_v2_dot_analyze__pb2.AstRequest.SerializeToString,
                response_deserializer=analyze_dot_v2_dot_analyze__pb2.AstReply.FromString,
                )
        self.getClasses = channel.unary_stream(
                '/analysis.Analyzer/getClasses',
                request_serializer=analyze_dot_v2_dot_analyze__pb2.AstRequest.SerializeToString,
                response_deserializer=analyze_dot_v2_dot_analyze__pb2.Class_.FromString,
                )
        self.getMethods = channel.unary_stream(
                '/analysis.Analyzer/getMethods',
                request_serializer=analyze_dot_v2_dot_analyze__pb2.AstRequest.SerializeToString,
                response_deserializer=analyze_dot_v2_dot_analyze__pb2.Method_.FromString,
                )
        self.getInvocations = channel.unary_stream(
                '/analysis.Analyzer/getInvocations',
                request_serializer=analyze_dot_v2_dot_analyze__pb2.AstRequest.SerializeToString,
                response_deserializer=analyze_dot_v2_dot_analyze__pb2.Invocation_.FromString,
                )


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

    def initRepo(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 getClasses(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 getMethods(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 getInvocations(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_AnalyzerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'initRepo': grpc.unary_unary_rpc_method_handler(
                    servicer.initRepo,
                    request_deserializer=analyze_dot_v2_dot_analyze__pb2.AstRequest.FromString,
                    response_serializer=analyze_dot_v2_dot_analyze__pb2.AstReply.SerializeToString,
            ),
            'getClasses': grpc.unary_stream_rpc_method_handler(
                    servicer.getClasses,
                    request_deserializer=analyze_dot_v2_dot_analyze__pb2.AstRequest.FromString,
                    response_serializer=analyze_dot_v2_dot_analyze__pb2.Class_.SerializeToString,
            ),
            'getMethods': grpc.unary_stream_rpc_method_handler(
                    servicer.getMethods,
                    request_deserializer=analyze_dot_v2_dot_analyze__pb2.AstRequest.FromString,
                    response_serializer=analyze_dot_v2_dot_analyze__pb2.Method_.SerializeToString,
            ),
            'getInvocations': grpc.unary_stream_rpc_method_handler(
                    servicer.getInvocations,
                    request_deserializer=analyze_dot_v2_dot_analyze__pb2.AstRequest.FromString,
                    response_serializer=analyze_dot_v2_dot_analyze__pb2.Invocation_.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'analysis.Analyzer', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def initRepo(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, '/analysis.Analyzer/initRepo',
            analyze_dot_v2_dot_analyze__pb2.AstRequest.SerializeToString,
            analyze_dot_v2_dot_analyze__pb2.AstReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getClasses(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, '/analysis.Analyzer/getClasses',
            analyze_dot_v2_dot_analyze__pb2.AstRequest.SerializeToString,
            analyze_dot_v2_dot_analyze__pb2.Class_.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getMethods(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, '/analysis.Analyzer/getMethods',
            analyze_dot_v2_dot_analyze__pb2.AstRequest.SerializeToString,
            analyze_dot_v2_dot_analyze__pb2.Method_.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getInvocations(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, '/analysis.Analyzer/getInvocations',
            analyze_dot_v2_dot_analyze__pb2.AstRequest.SerializeToString,
            analyze_dot_v2_dot_analyze__pb2.Invocation_.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
