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

from terrascope_api.models import notification_pb2 as notification__pb2


class NotificationApiStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.create_subscription = channel.unary_unary(
                '/oi.papi.NotificationApi/create_subscription',
                request_serializer=notification__pb2.SubscriptionCreateRequest.SerializeToString,
                response_deserializer=notification__pb2.SubscriptionCreateResponse.FromString,
                )
        self.list_topic = channel.unary_unary(
                '/oi.papi.NotificationApi/list_topic',
                request_serializer=notification__pb2.TopicListRequest.SerializeToString,
                response_deserializer=notification__pb2.TopicListResponse.FromString,
                )
        self.list_channel = channel.unary_unary(
                '/oi.papi.NotificationApi/list_channel',
                request_serializer=notification__pb2.ChannelListRequest.SerializeToString,
                response_deserializer=notification__pb2.ChannelListResponse.FromString,
                )
        self.delete_subscription = channel.unary_unary(
                '/oi.papi.NotificationApi/delete_subscription',
                request_serializer=notification__pb2.SubscriptionDeleteRequest.SerializeToString,
                response_deserializer=notification__pb2.SubscriptionDeleteResponse.FromString,
                )


class NotificationApiServicer(object):
    """Missing associated documentation comment in .proto file."""

    def create_subscription(self, request, context):
        """
        Create subscription for a specific topic
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def list_topic(self, request, context):
        """
        Get all the Topics that the user can subscribe to
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def list_channel(self, request, context):
        """
        Get all the channels that can be used
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def delete_subscription(self, request, context):
        """
        Deletes the specified Subscription.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_NotificationApiServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'create_subscription': grpc.unary_unary_rpc_method_handler(
                    servicer.create_subscription,
                    request_deserializer=notification__pb2.SubscriptionCreateRequest.FromString,
                    response_serializer=notification__pb2.SubscriptionCreateResponse.SerializeToString,
            ),
            'list_topic': grpc.unary_unary_rpc_method_handler(
                    servicer.list_topic,
                    request_deserializer=notification__pb2.TopicListRequest.FromString,
                    response_serializer=notification__pb2.TopicListResponse.SerializeToString,
            ),
            'list_channel': grpc.unary_unary_rpc_method_handler(
                    servicer.list_channel,
                    request_deserializer=notification__pb2.ChannelListRequest.FromString,
                    response_serializer=notification__pb2.ChannelListResponse.SerializeToString,
            ),
            'delete_subscription': grpc.unary_unary_rpc_method_handler(
                    servicer.delete_subscription,
                    request_deserializer=notification__pb2.SubscriptionDeleteRequest.FromString,
                    response_serializer=notification__pb2.SubscriptionDeleteResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'oi.papi.NotificationApi', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class NotificationApi(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def create_subscription(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, '/oi.papi.NotificationApi/create_subscription',
            notification__pb2.SubscriptionCreateRequest.SerializeToString,
            notification__pb2.SubscriptionCreateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def list_topic(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, '/oi.papi.NotificationApi/list_topic',
            notification__pb2.TopicListRequest.SerializeToString,
            notification__pb2.TopicListResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def list_channel(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, '/oi.papi.NotificationApi/list_channel',
            notification__pb2.ChannelListRequest.SerializeToString,
            notification__pb2.ChannelListResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def delete_subscription(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, '/oi.papi.NotificationApi/delete_subscription',
            notification__pb2.SubscriptionDeleteRequest.SerializeToString,
            notification__pb2.SubscriptionDeleteResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
