Package org.projectnessie.model
Class ImmutableContentsWithKey.Builder
- java.lang.Object
-
- org.projectnessie.model.ImmutableContentsWithKey.Builder
-
- Enclosing class:
- ImmutableContentsWithKey
@NotThreadSafe public static final class ImmutableContentsWithKey.Builder extends Object
Builds instances of typeImmutableContentsWithKey. 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableContentsWithKeybuild()Builds a newImmutableContentsWithKey.ImmutableContentsWithKey.Buildercontents(Contents contents)Initializes the value for thecontentsattribute.ImmutableContentsWithKey.Builderfrom(MultiGetContentsResponse.ContentsWithKey instance)Fill a builder with attribute values from the providedContentsWithKeyinstance.ImmutableContentsWithKey.Builderkey(ContentsKey key)Initializes the value for thekeyattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableContentsWithKey.Builder from(MultiGetContentsResponse.ContentsWithKey instance)
Fill a builder with attribute values from the providedContentsWithKeyinstance. 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
-
key
@CanIgnoreReturnValue public final ImmutableContentsWithKey.Builder key(ContentsKey key)
Initializes the value for thekeyattribute.- Parameters:
key- The value for key- Returns:
thisbuilder for use in a chained invocation
-
contents
@CanIgnoreReturnValue public final ImmutableContentsWithKey.Builder contents(Contents contents)
Initializes the value for thecontentsattribute.- Parameters:
contents- The value for contents- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableContentsWithKey build()
Builds a newImmutableContentsWithKey.- Returns:
- An immutable instance of ContentsWithKey
- Throws:
IllegalStateException- if any required attributes are missing
-
-