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

from v4_proto.dydxprotocol.bridge import query_pb2 as dydxprotocol_dot_bridge_dot_query__pb2

GRPC_GENERATED_VERSION = '1.65.4'
GRPC_VERSION = grpc.__version__
EXPECTED_ERROR_RELEASE = '1.66.0'
SCHEDULED_RELEASE_DATE = 'August 6, 2024'
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    warnings.warn(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in dydxprotocol/bridge/query_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
        + f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
        + f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
        RuntimeWarning
    )


class QueryStub(object):
    """Query defines the gRPC querier service.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.EventParams = channel.unary_unary(
                '/dydxprotocol.bridge.Query/EventParams',
                request_serializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryEventParamsRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryEventParamsResponse.FromString,
                _registered_method=True)
        self.ProposeParams = channel.unary_unary(
                '/dydxprotocol.bridge.Query/ProposeParams',
                request_serializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryProposeParamsRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryProposeParamsResponse.FromString,
                _registered_method=True)
        self.SafetyParams = channel.unary_unary(
                '/dydxprotocol.bridge.Query/SafetyParams',
                request_serializer=dydxprotocol_dot_bridge_dot_query__pb2.QuerySafetyParamsRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_bridge_dot_query__pb2.QuerySafetyParamsResponse.FromString,
                _registered_method=True)
        self.AcknowledgedEventInfo = channel.unary_unary(
                '/dydxprotocol.bridge.Query/AcknowledgedEventInfo',
                request_serializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryAcknowledgedEventInfoRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryAcknowledgedEventInfoResponse.FromString,
                _registered_method=True)
        self.RecognizedEventInfo = channel.unary_unary(
                '/dydxprotocol.bridge.Query/RecognizedEventInfo',
                request_serializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryRecognizedEventInfoRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryRecognizedEventInfoResponse.FromString,
                _registered_method=True)
        self.DelayedCompleteBridgeMessages = channel.unary_unary(
                '/dydxprotocol.bridge.Query/DelayedCompleteBridgeMessages',
                request_serializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryDelayedCompleteBridgeMessagesRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryDelayedCompleteBridgeMessagesResponse.FromString,
                _registered_method=True)


class QueryServicer(object):
    """Query defines the gRPC querier service.
    """

    def EventParams(self, request, context):
        """Queries the EventParams.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ProposeParams(self, request, context):
        """Queries the ProposeParams.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SafetyParams(self, request, context):
        """Queries the SafetyParams.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AcknowledgedEventInfo(self, request, context):
        """Queries the AcknowledgedEventInfo.
        An "acknowledged" event is one that is in-consensus and has been stored
        in-state.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RecognizedEventInfo(self, request, context):
        """Queries the RecognizedEventInfo.
        A "recognized" event is one that is finalized on the Ethereum blockchain
        and has been identified by the queried node. It is not yet in-consensus.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DelayedCompleteBridgeMessages(self, request, context):
        """Queries all `MsgCompleteBridge` messages that are delayed (not yet
        executed) and corresponding block heights at which they will execute.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_QueryServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'EventParams': grpc.unary_unary_rpc_method_handler(
                    servicer.EventParams,
                    request_deserializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryEventParamsRequest.FromString,
                    response_serializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryEventParamsResponse.SerializeToString,
            ),
            'ProposeParams': grpc.unary_unary_rpc_method_handler(
                    servicer.ProposeParams,
                    request_deserializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryProposeParamsRequest.FromString,
                    response_serializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryProposeParamsResponse.SerializeToString,
            ),
            'SafetyParams': grpc.unary_unary_rpc_method_handler(
                    servicer.SafetyParams,
                    request_deserializer=dydxprotocol_dot_bridge_dot_query__pb2.QuerySafetyParamsRequest.FromString,
                    response_serializer=dydxprotocol_dot_bridge_dot_query__pb2.QuerySafetyParamsResponse.SerializeToString,
            ),
            'AcknowledgedEventInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.AcknowledgedEventInfo,
                    request_deserializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryAcknowledgedEventInfoRequest.FromString,
                    response_serializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryAcknowledgedEventInfoResponse.SerializeToString,
            ),
            'RecognizedEventInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.RecognizedEventInfo,
                    request_deserializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryRecognizedEventInfoRequest.FromString,
                    response_serializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryRecognizedEventInfoResponse.SerializeToString,
            ),
            'DelayedCompleteBridgeMessages': grpc.unary_unary_rpc_method_handler(
                    servicer.DelayedCompleteBridgeMessages,
                    request_deserializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryDelayedCompleteBridgeMessagesRequest.FromString,
                    response_serializer=dydxprotocol_dot_bridge_dot_query__pb2.QueryDelayedCompleteBridgeMessagesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dydxprotocol.bridge.Query', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('dydxprotocol.bridge.Query', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class Query(object):
    """Query defines the gRPC querier service.
    """

    @staticmethod
    def EventParams(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.bridge.Query/EventParams',
            dydxprotocol_dot_bridge_dot_query__pb2.QueryEventParamsRequest.SerializeToString,
            dydxprotocol_dot_bridge_dot_query__pb2.QueryEventParamsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ProposeParams(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.bridge.Query/ProposeParams',
            dydxprotocol_dot_bridge_dot_query__pb2.QueryProposeParamsRequest.SerializeToString,
            dydxprotocol_dot_bridge_dot_query__pb2.QueryProposeParamsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SafetyParams(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.bridge.Query/SafetyParams',
            dydxprotocol_dot_bridge_dot_query__pb2.QuerySafetyParamsRequest.SerializeToString,
            dydxprotocol_dot_bridge_dot_query__pb2.QuerySafetyParamsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AcknowledgedEventInfo(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.bridge.Query/AcknowledgedEventInfo',
            dydxprotocol_dot_bridge_dot_query__pb2.QueryAcknowledgedEventInfoRequest.SerializeToString,
            dydxprotocol_dot_bridge_dot_query__pb2.QueryAcknowledgedEventInfoResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RecognizedEventInfo(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.bridge.Query/RecognizedEventInfo',
            dydxprotocol_dot_bridge_dot_query__pb2.QueryRecognizedEventInfoRequest.SerializeToString,
            dydxprotocol_dot_bridge_dot_query__pb2.QueryRecognizedEventInfoResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DelayedCompleteBridgeMessages(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.bridge.Query/DelayedCompleteBridgeMessages',
            dydxprotocol_dot_bridge_dot_query__pb2.QueryDelayedCompleteBridgeMessagesRequest.SerializeToString,
            dydxprotocol_dot_bridge_dot_query__pb2.QueryDelayedCompleteBridgeMessagesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
