# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from . import get_account_info_pb2 as org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__info__pb2
from . import get_account_transaction_history_pb2 as org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__transaction__history__pb2
from . import get_fee_pb2 as org_dot_xrpl_dot_rpc_dot_v1_dot_get__fee__pb2
from . import get_transaction_pb2 as org_dot_xrpl_dot_rpc_dot_v1_dot_get__transaction__pb2
from . import submit_pb2 as org_dot_xrpl_dot_rpc_dot_v1_dot_submit__pb2


class XRPLedgerAPIServiceStub(object):
    """RPCs available to interact with the XRP Ledger.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetAccountInfo = channel.unary_unary(
                '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetAccountInfo',
                request_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__info__pb2.GetAccountInfoRequest.SerializeToString,
                response_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__info__pb2.GetAccountInfoResponse.FromString,
                )
        self.GetFee = channel.unary_unary(
                '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetFee',
                request_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__fee__pb2.GetFeeRequest.SerializeToString,
                response_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__fee__pb2.GetFeeResponse.FromString,
                )
        self.SubmitTransaction = channel.unary_unary(
                '/org.xrpl.rpc.v1.XRPLedgerAPIService/SubmitTransaction',
                request_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_submit__pb2.SubmitTransactionRequest.SerializeToString,
                response_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_submit__pb2.SubmitTransactionResponse.FromString,
                )
        self.GetTransaction = channel.unary_unary(
                '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetTransaction',
                request_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__transaction__pb2.GetTransactionRequest.SerializeToString,
                response_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__transaction__pb2.GetTransactionResponse.FromString,
                )
        self.GetAccountTransactionHistory = channel.unary_unary(
                '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetAccountTransactionHistory',
                request_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__transaction__history__pb2.GetAccountTransactionHistoryRequest.SerializeToString,
                response_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__transaction__history__pb2.GetAccountTransactionHistoryResponse.FromString,
                )


class XRPLedgerAPIServiceServicer(object):
    """RPCs available to interact with the XRP Ledger.
    """

    def GetAccountInfo(self, request, context):
        """Get account info for an account on the XRP Ledger.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetFee(self, request, context):
        """Get the fee for a transaction on the XRP Ledger.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SubmitTransaction(self, request, context):
        """Submit a signed transaction to the XRP Ledger.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTransaction(self, request, context):
        """Get the status of a transaction
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAccountTransactionHistory(self, request, context):
        """Missing associated documentation comment in .proto file"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_XRPLedgerAPIServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetAccountInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAccountInfo,
                    request_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__info__pb2.GetAccountInfoRequest.FromString,
                    response_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__info__pb2.GetAccountInfoResponse.SerializeToString,
            ),
            'GetFee': grpc.unary_unary_rpc_method_handler(
                    servicer.GetFee,
                    request_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__fee__pb2.GetFeeRequest.FromString,
                    response_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__fee__pb2.GetFeeResponse.SerializeToString,
            ),
            'SubmitTransaction': grpc.unary_unary_rpc_method_handler(
                    servicer.SubmitTransaction,
                    request_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_submit__pb2.SubmitTransactionRequest.FromString,
                    response_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_submit__pb2.SubmitTransactionResponse.SerializeToString,
            ),
            'GetTransaction': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTransaction,
                    request_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__transaction__pb2.GetTransactionRequest.FromString,
                    response_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__transaction__pb2.GetTransactionResponse.SerializeToString,
            ),
            'GetAccountTransactionHistory': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAccountTransactionHistory,
                    request_deserializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__transaction__history__pb2.GetAccountTransactionHistoryRequest.FromString,
                    response_serializer=org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__transaction__history__pb2.GetAccountTransactionHistoryResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.xrpl.rpc.v1.XRPLedgerAPIService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class XRPLedgerAPIService(object):
    """RPCs available to interact with the XRP Ledger.
    """

    @staticmethod
    def GetAccountInfo(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetAccountInfo',
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__info__pb2.GetAccountInfoRequest.SerializeToString,
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__info__pb2.GetAccountInfoResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetFee(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetFee',
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__fee__pb2.GetFeeRequest.SerializeToString,
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__fee__pb2.GetFeeResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SubmitTransaction(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.xrpl.rpc.v1.XRPLedgerAPIService/SubmitTransaction',
            org_dot_xrpl_dot_rpc_dot_v1_dot_submit__pb2.SubmitTransactionRequest.SerializeToString,
            org_dot_xrpl_dot_rpc_dot_v1_dot_submit__pb2.SubmitTransactionResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetTransaction(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetTransaction',
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__transaction__pb2.GetTransactionRequest.SerializeToString,
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__transaction__pb2.GetTransactionResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetAccountTransactionHistory(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/org.xrpl.rpc.v1.XRPLedgerAPIService/GetAccountTransactionHistory',
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__transaction__history__pb2.GetAccountTransactionHistoryRequest.SerializeToString,
            org_dot_xrpl_dot_rpc_dot_v1_dot_get__account__transaction__history__pb2.GetAccountTransactionHistoryResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)
