Class ImmutableGetAggregatePriceRequestParams
java.lang.Object
org.xrpl.xrpl4j.model.client.oracle.ImmutableGetAggregatePriceRequestParams
- All Implemented Interfaces:
GetAggregatePriceRequestParams,XrplRequestParams
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableGetAggregatePriceRequestParams
extends Object
implements GetAggregatePriceRequestParams
Immutable implementation of
GetAggregatePriceRequestParams.
Use the builder to create immutable instances:
ImmutableGetAggregatePriceRequestParams.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableGetAggregatePriceRequestParams. -
Method Summary
Modifier and TypeMethodDescriptionThe currency code of the asset to be priced.builder()Creates a builder forImmutableGetAggregatePriceRequestParams.copyOf(GetAggregatePriceRequestParams instance) Creates an immutable copy of aGetAggregatePriceRequestParamsvalue.booleanThis instance is equal to all instances ofImmutableGetAggregatePriceRequestParamsthat have equal attribute values.inthashCode()Computes a hash code from attributes:ledgerSpecifier,baseAsset,quoteAsset,trim,trimThreshold,oracles.Specifies the ledger version to request.com.google.common.collect.ImmutableList<OracleLedgerEntryParams> oracles()A list of oracle identifiers.The currency code of the asset to quote the price of the base asset.toString()Prints the immutable valueGetAggregatePriceRequestParamswith attribute values.Optional<com.google.common.primitives.UnsignedInteger> trim()The percentage of outliers to trim.Optional<com.google.common.primitives.UnsignedInteger> Defines a time range in seconds for filtering out older price data.withBaseAsset(String value) Copy the current immutable object by setting a value for thebaseAssetattribute.Copy the current immutable object by setting a value for theledgerSpecifierattribute.withOracles(Iterable<? extends OracleLedgerEntryParams> elements) Copy the current immutable object with elements that replace the content oforacles.withOracles(OracleLedgerEntryParams... elements) Copy the current immutable object with elements that replace the content oforacles.withQuoteAsset(String value) Copy the current immutable object by setting a value for thequoteAssetattribute.withTrim(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionaltrimattribute.Copy the current immutable object by setting an optional value for thetrimattribute.withTrimThreshold(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionaltrimThresholdattribute.withTrimThreshold(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for thetrimThresholdattribute.
-
Method Details
-
ledgerSpecifier
Specifies the ledger version to request. A ledger version can be specified by ledger hash, numerical ledger index, or a shortcut value.- Specified by:
ledgerSpecifierin interfaceGetAggregatePriceRequestParams- Returns:
- A
LedgerSpecifierspecifying the ledger version to request.
-
baseAsset
The currency code of the asset to be priced.- Specified by:
baseAssetin interfaceGetAggregatePriceRequestParams- Returns:
- A
String.
-
quoteAsset
The currency code of the asset to quote the price of the base asset.- Specified by:
quoteAssetin interfaceGetAggregatePriceRequestParams- Returns:
- A
String.
-
trim
The percentage of outliers to trim. Valid trim range is 1-25. If included, the API returns statistics for the trimmed mean.- Specified by:
trimin interfaceGetAggregatePriceRequestParams- Returns:
- An
OptionalUnsignedInteger.
-
trimThreshold
Defines a time range in seconds for filtering out older price data. Default value is 0, which doesn't filter any data.- Specified by:
trimThresholdin interfaceGetAggregatePriceRequestParams- Returns:
- An
OptionalUnsignedInteger.
-
oracles
A list of oracle identifiers.- Specified by:
oraclesin interfaceGetAggregatePriceRequestParams- Returns:
- A
ListofOracleLedgerEntryParams.
-
withLedgerSpecifier
Copy the current immutable object by setting a value for theledgerSpecifierattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ledgerSpecifier- Returns:
- A modified copy of the
thisobject
-
withBaseAsset
Copy the current immutable object by setting a value for thebaseAssetattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for baseAsset- Returns:
- A modified copy of the
thisobject
-
withQuoteAsset
Copy the current immutable object by setting a value for thequoteAssetattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for quoteAsset- Returns:
- A modified copy of the
thisobject
-
withTrim
public final ImmutableGetAggregatePriceRequestParams withTrim(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionaltrimattribute.- Parameters:
value- The value for trim- Returns:
- A modified copy of
thisobject
-
withTrim
public final ImmutableGetAggregatePriceRequestParams withTrim(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for thetrimattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for trim- Returns:
- A modified copy of
thisobject
-
withTrimThreshold
public final ImmutableGetAggregatePriceRequestParams withTrimThreshold(com.google.common.primitives.UnsignedInteger value) Copy the current immutable object by setting a present value for the optionaltrimThresholdattribute.- Parameters:
value- The value for trimThreshold- Returns:
- A modified copy of
thisobject
-
withTrimThreshold
public final ImmutableGetAggregatePriceRequestParams withTrimThreshold(Optional<? extends com.google.common.primitives.UnsignedInteger> optional) Copy the current immutable object by setting an optional value for thetrimThresholdattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for trimThreshold- Returns:
- A modified copy of
thisobject
-
withOracles
public final ImmutableGetAggregatePriceRequestParams withOracles(OracleLedgerEntryParams... elements) Copy the current immutable object with elements that replace the content oforacles.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withOracles
public final ImmutableGetAggregatePriceRequestParams withOracles(Iterable<? extends OracleLedgerEntryParams> elements) Copy the current immutable object with elements that replace the content oforacles. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of oracles elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableGetAggregatePriceRequestParamsthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ledgerSpecifier,baseAsset,quoteAsset,trim,trimThreshold,oracles. -
toString
Prints the immutable valueGetAggregatePriceRequestParamswith attribute values. -
copyOf
public static ImmutableGetAggregatePriceRequestParams copyOf(GetAggregatePriceRequestParams instance) Creates an immutable copy of aGetAggregatePriceRequestParamsvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable GetAggregatePriceRequestParams instance
-
builder
Creates a builder forImmutableGetAggregatePriceRequestParams.ImmutableGetAggregatePriceRequestParams.builder() .ledgerSpecifier(org.xrpl.xrpl4j.model.client.common.LedgerSpecifier) // requiredledgerSpecifier.baseAsset(String) // requiredbaseAsset.quoteAsset(String) // requiredquoteAsset.trim(com.google.common.primitives.UnsignedInteger) // optionaltrim.trimThreshold(com.google.common.primitives.UnsignedInteger) // optionaltrimThreshold.addOracles|addAllOracles(org.xrpl.xrpl4j.model.client.ledger.OracleLedgerEntryParams) //oracleselements .build();- Returns:
- A new ImmutableGetAggregatePriceRequestParams builder
-