Package org.projectnessie.model
Class ImmutableRefLogResponse
- java.lang.Object
-
- org.projectnessie.model.ImmutableRefLogResponse
-
- All Implemented Interfaces:
PaginatedResponse,RefLogResponse
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableRefLogResponse extends Object implements RefLogResponse
Immutable implementation ofRefLogResponse.Use the builder to create immutable instances:
ImmutableRefLogResponse.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableRefLogResponse.BuilderBuilds instances of typeImmutableRefLogResponse.-
Nested classes/interfaces inherited from interface org.projectnessie.model.RefLogResponse
RefLogResponse.RefLogResponseEntry
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableRefLogResponse.Builderbuilder()Creates a builder forImmutableRefLogResponse.static ImmutableRefLogResponsecopyOf(RefLogResponse instance)Creates an immutable copy of aRefLogResponsevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableRefLogResponsethat have equal attribute values.List<RefLogResponse.RefLogResponseEntry>getLogEntries()StringgetToken()Pass this value to the next invocation of the API function to get the next page of results.inthashCode()Computes a hash code from attributes:isHasMore,token,logEntries.booleanisHasMore()Whether there are more result-items than returned by this response object.StringtoString()Prints the immutable valueRefLogResponsewith attribute values.ImmutableRefLogResponsewithIsHasMore(boolean value)Copy the current immutable object by setting a value for theisHasMoreattribute.ImmutableRefLogResponsewithLogEntries(Iterable<? extends RefLogResponse.RefLogResponseEntry> elements)Copy the current immutable object with elements that replace the content oflogEntries.ImmutableRefLogResponsewithLogEntries(RefLogResponse.RefLogResponseEntry... elements)Copy the current immutable object with elements that replace the content oflogEntries.ImmutableRefLogResponsewithToken(String value)Copy the current immutable object by setting a value for thetokenattribute.
-
-
-
Method Detail
-
isHasMore
public boolean isHasMore()
Whether there are more result-items than returned by this response object.If there are more result-items, the value returned by
getToken()can be used in the next invocation to get the next "page" of results.- Specified by:
isHasMorein interfacePaginatedResponse- Returns:
true, if there are more result items.
-
getToken
@Nullable public String getToken()
Pass this value to the next invocation of the API function to get the next page of results.Paging tokens are opaque and the structure may change without prior notice even in patch releases.
- Specified by:
getTokenin interfacePaginatedResponse- Returns:
- paging continuation token for the next invocation of an API function taking a subclass
of
AbstractParams, ifisHasMore()istrue. Undefined, ifisHasMore()isfalse.
-
getLogEntries
public List<RefLogResponse.RefLogResponseEntry> getLogEntries()
- Specified by:
getLogEntriesin interfaceRefLogResponse- Returns:
- The value of the
logEntriesattribute
-
withIsHasMore
public final ImmutableRefLogResponse withIsHasMore(boolean value)
Copy the current immutable object by setting a value for theisHasMoreattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isHasMore- Returns:
- A modified copy of the
thisobject
-
withToken
public final ImmutableRefLogResponse withToken(@Nullable String value)
Copy the current immutable object by setting a value for thetokenattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for token (can benull)- Returns:
- A modified copy of the
thisobject
-
withLogEntries
public final ImmutableRefLogResponse withLogEntries(RefLogResponse.RefLogResponseEntry... elements)
Copy the current immutable object with elements that replace the content oflogEntries.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withLogEntries
public final ImmutableRefLogResponse withLogEntries(Iterable<? extends RefLogResponse.RefLogResponseEntry> elements)
Copy the current immutable object with elements that replace the content oflogEntries. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of logEntries elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableRefLogResponsethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:isHasMore,token,logEntries.
-
toString
public String toString()
Prints the immutable valueRefLogResponsewith attribute values.
-
copyOf
public static ImmutableRefLogResponse copyOf(RefLogResponse instance)
Creates an immutable copy of aRefLogResponsevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable RefLogResponse instance
-
builder
public static ImmutableRefLogResponse.Builder builder()
Creates a builder forImmutableRefLogResponse.ImmutableRefLogResponse.builder() .isHasMore(boolean) // optionalisHasMore.token(String | null) // nullabletoken.addLogEntries|addAllLogEntries(org.projectnessie.model.RefLogResponse.RefLogResponseEntry) //logEntrieselements .build();- Returns:
- A new ImmutableRefLogResponse builder
-
-