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

from aruna.api.notification.services.v1 import notification_service_pb2 as aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2


class EventNotificationServiceStub(object):
    """EventNotificationService

    A service to receive events in the AOS storage
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateEventStreamingGroup = channel.unary_unary(
                '/aruna.api.notification.services.v1.EventNotificationService/CreateEventStreamingGroup',
                request_serializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.CreateEventStreamingGroupRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.CreateEventStreamingGroupResponse.FromString,
                )
        self.GetEventMessageBatch = channel.unary_unary(
                '/aruna.api.notification.services.v1.EventNotificationService/GetEventMessageBatch',
                request_serializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.GetEventMessageBatchRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.GetEventMessageBatchResponse.FromString,
                )
        self.GetEventMessageBatchStream = channel.unary_stream(
                '/aruna.api.notification.services.v1.EventNotificationService/GetEventMessageBatchStream',
                request_serializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.GetEventMessageBatchStreamRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.GetEventMessageBatchStreamResponse.FromString,
                )
        self.AcknowledgeMessageBatch = channel.unary_unary(
                '/aruna.api.notification.services.v1.EventNotificationService/AcknowledgeMessageBatch',
                request_serializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.AcknowledgeMessageBatchRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.AcknowledgeMessageBatchResponse.FromString,
                )
        self.DeleteEventStreamingGroup = channel.unary_unary(
                '/aruna.api.notification.services.v1.EventNotificationService/DeleteEventStreamingGroup',
                request_serializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.DeleteEventStreamingGroupRequest.SerializeToString,
                response_deserializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.DeleteEventStreamingGroupResponse.FromString,
                )


class EventNotificationServiceServicer(object):
    """EventNotificationService

    A service to receive events in the AOS storage
    """

    def CreateEventStreamingGroup(self, request, context):
        """CreateEventStreamingGroup

        Creates a new EventStreamingGroup
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetEventMessageBatch(self, request, context):
        """GetEventMessageBatch

        Reads a set of messages from a given stream group
        Each message contains a separate acknowledgement message that is protected by a salt and an hmac for verification
        The message can be send directly through the AcknowledgeMessageBatch call to acknowledge the message
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetEventMessageBatchStream(self, request, context):
        """GetEventMessageBatch

        Reads a set of messages from a given stream group
        Each message contains a separate acknowledgement message that is protected by a salt and an hmac for verification
        The message can be send directly through the AcknowledgeMessageBatch call to acknowledge the message
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AcknowledgeMessageBatch(self, request, context):
        """AcknowledgeMessageBatch

        List of messages to acknowledge
        Each reply is protected by a salt and and hmac that verifies the message
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteEventStreamingGroup(self, request, context):
        """DeleteEventStreamingGroup

        Deletes a existing EventStreamingGroup by ID
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_EventNotificationServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateEventStreamingGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateEventStreamingGroup,
                    request_deserializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.CreateEventStreamingGroupRequest.FromString,
                    response_serializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.CreateEventStreamingGroupResponse.SerializeToString,
            ),
            'GetEventMessageBatch': grpc.unary_unary_rpc_method_handler(
                    servicer.GetEventMessageBatch,
                    request_deserializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.GetEventMessageBatchRequest.FromString,
                    response_serializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.GetEventMessageBatchResponse.SerializeToString,
            ),
            'GetEventMessageBatchStream': grpc.unary_stream_rpc_method_handler(
                    servicer.GetEventMessageBatchStream,
                    request_deserializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.GetEventMessageBatchStreamRequest.FromString,
                    response_serializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.GetEventMessageBatchStreamResponse.SerializeToString,
            ),
            'AcknowledgeMessageBatch': grpc.unary_unary_rpc_method_handler(
                    servicer.AcknowledgeMessageBatch,
                    request_deserializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.AcknowledgeMessageBatchRequest.FromString,
                    response_serializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.AcknowledgeMessageBatchResponse.SerializeToString,
            ),
            'DeleteEventStreamingGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteEventStreamingGroup,
                    request_deserializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.DeleteEventStreamingGroupRequest.FromString,
                    response_serializer=aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.DeleteEventStreamingGroupResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'aruna.api.notification.services.v1.EventNotificationService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class EventNotificationService(object):
    """EventNotificationService

    A service to receive events in the AOS storage
    """

    @staticmethod
    def CreateEventStreamingGroup(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, '/aruna.api.notification.services.v1.EventNotificationService/CreateEventStreamingGroup',
            aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.CreateEventStreamingGroupRequest.SerializeToString,
            aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.CreateEventStreamingGroupResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetEventMessageBatch(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, '/aruna.api.notification.services.v1.EventNotificationService/GetEventMessageBatch',
            aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.GetEventMessageBatchRequest.SerializeToString,
            aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.GetEventMessageBatchResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetEventMessageBatchStream(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, '/aruna.api.notification.services.v1.EventNotificationService/GetEventMessageBatchStream',
            aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.GetEventMessageBatchStreamRequest.SerializeToString,
            aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.GetEventMessageBatchStreamResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AcknowledgeMessageBatch(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, '/aruna.api.notification.services.v1.EventNotificationService/AcknowledgeMessageBatch',
            aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.AcknowledgeMessageBatchRequest.SerializeToString,
            aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.AcknowledgeMessageBatchResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteEventStreamingGroup(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, '/aruna.api.notification.services.v1.EventNotificationService/DeleteEventStreamingGroup',
            aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.DeleteEventStreamingGroupRequest.SerializeToString,
            aruna_dot_api_dot_notification_dot_services_dot_v1_dot_notification__service__pb2.DeleteEventStreamingGroupResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
