Package io.dialob.api.form
Class ImmutableFormValidationError
- java.lang.Object
-
- io.dialob.api.form.ImmutableFormValidationError
-
- All Implemented Interfaces:
FormValidationError,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableFormValidationError extends Object implements FormValidationError
Immutable implementation ofFormValidationError.Use the builder to create immutable instances:
ImmutableFormValidationError.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableFormValidationError.BuilderBuilds instances of typeImmutableFormValidationError.-
Nested classes/interfaces inherited from interface io.dialob.api.form.FormValidationError
FormValidationError.Level, FormValidationError.Type
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableFormValidationError.Builderbuilder()Creates a builder forImmutableFormValidationError.static ImmutableFormValidationErrorcopyOf(FormValidationError instance)Creates an immutable copy of aFormValidationErrorvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableFormValidationErrorthat have equal attribute values.Optional<Integer>getEndIndex()Optional<String>getExpression()Optional<Integer>getIndex()StringgetItemId()FormValidationError.LevelgetLevel()StringgetMessage()Optional<Integer>getStartIndex()FormValidationError.TypegetType()inthashCode()Computes a hash code from attributes:itemId,message,level,type,expression,startIndex,endIndex,index.StringtoString()Prints the immutable valueFormValidationErrorwith attribute values.ImmutableFormValidationErrorwithEndIndex(int value)Copy the current immutable object by setting a present value for the optionalendIndexattribute.ImmutableFormValidationErrorwithEndIndex(Optional<Integer> optional)Copy the current immutable object by setting an optional value for theendIndexattribute.ImmutableFormValidationErrorwithExpression(String value)Copy the current immutable object by setting a present value for the optionalexpressionattribute.ImmutableFormValidationErrorwithExpression(Optional<String> optional)Copy the current immutable object by setting an optional value for theexpressionattribute.ImmutableFormValidationErrorwithIndex(int value)Copy the current immutable object by setting a present value for the optionalindexattribute.ImmutableFormValidationErrorwithIndex(Optional<Integer> optional)Copy the current immutable object by setting an optional value for theindexattribute.ImmutableFormValidationErrorwithItemId(String value)Copy the current immutable object by setting a value for theitemIdattribute.ImmutableFormValidationErrorwithLevel(FormValidationError.Level value)Copy the current immutable object by setting a value for thelevelattribute.ImmutableFormValidationErrorwithMessage(String value)Copy the current immutable object by setting a value for themessageattribute.ImmutableFormValidationErrorwithStartIndex(int value)Copy the current immutable object by setting a present value for the optionalstartIndexattribute.ImmutableFormValidationErrorwithStartIndex(Optional<Integer> optional)Copy the current immutable object by setting an optional value for thestartIndexattribute.ImmutableFormValidationErrorwithType(FormValidationError.Type value)Copy the current immutable object by setting a value for thetypeattribute.
-
-
-
Method Detail
-
getItemId
public String getItemId()
- Specified by:
getItemIdin interfaceFormValidationError- Returns:
- The value of the
itemIdattribute
-
getMessage
public String getMessage()
- Specified by:
getMessagein interfaceFormValidationError- Returns:
- The value of the
messageattribute
-
getLevel
public FormValidationError.Level getLevel()
- Specified by:
getLevelin interfaceFormValidationError- Returns:
- The value of the
levelattribute
-
getType
public FormValidationError.Type getType()
- Specified by:
getTypein interfaceFormValidationError- Returns:
- The value of the
typeattribute
-
getExpression
public Optional<String> getExpression()
- Specified by:
getExpressionin interfaceFormValidationError- Returns:
- The value of the
expressionattribute
-
getStartIndex
public Optional<Integer> getStartIndex()
- Specified by:
getStartIndexin interfaceFormValidationError- Returns:
- The value of the
startIndexattribute
-
getEndIndex
public Optional<Integer> getEndIndex()
- Specified by:
getEndIndexin interfaceFormValidationError- Returns:
- The value of the
endIndexattribute
-
getIndex
public Optional<Integer> getIndex()
- Specified by:
getIndexin interfaceFormValidationError- Returns:
- The value of the
indexattribute
-
withItemId
public final ImmutableFormValidationError withItemId(String value)
Copy the current immutable object by setting a value for theitemIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for itemId (can benull)- Returns:
- A modified copy of the
thisobject
-
withMessage
public final ImmutableFormValidationError withMessage(String value)
Copy the current immutable object by setting a value for themessageattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for message (can benull)- Returns:
- A modified copy of the
thisobject
-
withLevel
public final ImmutableFormValidationError withLevel(FormValidationError.Level value)
Copy the current immutable object by setting a value for thelevelattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for level- Returns:
- A modified copy of the
thisobject
-
withType
public final ImmutableFormValidationError withType(FormValidationError.Type value)
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type (can benull)- Returns:
- A modified copy of the
thisobject
-
withExpression
public final ImmutableFormValidationError withExpression(String value)
Copy the current immutable object by setting a present value for the optionalexpressionattribute.- Parameters:
value- The value for expression- Returns:
- A modified copy of
thisobject
-
withExpression
public final ImmutableFormValidationError withExpression(Optional<String> optional)
Copy the current immutable object by setting an optional value for theexpressionattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for expression- Returns:
- A modified copy of
thisobject
-
withStartIndex
public final ImmutableFormValidationError withStartIndex(int value)
Copy the current immutable object by setting a present value for the optionalstartIndexattribute.- Parameters:
value- The value for startIndex- Returns:
- A modified copy of
thisobject
-
withStartIndex
public final ImmutableFormValidationError withStartIndex(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for thestartIndexattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for startIndex- Returns:
- A modified copy of
thisobject
-
withEndIndex
public final ImmutableFormValidationError withEndIndex(int value)
Copy the current immutable object by setting a present value for the optionalendIndexattribute.- Parameters:
value- The value for endIndex- Returns:
- A modified copy of
thisobject
-
withEndIndex
public final ImmutableFormValidationError withEndIndex(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for theendIndexattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for endIndex- Returns:
- A modified copy of
thisobject
-
withIndex
public final ImmutableFormValidationError withIndex(int value)
Copy the current immutable object by setting a present value for the optionalindexattribute.- Parameters:
value- The value for index- Returns:
- A modified copy of
thisobject
-
withIndex
public final ImmutableFormValidationError withIndex(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for theindexattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for index- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableFormValidationErrorthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:itemId,message,level,type,expression,startIndex,endIndex,index.
-
toString
public String toString()
Prints the immutable valueFormValidationErrorwith attribute values.
-
copyOf
public static ImmutableFormValidationError copyOf(FormValidationError instance)
Creates an immutable copy of aFormValidationErrorvalue. 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 FormValidationError instance
-
builder
public static ImmutableFormValidationError.Builder builder()
Creates a builder forImmutableFormValidationError.ImmutableFormValidationError.builder() .itemId(String | null) // nullableitemId.message(String | null) // nullablemessage.level(io.dialob.api.form.FormValidationError.Level) // optionallevel.type(io.dialob.api.form.FormValidationError.Type | null) // nullabletype.expression(String) // optionalexpression.startIndex(Integer) // optionalstartIndex.endIndex(Integer) // optionalendIndex.index(Integer) // optionalindex.build();- Returns:
- A new ImmutableFormValidationError builder
-
-