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

from . import depend_pb2 as depend__pb2


class DependInterfaceStub(object):
    """-------- Services --------

    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetDepend = channel.unary_unary(
                '/depend.DependInterface/GetDepend',
                request_serializer=depend__pb2.DependGetDependRequest.SerializeToString,
                response_deserializer=depend__pb2.DependGetDependResponse.FromString,
                )
        self.Satisfy = channel.unary_unary(
                '/depend.DependInterface/Satisfy',
                request_serializer=depend__pb2.DependSatisfyRequest.SerializeToString,
                response_deserializer=depend__pb2.DependSatisfyResponse.FromString,
                )
        self.Unsatisfy = channel.unary_unary(
                '/depend.DependInterface/Unsatisfy',
                request_serializer=depend__pb2.DependUnsatisfyRequest.SerializeToString,
                response_deserializer=depend__pb2.DependUnsatisfyResponse.FromString,
                )


class DependInterfaceServicer(object):
    """-------- Services --------

    """

    def GetDepend(self, request, context):
        """Get a Depend by it's id
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Satisfy(self, request, context):
        """Satisfies the dependency which sets any frames waiting on this dependency to the WAITING state.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Unsatisfy(self, request, context):
        """Unsatisfies the dependency making it active again and sets matching frames to DEPEND
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_DependInterfaceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetDepend': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDepend,
                    request_deserializer=depend__pb2.DependGetDependRequest.FromString,
                    response_serializer=depend__pb2.DependGetDependResponse.SerializeToString,
            ),
            'Satisfy': grpc.unary_unary_rpc_method_handler(
                    servicer.Satisfy,
                    request_deserializer=depend__pb2.DependSatisfyRequest.FromString,
                    response_serializer=depend__pb2.DependSatisfyResponse.SerializeToString,
            ),
            'Unsatisfy': grpc.unary_unary_rpc_method_handler(
                    servicer.Unsatisfy,
                    request_deserializer=depend__pb2.DependUnsatisfyRequest.FromString,
                    response_serializer=depend__pb2.DependUnsatisfyResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'depend.DependInterface', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class DependInterface(object):
    """-------- Services --------

    """

    @staticmethod
    def GetDepend(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, '/depend.DependInterface/GetDepend',
            depend__pb2.DependGetDependRequest.SerializeToString,
            depend__pb2.DependGetDependResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Satisfy(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, '/depend.DependInterface/Satisfy',
            depend__pb2.DependSatisfyRequest.SerializeToString,
            depend__pb2.DependSatisfyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Unsatisfy(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, '/depend.DependInterface/Unsatisfy',
            depend__pb2.DependUnsatisfyRequest.SerializeToString,
            depend__pb2.DependUnsatisfyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)