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

from kaskada.kaskada.v1alpha import materialization_service_pb2 as kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2


class MaterializationServiceStub(object):
    """A service for managing Materializations.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListMaterializations = channel.unary_unary(
                '/kaskada.kaskada.v1alpha.MaterializationService/ListMaterializations',
                request_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.ListMaterializationsRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.ListMaterializationsResponse.FromString,
                )
        self.GetMaterialization = channel.unary_unary(
                '/kaskada.kaskada.v1alpha.MaterializationService/GetMaterialization',
                request_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.GetMaterializationRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.GetMaterializationResponse.FromString,
                )
        self.CreateMaterialization = channel.unary_unary(
                '/kaskada.kaskada.v1alpha.MaterializationService/CreateMaterialization',
                request_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.CreateMaterializationRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.CreateMaterializationResponse.FromString,
                )
        self.DeleteMaterialization = channel.unary_unary(
                '/kaskada.kaskada.v1alpha.MaterializationService/DeleteMaterialization',
                request_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.DeleteMaterializationRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.DeleteMaterializationResponse.FromString,
                )


class MaterializationServiceServicer(object):
    """A service for managing Materializations.
    """

    def ListMaterializations(self, request, context):
        """Lists materializations.

        The response includes all Materializations defined for the Kaskada
        account. If a search string is provided, only Materializations
        matching the search string are returned.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetMaterialization(self, request, context):
        """Gets a materialization.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateMaterialization(self, request, context):
        """Creates a materialization.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteMaterialization(self, request, context):
        """Deletes a materialization and any events loaded into it.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_MaterializationServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListMaterializations': grpc.unary_unary_rpc_method_handler(
                    servicer.ListMaterializations,
                    request_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.ListMaterializationsRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.ListMaterializationsResponse.SerializeToString,
            ),
            'GetMaterialization': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMaterialization,
                    request_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.GetMaterializationRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.GetMaterializationResponse.SerializeToString,
            ),
            'CreateMaterialization': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateMaterialization,
                    request_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.CreateMaterializationRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.CreateMaterializationResponse.SerializeToString,
            ),
            'DeleteMaterialization': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteMaterialization,
                    request_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.DeleteMaterializationRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.DeleteMaterializationResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'kaskada.kaskada.v1alpha.MaterializationService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class MaterializationService(object):
    """A service for managing Materializations.
    """

    @staticmethod
    def ListMaterializations(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, '/kaskada.kaskada.v1alpha.MaterializationService/ListMaterializations',
            kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.ListMaterializationsRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.ListMaterializationsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetMaterialization(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, '/kaskada.kaskada.v1alpha.MaterializationService/GetMaterialization',
            kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.GetMaterializationRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.GetMaterializationResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateMaterialization(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, '/kaskada.kaskada.v1alpha.MaterializationService/CreateMaterialization',
            kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.CreateMaterializationRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.CreateMaterializationResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteMaterialization(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, '/kaskada.kaskada.v1alpha.MaterializationService/DeleteMaterialization',
            kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.DeleteMaterializationRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v1alpha_dot_materialization__service__pb2.DeleteMaterializationResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
