Package org.projectnessie.model
Class ImmutableContentWithKey
- java.lang.Object
-
- org.projectnessie.model.ImmutableContentWithKey
-
- All Implemented Interfaces:
GetMultipleContentsResponse.ContentWithKey
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableContentWithKey extends Object implements GetMultipleContentsResponse.ContentWithKey
Immutable implementation ofGetMultipleContentsResponse.ContentWithKey.Use the builder to create immutable instances:
ImmutableContentWithKey.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableContentWithKey.BuilderBuilds instances of typeImmutableContentWithKey.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableContentWithKey.Builderbuilder()Creates a builder forImmutableContentWithKey.static ImmutableContentWithKeycopyOf(GetMultipleContentsResponse.ContentWithKey instance)Creates an immutable copy of aGetMultipleContentsResponse.ContentWithKeyvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableContentWithKeythat have equal attribute values.ContentgetContent()ContentKeygetKey()inthashCode()Computes a hash code from attributes:key,content.StringtoString()Prints the immutable valueContentWithKeywith attribute values.ImmutableContentWithKeywithContent(Content value)Copy the current immutable object by setting a value for thecontentattribute.ImmutableContentWithKeywithKey(ContentKey value)Copy the current immutable object by setting a value for thekeyattribute.
-
-
-
Method Detail
-
getKey
public ContentKey getKey()
- Specified by:
getKeyin interfaceGetMultipleContentsResponse.ContentWithKey- Returns:
- The value of the
keyattribute
-
getContent
public Content getContent()
- Specified by:
getContentin interfaceGetMultipleContentsResponse.ContentWithKey- Returns:
- The value of the
contentattribute
-
withKey
public final ImmutableContentWithKey withKey(ContentKey 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
-
withContent
public final ImmutableContentWithKey withContent(Content value)
Copy the current immutable object by setting a value for thecontentattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for content- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableContentWithKeythat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:key,content.
-
toString
public String toString()
Prints the immutable valueContentWithKeywith attribute values.
-
copyOf
public static ImmutableContentWithKey copyOf(GetMultipleContentsResponse.ContentWithKey instance)
Creates an immutable copy of aGetMultipleContentsResponse.ContentWithKeyvalue. 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 ContentWithKey instance
-
builder
public static ImmutableContentWithKey.Builder builder()
Creates a builder forImmutableContentWithKey.ImmutableContentWithKey.builder() .key(org.projectnessie.model.ContentKey) // requiredkey.content(org.projectnessie.model.Content) // requiredcontent.build();- Returns:
- A new ImmutableContentWithKey builder
-
-