# 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_referral_rpc_pb2 as exchange_dot_injective__referral__rpc__pb2


class InjectiveReferralRPCStub(object):
    """InjectiveReferralRPC defines gRPC API for referral system
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetReferrerDetails = channel.unary_unary(
                '/injective_referral_rpc.InjectiveReferralRPC/GetReferrerDetails',
                request_serializer=exchange_dot_injective__referral__rpc__pb2.GetReferrerDetailsRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__referral__rpc__pb2.GetReferrerDetailsResponse.FromString,
                _registered_method=True)
        self.GetInviteeDetails = channel.unary_unary(
                '/injective_referral_rpc.InjectiveReferralRPC/GetInviteeDetails',
                request_serializer=exchange_dot_injective__referral__rpc__pb2.GetInviteeDetailsRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__referral__rpc__pb2.GetInviteeDetailsResponse.FromString,
                _registered_method=True)
        self.GetReferrerByCode = channel.unary_unary(
                '/injective_referral_rpc.InjectiveReferralRPC/GetReferrerByCode',
                request_serializer=exchange_dot_injective__referral__rpc__pb2.GetReferrerByCodeRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__referral__rpc__pb2.GetReferrerByCodeResponse.FromString,
                _registered_method=True)


class InjectiveReferralRPCServicer(object):
    """InjectiveReferralRPC defines gRPC API for referral system
    """

    def GetReferrerDetails(self, request, context):
        """Get referrer details including their invitees, commissions and trading
        volumes
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetInviteeDetails(self, request, context):
        """Get invitee details including their referrer, trading volume and join date
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetReferrerByCode(self, request, context):
        """Get referrer details by their referral code
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_InjectiveReferralRPCServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetReferrerDetails': grpc.unary_unary_rpc_method_handler(
                    servicer.GetReferrerDetails,
                    request_deserializer=exchange_dot_injective__referral__rpc__pb2.GetReferrerDetailsRequest.FromString,
                    response_serializer=exchange_dot_injective__referral__rpc__pb2.GetReferrerDetailsResponse.SerializeToString,
            ),
            'GetInviteeDetails': grpc.unary_unary_rpc_method_handler(
                    servicer.GetInviteeDetails,
                    request_deserializer=exchange_dot_injective__referral__rpc__pb2.GetInviteeDetailsRequest.FromString,
                    response_serializer=exchange_dot_injective__referral__rpc__pb2.GetInviteeDetailsResponse.SerializeToString,
            ),
            'GetReferrerByCode': grpc.unary_unary_rpc_method_handler(
                    servicer.GetReferrerByCode,
                    request_deserializer=exchange_dot_injective__referral__rpc__pb2.GetReferrerByCodeRequest.FromString,
                    response_serializer=exchange_dot_injective__referral__rpc__pb2.GetReferrerByCodeResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'injective_referral_rpc.InjectiveReferralRPC', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('injective_referral_rpc.InjectiveReferralRPC', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class InjectiveReferralRPC(object):
    """InjectiveReferralRPC defines gRPC API for referral system
    """

    @staticmethod
    def GetReferrerDetails(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_referral_rpc.InjectiveReferralRPC/GetReferrerDetails',
            exchange_dot_injective__referral__rpc__pb2.GetReferrerDetailsRequest.SerializeToString,
            exchange_dot_injective__referral__rpc__pb2.GetReferrerDetailsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetInviteeDetails(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_referral_rpc.InjectiveReferralRPC/GetInviteeDetails',
            exchange_dot_injective__referral__rpc__pb2.GetInviteeDetailsRequest.SerializeToString,
            exchange_dot_injective__referral__rpc__pb2.GetInviteeDetailsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetReferrerByCode(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_referral_rpc.InjectiveReferralRPC/GetReferrerByCode',
            exchange_dot_injective__referral__rpc__pb2.GetReferrerByCodeRequest.SerializeToString,
            exchange_dot_injective__referral__rpc__pb2.GetReferrerByCodeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
