Package com.orbitz.consul.option
Class ImmutablePutOptions.Builder
- java.lang.Object
-
- com.orbitz.consul.option.ImmutablePutOptions.Builder
-
- Enclosing class:
- ImmutablePutOptions
@NotThreadSafe public static final class ImmutablePutOptions.Builder extends java.lang.ObjectBuilds instances of typeImmutablePutOptions. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
Modifier and Type Method Description ImmutablePutOptions.Builderacquire(java.lang.String acquire)Initializes the optional valueacquireto acquire.ImmutablePutOptions.Builderacquire(java.util.Optional<java.lang.String> acquire)Initializes the optional valueacquireto acquire.ImmutablePutOptionsbuild()Builds a newImmutablePutOptions.ImmutablePutOptions.Buildercas(long cas)Initializes the optional valuecasto cas.ImmutablePutOptions.Buildercas(java.util.Optional<java.lang.Long> cas)Initializes the optional valuecasto cas.ImmutablePutOptions.Builderdc(java.lang.String dc)Initializes the optional valuedcto dc.ImmutablePutOptions.Builderdc(java.util.Optional<java.lang.String> dc)Initializes the optional valuedcto dc.ImmutablePutOptions.Builderfrom(ParamAdder instance)Fill a builder with attribute values from the providedcom.orbitz.consul.option.ParamAdderinstance.ImmutablePutOptions.Builderfrom(PutOptions instance)Fill a builder with attribute values from the providedcom.orbitz.consul.option.PutOptionsinstance.ImmutablePutOptions.BuilderputAllToHeaders(java.util.Map<java.lang.String,? extends java.lang.String> entries)Put all mappings from the specified map as entries totoHeadersmap.ImmutablePutOptions.BuilderputToHeaders(java.lang.String key, java.lang.String value)Put one entry to thetoHeadersmap.ImmutablePutOptions.BuilderputToHeaders(java.util.Map.Entry<java.lang.String,? extends java.lang.String> entry)Put one entry to thetoHeadersmap.ImmutablePutOptions.Builderrelease(java.lang.String release)Initializes the optional valuereleaseto release.ImmutablePutOptions.Builderrelease(java.util.Optional<java.lang.String> release)Initializes the optional valuereleaseto release.ImmutablePutOptions.BuildertoHeaders(java.util.Map<java.lang.String,? extends java.lang.String> entries)Sets or replaces all mappings from the specified map as entries for thetoHeadersmap.ImmutablePutOptions.Buildertoken(java.lang.String token)Initializes the optional valuetokento token.ImmutablePutOptions.Buildertoken(java.util.Optional<java.lang.String> token)Initializes the optional valuetokento token.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder from(ParamAdder instance)
Fill a builder with attribute values from the providedcom.orbitz.consul.option.ParamAdderinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder from(PutOptions instance)
Fill a builder with attribute values from the providedcom.orbitz.consul.option.PutOptionsinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
putToHeaders
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder putToHeaders(java.lang.String key, java.lang.String value)
Put one entry to thetoHeadersmap.- Parameters:
key- The key in the toHeaders mapvalue- The associated value in the toHeaders map- Returns:
thisbuilder for use in a chained invocation
-
putToHeaders
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder putToHeaders(java.util.Map.Entry<java.lang.String,? extends java.lang.String> entry)
Put one entry to thetoHeadersmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
toHeaders
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder toHeaders(java.util.Map<java.lang.String,? extends java.lang.String> entries)
Sets or replaces all mappings from the specified map as entries for thetoHeadersmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the toHeaders map- Returns:
thisbuilder for use in a chained invocation
-
putAllToHeaders
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder putAllToHeaders(java.util.Map<java.lang.String,? extends java.lang.String> entries)
Put all mappings from the specified map as entries totoHeadersmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the toHeaders map- Returns:
thisbuilder for use in a chained invocation
-
cas
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder cas(long cas)
Initializes the optional valuecasto cas.- Parameters:
cas- The value for cas- Returns:
thisbuilder for chained invocation
-
cas
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder cas(java.util.Optional<java.lang.Long> cas)
Initializes the optional valuecasto cas.- Parameters:
cas- The value for cas- Returns:
thisbuilder for use in a chained invocation
-
acquire
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder acquire(java.lang.String acquire)
Initializes the optional valueacquireto acquire.- Parameters:
acquire- The value for acquire- Returns:
thisbuilder for chained invocation
-
acquire
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder acquire(java.util.Optional<java.lang.String> acquire)
Initializes the optional valueacquireto acquire.- Parameters:
acquire- The value for acquire- Returns:
thisbuilder for use in a chained invocation
-
release
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder release(java.lang.String release)
Initializes the optional valuereleaseto release.- Parameters:
release- The value for release- Returns:
thisbuilder for chained invocation
-
release
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder release(java.util.Optional<java.lang.String> release)
Initializes the optional valuereleaseto release.- Parameters:
release- The value for release- Returns:
thisbuilder for use in a chained invocation
-
dc
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder dc(java.lang.String dc)
Initializes the optional valuedcto dc.- Parameters:
dc- The value for dc- Returns:
thisbuilder for chained invocation
-
dc
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder dc(java.util.Optional<java.lang.String> dc)
Initializes the optional valuedcto dc.- Parameters:
dc- The value for dc- Returns:
thisbuilder for use in a chained invocation
-
token
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder token(java.lang.String token)
Initializes the optional valuetokento token.- Parameters:
token- The value for token- Returns:
thisbuilder for chained invocation
-
token
@CanIgnoreReturnValue public final ImmutablePutOptions.Builder token(java.util.Optional<java.lang.String> token)
Initializes the optional valuetokento token.- Parameters:
token- The value for token- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutablePutOptions build()
Builds a newImmutablePutOptions.- Returns:
- An immutable instance of PutOptions
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
-