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

from cf import cf_rdbms_pb2 as cf_dot_cf__rdbms__pb2


class RdbmsCustomFieldMDEStub(object):
    """The RdbmsCustomFieldMDE enables an RDBMS connector to extract custom fields about RDBMS objects.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CustomFieldExtraction = channel.unary_stream(
                '/ocf.cf.rdbms.RdbmsCustomFieldMDE/CustomFieldExtraction',
                request_serializer=cf_dot_cf__rdbms__pb2.CustomFieldExtractionRequest.SerializeToString,
                response_deserializer=cf_dot_cf__rdbms__pb2.CustomFieldExtractionResponse.FromString,
                )


class RdbmsCustomFieldMDEServicer(object):
    """The RdbmsCustomFieldMDE enables an RDBMS connector to extract custom fields about RDBMS objects.
    """

    def CustomFieldExtraction(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_RdbmsCustomFieldMDEServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CustomFieldExtraction': grpc.unary_stream_rpc_method_handler(
                    servicer.CustomFieldExtraction,
                    request_deserializer=cf_dot_cf__rdbms__pb2.CustomFieldExtractionRequest.FromString,
                    response_serializer=cf_dot_cf__rdbms__pb2.CustomFieldExtractionResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ocf.cf.rdbms.RdbmsCustomFieldMDE', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class RdbmsCustomFieldMDE(object):
    """The RdbmsCustomFieldMDE enables an RDBMS connector to extract custom fields about RDBMS objects.
    """

    @staticmethod
    def CustomFieldExtraction(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, '/ocf.cf.rdbms.RdbmsCustomFieldMDE/CustomFieldExtraction',
            cf_dot_cf__rdbms__pb2.CustomFieldExtractionRequest.SerializeToString,
            cf_dot_cf__rdbms__pb2.CustomFieldExtractionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
