Package io.dialob.api.form
Class ImmutableFormPutResponse
java.lang.Object
io.dialob.api.form.ImmutableFormPutResponse
- All Implemented Interfaces:
FormPutResponse,Response,ResponseStatus,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableFormPutResponse
extends Object
implements FormPutResponse
Immutable implementation of
FormPutResponse.
Use the builder to create immutable instances:
ImmutableFormPutResponse.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableFormPutResponse. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableFormPutResponse.static ImmutableFormPutResponsecopyOf(FormPutResponse instance) Creates an immutable copy of aFormPutResponsevalue.booleanThis instance is equal to all instances ofImmutableFormPutResponsethat have equal attribute values.getError()getForm()getId()getOk()getRev()inthashCode()Computes a hash code from attributes:ok,error,reason,id,rev,errors,form.toString()Prints the immutable valueFormPutResponsewith attribute values.final ImmutableFormPutResponseCopy the current immutable object by setting a value for theerrorattribute.final ImmutableFormPutResponsewithErrors(FormValidationError... elements) Copy the current immutable object with elements that replace the content oferrors.final ImmutableFormPutResponsewithErrors(Iterable<? extends FormValidationError> elements) Copy the current immutable object with elements that replace the content oferrors.final ImmutableFormPutResponseCopy the current immutable object by setting a value for theformattribute.final ImmutableFormPutResponseCopy the current immutable object by setting a value for theidattribute.final ImmutableFormPutResponseCopy the current immutable object by setting a value for theokattribute.final ImmutableFormPutResponsewithReason(String value) Copy the current immutable object by setting a value for thereasonattribute.final ImmutableFormPutResponseCopy the current immutable object by setting a value for therevattribute.
-
Method Details
-
getOk
- Specified by:
getOkin interfaceResponseStatus- Returns:
- The value of the
okattribute
-
getError
-
getReason
-
getId
- Specified by:
getIdin interfaceFormPutResponse- Returns:
- The value of the
idattribute
-
getRev
- Specified by:
getRevin interfaceFormPutResponse- Returns:
- The value of the
revattribute
-
getErrors
- Specified by:
getErrorsin interfaceFormPutResponse- Returns:
- The value of the
errorsattribute
-
getForm
- Specified by:
getFormin interfaceFormPutResponse- Returns:
- The value of the
formattribute
-
withOk
Copy the current immutable object by setting a value for theokattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ok (can benull)- Returns:
- A modified copy of the
thisobject
-
withError
Copy the current immutable object by setting a value for theerrorattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for error (can benull)- Returns:
- A modified copy of the
thisobject
-
withReason
Copy the current immutable object by setting a value for thereasonattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for reason (can benull)- Returns:
- A modified copy of the
thisobject
-
withId
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
-
withRev
Copy the current immutable object by setting a value for therevattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for rev (can benull)- Returns:
- A modified copy of the
thisobject
-
withErrors
Copy the current immutable object with elements that replace the content oferrors.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withErrors
Copy the current immutable object with elements that replace the content oferrors. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of errors elements to set- Returns:
- A modified copy of
thisobject
-
withForm
Copy the current immutable object by setting a value for theformattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for form (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableFormPutResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ok,error,reason,id,rev,errors,form. -
toString
Prints the immutable valueFormPutResponsewith attribute values. -
copyOf
Creates an immutable copy of aFormPutResponsevalue. 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 FormPutResponse instance
-
builder
Creates a builder forImmutableFormPutResponse.ImmutableFormPutResponse.builder() .ok(Boolean | null) // nullableok.error(String | null) // nullableerror.reason(String | null) // nullablereason.id(String | null) // nullableid.rev(String | null) // nullablerev.addErrors|addAllErrors(io.dialob.api.form.FormValidationError) //errorselements .form(io.dialob.api.form.Form | null) // nullableform.build();- Returns:
- A new ImmutableFormPutResponse builder
-