Package io.dialob.client.api
Class ImmutableHistoryEntity
- java.lang.Object
-
- io.dialob.client.api.ImmutableHistoryEntity
-
- All Implemented Interfaces:
DialobStore.HistoryEntity
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableHistoryEntity extends Object implements DialobStore.HistoryEntity
Immutable implementation ofDialobStore.HistoryEntity.Use the builder to create immutable instances:
ImmutableHistoryEntity.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableHistoryEntity.BuilderBuilds instances of typeImmutableHistoryEntity.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableHistoryEntity.Builderbuilder()Creates a builder forImmutableHistoryEntity.static ImmutableHistoryEntitycopyOf(DialobStore.HistoryEntity instance)Creates an immutable copy of aDialobStore.HistoryEntityvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableHistoryEntitythat have equal attribute values.com.google.common.collect.ImmutableList<DialobStore.DetachedEntity>getBody()io.dialob.api.form.FormEntitygetBodyType()StringgetId()inthashCode()Computes a hash code from attributes:id,bodyType,body.StringtoString()Prints the immutable valueHistoryEntitywith attribute values.ImmutableHistoryEntitywithBody(DialobStore.DetachedEntity... elements)Copy the current immutable object with elements that replace the content ofbody.ImmutableHistoryEntitywithBody(Iterable<? extends DialobStore.DetachedEntity> elements)Copy the current immutable object with elements that replace the content ofbody.ImmutableHistoryEntitywithBodyType(io.dialob.api.form.FormEntity value)Copy the current immutable object by setting a value for thebodyTypeattribute.ImmutableHistoryEntitywithId(String value)Copy the current immutable object by setting a value for theidattribute.
-
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getIdin interfaceDialobStore.HistoryEntity- Returns:
- The value of the
idattribute
-
getBodyType
public io.dialob.api.form.FormEntity getBodyType()
- Specified by:
getBodyTypein interfaceDialobStore.HistoryEntity- Returns:
- The value of the
bodyTypeattribute
-
getBody
public com.google.common.collect.ImmutableList<DialobStore.DetachedEntity> getBody()
- Specified by:
getBodyin interfaceDialobStore.HistoryEntity- Returns:
- The value of the
bodyattribute
-
withId
public final ImmutableHistoryEntity withId(String value)
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withBodyType
public final ImmutableHistoryEntity withBodyType(io.dialob.api.form.FormEntity value)
Copy the current immutable object by setting a value for thebodyTypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bodyType- Returns:
- A modified copy of the
thisobject
-
withBody
public final ImmutableHistoryEntity withBody(DialobStore.DetachedEntity... elements)
Copy the current immutable object with elements that replace the content ofbody.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withBody
public final ImmutableHistoryEntity withBody(Iterable<? extends DialobStore.DetachedEntity> elements)
Copy the current immutable object with elements that replace the content ofbody. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of body elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableHistoryEntitythat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,bodyType,body.
-
toString
public String toString()
Prints the immutable valueHistoryEntitywith attribute values.
-
copyOf
public static ImmutableHistoryEntity copyOf(DialobStore.HistoryEntity instance)
Creates an immutable copy of aDialobStore.HistoryEntityvalue. 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 HistoryEntity instance
-
builder
public static ImmutableHistoryEntity.Builder builder()
Creates a builder forImmutableHistoryEntity.ImmutableHistoryEntity.builder() .id(String) // requiredid.bodyType(io.dialob.api.form.FormEntity) // requiredbodyType.addBody|addAllBody(io.dialob.client.api.DialobStore.DetachedEntity) //bodyelements .build();- Returns:
- A new ImmutableHistoryEntity builder
-
-