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

from pyinjective.proto.exchange import injective_chart_rpc_pb2 as exchange_dot_injective__chart__rpc__pb2


class InjectiveChartRPCStub(object):
    """InjectiveChartRPC implements historical chart data retrieval.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SpotMarketHistory = channel.unary_unary(
                '/injective_chart_rpc.InjectiveChartRPC/SpotMarketHistory',
                request_serializer=exchange_dot_injective__chart__rpc__pb2.SpotMarketHistoryRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__chart__rpc__pb2.SpotMarketHistoryResponse.FromString,
                _registered_method=True)
        self.DerivativeMarketHistory = channel.unary_unary(
                '/injective_chart_rpc.InjectiveChartRPC/DerivativeMarketHistory',
                request_serializer=exchange_dot_injective__chart__rpc__pb2.DerivativeMarketHistoryRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__chart__rpc__pb2.DerivativeMarketHistoryResponse.FromString,
                _registered_method=True)
        self.SpotMarketSummary = channel.unary_unary(
                '/injective_chart_rpc.InjectiveChartRPC/SpotMarketSummary',
                request_serializer=exchange_dot_injective__chart__rpc__pb2.SpotMarketSummaryRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__chart__rpc__pb2.SpotMarketSummaryResponse.FromString,
                _registered_method=True)
        self.AllSpotMarketSummary = channel.unary_unary(
                '/injective_chart_rpc.InjectiveChartRPC/AllSpotMarketSummary',
                request_serializer=exchange_dot_injective__chart__rpc__pb2.AllSpotMarketSummaryRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__chart__rpc__pb2.AllSpotMarketSummaryResponse.FromString,
                _registered_method=True)
        self.DerivativeMarketSummary = channel.unary_unary(
                '/injective_chart_rpc.InjectiveChartRPC/DerivativeMarketSummary',
                request_serializer=exchange_dot_injective__chart__rpc__pb2.DerivativeMarketSummaryRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__chart__rpc__pb2.DerivativeMarketSummaryResponse.FromString,
                _registered_method=True)
        self.AllDerivativeMarketSummary = channel.unary_unary(
                '/injective_chart_rpc.InjectiveChartRPC/AllDerivativeMarketSummary',
                request_serializer=exchange_dot_injective__chart__rpc__pb2.AllDerivativeMarketSummaryRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__chart__rpc__pb2.AllDerivativeMarketSummaryResponse.FromString,
                _registered_method=True)
        self.MarketSnapshot = channel.unary_unary(
                '/injective_chart_rpc.InjectiveChartRPC/MarketSnapshot',
                request_serializer=exchange_dot_injective__chart__rpc__pb2.MarketSnapshotRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__chart__rpc__pb2.MarketSnapshotResponse.FromString,
                _registered_method=True)


class InjectiveChartRPCServicer(object):
    """InjectiveChartRPC implements historical chart data retrieval.
    """

    def SpotMarketHistory(self, request, context):
        """Request for history bars of spotMarket for TradingView.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DerivativeMarketHistory(self, request, context):
        """Request for history bars of derivativeMarket for TradingView.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SpotMarketSummary(self, request, context):
        """Gets spot market summary for the latest interval (hour, day, month)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AllSpotMarketSummary(self, request, context):
        """Gets batch summary for all active markets, for the latest interval (hour,
        day, month)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DerivativeMarketSummary(self, request, context):
        """Gets derivative market summary for the latest interval (hour, day, month)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AllDerivativeMarketSummary(self, request, context):
        """Gets batch summary for all active markets, for the latest interval (hour,
        day, month)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def MarketSnapshot(self, request, context):
        """Request for cached markets history bars. Max age is 1h.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_InjectiveChartRPCServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SpotMarketHistory': grpc.unary_unary_rpc_method_handler(
                    servicer.SpotMarketHistory,
                    request_deserializer=exchange_dot_injective__chart__rpc__pb2.SpotMarketHistoryRequest.FromString,
                    response_serializer=exchange_dot_injective__chart__rpc__pb2.SpotMarketHistoryResponse.SerializeToString,
            ),
            'DerivativeMarketHistory': grpc.unary_unary_rpc_method_handler(
                    servicer.DerivativeMarketHistory,
                    request_deserializer=exchange_dot_injective__chart__rpc__pb2.DerivativeMarketHistoryRequest.FromString,
                    response_serializer=exchange_dot_injective__chart__rpc__pb2.DerivativeMarketHistoryResponse.SerializeToString,
            ),
            'SpotMarketSummary': grpc.unary_unary_rpc_method_handler(
                    servicer.SpotMarketSummary,
                    request_deserializer=exchange_dot_injective__chart__rpc__pb2.SpotMarketSummaryRequest.FromString,
                    response_serializer=exchange_dot_injective__chart__rpc__pb2.SpotMarketSummaryResponse.SerializeToString,
            ),
            'AllSpotMarketSummary': grpc.unary_unary_rpc_method_handler(
                    servicer.AllSpotMarketSummary,
                    request_deserializer=exchange_dot_injective__chart__rpc__pb2.AllSpotMarketSummaryRequest.FromString,
                    response_serializer=exchange_dot_injective__chart__rpc__pb2.AllSpotMarketSummaryResponse.SerializeToString,
            ),
            'DerivativeMarketSummary': grpc.unary_unary_rpc_method_handler(
                    servicer.DerivativeMarketSummary,
                    request_deserializer=exchange_dot_injective__chart__rpc__pb2.DerivativeMarketSummaryRequest.FromString,
                    response_serializer=exchange_dot_injective__chart__rpc__pb2.DerivativeMarketSummaryResponse.SerializeToString,
            ),
            'AllDerivativeMarketSummary': grpc.unary_unary_rpc_method_handler(
                    servicer.AllDerivativeMarketSummary,
                    request_deserializer=exchange_dot_injective__chart__rpc__pb2.AllDerivativeMarketSummaryRequest.FromString,
                    response_serializer=exchange_dot_injective__chart__rpc__pb2.AllDerivativeMarketSummaryResponse.SerializeToString,
            ),
            'MarketSnapshot': grpc.unary_unary_rpc_method_handler(
                    servicer.MarketSnapshot,
                    request_deserializer=exchange_dot_injective__chart__rpc__pb2.MarketSnapshotRequest.FromString,
                    response_serializer=exchange_dot_injective__chart__rpc__pb2.MarketSnapshotResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'injective_chart_rpc.InjectiveChartRPC', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('injective_chart_rpc.InjectiveChartRPC', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class InjectiveChartRPC(object):
    """InjectiveChartRPC implements historical chart data retrieval.
    """

    @staticmethod
    def SpotMarketHistory(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_chart_rpc.InjectiveChartRPC/SpotMarketHistory',
            exchange_dot_injective__chart__rpc__pb2.SpotMarketHistoryRequest.SerializeToString,
            exchange_dot_injective__chart__rpc__pb2.SpotMarketHistoryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DerivativeMarketHistory(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_chart_rpc.InjectiveChartRPC/DerivativeMarketHistory',
            exchange_dot_injective__chart__rpc__pb2.DerivativeMarketHistoryRequest.SerializeToString,
            exchange_dot_injective__chart__rpc__pb2.DerivativeMarketHistoryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SpotMarketSummary(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_chart_rpc.InjectiveChartRPC/SpotMarketSummary',
            exchange_dot_injective__chart__rpc__pb2.SpotMarketSummaryRequest.SerializeToString,
            exchange_dot_injective__chart__rpc__pb2.SpotMarketSummaryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AllSpotMarketSummary(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_chart_rpc.InjectiveChartRPC/AllSpotMarketSummary',
            exchange_dot_injective__chart__rpc__pb2.AllSpotMarketSummaryRequest.SerializeToString,
            exchange_dot_injective__chart__rpc__pb2.AllSpotMarketSummaryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DerivativeMarketSummary(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_chart_rpc.InjectiveChartRPC/DerivativeMarketSummary',
            exchange_dot_injective__chart__rpc__pb2.DerivativeMarketSummaryRequest.SerializeToString,
            exchange_dot_injective__chart__rpc__pb2.DerivativeMarketSummaryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AllDerivativeMarketSummary(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_chart_rpc.InjectiveChartRPC/AllDerivativeMarketSummary',
            exchange_dot_injective__chart__rpc__pb2.AllDerivativeMarketSummaryRequest.SerializeToString,
            exchange_dot_injective__chart__rpc__pb2.AllDerivativeMarketSummaryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def MarketSnapshot(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_chart_rpc.InjectiveChartRPC/MarketSnapshot',
            exchange_dot_injective__chart__rpc__pb2.MarketSnapshotRequest.SerializeToString,
            exchange_dot_injective__chart__rpc__pb2.MarketSnapshotResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
