Package io.dialob.client.api
Class ImmutableCreateStoreEntity
- java.lang.Object
-
- io.dialob.client.api.ImmutableCreateStoreEntity
-
- All Implemented Interfaces:
DialobStore.CreateStoreEntity,DialobStore.StoreCommand,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCreateStoreEntity extends Object implements DialobStore.CreateStoreEntity
Immutable implementation ofDialobStore.CreateStoreEntity.Use the builder to create immutable instances:
ImmutableCreateStoreEntity.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCreateStoreEntity.BuilderBuilds instances of typeImmutableCreateStoreEntity.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCreateStoreEntity.Builderbuilder()Creates a builder forImmutableCreateStoreEntity.static ImmutableCreateStoreEntitycopyOf(DialobStore.CreateStoreEntity instance)Creates an immutable copy of aDialobStore.CreateStoreEntityvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCreateStoreEntitythat have equal attribute values.StringgetBody()DialobDocument.DocumentTypegetBodyType()StringgetId()StringgetVersion()inthashCode()Computes a hash code from attributes:bodyType,id,version,body.StringtoString()Prints the immutable valueCreateStoreEntitywith attribute values.ImmutableCreateStoreEntitywithBody(String value)Copy the current immutable object by setting a value for thebodyattribute.ImmutableCreateStoreEntitywithBodyType(DialobDocument.DocumentType value)Copy the current immutable object by setting a value for thebodyTypeattribute.ImmutableCreateStoreEntitywithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableCreateStoreEntitywithVersion(String value)Copy the current immutable object by setting a value for theversionattribute.
-
-
-
Method Detail
-
getBodyType
public DialobDocument.DocumentType getBodyType()
- Specified by:
getBodyTypein interfaceDialobStore.StoreCommand- Returns:
- The value of the
bodyTypeattribute
-
getId
@Nullable public String getId()
- Specified by:
getIdin interfaceDialobStore.CreateStoreEntity- Returns:
- The value of the
idattribute
-
getVersion
@Nullable public String getVersion()
- Specified by:
getVersionin interfaceDialobStore.CreateStoreEntity- Returns:
- The value of the
versionattribute
-
getBody
public String getBody()
- Specified by:
getBodyin interfaceDialobStore.CreateStoreEntity- Returns:
- The value of the
bodyattribute
-
withBodyType
public final ImmutableCreateStoreEntity withBodyType(DialobDocument.DocumentType value)
Copy the current immutable object by setting a value for thebodyTypeattribute. A value 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
-
withId
public final ImmutableCreateStoreEntity withId(@Nullable 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 (can benull)- Returns:
- A modified copy of the
thisobject
-
withVersion
public final ImmutableCreateStoreEntity withVersion(@Nullable String value)
Copy the current immutable object by setting a value for theversionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for version (can benull)- Returns:
- A modified copy of the
thisobject
-
withBody
public final ImmutableCreateStoreEntity withBody(String value)
Copy the current immutable object by setting a value for thebodyattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for body- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableCreateStoreEntitythat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:bodyType,id,version,body.
-
toString
public String toString()
Prints the immutable valueCreateStoreEntitywith attribute values.
-
copyOf
public static ImmutableCreateStoreEntity copyOf(DialobStore.CreateStoreEntity instance)
Creates an immutable copy of aDialobStore.CreateStoreEntityvalue. 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 CreateStoreEntity instance
-
builder
public static ImmutableCreateStoreEntity.Builder builder()
Creates a builder forImmutableCreateStoreEntity.ImmutableCreateStoreEntity.builder() .bodyType(io.dialob.client.api.DialobDocument.DocumentType) // requiredbodyType.id(String | null) // nullableid.version(String | null) // nullableversion.body(String) // requiredbody.build();- Returns:
- A new ImmutableCreateStoreEntity builder
-
-