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

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from yandex.cloud.serverless.eventrouter.v1 import event_service_pb2 as yandex_dot_cloud_dot_serverless_dot_eventrouter_dot_v1_dot_event__service__pb2


class EventServiceStub(object):
    """Service for put events to bus for serverless eventrouter.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Put = channel.unary_unary(
                '/yandex.cloud.serverless.eventrouter.v1.EventService/Put',
                request_serializer=yandex_dot_cloud_dot_serverless_dot_eventrouter_dot_v1_dot_event__service__pb2.PutEventRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


class EventServiceServicer(object):
    """Service for put events to bus for serverless eventrouter.
    """

    def Put(self, request, context):
        """Puts event to bus.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_EventServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Put': grpc.unary_unary_rpc_method_handler(
                    servicer.Put,
                    request_deserializer=yandex_dot_cloud_dot_serverless_dot_eventrouter_dot_v1_dot_event__service__pb2.PutEventRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.serverless.eventrouter.v1.EventService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class EventService(object):
    """Service for put events to bus for serverless eventrouter.
    """

    @staticmethod
    def Put(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, '/yandex.cloud.serverless.eventrouter.v1.EventService/Put',
            yandex_dot_cloud_dot_serverless_dot_eventrouter_dot_v1_dot_event__service__pb2.PutEventRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
