Package com.orbitz.consul.model.kv
Class ImmutableTxError.Builder
- java.lang.Object
-
- com.orbitz.consul.model.kv.ImmutableTxError.Builder
-
- Enclosing class:
- ImmutableTxError
@NotThreadSafe public static final class ImmutableTxError.Builder extends java.lang.ObjectBuilds instances of typeImmutableTxError. 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 ImmutableTxErrorbuild()Builds a newImmutableTxError.ImmutableTxError.Builderfrom(TxError instance)Fill a builder with attribute values from the providedTxErrorinstance.ImmutableTxError.BuilderopIndex(java.math.BigInteger opIndex)Initializes the optional valueopIndexto opIndex.ImmutableTxError.BuilderopIndex(java.util.Optional<? extends java.math.BigInteger> opIndex)Initializes the optional valueopIndexto opIndex.ImmutableTxError.Builderwhat(java.lang.String what)Initializes the optional valuewhatto what.ImmutableTxError.Builderwhat(java.util.Optional<java.lang.String> what)Initializes the optional valuewhatto what.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableTxError.Builder from(TxError instance)
Fill a builder with attribute values from the providedTxErrorinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
opIndex
@CanIgnoreReturnValue public final ImmutableTxError.Builder opIndex(java.math.BigInteger opIndex)
Initializes the optional valueopIndexto opIndex.- Parameters:
opIndex- The value for opIndex- Returns:
thisbuilder for chained invocation
-
opIndex
@CanIgnoreReturnValue public final ImmutableTxError.Builder opIndex(java.util.Optional<? extends java.math.BigInteger> opIndex)
Initializes the optional valueopIndexto opIndex.- Parameters:
opIndex- The value for opIndex- Returns:
thisbuilder for use in a chained invocation
-
what
@CanIgnoreReturnValue public final ImmutableTxError.Builder what(java.lang.String what)
Initializes the optional valuewhatto what.- Parameters:
what- The value for what- Returns:
thisbuilder for chained invocation
-
what
@CanIgnoreReturnValue public final ImmutableTxError.Builder what(java.util.Optional<java.lang.String> what)
Initializes the optional valuewhatto what.- Parameters:
what- The value for what- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableTxError build()
Builds a newImmutableTxError.- Returns:
- An immutable instance of TxError
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
-