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().

  • 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:
      compactMapData in interface RequestParams
      Returns:
      boolean
    • withCompactMapData

      public final ImmutableRequestParams withCompactMapData(boolean value)
      Copy the current immutable object by setting a value for the compactMapData attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for compactMapData
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableRequestParams that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: compactMapData.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value RequestParams with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableRequestParams copyOf(RequestParams instance)
      Creates an immutable copy of a RequestParams value. 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

      public static ImmutableRequestParams.Builder builder()
      Creates a builder for ImmutableRequestParams.
       ImmutableRequestParams.builder()
          .compactMapData(boolean) // required compactMapData
          .build();
       
      Returns:
      A new ImmutableRequestParams builder