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 ofFormPutResponse.Use the builder to create immutable instances:
ImmutableFormPutResponse.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableFormPutResponse.BuilderBuilds instances of typeImmutableFormPutResponse.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableFormPutResponse.Builderbuilder()Creates a builder forImmutableFormPutResponse.static ImmutableFormPutResponsecopyOf(FormPutResponse instance)Creates an immutable copy of aFormPutResponsevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableFormPutResponsethat have equal attribute values.StringgetError()List<FormValidationError>getErrors()FormgetForm()StringgetId()BooleangetOk()StringgetReason()StringgetRev()inthashCode()Computes a hash code from attributes:ok,error,reason,id,rev,errors,form.StringtoString()Prints the immutable valueFormPutResponsewith attribute values.ImmutableFormPutResponsewithError(String value)Copy the current immutable object by setting a value for theerrorattribute.ImmutableFormPutResponsewithErrors(FormValidationError... elements)Copy the current immutable object with elements that replace the content oferrors.ImmutableFormPutResponsewithErrors(Iterable<? extends FormValidationError> elements)Copy the current immutable object with elements that replace the content oferrors.ImmutableFormPutResponsewithForm(Form value)Copy the current immutable object by setting a value for theformattribute.ImmutableFormPutResponsewithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableFormPutResponsewithOk(Boolean value)Copy the current immutable object by setting a value for theokattribute.ImmutableFormPutResponsewithReason(String value)Copy the current immutable object by setting a value for thereasonattribute.ImmutableFormPutResponsewithRev(String value)Copy the current immutable object by setting a value for therevattribute.
-
-
-
Method Detail
-
getOk
public Boolean getOk()
- Specified by:
getOkin interfaceResponseStatus- Returns:
- The value of the
okattribute
-
getError
public String getError()
-
getReason
public String getReason()
-
getId
public String getId()
- Specified by:
getIdin interfaceFormPutResponse- Returns:
- The value of the
idattribute
-
getRev
public String getRev()
- Specified by:
getRevin interfaceFormPutResponse- Returns:
- The value of the
revattribute
-
getErrors
public List<FormValidationError> getErrors()
- Specified by:
getErrorsin interfaceFormPutResponse- Returns:
- The value of the
errorsattribute
-
getForm
public Form getForm()
- Specified by:
getFormin interfaceFormPutResponse- Returns:
- The value of the
formattribute
-
withOk
public final ImmutableFormPutResponse withOk(Boolean value)
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
public final ImmutableFormPutResponse withError(String value)
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
public final ImmutableFormPutResponse withReason(String value)
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
public final ImmutableFormPutResponse 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 (can benull)- Returns:
- A modified copy of the
thisobject
-
withRev
public final ImmutableFormPutResponse withRev(String value)
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
public final ImmutableFormPutResponse withErrors(FormValidationError... elements)
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
public final ImmutableFormPutResponse withErrors(Iterable<? extends FormValidationError> elements)
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
public final ImmutableFormPutResponse withForm(Form value)
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
public boolean equals(@Nullable Object another)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
public String toString()
Prints the immutable valueFormPutResponsewith attribute values.
-
copyOf
public static ImmutableFormPutResponse copyOf(FormPutResponse instance)
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
public static ImmutableFormPutResponse.Builder 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
-
-