Package org.projectnessie.model
Class ImmutableRefLogResponseEntry
- java.lang.Object
-
- org.projectnessie.model.ImmutableRefLogResponseEntry
-
- All Implemented Interfaces:
RefLogResponse.RefLogResponseEntry
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableRefLogResponseEntry extends Object implements RefLogResponse.RefLogResponseEntry
Immutable implementation ofRefLogResponse.RefLogResponseEntry.Use the builder to create immutable instances:
ImmutableRefLogResponseEntry.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableRefLogResponseEntry.BuilderBuilds instances of typeImmutableRefLogResponseEntry.
-
Field Summary
-
Fields inherited from interface org.projectnessie.model.RefLogResponse.RefLogResponseEntry
ASSIGN_REFERENCE, BRANCH, COMMIT, CREATE_REFERENCE, DELETE_REFERENCE, MERGE, TAG, TRANSPLANT
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableRefLogResponseEntry.Builderbuilder()Creates a builder forImmutableRefLogResponseEntry.static ImmutableRefLogResponseEntrycopyOf(RefLogResponse.RefLogResponseEntry instance)Creates an immutable copy of aRefLogResponse.RefLogResponseEntryvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableRefLogResponseEntrythat have equal attribute values.StringgetCommitHash()Output commit hash of the operation.StringgetOperation()Operation String mapped to ENUM inRefLogEntry.Operationof 'persist.proto' file.longgetOperationTime()Time in microseconds since epoch.StringgetParentRefLogId()Parent reflog id of the current entry.StringgetRefLogId()Reflog id of the current entry.StringgetRefName()Reference on which current operation is executed.StringgetRefType()Reference type can be 'Branch' or 'Tag'.List<String>getSourceHashes()Single hash in case of MERGE or ASSIGN.inthashCode()Computes a hash code from attributes:refLogId,refName,refType,commitHash,parentRefLogId,operationTime,operation,sourceHashes.StringtoString()Prints the immutable valueRefLogResponseEntrywith attribute values.ImmutableRefLogResponseEntrywithCommitHash(String value)Copy the current immutable object by setting a value for thecommitHashattribute.ImmutableRefLogResponseEntrywithOperation(String value)Copy the current immutable object by setting a value for theoperationattribute.ImmutableRefLogResponseEntrywithOperationTime(long value)Copy the current immutable object by setting a value for theoperationTimeattribute.ImmutableRefLogResponseEntrywithParentRefLogId(String value)Copy the current immutable object by setting a value for theparentRefLogIdattribute.ImmutableRefLogResponseEntrywithRefLogId(String value)Copy the current immutable object by setting a value for therefLogIdattribute.ImmutableRefLogResponseEntrywithRefName(String value)Copy the current immutable object by setting a value for therefNameattribute.ImmutableRefLogResponseEntrywithRefType(String value)Copy the current immutable object by setting a value for therefTypeattribute.ImmutableRefLogResponseEntrywithSourceHashes(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofsourceHashes.ImmutableRefLogResponseEntrywithSourceHashes(String... elements)Copy the current immutable object with elements that replace the content ofsourceHashes.
-
-
-
Method Detail
-
getRefLogId
public String getRefLogId()
Reflog id of the current entry.- Specified by:
getRefLogIdin interfaceRefLogResponse.RefLogResponseEntry
-
getRefName
public String getRefName()
Reference on which current operation is executed.- Specified by:
getRefNamein interfaceRefLogResponse.RefLogResponseEntry
-
getRefType
public String getRefType()
Reference type can be 'Branch' or 'Tag'.- Specified by:
getRefTypein interfaceRefLogResponse.RefLogResponseEntry
-
getCommitHash
public String getCommitHash()
Output commit hash of the operation.- Specified by:
getCommitHashin interfaceRefLogResponse.RefLogResponseEntry
-
getParentRefLogId
public String getParentRefLogId()
Parent reflog id of the current entry.- Specified by:
getParentRefLogIdin interfaceRefLogResponse.RefLogResponseEntry
-
getOperationTime
public long getOperationTime()
Time in microseconds since epoch.- Specified by:
getOperationTimein interfaceRefLogResponse.RefLogResponseEntry
-
getOperation
public String getOperation()
Operation String mapped to ENUM inRefLogEntry.Operationof 'persist.proto' file.- Specified by:
getOperationin interfaceRefLogResponse.RefLogResponseEntry
-
getSourceHashes
public List<String> getSourceHashes()
Single hash in case of MERGE or ASSIGN. One or more hashes in case of TRANSPLANT. Empty list for other operations.- Specified by:
getSourceHashesin interfaceRefLogResponse.RefLogResponseEntry
-
withRefLogId
public final ImmutableRefLogResponseEntry withRefLogId(String value)
Copy the current immutable object by setting a value for therefLogIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for refLogId- Returns:
- A modified copy of the
thisobject
-
withRefName
public final ImmutableRefLogResponseEntry withRefName(String value)
Copy the current immutable object by setting a value for therefNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for refName- Returns:
- A modified copy of the
thisobject
-
withRefType
public final ImmutableRefLogResponseEntry withRefType(String value)
Copy the current immutable object by setting a value for therefTypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for refType- Returns:
- A modified copy of the
thisobject
-
withCommitHash
public final ImmutableRefLogResponseEntry withCommitHash(String value)
Copy the current immutable object by setting a value for thecommitHashattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for commitHash- Returns:
- A modified copy of the
thisobject
-
withParentRefLogId
public final ImmutableRefLogResponseEntry withParentRefLogId(String value)
Copy the current immutable object by setting a value for theparentRefLogIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for parentRefLogId- Returns:
- A modified copy of the
thisobject
-
withOperationTime
public final ImmutableRefLogResponseEntry withOperationTime(long value)
Copy the current immutable object by setting a value for theoperationTimeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for operationTime- Returns:
- A modified copy of the
thisobject
-
withOperation
public final ImmutableRefLogResponseEntry withOperation(String value)
Copy the current immutable object by setting a value for theoperationattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for operation- Returns:
- A modified copy of the
thisobject
-
withSourceHashes
public final ImmutableRefLogResponseEntry withSourceHashes(String... elements)
Copy the current immutable object with elements that replace the content ofsourceHashes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSourceHashes
public final ImmutableRefLogResponseEntry withSourceHashes(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofsourceHashes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of sourceHashes elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableRefLogResponseEntrythat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:refLogId,refName,refType,commitHash,parentRefLogId,operationTime,operation,sourceHashes.
-
toString
public String toString()
Prints the immutable valueRefLogResponseEntrywith attribute values.
-
copyOf
public static ImmutableRefLogResponseEntry copyOf(RefLogResponse.RefLogResponseEntry instance)
Creates an immutable copy of aRefLogResponse.RefLogResponseEntryvalue. 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 RefLogResponseEntry instance
-
builder
public static ImmutableRefLogResponseEntry.Builder builder()
Creates a builder forImmutableRefLogResponseEntry.ImmutableRefLogResponseEntry.builder() .refLogId(String) // requiredrefLogId.refName(String) // requiredrefName.refType(String) // requiredrefType.commitHash(String) // requiredcommitHash.parentRefLogId(String) // requiredparentRefLogId.operationTime(long) // requiredoperationTime.operation(String) // requiredoperation.addSourceHashes|addAllSourceHashes(String) //sourceHasheselements .build();- Returns:
- A new ImmutableRefLogResponseEntry builder
-
-