Class ImmutableFormMetadata

java.lang.Object
io.dialob.api.form.ImmutableFormMetadata
All Implemented Interfaces:
Form.Metadata, Serializable

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableFormMetadata extends Object implements Form.Metadata
Immutable implementation of Form.Metadata.

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

See Also:
  • Method Details

    • getLabel

      public String getLabel()
      Specified by:
      getLabel in interface Form.Metadata
      Returns:
      The value of the label attribute
    • getCreated

      public Date getCreated()
      Specified by:
      getCreated in interface Form.Metadata
      Returns:
      The value of the created attribute
    • getLastSaved

      public Date getLastSaved()
      Specified by:
      getLastSaved in interface Form.Metadata
      Returns:
      The value of the lastSaved attribute
    • getValid

      public Boolean getValid()
      Specified by:
      getValid in interface Form.Metadata
      Returns:
      The value of the valid attribute
    • getCreator

      public String getCreator()
      Specified by:
      getCreator in interface Form.Metadata
      Returns:
      The value of the creator attribute
    • getTenantId

      public String getTenantId()
      Specified by:
      getTenantId in interface Form.Metadata
      Returns:
      The value of the tenantId attribute
    • getSavedBy

      public String getSavedBy()
      Specified by:
      getSavedBy in interface Form.Metadata
      Returns:
      The value of the savedBy attribute
    • getLabels

      public Set<String> getLabels()
      Specified by:
      getLabels in interface Form.Metadata
      Returns:
      The value of the labels attribute
    • getDefaultSubmitUrl

      public String getDefaultSubmitUrl()
      Specified by:
      getDefaultSubmitUrl in interface Form.Metadata
      Returns:
      The value of the defaultSubmitUrl attribute
    • getLanguages

      public Set<String> getLanguages()
      Specified by:
      getLanguages in interface Form.Metadata
      Returns:
      The value of the languages attribute
    • getAdditionalProperties

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

      public final ImmutableFormMetadata 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
    • withCreated

      public final ImmutableFormMetadata 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
    • withLastSaved

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

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

      public final ImmutableFormMetadata 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
    • withTenantId

      public final ImmutableFormMetadata 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
    • withSavedBy

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

      public final ImmutableFormMetadata withLabels(String... elements)
      Copy the current immutable object with elements that replace the content of labels.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withLabels

      public final ImmutableFormMetadata withLabels(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of labels. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of labels elements to set
      Returns:
      A modified copy of this object
    • withDefaultSubmitUrl

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

      public final ImmutableFormMetadata withLanguages(String... elements)
      Copy the current immutable object with elements that replace the content of languages.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withLanguages

      public final ImmutableFormMetadata withLanguages(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of languages. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of languages elements to set
      Returns:
      A modified copy of this object
    • withAdditionalProperties

      public final ImmutableFormMetadata 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 ImmutableFormMetadata 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: label, created, lastSaved, valid, creator, tenantId, savedBy, labels, defaultSubmitUrl, languages, 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 ImmutableFormMetadata copyOf(Form.Metadata instance)
      Creates an immutable copy of a Form.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 ImmutableFormMetadata.Builder builder()
      Creates a builder for ImmutableFormMetadata.
       ImmutableFormMetadata.builder()
          .label(String | null) // nullable label
          .created(Date | null) // nullable created
          .lastSaved(Date | null) // nullable lastSaved
          .valid(Boolean | null) // nullable valid
          .creator(String | null) // nullable creator
          .tenantId(String | null) // nullable tenantId
          .savedBy(String | null) // nullable savedBy
          .addLabels|addAllLabels(String) // labels elements
          .defaultSubmitUrl(String | null) // nullable defaultSubmitUrl
          .addLanguages|addAllLanguages(String) // languages elements
          .putAdditionalProperties|putAllAdditionalProperties(String => Object) // additionalProperties mappings
          .build();
       
      Returns:
      A new ImmutableFormMetadata builder