Interface CustomFieldsDraft

All Superinterfaces:
Draft<CustomFieldsDraft>

public interface CustomFieldsDraft extends Draft<CustomFieldsDraft>

The representation used when creating or updating a customizable data type with Custom Fields.


Example to create an instance using the builder pattern

     CustomFieldsDraft customFieldsDraft = CustomFieldsDraft.builder()
             .type(typeBuilder -> typeBuilder)
             .build()
 
  • Method Details

    • getType

      @NotNull @Valid @NotNull @Valid TypeResourceIdentifier getType()

      id or key of the Type.

      Returns:
      type
    • getFields

      @Valid @Valid FieldContainer getFields()

      Object containing the Custom Fields for the customized resource or data type.

      Returns:
      fields
    • setType

      void setType(TypeResourceIdentifier type)

      id or key of the Type.

      Parameters:
      type - value to be set
    • setFields

      void setFields(FieldContainer fields)

      Object containing the Custom Fields for the customized resource or data type.

      Parameters:
      fields - value to be set
    • of

      static CustomFieldsDraft of()
      factory method
      Returns:
      instance of CustomFieldsDraft
    • of

      static CustomFieldsDraft of(CustomFieldsDraft template)
      factory method to create a shallow copy CustomFieldsDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of CustomFieldsDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static CustomFieldsDraftBuilder builder()
      builder factory method for CustomFieldsDraft
      Returns:
      builder
    • builder

      static CustomFieldsDraftBuilder builder(CustomFieldsDraft template)
      create builder for CustomFieldsDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCustomFieldsDraft

      default <T> T withCustomFieldsDraft(Function<CustomFieldsDraft,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • of

      static CustomFieldsDraft of(CustomFields template)
    • builder

      static CustomFieldsDraftBuilder builder(CustomFields template)
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<CustomFieldsDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference