Package org.projectnessie.model
Class ImmutableContentsWithKey
- java.lang.Object
-
- org.projectnessie.model.ImmutableContentsWithKey
-
- All Implemented Interfaces:
MultiGetContentsResponse.ContentsWithKey
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableContentsWithKey extends Object implements MultiGetContentsResponse.ContentsWithKey
Immutable implementation ofMultiGetContentsResponse.ContentsWithKey.Use the builder to create immutable instances:
ImmutableContentsWithKey.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableContentsWithKey.BuilderBuilds instances of typeImmutableContentsWithKey.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableContentsWithKey.Builderbuilder()Creates a builder forImmutableContentsWithKey.static ImmutableContentsWithKeycopyOf(MultiGetContentsResponse.ContentsWithKey instance)Creates an immutable copy of aMultiGetContentsResponse.ContentsWithKeyvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableContentsWithKeythat have equal attribute values.ContentsgetContents()ContentsKeygetKey()inthashCode()Computes a hash code from attributes:key,contents.StringtoString()Prints the immutable valueContentsWithKeywith attribute values.ImmutableContentsWithKeywithContents(Contents value)Copy the current immutable object by setting a value for thecontentsattribute.ImmutableContentsWithKeywithKey(ContentsKey value)Copy the current immutable object by setting a value for thekeyattribute.
-
-
-
Method Detail
-
getKey
public ContentsKey getKey()
- Specified by:
getKeyin interfaceMultiGetContentsResponse.ContentsWithKey- Returns:
- The value of the
keyattribute
-
getContents
public Contents getContents()
- Specified by:
getContentsin interfaceMultiGetContentsResponse.ContentsWithKey- Returns:
- The value of the
contentsattribute
-
withKey
public final ImmutableContentsWithKey withKey(ContentsKey value)
Copy the current immutable object by setting a value for thekeyattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for key- Returns:
- A modified copy of the
thisobject
-
withContents
public final ImmutableContentsWithKey withContents(Contents value)
Copy the current immutable object by setting a value for thecontentsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for contents- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableContentsWithKeythat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:key,contents.
-
toString
public String toString()
Prints the immutable valueContentsWithKeywith attribute values.
-
copyOf
public static ImmutableContentsWithKey copyOf(MultiGetContentsResponse.ContentsWithKey instance)
Creates an immutable copy of aMultiGetContentsResponse.ContentsWithKeyvalue. 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 ContentsWithKey instance
-
builder
public static ImmutableContentsWithKey.Builder builder()
Creates a builder forImmutableContentsWithKey.ImmutableContentsWithKey.builder() .key(org.projectnessie.model.ContentsKey) // requiredkey.contents(org.projectnessie.model.Contents) // requiredcontents.build();- Returns:
- A new ImmutableContentsWithKey builder
-
-