Package com.telenordigital.nbiot
Class ImmutableDataSearchParameters
- java.lang.Object
-
- com.telenordigital.nbiot.ImmutableDataSearchParameters
-
- All Implemented Interfaces:
DataSearchParameters
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableDataSearchParameters extends Object implements DataSearchParameters
Immutable implementation ofDataSearchParameters.Use the builder to create immutable instances:
new ImmutableDataSearchParameters.Builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableDataSearchParameters.BuilderBuilds instances of typeImmutableDataSearchParameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDataSearchParameterscopyOf(DataSearchParameters instance)Creates an immutable copy of aDataSearchParametersvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableDataSearchParametersthat have equal attribute values.inthashCode()Computes a hash code from attributes:limit,since,until.Integerlimit()Limit number of results when querying data endpointInstantsince()Fetch data since given InstantStringtoString()Prints the immutable valueDataSearchParameterswith attribute values.Instantuntil()Fetch data until given InstantImmutableDataSearchParameterswithLimit(Integer value)Copy the current immutable object by setting a value for thelimitattribute.ImmutableDataSearchParameterswithSince(Instant value)Copy the current immutable object by setting a value for thesinceattribute.ImmutableDataSearchParameterswithUntil(Instant value)Copy the current immutable object by setting a value for theuntilattribute.
-
-
-
Method Detail
-
limit
@Nullable public Integer limit()
Limit number of results when querying data endpoint- Specified by:
limitin interfaceDataSearchParameters- Returns:
- Limit parameter as an Integer
-
since
@Nullable public Instant since()
Fetch data since given Instant- Specified by:
sincein interfaceDataSearchParameters- Returns:
- Since parameter as Instant
-
until
@Nullable public Instant until()
Fetch data until given Instant- Specified by:
untilin interfaceDataSearchParameters- Returns:
- Until parameter as Instant
-
withLimit
public final ImmutableDataSearchParameters withLimit(@Nullable Integer value)
Copy the current immutable object by setting a value for thelimitattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for limit (can benull)- Returns:
- A modified copy of the
thisobject
-
withSince
public final ImmutableDataSearchParameters withSince(@Nullable Instant value)
Copy the current immutable object by setting a value for thesinceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for since (can benull)- Returns:
- A modified copy of the
thisobject
-
withUntil
public final ImmutableDataSearchParameters withUntil(@Nullable Instant value)
Copy the current immutable object by setting a value for theuntilattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for until (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableDataSearchParametersthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:limit,since,until.
-
toString
public String toString()
Prints the immutable valueDataSearchParameterswith attribute values.
-
copyOf
public static ImmutableDataSearchParameters copyOf(DataSearchParameters instance)
Creates an immutable copy of aDataSearchParametersvalue. 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 DataSearchParameters instance
-
-