Package io.dialob.client.api
Class ImmutableProgramMessage
- java.lang.Object
-
- io.dialob.client.api.ImmutableProgramMessage
-
- All Implemented Interfaces:
DialobClient.ProgramMessage
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableProgramMessage extends Object implements DialobClient.ProgramMessage
Immutable implementation ofDialobClient.ProgramMessage.Use the builder to create immutable instances:
ImmutableProgramMessage.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableProgramMessage.BuilderBuilds instances of typeImmutableProgramMessage.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableProgramMessage.Builderbuilder()Creates a builder forImmutableProgramMessage.static ImmutableProgramMessagecopyOf(DialobClient.ProgramMessage instance)Creates an immutable copy of aDialobClient.ProgramMessagevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableProgramMessagethat have equal attribute values.ExceptiongetException()StringgetId()StringgetMsg()io.dialob.api.form.FormValidationErrorgetSrc()inthashCode()Computes a hash code from attributes:id,msg,src,exception.StringtoString()Prints the immutable valueProgramMessagewith attribute values.ImmutableProgramMessagewithException(Exception value)Copy the current immutable object by setting a value for theexceptionattribute.ImmutableProgramMessagewithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableProgramMessagewithMsg(String value)Copy the current immutable object by setting a value for themsgattribute.ImmutableProgramMessagewithSrc(io.dialob.api.form.FormValidationError value)Copy the current immutable object by setting a value for thesrcattribute.
-
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getIdin interfaceDialobClient.ProgramMessage- Returns:
- The value of the
idattribute
-
getMsg
@Nullable public String getMsg()
- Specified by:
getMsgin interfaceDialobClient.ProgramMessage- Returns:
- The value of the
msgattribute
-
getSrc
@Nullable public io.dialob.api.form.FormValidationError getSrc()
- Specified by:
getSrcin interfaceDialobClient.ProgramMessage- Returns:
- The value of the
srcattribute
-
getException
@Nullable public Exception getException()
- Specified by:
getExceptionin interfaceDialobClient.ProgramMessage- Returns:
- The value of the
exceptionattribute
-
withId
public final ImmutableProgramMessage 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
-
withMsg
public final ImmutableProgramMessage withMsg(@Nullable String value)
Copy the current immutable object by setting a value for themsgattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for msg (can benull)- Returns:
- A modified copy of the
thisobject
-
withSrc
public final ImmutableProgramMessage withSrc(@Nullable io.dialob.api.form.FormValidationError value)
Copy the current immutable object by setting a value for thesrcattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for src (can benull)- Returns:
- A modified copy of the
thisobject
-
withException
public final ImmutableProgramMessage withException(@Nullable Exception value)
Copy the current immutable object by setting a value for theexceptionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for exception (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableProgramMessagethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,msg,src,exception.
-
toString
public String toString()
Prints the immutable valueProgramMessagewith attribute values.
-
copyOf
public static ImmutableProgramMessage copyOf(DialobClient.ProgramMessage instance)
Creates an immutable copy of aDialobClient.ProgramMessagevalue. 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 ProgramMessage instance
-
builder
public static ImmutableProgramMessage.Builder builder()
Creates a builder forImmutableProgramMessage.ImmutableProgramMessage.builder() .id(String) // requiredid.msg(String | null) // nullablemsg.src(io.dialob.api.form.FormValidationError | null) // nullablesrc.exception(Exception | null) // nullableexception.build();- Returns:
- A new ImmutableProgramMessage builder
-
-