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

from v4_proto.dydxprotocol.daemons.bridge import bridge_pb2 as dydxprotocol_dot_daemons_dot_bridge_dot_bridge__pb2


class BridgeServiceStub(object):
    """BridgeService defines the gRPC service used by bridge daemon.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.AddBridgeEvents = channel.unary_unary(
                '/dydxprotocol.daemons.bridge.BridgeService/AddBridgeEvents',
                request_serializer=dydxprotocol_dot_daemons_dot_bridge_dot_bridge__pb2.AddBridgeEventsRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_daemons_dot_bridge_dot_bridge__pb2.AddBridgeEventsResponse.FromString,
                )


class BridgeServiceServicer(object):
    """BridgeService defines the gRPC service used by bridge daemon.
    """

    def AddBridgeEvents(self, request, context):
        """Sends a list of newly recognized bridge events.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_BridgeServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AddBridgeEvents': grpc.unary_unary_rpc_method_handler(
                    servicer.AddBridgeEvents,
                    request_deserializer=dydxprotocol_dot_daemons_dot_bridge_dot_bridge__pb2.AddBridgeEventsRequest.FromString,
                    response_serializer=dydxprotocol_dot_daemons_dot_bridge_dot_bridge__pb2.AddBridgeEventsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dydxprotocol.daemons.bridge.BridgeService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class BridgeService(object):
    """BridgeService defines the gRPC service used by bridge daemon.
    """

    @staticmethod
    def AddBridgeEvents(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, '/dydxprotocol.daemons.bridge.BridgeService/AddBridgeEvents',
            dydxprotocol_dot_daemons_dot_bridge_dot_bridge__pb2.AddBridgeEventsRequest.SerializeToString,
            dydxprotocol_dot_daemons_dot_bridge_dot_bridge__pb2.AddBridgeEventsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
