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

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from . import documents_pb2 as v1_dot_documents__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateDocument = channel.unary_unary(
                '/nitric.v1.documents.Documents/CreateDocument',
                request_serializer=v1_dot_documents__pb2.CreateDocumentRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.GetDocument = channel.unary_unary(
                '/nitric.v1.documents.Documents/GetDocument',
                request_serializer=v1_dot_documents__pb2.GetDocumentRequest.SerializeToString,
                response_deserializer=v1_dot_documents__pb2.GetDocumentReply.FromString,
                )
        self.UpdateDocument = channel.unary_unary(
                '/nitric.v1.documents.Documents/UpdateDocument',
                request_serializer=v1_dot_documents__pb2.UpdateDocumentRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.DeleteDocument = channel.unary_unary(
                '/nitric.v1.documents.Documents/DeleteDocument',
                request_serializer=v1_dot_documents__pb2.DeleteDocumentRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


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

    def CreateDocument(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 GetDocument(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 UpdateDocument(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 DeleteDocument(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_DocumentsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateDocument': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateDocument,
                    request_deserializer=v1_dot_documents__pb2.CreateDocumentRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetDocument': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDocument,
                    request_deserializer=v1_dot_documents__pb2.GetDocumentRequest.FromString,
                    response_serializer=v1_dot_documents__pb2.GetDocumentReply.SerializeToString,
            ),
            'UpdateDocument': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateDocument,
                    request_deserializer=v1_dot_documents__pb2.UpdateDocumentRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'DeleteDocument': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteDocument,
                    request_deserializer=v1_dot_documents__pb2.DeleteDocumentRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'nitric.v1.documents.Documents', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CreateDocument(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, '/nitric.v1.documents.Documents/CreateDocument',
            v1_dot_documents__pb2.CreateDocumentRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDocument(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, '/nitric.v1.documents.Documents/GetDocument',
            v1_dot_documents__pb2.GetDocumentRequest.SerializeToString,
            v1_dot_documents__pb2.GetDocumentReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateDocument(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, '/nitric.v1.documents.Documents/UpdateDocument',
            v1_dot_documents__pb2.UpdateDocumentRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteDocument(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, '/nitric.v1.documents.Documents/DeleteDocument',
            v1_dot_documents__pb2.DeleteDocumentRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
