Package io.dialob.api.questionnaire
Class ImmutableQuestionnaireMetadata.Builder
java.lang.Object
io.dialob.api.questionnaire.ImmutableQuestionnaireMetadata.Builder
- Enclosing class:
- ImmutableQuestionnaireMetadata
Builds instances of type
ImmutableQuestionnaireMetadata.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionadditionalProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for theadditionalPropertiesmap.build()Builds a newImmutableQuestionnaireMetadata.Initializes the value for thecompletedattribute.Initializes the value for thecreatedattribute.Initializes the value for thecreatorattribute.Initializes the value for theformIdattribute.Initializes the value for theformNameattribute.Initializes the value for theformRevattribute.from(ModifiableQuestionnaireMetadata instance) Fill a builder with attribute values from the providedModifiableQuestionnaireMetadatainstance.from(Questionnaire.Metadata instance) Fill a builder with attribute values from the providedMetadatainstance.Initializes the value for thelabelattribute.Initializes the value for thelanguageattribute.lastAnswer(Date lastAnswer) Initializes the value for thelastAnswerattribute.Initializes the value for theopenedattribute.Initializes the value for theownerattribute.putAdditionalProperties(String key, Object value) Put one entry to theadditionalPropertiesmap.putAdditionalProperties(Map.Entry<String, ? extends Object> entry) Put one entry to theadditionalPropertiesmap.putAllAdditionalProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries toadditionalPropertiesmap.reason(Questionnaire.Metadata.Reason reason) Initializes the value for thereasonattribute.status(Questionnaire.Metadata.Status status) Initializes the value for thestatusattribute.Initializes the value for thesubmitUrlattribute.Initializes the value for thetenantIdattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedModifiableQuestionnaireMetadatainstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedMetadatainstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
formId
Initializes the value for theformIdattribute.- Parameters:
formId- The value for formId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
formName
Initializes the value for theformNameattribute.- Parameters:
formName- The value for formName (can benull)- Returns:
thisbuilder for use in a chained invocation
-
status
Initializes the value for thestatusattribute.If not set, this attribute will have a default value as returned by the initializer of
status.- Parameters:
status- The value for status- Returns:
thisbuilder for use in a chained invocation
-
formRev
Initializes the value for theformRevattribute.- Parameters:
formRev- The value for formRev (can benull)- Returns:
thisbuilder for use in a chained invocation
-
tenantId
Initializes the value for thetenantIdattribute.- Parameters:
tenantId- The value for tenantId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
created
Initializes the value for thecreatedattribute.- Parameters:
created- The value for created (can benull)- Returns:
thisbuilder for use in a chained invocation
-
lastAnswer
Initializes the value for thelastAnswerattribute.- Parameters:
lastAnswer- The value for lastAnswer (can benull)- Returns:
thisbuilder for use in a chained invocation
-
opened
Initializes the value for theopenedattribute.- Parameters:
opened- The value for opened (can benull)- Returns:
thisbuilder for use in a chained invocation
-
completed
Initializes the value for thecompletedattribute.- Parameters:
completed- The value for completed (can benull)- Returns:
thisbuilder for use in a chained invocation
-
label
Initializes the value for thelabelattribute.- Parameters:
label- The value for label (can benull)- Returns:
thisbuilder for use in a chained invocation
-
submitUrl
Initializes the value for thesubmitUrlattribute.- Parameters:
submitUrl- The value for submitUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
reason
Initializes the value for thereasonattribute.- Parameters:
reason- The value for reason (can benull)- Returns:
thisbuilder for use in a chained invocation
-
language
Initializes the value for thelanguageattribute.- Parameters:
language- The value for language (can benull)- Returns:
thisbuilder for use in a chained invocation
-
owner
Initializes the value for theownerattribute.- Parameters:
owner- The value for owner (can benull)- Returns:
thisbuilder for use in a chained invocation
-
creator
Initializes the value for thecreatorattribute.- Parameters:
creator- The value for creator (can benull)- Returns:
thisbuilder for use in a chained invocation
-
putAdditionalProperties
public final ImmutableQuestionnaireMetadata.Builder putAdditionalProperties(@Nullable String key, @Nullable Object value) Put one entry to theadditionalPropertiesmap.- Parameters:
key- The key in the additionalProperties mapvalue- The associated value in the additionalProperties map- Returns:
thisbuilder for use in a chained invocation
-
putAdditionalProperties
public final ImmutableQuestionnaireMetadata.Builder putAdditionalProperties(Map.Entry<String, ? extends Object> entry) Put one entry to theadditionalPropertiesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
additionalProperties
public final ImmutableQuestionnaireMetadata.Builder additionalProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for theadditionalPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the additionalProperties map- Returns:
thisbuilder for use in a chained invocation
-
putAllAdditionalProperties
public final ImmutableQuestionnaireMetadata.Builder putAllAdditionalProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries toadditionalPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the additionalProperties map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableQuestionnaireMetadata.- Returns:
- An immutable instance of Metadata
- Throws:
IllegalStateException- if any required attributes are missing
-