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 NegativeUNLBuilder;
57 if (this->
sle_->isFieldPresent(sfDisabledValidators))
58 return this->
sle_->getFieldArray(sfDisabledValidators);
70 return this->
sle_->isFieldPresent(sfDisabledValidators);
82 return this->
sle_->at(sfValidatorToDisable);
94 return this->
sle_->isFieldPresent(sfValidatorToDisable);
106 return this->
sle_->at(sfValidatorToReEnable);
118 return this->
sle_->isFieldPresent(sfValidatorToReEnable);
130 return this->
sle_->at(sfPreviousTxnID);
142 return this->
sle_->isFieldPresent(sfPreviousTxnID);
154 return this->
sle_->at(sfPreviousTxnLgrSeq);
166 return this->
sle_->isFieldPresent(sfPreviousTxnLgrSeq);
195 if (sle->at(sfLedgerEntryType) != ltNEGATIVE_UNL)
222 object_[sfValidatorToDisable] = value;
233 object_[sfValidatorToReEnable] = value;
244 object_[sfPreviousTxnID] = value;
255 object_[sfPreviousTxnLgrSeq] = value;
void setFieldArray(SField const &field, STArray const &v)
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 NegativeUNL ledger entries.
NegativeUNLBuilder()
Construct a new NegativeUNLBuilder with required fields.
NegativeUNLBuilder & setPreviousTxnID(std::decay_t< typename SF_UINT256::type::value_type > const &value)
Set sfPreviousTxnID (soeOPTIONAL)
NegativeUNLBuilder & setValidatorToDisable(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfValidatorToDisable (soeOPTIONAL)
NegativeUNLBuilder & setDisabledValidators(STArray const &value)
Ledger entry-specific field setters.
NegativeUNLBuilder(std::shared_ptr< SLE const > sle)
Construct a NegativeUNLBuilder from an existing SLE object.
NegativeUNLBuilder & setPreviousTxnLgrSeq(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfPreviousTxnLgrSeq (soeOPTIONAL)
NegativeUNLBuilder & setValidatorToReEnable(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfValidatorToReEnable (soeOPTIONAL)
NegativeUNL build(uint256 const &index)
Build and return the completed NegativeUNL wrapper.
Ledger Entry: NegativeUNL.
protocol_autogen::Optional< SF_UINT256::type::value_type > getPreviousTxnID() const
Get sfPreviousTxnID (soeOPTIONAL)
protocol_autogen::Optional< SF_VL::type::value_type > getValidatorToDisable() const
Get sfValidatorToDisable (soeOPTIONAL)
bool hasDisabledValidators() const
Check if sfDisabledValidators is present.
bool hasPreviousTxnLgrSeq() const
Check if sfPreviousTxnLgrSeq is present.
bool hasValidatorToDisable() const
Check if sfValidatorToDisable is present.
std::optional< std::reference_wrapper< STArray const > > getDisabledValidators() const
Get sfDisabledValidators (soeOPTIONAL)
bool hasPreviousTxnID() const
Check if sfPreviousTxnID is present.
protocol_autogen::Optional< SF_VL::type::value_type > getValidatorToReEnable() const
Get sfValidatorToReEnable (soeOPTIONAL)
static constexpr LedgerEntryType entryType
protocol_autogen::Optional< SF_UINT32::type::value_type > getPreviousTxnLgrSeq() const
Get sfPreviousTxnLgrSeq (soeOPTIONAL)
bool hasValidatorToReEnable() const
Check if sfValidatorToReEnable is present.
NegativeUNL(std::shared_ptr< SLE const > sle)
Construct a NegativeUNL ledger entry wrapper from an existing SLE object.
LedgerEntryType
Identifiers for on-ledger objects.