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

from exchange import injective_meta_rpc_pb2 as exchange_dot_injective__meta__rpc__pb2


class InjectiveMetaRPCStub(object):
    """InjectiveMetaRPC is a special API subset to get info about server.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Ping = channel.unary_unary(
                '/injective_meta_rpc.InjectiveMetaRPC/Ping',
                request_serializer=exchange_dot_injective__meta__rpc__pb2.PingRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__meta__rpc__pb2.PingResponse.FromString,
                )
        self.Version = channel.unary_unary(
                '/injective_meta_rpc.InjectiveMetaRPC/Version',
                request_serializer=exchange_dot_injective__meta__rpc__pb2.VersionRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__meta__rpc__pb2.VersionResponse.FromString,
                )
        self.Info = channel.unary_unary(
                '/injective_meta_rpc.InjectiveMetaRPC/Info',
                request_serializer=exchange_dot_injective__meta__rpc__pb2.InfoRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__meta__rpc__pb2.InfoResponse.FromString,
                )
        self.StreamKeepalive = channel.unary_stream(
                '/injective_meta_rpc.InjectiveMetaRPC/StreamKeepalive',
                request_serializer=exchange_dot_injective__meta__rpc__pb2.StreamKeepaliveRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__meta__rpc__pb2.StreamKeepaliveResponse.FromString,
                )


class InjectiveMetaRPCServicer(object):
    """InjectiveMetaRPC is a special API subset to get info about server.
    """

    def Ping(self, request, context):
        """Endpoint for checking server health.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Version(self, request, context):
        """Returns injective-exchange version.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Info(self, request, context):
        """Gets connection info
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StreamKeepalive(self, request, context):
        """Stream keepalive, if server exits, a shutdown event will be sent over this
        channel.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_InjectiveMetaRPCServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Ping': grpc.unary_unary_rpc_method_handler(
                    servicer.Ping,
                    request_deserializer=exchange_dot_injective__meta__rpc__pb2.PingRequest.FromString,
                    response_serializer=exchange_dot_injective__meta__rpc__pb2.PingResponse.SerializeToString,
            ),
            'Version': grpc.unary_unary_rpc_method_handler(
                    servicer.Version,
                    request_deserializer=exchange_dot_injective__meta__rpc__pb2.VersionRequest.FromString,
                    response_serializer=exchange_dot_injective__meta__rpc__pb2.VersionResponse.SerializeToString,
            ),
            'Info': grpc.unary_unary_rpc_method_handler(
                    servicer.Info,
                    request_deserializer=exchange_dot_injective__meta__rpc__pb2.InfoRequest.FromString,
                    response_serializer=exchange_dot_injective__meta__rpc__pb2.InfoResponse.SerializeToString,
            ),
            'StreamKeepalive': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamKeepalive,
                    request_deserializer=exchange_dot_injective__meta__rpc__pb2.StreamKeepaliveRequest.FromString,
                    response_serializer=exchange_dot_injective__meta__rpc__pb2.StreamKeepaliveResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'injective_meta_rpc.InjectiveMetaRPC', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class InjectiveMetaRPC(object):
    """InjectiveMetaRPC is a special API subset to get info about server.
    """

    @staticmethod
    def Ping(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, '/injective_meta_rpc.InjectiveMetaRPC/Ping',
            exchange_dot_injective__meta__rpc__pb2.PingRequest.SerializeToString,
            exchange_dot_injective__meta__rpc__pb2.PingResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Version(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, '/injective_meta_rpc.InjectiveMetaRPC/Version',
            exchange_dot_injective__meta__rpc__pb2.VersionRequest.SerializeToString,
            exchange_dot_injective__meta__rpc__pb2.VersionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Info(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, '/injective_meta_rpc.InjectiveMetaRPC/Info',
            exchange_dot_injective__meta__rpc__pb2.InfoRequest.SerializeToString,
            exchange_dot_injective__meta__rpc__pb2.InfoResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StreamKeepalive(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, '/injective_meta_rpc.InjectiveMetaRPC/StreamKeepalive',
            exchange_dot_injective__meta__rpc__pb2.StreamKeepaliveRequest.SerializeToString,
            exchange_dot_injective__meta__rpc__pb2.StreamKeepaliveResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
