Package org.projectnessie.model
Class ImmutableReferencesResponse.Builder
- java.lang.Object
-
- org.projectnessie.model.ImmutableReferencesResponse.Builder
-
- Enclosing class:
- ImmutableReferencesResponse
@NotThreadSafe public static final class ImmutableReferencesResponse.Builder extends Object
Builds instances of typeImmutableReferencesResponse. 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 ImmutableReferencesResponse.BuilderaddAllReferences(Iterable<? extends Reference> elements)Adds elements toreferenceslist.ImmutableReferencesResponse.BuilderaddReferences(Reference element)Adds one element toreferenceslist.ImmutableReferencesResponse.BuilderaddReferences(Reference... elements)Adds elements toreferenceslist.ImmutableReferencesResponsebuild()Builds a newImmutableReferencesResponse.ImmutableReferencesResponse.Builderfrom(PaginatedResponse instance)Fill a builder with attribute values from the providedorg.projectnessie.model.PaginatedResponseinstance.ImmutableReferencesResponse.Builderfrom(ReferencesResponse instance)Fill a builder with attribute values from the providedorg.projectnessie.model.ReferencesResponseinstance.ImmutableReferencesResponse.BuilderisHasMore(boolean isHasMore)Initializes the value for theisHasMoreattribute.ImmutableReferencesResponse.Builderreferences(Iterable<? extends Reference> elements)Sets or replaces all elements forreferenceslist.ImmutableReferencesResponse.Buildertoken(String token)Initializes the value for thetokenattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableReferencesResponse.Builder from(ReferencesResponse instance)
Fill a builder with attribute values from the providedorg.projectnessie.model.ReferencesResponseinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableReferencesResponse.Builder from(PaginatedResponse instance)
Fill a builder with attribute values from the providedorg.projectnessie.model.PaginatedResponseinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
isHasMore
@CanIgnoreReturnValue public final ImmutableReferencesResponse.Builder isHasMore(boolean isHasMore)
Initializes the value for theisHasMoreattribute.If not set, this attribute will have a default value as returned by the initializer of
isHasMore.- Parameters:
isHasMore- The value for isHasMore- Returns:
thisbuilder for use in a chained invocation
-
token
@CanIgnoreReturnValue public final ImmutableReferencesResponse.Builder token(@Nullable String token)
Initializes the value for thetokenattribute.- Parameters:
token- The value for token (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addReferences
@CanIgnoreReturnValue public final ImmutableReferencesResponse.Builder addReferences(Reference element)
Adds one element toreferenceslist.- Parameters:
element- A references element- Returns:
thisbuilder for use in a chained invocation
-
addReferences
@CanIgnoreReturnValue public final ImmutableReferencesResponse.Builder addReferences(Reference... elements)
Adds elements toreferenceslist.- Parameters:
elements- An array of references elements- Returns:
thisbuilder for use in a chained invocation
-
references
@CanIgnoreReturnValue public final ImmutableReferencesResponse.Builder references(Iterable<? extends Reference> elements)
Sets or replaces all elements forreferenceslist.- Parameters:
elements- An iterable of references elements- Returns:
thisbuilder for use in a chained invocation
-
addAllReferences
@CanIgnoreReturnValue public final ImmutableReferencesResponse.Builder addAllReferences(Iterable<? extends Reference> elements)
Adds elements toreferenceslist.- Parameters:
elements- An iterable of references elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableReferencesResponse build()
Builds a newImmutableReferencesResponse.- Returns:
- An immutable instance of ReferencesResponse
- Throws:
IllegalStateException- if any required attributes are missing
-
-