Class ImmutableQuestionnaireMetadata

java.lang.Object
io.dialob.api.questionnaire.Questionnaire.Metadata
io.dialob.api.questionnaire.ImmutableQuestionnaireMetadata
All Implemented Interfaces:
Serializable

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableQuestionnaireMetadata extends Questionnaire.Metadata
Immutable implementation of Questionnaire.Metadata.

Use the builder to create immutable instances: ImmutableQuestionnaireMetadata.builder().

See Also:
  • Method Details

    • getFormId

      public String getFormId()
      Specified by:
      getFormId in class Questionnaire.Metadata
      Returns:
      The value of the formId attribute
    • getFormName

      public String getFormName()
      Specified by:
      getFormName in class Questionnaire.Metadata
      Returns:
      The value of the formName attribute
    • getStatus

      public Questionnaire.Metadata.Status getStatus()
      Overrides:
      getStatus in class Questionnaire.Metadata
      Returns:
      The value of the status attribute
    • getFormRev

      public String getFormRev()
      Specified by:
      getFormRev in class Questionnaire.Metadata
      Returns:
      The value of the formRev attribute
    • getTenantId

      public String getTenantId()
      Specified by:
      getTenantId in class Questionnaire.Metadata
      Returns:
      The value of the tenantId attribute
    • getCreated

      public Date getCreated()
      Specified by:
      getCreated in class Questionnaire.Metadata
      Returns:
      The value of the created attribute
    • getLastAnswer

      public Date getLastAnswer()
      Specified by:
      getLastAnswer in class Questionnaire.Metadata
      Returns:
      The value of the lastAnswer attribute
    • getOpened

      public Date getOpened()
      Specified by:
      getOpened in class Questionnaire.Metadata
      Returns:
      The value of the opened attribute
    • getCompleted

      public Date getCompleted()
      Specified by:
      getCompleted in class Questionnaire.Metadata
      Returns:
      The value of the completed attribute
    • getLabel

      public String getLabel()
      Specified by:
      getLabel in class Questionnaire.Metadata
      Returns:
      The value of the label attribute
    • getSubmitUrl

      public String getSubmitUrl()
      Specified by:
      getSubmitUrl in class Questionnaire.Metadata
      Returns:
      The value of the submitUrl attribute
    • getReason

      public Questionnaire.Metadata.Reason getReason()
      Completion reason, null if normally completed.
      Specified by:
      getReason in class Questionnaire.Metadata
    • getLanguage

      public String getLanguage()
      Specified by:
      getLanguage in class Questionnaire.Metadata
      Returns:
      The value of the language attribute
    • getOwner

      public String getOwner()
      userId of document owner
      Specified by:
      getOwner in class Questionnaire.Metadata
    • getCreator

      public String getCreator()
      userId of one who created questionnaire
      Specified by:
      getCreator in class Questionnaire.Metadata
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Specified by:
      getAdditionalProperties in class Questionnaire.Metadata
      Returns:
      The value of the additionalProperties attribute
    • withFormId

      public final ImmutableQuestionnaireMetadata withFormId(String value)
      Copy the current immutable object by setting a value for the formId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for formId (can be null)
      Returns:
      A modified copy of the this object
    • withFormName

      public final ImmutableQuestionnaireMetadata withFormName(String value)
      Copy the current immutable object by setting a value for the formName attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for formName (can be null)
      Returns:
      A modified copy of the this object
    • withStatus

      Copy the current immutable object by setting a value for the status attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for status
      Returns:
      A modified copy of the this object
    • withFormRev

      public final ImmutableQuestionnaireMetadata withFormRev(String value)
      Copy the current immutable object by setting a value for the formRev attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for formRev (can be null)
      Returns:
      A modified copy of the this object
    • withTenantId

      public final ImmutableQuestionnaireMetadata withTenantId(String value)
      Copy the current immutable object by setting a value for the tenantId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for tenantId (can be null)
      Returns:
      A modified copy of the this object
    • withCreated

      public final ImmutableQuestionnaireMetadata withCreated(Date value)
      Copy the current immutable object by setting a value for the created attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for created (can be null)
      Returns:
      A modified copy of the this object
    • withLastAnswer

      public final ImmutableQuestionnaireMetadata withLastAnswer(Date value)
      Copy the current immutable object by setting a value for the lastAnswer attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for lastAnswer (can be null)
      Returns:
      A modified copy of the this object
    • withOpened

      public final ImmutableQuestionnaireMetadata withOpened(Date value)
      Copy the current immutable object by setting a value for the opened attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for opened (can be null)
      Returns:
      A modified copy of the this object
    • withCompleted

      public final ImmutableQuestionnaireMetadata withCompleted(Date value)
      Copy the current immutable object by setting a value for the completed attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for completed (can be null)
      Returns:
      A modified copy of the this object
    • withLabel

      public final ImmutableQuestionnaireMetadata withLabel(String value)
      Copy the current immutable object by setting a value for the label attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for label (can be null)
      Returns:
      A modified copy of the this object
    • withSubmitUrl

      public final ImmutableQuestionnaireMetadata withSubmitUrl(String value)
      Copy the current immutable object by setting a value for the submitUrl attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for submitUrl (can be null)
      Returns:
      A modified copy of the this object
    • withReason

      Copy the current immutable object by setting a value for the reason attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for reason (can be null)
      Returns:
      A modified copy of the this object
    • withLanguage

      public final ImmutableQuestionnaireMetadata withLanguage(String value)
      Copy the current immutable object by setting a value for the language attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for language (can be null)
      Returns:
      A modified copy of the this object
    • withOwner

      public final ImmutableQuestionnaireMetadata withOwner(String value)
      Copy the current immutable object by setting a value for the owner attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for owner (can be null)
      Returns:
      A modified copy of the this object
    • withCreator

      public final ImmutableQuestionnaireMetadata withCreator(String value)
      Copy the current immutable object by setting a value for the creator attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for creator (can be null)
      Returns:
      A modified copy of the this object
    • withAdditionalProperties

      public final ImmutableQuestionnaireMetadata withAdditionalProperties(Map<String,? extends Object> entries)
      Copy the current immutable object by replacing the additionalProperties map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the additionalProperties map
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableQuestionnaireMetadata that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: formId, formName, status, formRev, tenantId, created, lastAnswer, opened, completed, label, submitUrl, reason, language, owner, creator, additionalProperties.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value Metadata with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableQuestionnaireMetadata copyOf(Questionnaire.Metadata instance)
      Creates an immutable copy of a Questionnaire.Metadata value. 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 Metadata instance
    • builder

      public static ImmutableQuestionnaireMetadata.Builder builder()
      Creates a builder for ImmutableQuestionnaireMetadata.
       ImmutableQuestionnaireMetadata.builder()
          .formId(String | null) // nullable formId
          .formName(String | null) // nullable formName
          .status(io.dialob.api.questionnaire.Questionnaire.Metadata.Status) // optional status
          .formRev(String | null) // nullable formRev
          .tenantId(String | null) // nullable tenantId
          .created(Date | null) // nullable created
          .lastAnswer(Date | null) // nullable lastAnswer
          .opened(Date | null) // nullable opened
          .completed(Date | null) // nullable completed
          .label(String | null) // nullable label
          .submitUrl(String | null) // nullable submitUrl
          .reason(io.dialob.api.questionnaire.Questionnaire.Metadata.Reason | null) // nullable reason
          .language(String | null) // nullable language
          .owner(String | null) // nullable owner
          .creator(String | null) // nullable creator
          .putAdditionalProperties|putAllAdditionalProperties(String => Object) // additionalProperties mappings
          .build();
       
      Returns:
      A new ImmutableQuestionnaireMetadata builder