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

from spaceone.api.monitoring.plugin import event_pb2 as spaceone_dot_api_dot_monitoring_dot_plugin_dot_event__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.parse = channel.unary_unary(
                '/spaceone.api.monitoring.plugin.Event/parse',
                request_serializer=spaceone_dot_api_dot_monitoring_dot_plugin_dot_event__pb2.ParseRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_monitoring_dot_plugin_dot_event__pb2.EventsInfo.FromString,
                )


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

    def parse(self, request, context):
        """
        desc: Parses a specific Event resource and transforms the resource from external data collected to data available in Cloudforet internally. The `parse` method standardizes all different data from external monitoring systems.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_EventServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'parse': grpc.unary_unary_rpc_method_handler(
                    servicer.parse,
                    request_deserializer=spaceone_dot_api_dot_monitoring_dot_plugin_dot_event__pb2.ParseRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_monitoring_dot_plugin_dot_event__pb2.EventsInfo.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'spaceone.api.monitoring.plugin.Event', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def parse(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, '/spaceone.api.monitoring.plugin.Event/parse',
            spaceone_dot_api_dot_monitoring_dot_plugin_dot_event__pb2.ParseRequest.SerializeToString,
            spaceone_dot_api_dot_monitoring_dot_plugin_dot_event__pb2.EventsInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
