Package io.dialob.client.api
Class ImmutableProgramWrapper
- java.lang.Object
-
- io.dialob.client.api.ImmutableProgramWrapper
-
- All Implemented Interfaces:
DialobClient.ProgramEnvirValue<DialobDocument.FormDocument>,DialobClient.ProgramWrapper,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableProgramWrapper extends Object implements DialobClient.ProgramWrapper
Immutable implementation ofDialobClient.ProgramWrapper.Use the builder to create immutable instances:
ImmutableProgramWrapper.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableProgramWrapper.BuilderBuilds instances of typeImmutableProgramWrapper.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableProgramWrapper.Builderbuilder()Creates a builder forImmutableProgramWrapper.static ImmutableProgramWrappercopyOf(DialobClient.ProgramWrapper instance)Creates an immutable copy of aDialobClient.ProgramWrappervalue.booleanequals(Object another)This instance is equal to all instances ofImmutableProgramWrapperthat have equal attribute values.DialobDocument.FormDocumentgetDocument()com.google.common.collect.ImmutableList<DialobClient.ProgramMessage>getErrors()StringgetId()Optional<DialobProgram>getProgram()DialobStore.StoreEntitygetSource()DialobClient.ProgramStatusgetStatus()inthashCode()Computes a hash code from attributes:source,document,id,status,errors,program.StringtoString()Prints the immutable valueProgramWrapperwith attribute values.ImmutableProgramWrapperwithDocument(DialobDocument.FormDocument value)Copy the current immutable object by setting a value for thedocumentattribute.ImmutableProgramWrapperwithErrors(DialobClient.ProgramMessage... elements)Copy the current immutable object with elements that replace the content oferrors.ImmutableProgramWrapperwithErrors(Iterable<? extends DialobClient.ProgramMessage> elements)Copy the current immutable object with elements that replace the content oferrors.ImmutableProgramWrapperwithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableProgramWrapperwithProgram(DialobProgram value)Copy the current immutable object by setting a present value for the optionalprogramattribute.ImmutableProgramWrapperwithProgram(Optional<? extends DialobProgram> optional)Copy the current immutable object by setting an optional value for theprogramattribute.ImmutableProgramWrapperwithSource(DialobStore.StoreEntity value)Copy the current immutable object by setting a value for thesourceattribute.ImmutableProgramWrapperwithStatus(DialobClient.ProgramStatus value)Copy the current immutable object by setting a value for thestatusattribute.
-
-
-
Method Detail
-
getSource
public DialobStore.StoreEntity getSource()
- Specified by:
getSourcein interfaceDialobClient.ProgramEnvirValue<DialobDocument.FormDocument>- Returns:
- The value of the
sourceattribute
-
getDocument
public DialobDocument.FormDocument getDocument()
- Specified by:
getDocumentin interfaceDialobClient.ProgramEnvirValue<DialobDocument.FormDocument>- Returns:
- The value of the
documentattribute
-
getId
public String getId()
- Specified by:
getIdin interfaceDialobClient.ProgramWrapper- Returns:
- The value of the
idattribute
-
getStatus
public DialobClient.ProgramStatus getStatus()
- Specified by:
getStatusin interfaceDialobClient.ProgramWrapper- Returns:
- The value of the
statusattribute
-
getErrors
public com.google.common.collect.ImmutableList<DialobClient.ProgramMessage> getErrors()
- Specified by:
getErrorsin interfaceDialobClient.ProgramWrapper- Returns:
- The value of the
errorsattribute
-
getProgram
public Optional<DialobProgram> getProgram()
- Specified by:
getProgramin interfaceDialobClient.ProgramWrapper- Returns:
- The value of the
programattribute
-
withSource
public final ImmutableProgramWrapper withSource(DialobStore.StoreEntity value)
Copy the current immutable object by setting a value for thesourceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for source- Returns:
- A modified copy of the
thisobject
-
withDocument
public final ImmutableProgramWrapper withDocument(DialobDocument.FormDocument value)
Copy the current immutable object by setting a value for thedocumentattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for document- Returns:
- A modified copy of the
thisobject
-
withId
public final ImmutableProgramWrapper 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
-
withStatus
public final ImmutableProgramWrapper withStatus(DialobClient.ProgramStatus value)
Copy the current immutable object by setting a value for thestatusattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for status- Returns:
- A modified copy of the
thisobject
-
withErrors
public final ImmutableProgramWrapper withErrors(DialobClient.ProgramMessage... 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 ImmutableProgramWrapper withErrors(Iterable<? extends DialobClient.ProgramMessage> 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
-
withProgram
public final ImmutableProgramWrapper withProgram(DialobProgram value)
Copy the current immutable object by setting a present value for the optionalprogramattribute.- Parameters:
value- The value for program- Returns:
- A modified copy of
thisobject
-
withProgram
public final ImmutableProgramWrapper withProgram(Optional<? extends DialobProgram> optional)
Copy the current immutable object by setting an optional value for theprogramattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for program- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableProgramWrapperthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:source,document,id,status,errors,program.
-
toString
public String toString()
Prints the immutable valueProgramWrapperwith attribute values.
-
copyOf
public static ImmutableProgramWrapper copyOf(DialobClient.ProgramWrapper instance)
Creates an immutable copy of aDialobClient.ProgramWrappervalue. 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 ProgramWrapper instance
-
builder
public static ImmutableProgramWrapper.Builder builder()
Creates a builder forImmutableProgramWrapper.ImmutableProgramWrapper.builder() .source(io.dialob.client.api.DialobStore.StoreEntity) // requiredsource.document(io.dialob.client.api.DialobDocument.FormDocument) // requireddocument.id(String) // requiredid.status(io.dialob.client.api.DialobClient.ProgramStatus) // requiredstatus.addErrors|addAllErrors(io.dialob.client.api.DialobClient.ProgramMessage) //errorselements .program(io.dialob.program.DialobProgram) // optionalprogram.build();- Returns:
- A new ImmutableProgramWrapper builder
-
-