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

from . import comment_pb2 as comment__pb2


class CommentInterfaceStub(object):
    """The Comment class contains comment data for any entity that supports
    commenting.  Currently these are [Job] and [Host].

    -------- Services --------]

    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Delete = channel.unary_unary(
                '/comment.CommentInterface/Delete',
                request_serializer=comment__pb2.CommentDeleteRequest.SerializeToString,
                response_deserializer=comment__pb2.CommentDeleteResponse.FromString,
                )
        self.Save = channel.unary_unary(
                '/comment.CommentInterface/Save',
                request_serializer=comment__pb2.CommentSaveRequest.SerializeToString,
                response_deserializer=comment__pb2.CommentSaveResponse.FromString,
                )


class CommentInterfaceServicer(object):
    """The Comment class contains comment data for any entity that supports
    commenting.  Currently these are [Job] and [Host].

    -------- Services --------]

    """

    def Delete(self, request, context):
        """Delete the specified comment.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Save(self, request, context):
        """Saves the specified comment.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_CommentInterfaceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=comment__pb2.CommentDeleteRequest.FromString,
                    response_serializer=comment__pb2.CommentDeleteResponse.SerializeToString,
            ),
            'Save': grpc.unary_unary_rpc_method_handler(
                    servicer.Save,
                    request_deserializer=comment__pb2.CommentSaveRequest.FromString,
                    response_serializer=comment__pb2.CommentSaveResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'comment.CommentInterface', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class CommentInterface(object):
    """The Comment class contains comment data for any entity that supports
    commenting.  Currently these are [Job] and [Host].

    -------- Services --------]

    """

    @staticmethod
    def Delete(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, '/comment.CommentInterface/Delete',
            comment__pb2.CommentDeleteRequest.SerializeToString,
            comment__pb2.CommentDeleteResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Save(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, '/comment.CommentInterface/Save',
            comment__pb2.CommentSaveRequest.SerializeToString,
            comment__pb2.CommentSaveResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)