Package io.dialob.client.api
Class ImmutableEmptyCommand
- java.lang.Object
-
- io.dialob.client.api.ImmutableEmptyCommand
-
- All Implemented Interfaces:
DialobStore.EmptyCommand,DialobStore.StoreCommand,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableEmptyCommand extends Object implements DialobStore.EmptyCommand
Immutable implementation ofDialobStore.EmptyCommand.Use the builder to create immutable instances:
ImmutableEmptyCommand.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableEmptyCommand.BuilderBuilds instances of typeImmutableEmptyCommand.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableEmptyCommand.Builderbuilder()Creates a builder forImmutableEmptyCommand.static ImmutableEmptyCommandcopyOf(DialobStore.EmptyCommand instance)Creates an immutable copy of aDialobStore.EmptyCommandvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableEmptyCommandthat have equal attribute values.DialobDocument.DocumentTypegetBodyType()StringgetDescription()StringgetId()inthashCode()Computes a hash code from attributes:bodyType,id,description.StringtoString()Prints the immutable valueEmptyCommandwith attribute values.ImmutableEmptyCommandwithBodyType(DialobDocument.DocumentType value)Copy the current immutable object by setting a value for thebodyTypeattribute.ImmutableEmptyCommandwithDescription(String value)Copy the current immutable object by setting a value for thedescriptionattribute.ImmutableEmptyCommandwithId(String value)Copy the current immutable object by setting a value for theidattribute.
-
-
-
Method Detail
-
getBodyType
public DialobDocument.DocumentType getBodyType()
- Specified by:
getBodyTypein interfaceDialobStore.StoreCommand- Returns:
- The value of the
bodyTypeattribute
-
getId
public String getId()
- Specified by:
getIdin interfaceDialobStore.EmptyCommand- Returns:
- The value of the
idattribute
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceDialobStore.EmptyCommand- Returns:
- The value of the
descriptionattribute
-
withBodyType
public final ImmutableEmptyCommand 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 ImmutableEmptyCommand 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
-
withDescription
public final ImmutableEmptyCommand withDescription(String value)
Copy the current immutable object by setting a value for thedescriptionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for description- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableEmptyCommandthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:bodyType,id,description.
-
toString
public String toString()
Prints the immutable valueEmptyCommandwith attribute values.
-
copyOf
public static ImmutableEmptyCommand copyOf(DialobStore.EmptyCommand instance)
Creates an immutable copy of aDialobStore.EmptyCommandvalue. 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 EmptyCommand instance
-
builder
public static ImmutableEmptyCommand.Builder builder()
Creates a builder forImmutableEmptyCommand.ImmutableEmptyCommand.builder() .bodyType(io.dialob.client.api.DialobDocument.DocumentType) // requiredbodyType.id(String) // requiredid.description(String) // requireddescription.build();- Returns:
- A new ImmutableEmptyCommand builder
-
-