Package org.projectnessie.model
Class ImmutableRefLogResponseEntry.Builder
- java.lang.Object
-
- org.projectnessie.model.ImmutableRefLogResponseEntry.Builder
-
- Enclosing class:
- ImmutableRefLogResponseEntry
@NotThreadSafe public static final class ImmutableRefLogResponseEntry.Builder extends Object
Builds instances of typeImmutableRefLogResponseEntry. 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
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableRefLogResponseEntry.Builder from(RefLogResponse.RefLogResponseEntry instance)
Fill a builder with attribute values from the providedRefLogResponseEntryinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
refLogId
@CanIgnoreReturnValue public final ImmutableRefLogResponseEntry.Builder refLogId(String refLogId)
Initializes the value for therefLogIdattribute.- Parameters:
refLogId- The value for refLogId- Returns:
thisbuilder for use in a chained invocation
-
refName
@CanIgnoreReturnValue public final ImmutableRefLogResponseEntry.Builder refName(String refName)
Initializes the value for therefNameattribute.- Parameters:
refName- The value for refName- Returns:
thisbuilder for use in a chained invocation
-
refType
@CanIgnoreReturnValue public final ImmutableRefLogResponseEntry.Builder refType(String refType)
Initializes the value for therefTypeattribute.- Parameters:
refType- The value for refType- Returns:
thisbuilder for use in a chained invocation
-
commitHash
@CanIgnoreReturnValue public final ImmutableRefLogResponseEntry.Builder commitHash(String commitHash)
Initializes the value for thecommitHashattribute.- Parameters:
commitHash- The value for commitHash- Returns:
thisbuilder for use in a chained invocation
-
parentRefLogId
@CanIgnoreReturnValue public final ImmutableRefLogResponseEntry.Builder parentRefLogId(String parentRefLogId)
Initializes the value for theparentRefLogIdattribute.- Parameters:
parentRefLogId- The value for parentRefLogId- Returns:
thisbuilder for use in a chained invocation
-
operationTime
@CanIgnoreReturnValue public final ImmutableRefLogResponseEntry.Builder operationTime(long operationTime)
Initializes the value for theoperationTimeattribute.- Parameters:
operationTime- The value for operationTime- Returns:
thisbuilder for use in a chained invocation
-
operation
@CanIgnoreReturnValue public final ImmutableRefLogResponseEntry.Builder operation(String operation)
Initializes the value for theoperationattribute.- Parameters:
operation- The value for operation- Returns:
thisbuilder for use in a chained invocation
-
addSourceHashes
@CanIgnoreReturnValue public final ImmutableRefLogResponseEntry.Builder addSourceHashes(String element)
Adds one element tosourceHasheslist.- Parameters:
element- A sourceHashes element- Returns:
thisbuilder for use in a chained invocation
-
addSourceHashes
@CanIgnoreReturnValue public final ImmutableRefLogResponseEntry.Builder addSourceHashes(String... elements)
Adds elements tosourceHasheslist.- Parameters:
elements- An array of sourceHashes elements- Returns:
thisbuilder for use in a chained invocation
-
sourceHashes
@CanIgnoreReturnValue public final ImmutableRefLogResponseEntry.Builder sourceHashes(Iterable<String> elements)
Sets or replaces all elements forsourceHasheslist.- Parameters:
elements- An iterable of sourceHashes elements- Returns:
thisbuilder for use in a chained invocation
-
addAllSourceHashes
@CanIgnoreReturnValue public final ImmutableRefLogResponseEntry.Builder addAllSourceHashes(Iterable<String> elements)
Adds elements tosourceHasheslist.- Parameters:
elements- An iterable of sourceHashes elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableRefLogResponseEntry build()
Builds a newImmutableRefLogResponseEntry.- Returns:
- An immutable instance of RefLogResponseEntry
- Throws:
IllegalStateException- if any required attributes are missing
-
-