Package io.dialob.client.api
Class ImmutableFormDocument.Builder
- java.lang.Object
-
- io.dialob.client.api.ImmutableFormDocument.Builder
-
- Enclosing class:
- ImmutableFormDocument
@NotThreadSafe public static final class ImmutableFormDocument.Builder extends Object
Builds instances of typeImmutableFormDocument. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableFormDocumentbuild()Builds a newImmutableFormDocument.ImmutableFormDocument.Buildercreated(LocalDateTime created)Initializes the value for thecreatedattribute.ImmutableFormDocument.Builderdata(io.dialob.api.form.Form data)Initializes the value for thedataattribute.ImmutableFormDocument.Builderdescription(String description)Initializes the value for thedescriptionattribute.ImmutableFormDocument.Builderfrom(DialobDocument instance)Fill a builder with attribute values from the providedio.dialob.client.api.DialobDocumentinstance.ImmutableFormDocument.Builderfrom(DialobDocument.FormDocument instance)Fill a builder with attribute values from the providedio.dialob.client.api.DialobDocument.FormDocumentinstance.ImmutableFormDocument.Builderid(String id)Initializes the value for theidattribute.ImmutableFormDocument.Buildername(String name)Initializes the value for thenameattribute.ImmutableFormDocument.Buildertype(DialobDocument.DocumentType type)Initializes the value for thetypeattribute.ImmutableFormDocument.Builderupdated(LocalDateTime updated)Initializes the value for theupdatedattribute.ImmutableFormDocument.Builderversion(String version)Initializes the value for theversionattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableFormDocument.Builder from(DialobDocument.FormDocument instance)
Fill a builder with attribute values from the providedio.dialob.client.api.DialobDocument.FormDocumentinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableFormDocument.Builder from(DialobDocument instance)
Fill a builder with attribute values from the providedio.dialob.client.api.DialobDocumentinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
id
@CanIgnoreReturnValue public final ImmutableFormDocument.Builder id(@Nullable String id)
Initializes the value for theidattribute.- Parameters:
id- The value for id (can benull)- Returns:
thisbuilder for use in a chained invocation
-
version
@CanIgnoreReturnValue public final ImmutableFormDocument.Builder version(@Nullable String version)
Initializes the value for theversionattribute.- Parameters:
version- The value for version (can benull)- Returns:
thisbuilder for use in a chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableFormDocument.Builder description(@Nullable String description)
Initializes the value for thedescriptionattribute.- Parameters:
description- The value for description (can benull)- Returns:
thisbuilder for use in a chained invocation
-
created
@CanIgnoreReturnValue public final ImmutableFormDocument.Builder created(LocalDateTime created)
Initializes the value for thecreatedattribute.- Parameters:
created- The value for created- Returns:
thisbuilder for use in a chained invocation
-
data
@CanIgnoreReturnValue public final ImmutableFormDocument.Builder data(io.dialob.api.form.Form data)
Initializes the value for thedataattribute.- Parameters:
data- The value for data- Returns:
thisbuilder for use in a chained invocation
-
updated
@CanIgnoreReturnValue public final ImmutableFormDocument.Builder updated(LocalDateTime updated)
Initializes the value for theupdatedattribute.- Parameters:
updated- The value for updated- Returns:
thisbuilder for use in a chained invocation
-
type
@CanIgnoreReturnValue public final ImmutableFormDocument.Builder type(DialobDocument.DocumentType type)
Initializes the value for thetypeattribute.If not set, this attribute will have a default value as returned by the initializer of
type.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
name
@CanIgnoreReturnValue public final ImmutableFormDocument.Builder name(String name)
Initializes the value for thenameattribute.If not set, this attribute will have a default value as returned by the initializer of
name.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableFormDocument build()
Builds a newImmutableFormDocument.- Returns:
- An immutable instance of FormDocument
- Throws:
IllegalStateException- if any required attributes are missing
-
-