Class ImmutableRequestParams
java.lang.Object
io.stargate.sgv2.api.common.config.ImmutableRequestParams
- All Implemented Interfaces:
RequestParams
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableRequestParams
extends Object
implements RequestParams
Immutable implementation of
RequestParams.
Use the builder to create immutable instances:
ImmutableRequestParams.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableRequestParams. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableRequestParams.booleanThis is an option set by the client in an API call to get the map data during a read operation or to specify the format of the map data during a write operation.static ImmutableRequestParamscopyOf(RequestParams instance) Creates an immutable copy of aRequestParamsvalue.booleanThis instance is equal to all instances ofImmutableRequestParamsthat have equal attribute values.inthashCode()Computes a hash code from attributes:compactMapData.toString()Prints the immutable valueRequestParamswith attribute values.final ImmutableRequestParamswithCompactMapData(boolean value) Copy the current immutable object by setting a value for thecompactMapDataattribute.
-
Method Details
-
compactMapData
public boolean compactMapData()This is an option set by the client in an API call to get the map data during a read operation or to specify the format of the map data during a write operation. if true"map": { "key1": "value1", "key2": "value2" }else"map": [ { "key": "key1", "value": "value1" }, { "key": "key2", "value": "value2" } ]- Specified by:
compactMapDatain interfaceRequestParams- Returns:
- boolean
-
withCompactMapData
Copy the current immutable object by setting a value for thecompactMapDataattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for compactMapData- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableRequestParamsthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:compactMapData. -
toString
Prints the immutable valueRequestParamswith attribute values. -
copyOf
Creates an immutable copy of aRequestParamsvalue. 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 RequestParams instance
-
builder
Creates a builder forImmutableRequestParams.ImmutableRequestParams.builder() .compactMapData(boolean) // requiredcompactMapData.build();- Returns:
- A new ImmutableRequestParams builder
-