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

from mgmt.v1alpha1 import connection_data_pb2 as mgmt_dot_v1alpha1_dot_connection__data__pb2


class ConnectionDataServiceStub(object):
    """Service for managing connection data.
    This is used in handle data from a connection
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetConnectionDataStream = channel.unary_stream(
                '/mgmt.v1alpha1.ConnectionDataService/GetConnectionDataStream',
                request_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionDataStreamRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionDataStreamResponse.FromString,
                _registered_method=True)
        self.GetConnectionSchema = channel.unary_unary(
                '/mgmt.v1alpha1.ConnectionDataService/GetConnectionSchema',
                request_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaResponse.FromString,
                _registered_method=True)
        self.GetConnectionSchemaMap = channel.unary_unary(
                '/mgmt.v1alpha1.ConnectionDataService/GetConnectionSchemaMap',
                request_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaMapRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaMapResponse.FromString,
                _registered_method=True)
        self.GetConnectionSchemaMaps = channel.unary_unary(
                '/mgmt.v1alpha1.ConnectionDataService/GetConnectionSchemaMaps',
                request_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaMapsRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaMapsResponse.FromString,
                _registered_method=True)
        self.GetConnectionTableConstraints = channel.unary_unary(
                '/mgmt.v1alpha1.ConnectionDataService/GetConnectionTableConstraints',
                request_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionTableConstraintsRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionTableConstraintsResponse.FromString,
                _registered_method=True)
        self.GetConnectionInitStatements = channel.unary_unary(
                '/mgmt.v1alpha1.ConnectionDataService/GetConnectionInitStatements',
                request_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionInitStatementsRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionInitStatementsResponse.FromString,
                _registered_method=True)
        self.GetAiGeneratedData = channel.unary_unary(
                '/mgmt.v1alpha1.ConnectionDataService/GetAiGeneratedData',
                request_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetAiGeneratedDataRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetAiGeneratedDataResponse.FromString,
                _registered_method=True)
        self.GetTableRowCount = channel.unary_unary(
                '/mgmt.v1alpha1.ConnectionDataService/GetTableRowCount',
                request_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetTableRowCountRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetTableRowCountResponse.FromString,
                _registered_method=True)
        self.GetAllSchemasAndTables = channel.unary_unary(
                '/mgmt.v1alpha1.ConnectionDataService/GetAllSchemasAndTables',
                request_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetAllSchemasAndTablesRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetAllSchemasAndTablesResponse.FromString,
                _registered_method=True)


class ConnectionDataServiceServicer(object):
    """Service for managing connection data.
    This is used in handle data from a connection
    """

    def GetConnectionDataStream(self, request, context):
        """Streaming endpoint that will stream the data available from the Connection to the client.
        Used primarily by the CLI sync command.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetConnectionSchema(self, request, context):
        """Returns the schema for a specific connection. Used mostly for SQL-based connections
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetConnectionSchemaMap(self, request, context):
        """Returns the schema in map format. The keys are the fully qualified table in the format <schema>.<table>
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetConnectionSchemaMaps(self, request, context):
        """Returns the schema in map format for every request provided
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetConnectionTableConstraints(self, request, context):
        """For a specific connection, returns the table constraints. Mostly useful for SQL-based Connections.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetConnectionInitStatements(self, request, context):
        """For a specific connection, returns the init table statements. Mostly useful for SQL-based Connections.
        Used primarily by the CLI sync command to create table schema init statement.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAiGeneratedData(self, request, context):
        """Query an AI connection by providing the necessary values. Typically used for generating preview data
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTableRowCount(self, request, context):
        """Query table with subset to get row count
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAllSchemasAndTables(self, request, context):
        """Get all schemas and tables for a connection
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ConnectionDataServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetConnectionDataStream': grpc.unary_stream_rpc_method_handler(
                    servicer.GetConnectionDataStream,
                    request_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionDataStreamRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionDataStreamResponse.SerializeToString,
            ),
            'GetConnectionSchema': grpc.unary_unary_rpc_method_handler(
                    servicer.GetConnectionSchema,
                    request_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaResponse.SerializeToString,
            ),
            'GetConnectionSchemaMap': grpc.unary_unary_rpc_method_handler(
                    servicer.GetConnectionSchemaMap,
                    request_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaMapRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaMapResponse.SerializeToString,
            ),
            'GetConnectionSchemaMaps': grpc.unary_unary_rpc_method_handler(
                    servicer.GetConnectionSchemaMaps,
                    request_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaMapsRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaMapsResponse.SerializeToString,
            ),
            'GetConnectionTableConstraints': grpc.unary_unary_rpc_method_handler(
                    servicer.GetConnectionTableConstraints,
                    request_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionTableConstraintsRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionTableConstraintsResponse.SerializeToString,
            ),
            'GetConnectionInitStatements': grpc.unary_unary_rpc_method_handler(
                    servicer.GetConnectionInitStatements,
                    request_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionInitStatementsRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionInitStatementsResponse.SerializeToString,
            ),
            'GetAiGeneratedData': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAiGeneratedData,
                    request_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetAiGeneratedDataRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetAiGeneratedDataResponse.SerializeToString,
            ),
            'GetTableRowCount': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTableRowCount,
                    request_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetTableRowCountRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetTableRowCountResponse.SerializeToString,
            ),
            'GetAllSchemasAndTables': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAllSchemasAndTables,
                    request_deserializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetAllSchemasAndTablesRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_connection__data__pb2.GetAllSchemasAndTablesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mgmt.v1alpha1.ConnectionDataService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('mgmt.v1alpha1.ConnectionDataService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class ConnectionDataService(object):
    """Service for managing connection data.
    This is used in handle data from a connection
    """

    @staticmethod
    def GetConnectionDataStream(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,
            '/mgmt.v1alpha1.ConnectionDataService/GetConnectionDataStream',
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionDataStreamRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionDataStreamResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetConnectionSchema(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,
            '/mgmt.v1alpha1.ConnectionDataService/GetConnectionSchema',
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetConnectionSchemaMap(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,
            '/mgmt.v1alpha1.ConnectionDataService/GetConnectionSchemaMap',
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaMapRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaMapResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetConnectionSchemaMaps(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,
            '/mgmt.v1alpha1.ConnectionDataService/GetConnectionSchemaMaps',
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaMapsRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionSchemaMapsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetConnectionTableConstraints(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,
            '/mgmt.v1alpha1.ConnectionDataService/GetConnectionTableConstraints',
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionTableConstraintsRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionTableConstraintsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetConnectionInitStatements(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,
            '/mgmt.v1alpha1.ConnectionDataService/GetConnectionInitStatements',
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionInitStatementsRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetConnectionInitStatementsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetAiGeneratedData(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,
            '/mgmt.v1alpha1.ConnectionDataService/GetAiGeneratedData',
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetAiGeneratedDataRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetAiGeneratedDataResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetTableRowCount(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,
            '/mgmt.v1alpha1.ConnectionDataService/GetTableRowCount',
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetTableRowCountRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetTableRowCountResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetAllSchemasAndTables(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,
            '/mgmt.v1alpha1.ConnectionDataService/GetAllSchemasAndTables',
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetAllSchemasAndTablesRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_connection__data__pb2.GetAllSchemasAndTablesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
