# 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 view_service_pb2 as kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2


class ViewServiceStub(object):
    """A service for managing Views.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListViews = channel.unary_unary(
                '/kaskada.kaskada.v1alpha.ViewService/ListViews',
                request_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.ListViewsRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.ListViewsResponse.FromString,
                )
        self.GetView = channel.unary_unary(
                '/kaskada.kaskada.v1alpha.ViewService/GetView',
                request_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.GetViewRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.GetViewResponse.FromString,
                )
        self.CreateView = channel.unary_unary(
                '/kaskada.kaskada.v1alpha.ViewService/CreateView',
                request_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.CreateViewRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.CreateViewResponse.FromString,
                )
        self.DeleteView = channel.unary_unary(
                '/kaskada.kaskada.v1alpha.ViewService/DeleteView',
                request_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.DeleteViewRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.DeleteViewResponse.FromString,
                )


class ViewServiceServicer(object):
    """A service for managing Views.
    """

    def ListViews(self, request, context):
        """Lists views.

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

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

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

    def DeleteView(self, request, context):
        """Deletes a view.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ViewServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListViews': grpc.unary_unary_rpc_method_handler(
                    servicer.ListViews,
                    request_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.ListViewsRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.ListViewsResponse.SerializeToString,
            ),
            'GetView': grpc.unary_unary_rpc_method_handler(
                    servicer.GetView,
                    request_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.GetViewRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.GetViewResponse.SerializeToString,
            ),
            'CreateView': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateView,
                    request_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.CreateViewRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.CreateViewResponse.SerializeToString,
            ),
            'DeleteView': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteView,
                    request_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.DeleteViewRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.DeleteViewResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'kaskada.kaskada.v1alpha.ViewService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ListViews(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.ViewService/ListViews',
            kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.ListViewsRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.ListViewsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetView(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.ViewService/GetView',
            kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.GetViewRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.GetViewResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateView(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.ViewService/CreateView',
            kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.CreateViewRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.CreateViewResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteView(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.ViewService/DeleteView',
            kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.DeleteViewRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v1alpha_dot_view__service__pb2.DeleteViewResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
