4#include <xrpl/protocol/STLedgerEntry.h>
5#include <xrpl/protocol/STParsedJSON.h>
6#include <xrpl/protocol/jss.h>
7#include <xrpl/protocol_autogen/LedgerEntryBase.h>
8#include <xrpl/protocol_autogen/LedgerEntryBuilderBase.h>
9#include <xrpl/json/json_value.h>
16class LoanBrokerBuilder;
53 SF_UINT256::type::value_type
56 return this->
sle_->at(sfPreviousTxnID);
64 SF_UINT32::type::value_type
67 return this->
sle_->at(sfPreviousTxnLgrSeq);
75 SF_UINT32::type::value_type
78 return this->
sle_->at(sfSequence);
86 SF_UINT64::type::value_type
89 return this->
sle_->at(sfOwnerNode);
97 SF_UINT64::type::value_type
100 return this->
sle_->at(sfVaultNode);
108 SF_UINT256::type::value_type
111 return this->
sle_->at(sfVaultID);
119 SF_ACCOUNT::type::value_type
122 return this->
sle_->at(sfAccount);
130 SF_ACCOUNT::type::value_type
133 return this->
sle_->at(sfOwner);
141 SF_UINT32::type::value_type
144 return this->
sle_->at(sfLoanSequence);
156 return this->
sle_->at(sfData);
168 return this->
sle_->isFieldPresent(sfData);
180 return this->
sle_->at(sfManagementFeeRate);
192 return this->
sle_->isFieldPresent(sfManagementFeeRate);
204 return this->
sle_->at(sfOwnerCount);
216 return this->
sle_->isFieldPresent(sfOwnerCount);
228 return this->
sle_->at(sfDebtTotal);
240 return this->
sle_->isFieldPresent(sfDebtTotal);
252 return this->
sle_->at(sfDebtMaximum);
264 return this->
sle_->isFieldPresent(sfDebtMaximum);
276 return this->
sle_->at(sfCoverAvailable);
288 return this->
sle_->isFieldPresent(sfCoverAvailable);
300 return this->
sle_->at(sfCoverRateMinimum);
312 return this->
sle_->isFieldPresent(sfCoverRateMinimum);
324 return this->
sle_->at(sfCoverRateLiquidation);
336 return this->
sle_->isFieldPresent(sfCoverRateLiquidation);
383 if (sle->at(sfLedgerEntryType) != ltLOAN_BROKER)
399 object_[sfPreviousTxnID] = value;
410 object_[sfPreviousTxnLgrSeq] = value;
487 object_[sfLoanSequence] = value;
509 object_[sfManagementFeeRate] = value;
542 object_[sfDebtMaximum] = value;
553 object_[sfCoverAvailable] = value;
564 object_[sfCoverRateMinimum] = value;
575 object_[sfCoverRateLiquidation] = value;
Base class for type-safe ledger entry wrappers.
std::shared_ptr< SLE const > sle_
The underlying serialized ledger entry being wrapped.
Base class for all ledger entry builders.
Builder for LoanBroker ledger entries.
LoanBrokerBuilder(std::decay_t< typename SF_UINT256::type::value_type > const &previousTxnID, std::decay_t< typename SF_UINT32::type::value_type > const &previousTxnLgrSeq, std::decay_t< typename SF_UINT32::type::value_type > const &sequence, std::decay_t< typename SF_UINT64::type::value_type > const &ownerNode, std::decay_t< typename SF_UINT64::type::value_type > const &vaultNode, std::decay_t< typename SF_UINT256::type::value_type > const &vaultID, std::decay_t< typename SF_ACCOUNT::type::value_type > const &account, std::decay_t< typename SF_ACCOUNT::type::value_type > const &owner, std::decay_t< typename SF_UINT32::type::value_type > const &loanSequence)
Construct a new LoanBrokerBuilder with required fields.
LoanBrokerBuilder & setSequence(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfSequence (soeREQUIRED)
LoanBrokerBuilder & setCoverRateMinimum(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfCoverRateMinimum (soeDEFAULT)
LoanBroker build(uint256 const &index)
Build and return the completed LoanBroker wrapper.
LoanBrokerBuilder & setOwner(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Set sfOwner (soeREQUIRED)
LoanBrokerBuilder & setDebtTotal(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfDebtTotal (soeDEFAULT)
LoanBrokerBuilder & setDebtMaximum(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfDebtMaximum (soeDEFAULT)
LoanBrokerBuilder & setVaultNode(std::decay_t< typename SF_UINT64::type::value_type > const &value)
Set sfVaultNode (soeREQUIRED)
LoanBrokerBuilder & setLoanSequence(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfLoanSequence (soeREQUIRED)
LoanBrokerBuilder & setPreviousTxnLgrSeq(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfPreviousTxnLgrSeq (soeREQUIRED)
LoanBrokerBuilder & setCoverAvailable(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfCoverAvailable (soeDEFAULT)
LoanBrokerBuilder & setVaultID(std::decay_t< typename SF_UINT256::type::value_type > const &value)
Set sfVaultID (soeREQUIRED)
LoanBrokerBuilder & setPreviousTxnID(std::decay_t< typename SF_UINT256::type::value_type > const &value)
Ledger entry-specific field setters.
LoanBrokerBuilder & setOwnerNode(std::decay_t< typename SF_UINT64::type::value_type > const &value)
Set sfOwnerNode (soeREQUIRED)
LoanBrokerBuilder & setAccount(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Set sfAccount (soeREQUIRED)
LoanBrokerBuilder & setData(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfData (soeDEFAULT)
LoanBrokerBuilder & setCoverRateLiquidation(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfCoverRateLiquidation (soeDEFAULT)
LoanBrokerBuilder & setManagementFeeRate(std::decay_t< typename SF_UINT16::type::value_type > const &value)
Set sfManagementFeeRate (soeDEFAULT)
LoanBrokerBuilder & setOwnerCount(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfOwnerCount (soeDEFAULT)
LoanBrokerBuilder(std::shared_ptr< SLE const > sle)
Construct a LoanBrokerBuilder from an existing SLE object.
Ledger Entry: LoanBroker.
bool hasDebtMaximum() const
Check if sfDebtMaximum is present.
bool hasOwnerCount() const
Check if sfOwnerCount is present.
bool hasManagementFeeRate() const
Check if sfManagementFeeRate is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getCoverRateMinimum() const
Get sfCoverRateMinimum (soeDEFAULT)
SF_UINT64::type::value_type getOwnerNode() const
Get sfOwnerNode (soeREQUIRED)
SF_UINT64::type::value_type getVaultNode() const
Get sfVaultNode (soeREQUIRED)
protocol_autogen::Optional< SF_UINT32::type::value_type > getCoverRateLiquidation() const
Get sfCoverRateLiquidation (soeDEFAULT)
SF_UINT32::type::value_type getPreviousTxnLgrSeq() const
Get sfPreviousTxnLgrSeq (soeREQUIRED)
LoanBroker(std::shared_ptr< SLE const > sle)
Construct a LoanBroker ledger entry wrapper from an existing SLE object.
protocol_autogen::Optional< SF_NUMBER::type::value_type > getDebtTotal() const
Get sfDebtTotal (soeDEFAULT)
SF_UINT32::type::value_type getLoanSequence() const
Get sfLoanSequence (soeREQUIRED)
bool hasCoverAvailable() const
Check if sfCoverAvailable is present.
bool hasDebtTotal() const
Check if sfDebtTotal is present.
protocol_autogen::Optional< SF_VL::type::value_type > getData() const
Get sfData (soeDEFAULT)
static constexpr LedgerEntryType entryType
SF_UINT256::type::value_type getPreviousTxnID() const
Get sfPreviousTxnID (soeREQUIRED)
SF_ACCOUNT::type::value_type getOwner() const
Get sfOwner (soeREQUIRED)
protocol_autogen::Optional< SF_NUMBER::type::value_type > getCoverAvailable() const
Get sfCoverAvailable (soeDEFAULT)
SF_UINT256::type::value_type getVaultID() const
Get sfVaultID (soeREQUIRED)
protocol_autogen::Optional< SF_UINT32::type::value_type > getOwnerCount() const
Get sfOwnerCount (soeDEFAULT)
protocol_autogen::Optional< SF_UINT16::type::value_type > getManagementFeeRate() const
Get sfManagementFeeRate (soeDEFAULT)
bool hasCoverRateLiquidation() const
Check if sfCoverRateLiquidation is present.
bool hasData() const
Check if sfData is present.
SF_UINT32::type::value_type getSequence() const
Get sfSequence (soeREQUIRED)
protocol_autogen::Optional< SF_NUMBER::type::value_type > getDebtMaximum() const
Get sfDebtMaximum (soeDEFAULT)
SF_ACCOUNT::type::value_type getAccount() const
Get sfAccount (soeREQUIRED)
bool hasCoverRateMinimum() const
Check if sfCoverRateMinimum is present.
LedgerEntryType
Identifiers for on-ledger objects.