Class ImmutableQueryParameterOptions.Builder

java.lang.Object
org.kiwiproject.consul.option.ImmutableQueryParameterOptions.Builder
Enclosing class:
ImmutableQueryParameterOptions

public static final class ImmutableQueryParameterOptions.Builder extends Object
Builds instances of type ImmutableQueryParameterOptions. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      @CanIgnoreReturnValue public final ImmutableQueryParameterOptions.Builder from(ParamAdder instance)
      Fill a builder with attribute values from the provided org.kiwiproject.consul.option.ParamAdder instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final ImmutableQueryParameterOptions.Builder from(QueryParameterOptions instance)
      Fill a builder with attribute values from the provided org.kiwiproject.consul.option.QueryParameterOptions instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • putToQuery

      @CanIgnoreReturnValue public final ImmutableQueryParameterOptions.Builder putToQuery(String key, Object value)
      Put one entry to the toQuery map.
      Parameters:
      key - The key in the toQuery map
      value - The associated value in the toQuery map
      Returns:
      this builder for use in a chained invocation
    • putToQuery

      @CanIgnoreReturnValue public final ImmutableQueryParameterOptions.Builder putToQuery(Map.Entry<String,? extends Object> entry)
      Put one entry to the toQuery map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder for use in a chained invocation
    • toQuery

      @CanIgnoreReturnValue public final ImmutableQueryParameterOptions.Builder toQuery(Map<String,? extends Object> entries)
      Sets or replaces all mappings from the specified map as entries for the toQuery map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the toQuery map
      Returns:
      this builder for use in a chained invocation
    • putAllToQuery

      @CanIgnoreReturnValue public final ImmutableQueryParameterOptions.Builder putAllToQuery(Map<String,? extends Object> entries)
      Put all mappings from the specified map as entries to toQuery map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the toQuery map
      Returns:
      this builder for use in a chained invocation
    • putToHeaders

      @CanIgnoreReturnValue public final ImmutableQueryParameterOptions.Builder putToHeaders(String key, String value)
      Put one entry to the toHeaders map.
      Parameters:
      key - The key in the toHeaders map
      value - The associated value in the toHeaders map
      Returns:
      this builder for use in a chained invocation
    • putToHeaders

      @CanIgnoreReturnValue public final ImmutableQueryParameterOptions.Builder putToHeaders(Map.Entry<String,? extends String> entry)
      Put one entry to the toHeaders map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder for use in a chained invocation
    • toHeaders

      @CanIgnoreReturnValue public final ImmutableQueryParameterOptions.Builder toHeaders(Map<String,? extends String> entries)
      Sets or replaces all mappings from the specified map as entries for the toHeaders map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the toHeaders map
      Returns:
      this builder for use in a chained invocation
    • putAllToHeaders

      @CanIgnoreReturnValue public final ImmutableQueryParameterOptions.Builder putAllToHeaders(Map<String,? extends String> entries)
      Put all mappings from the specified map as entries to toHeaders map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the toHeaders map
      Returns:
      this builder for use in a chained invocation
    • replaceExistingChecks

      @CanIgnoreReturnValue public final ImmutableQueryParameterOptions.Builder replaceExistingChecks(boolean replaceExistingChecks)
      Initializes the optional value replaceExistingChecks to replaceExistingChecks.
      Parameters:
      replaceExistingChecks - The value for replaceExistingChecks
      Returns:
      this builder for chained invocation
    • replaceExistingChecks

      @CanIgnoreReturnValue public final ImmutableQueryParameterOptions.Builder replaceExistingChecks(Optional<Boolean> replaceExistingChecks)
      Initializes the optional value replaceExistingChecks to replaceExistingChecks.
      Parameters:
      replaceExistingChecks - The value for replaceExistingChecks
      Returns:
      this builder for use in a chained invocation
    • prune

      @CanIgnoreReturnValue public final ImmutableQueryParameterOptions.Builder prune(boolean prune)
      Initializes the optional value prune to prune.
      Parameters:
      prune - The value for prune
      Returns:
      this builder for chained invocation
    • prune

      @CanIgnoreReturnValue public final ImmutableQueryParameterOptions.Builder prune(Optional<Boolean> prune)
      Initializes the optional value prune to prune.
      Parameters:
      prune - The value for prune
      Returns:
      this builder for use in a chained invocation
    • build

      Returns:
      An immutable instance of QueryParameterOptions
      Throws:
      IllegalStateException - if any required attributes are missing