# 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 ziplime.data.data_sources.grpc.grpc_stubs.grpc.tradeapi.v1.assets import assets_service_pb2 as grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2

GRPC_GENERATED_VERSION = '1.74.0'
GRPC_VERSION = grpc.__version__
_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:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in grpc/tradeapi/v1/assets/assets_service_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}.'
    )


class AssetsServiceStub(object):
    def __init__(self, channel):
        self.Exchanges = channel.unary_unary(
                '/grpc.tradeapi.v1.assets.AssetsService/Exchanges',
                request_serializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ExchangesRequest.SerializeToString,
                response_deserializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ExchangesResponse.FromString,
                _registered_method=True)
        self.Assets = channel.unary_unary(
                '/grpc.tradeapi.v1.assets.AssetsService/Assets',
                request_serializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.AssetsRequest.SerializeToString,
                response_deserializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.AssetsResponse.FromString,
                _registered_method=True)
        self.GetAsset = channel.unary_unary(
                '/grpc.tradeapi.v1.assets.AssetsService/GetAsset',
                request_serializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.GetAssetRequest.SerializeToString,
                response_deserializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.GetAssetResponse.FromString,
                _registered_method=True)
        self.GetAssetParams = channel.unary_unary(
                '/grpc.tradeapi.v1.assets.AssetsService/GetAssetParams',
                request_serializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.GetAssetParamsRequest.SerializeToString,
                response_deserializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.GetAssetParamsResponse.FromString,
                _registered_method=True)
        self.OptionsChain = channel.unary_unary(
                '/grpc.tradeapi.v1.assets.AssetsService/OptionsChain',
                request_serializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.OptionsChainRequest.SerializeToString,
                response_deserializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.OptionsChainResponse.FromString,
                _registered_method=True)
        self.Schedule = channel.unary_unary(
                '/grpc.tradeapi.v1.assets.AssetsService/Schedule',
                request_serializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ScheduleRequest.SerializeToString,
                response_deserializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ScheduleResponse.FromString,
                _registered_method=True)
        self.Clock = channel.unary_unary(
                '/grpc.tradeapi.v1.assets.AssetsService/Clock',
                request_serializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ClockRequest.SerializeToString,
                response_deserializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ClockResponse.FromString,
                _registered_method=True)


class AssetsServiceServicer(object):
    def Exchanges(self, request, context):
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

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

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

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

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

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


def add_AssetsServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Exchanges': grpc.unary_unary_rpc_method_handler(
                    servicer.Exchanges,
                    request_deserializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ExchangesRequest.FromString,
                    response_serializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ExchangesResponse.SerializeToString,
            ),
            'Assets': grpc.unary_unary_rpc_method_handler(
                    servicer.Assets,
                    request_deserializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.AssetsRequest.FromString,
                    response_serializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.AssetsResponse.SerializeToString,
            ),
            'GetAsset': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAsset,
                    request_deserializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.GetAssetRequest.FromString,
                    response_serializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.GetAssetResponse.SerializeToString,
            ),
            'GetAssetParams': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAssetParams,
                    request_deserializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.GetAssetParamsRequest.FromString,
                    response_serializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.GetAssetParamsResponse.SerializeToString,
            ),
            'OptionsChain': grpc.unary_unary_rpc_method_handler(
                    servicer.OptionsChain,
                    request_deserializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.OptionsChainRequest.FromString,
                    response_serializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.OptionsChainResponse.SerializeToString,
            ),
            'Schedule': grpc.unary_unary_rpc_method_handler(
                    servicer.Schedule,
                    request_deserializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ScheduleRequest.FromString,
                    response_serializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ScheduleResponse.SerializeToString,
            ),
            'Clock': grpc.unary_unary_rpc_method_handler(
                    servicer.Clock,
                    request_deserializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ClockRequest.FromString,
                    response_serializer=grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ClockResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'grpc.tradeapi.v1.assets.AssetsService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('grpc.tradeapi.v1.assets.AssetsService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class AssetsService(object):
    @staticmethod
    def Exchanges(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,
            '/grpc.tradeapi.v1.assets.AssetsService/Exchanges',
            grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ExchangesRequest.SerializeToString,
            grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ExchangesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Assets(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,
            '/grpc.tradeapi.v1.assets.AssetsService/Assets',
            grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.AssetsRequest.SerializeToString,
            grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.AssetsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetAsset(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,
            '/grpc.tradeapi.v1.assets.AssetsService/GetAsset',
            grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.GetAssetRequest.SerializeToString,
            grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.GetAssetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetAssetParams(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,
            '/grpc.tradeapi.v1.assets.AssetsService/GetAssetParams',
            grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.GetAssetParamsRequest.SerializeToString,
            grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.GetAssetParamsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def OptionsChain(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,
            '/grpc.tradeapi.v1.assets.AssetsService/OptionsChain',
            grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.OptionsChainRequest.SerializeToString,
            grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.OptionsChainResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Schedule(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,
            '/grpc.tradeapi.v1.assets.AssetsService/Schedule',
            grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ScheduleRequest.SerializeToString,
            grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ScheduleResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Clock(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,
            '/grpc.tradeapi.v1.assets.AssetsService/Clock',
            grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ClockRequest.SerializeToString,
            grpc_dot_tradeapi_dot_v1_dot_assets_dot_assets__service__pb2.ClockResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
