Class ImmutableDeleteOptions

java.lang.Object
org.kiwiproject.consul.option.DeleteOptions
org.kiwiproject.consul.option.ImmutableDeleteOptions
All Implemented Interfaces:
ParamAdder

@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableDeleteOptions extends DeleteOptions
Immutable implementation of DeleteOptions.

Use the builder to create immutable instances: ImmutableDeleteOptions.builder().

  • Method Details

    • toQueryParameters

      public com.google.common.collect.ImmutableList<String> toQueryParameters()
      Returns:
      The value of the toQueryParameters attribute
    • toHeaders

      public com.google.common.collect.ImmutableMap<String,String> toHeaders()
      Returns:
      The value of the toHeaders attribute
    • getCas

      public Optional<Long> getCas()
      Specified by:
      getCas in class DeleteOptions
      Returns:
      The value of the cas attribute
    • getRecurse

      public Optional<Boolean> getRecurse()
      Specified by:
      getRecurse in class DeleteOptions
      Returns:
      The value of the recurse attribute
    • getDatacenter

      public Optional<String> getDatacenter()
      Specified by:
      getDatacenter in class DeleteOptions
      Returns:
      The value of the datacenter attribute
    • isRecurse

      public boolean isRecurse()
      Overrides:
      isRecurse in class DeleteOptions
      Returns:
      The computed-at-construction value of the isRecurse attribute
    • withToQueryParameters

      public final ImmutableDeleteOptions withToQueryParameters(String... elements)
      Copy the current immutable object with elements that replace the content of toQueryParameters.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withToQueryParameters

      public final ImmutableDeleteOptions withToQueryParameters(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of toQueryParameters. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of toQueryParameters elements to set
      Returns:
      A modified copy of this object
    • withToHeaders

      public final ImmutableDeleteOptions withToHeaders(Map<String,? extends String> entries)
      Copy the current immutable object by replacing the toHeaders map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the toHeaders map
      Returns:
      A modified copy of this object
    • withCas

      public final ImmutableDeleteOptions withCas(long value)
      Copy the current immutable object by setting a present value for the optional cas attribute.
      Parameters:
      value - The value for cas
      Returns:
      A modified copy of this object
    • withCas

      public final ImmutableDeleteOptions withCas(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the cas attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for cas
      Returns:
      A modified copy of this object
    • withRecurse

      public final ImmutableDeleteOptions withRecurse(boolean value)
      Copy the current immutable object by setting a present value for the optional recurse attribute.
      Parameters:
      value - The value for recurse
      Returns:
      A modified copy of this object
    • withRecurse

      public final ImmutableDeleteOptions withRecurse(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the recurse attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for recurse
      Returns:
      A modified copy of this object
    • withDatacenter

      public final ImmutableDeleteOptions withDatacenter(String value)
      Copy the current immutable object by setting a present value for the optional datacenter attribute.
      Parameters:
      value - The value for datacenter
      Returns:
      A modified copy of this object
    • withDatacenter

      public final ImmutableDeleteOptions withDatacenter(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the datacenter attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for datacenter
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableDeleteOptions 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: toQueryParameters, toHeaders, cas, recurse, datacenter, isRecurse.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableDeleteOptions copyOf(DeleteOptions instance)
      Creates an immutable copy of a DeleteOptions 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 DeleteOptions instance
    • builder

      public static ImmutableDeleteOptions.Builder builder()
      Creates a builder for ImmutableDeleteOptions.
       ImmutableDeleteOptions.builder()
          .addToQueryParameters|addAllToQueryParameters(String) // toQueryParameters elements
          .putToHeaders|putAllToHeaders(String => String) // toHeaders mappings
          .cas(Long) // optional cas
          .recurse(Boolean) // optional recurse
          .datacenter(String) // optional datacenter
          .build();
       
      Returns:
      A new ImmutableDeleteOptions builder