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

from protopia.api.data.v1beta1 import data_source_pb2 as protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2


class DataSourceServiceStub(object):
    """DataSource service manages the CRUD operations on a data source.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateDatasource = channel.unary_unary(
                '/protopia.cloud.governance.v1beta1.DataSourceService/CreateDatasource',
                request_serializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DataSource.SerializeToString,
                response_deserializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DataSource.FromString,
                )
        self.ListDataSources = channel.unary_unary(
                '/protopia.cloud.governance.v1beta1.DataSourceService/ListDataSources',
                request_serializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.ListDataSourcesRequest.SerializeToString,
                response_deserializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.ListDataSourcesResponse.FromString,
                )
        self.GetDataSource = channel.unary_unary(
                '/protopia.cloud.governance.v1beta1.DataSourceService/GetDataSource',
                request_serializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.GetDataSourceRequest.SerializeToString,
                response_deserializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DataSource.FromString,
                )
        self.UpdateDatasource = channel.unary_unary(
                '/protopia.cloud.governance.v1beta1.DataSourceService/UpdateDatasource',
                request_serializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.UpdateDataSourceRequest.SerializeToString,
                response_deserializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DataSource.FromString,
                )
        self.DeleteDatasource = channel.unary_unary(
                '/protopia.cloud.governance.v1beta1.DataSourceService/DeleteDatasource',
                request_serializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DeleteDataSourceRequest.SerializeToString,
                response_deserializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DeleteDataSourceResponse.FromString,
                )


class DataSourceServiceServicer(object):
    """DataSource service manages the CRUD operations on a data source.
    """

    def CreateDatasource(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 ListDataSources(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 GetDataSource(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 UpdateDatasource(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 DeleteDatasource(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_DataSourceServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateDatasource': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateDatasource,
                    request_deserializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DataSource.FromString,
                    response_serializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DataSource.SerializeToString,
            ),
            'ListDataSources': grpc.unary_unary_rpc_method_handler(
                    servicer.ListDataSources,
                    request_deserializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.ListDataSourcesRequest.FromString,
                    response_serializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.ListDataSourcesResponse.SerializeToString,
            ),
            'GetDataSource': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDataSource,
                    request_deserializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.GetDataSourceRequest.FromString,
                    response_serializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DataSource.SerializeToString,
            ),
            'UpdateDatasource': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateDatasource,
                    request_deserializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.UpdateDataSourceRequest.FromString,
                    response_serializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DataSource.SerializeToString,
            ),
            'DeleteDatasource': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteDatasource,
                    request_deserializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DeleteDataSourceRequest.FromString,
                    response_serializer=protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DeleteDataSourceResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'protopia.cloud.governance.v1beta1.DataSourceService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class DataSourceService(object):
    """DataSource service manages the CRUD operations on a data source.
    """

    @staticmethod
    def CreateDatasource(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, '/protopia.cloud.governance.v1beta1.DataSourceService/CreateDatasource',
            protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DataSource.SerializeToString,
            protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DataSource.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListDataSources(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, '/protopia.cloud.governance.v1beta1.DataSourceService/ListDataSources',
            protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.ListDataSourcesRequest.SerializeToString,
            protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.ListDataSourcesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDataSource(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, '/protopia.cloud.governance.v1beta1.DataSourceService/GetDataSource',
            protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.GetDataSourceRequest.SerializeToString,
            protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DataSource.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateDatasource(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, '/protopia.cloud.governance.v1beta1.DataSourceService/UpdateDatasource',
            protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.UpdateDataSourceRequest.SerializeToString,
            protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DataSource.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteDatasource(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, '/protopia.cloud.governance.v1beta1.DataSourceService/DeleteDatasource',
            protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DeleteDataSourceRequest.SerializeToString,
            protopia_dot_api_dot_data_dot_v1beta1_dot_data__source__pb2.DeleteDataSourceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
