Interface Asset


public interface Asset
Asset
Example to create an instance using the builder pattern

     Asset asset = Asset.builder()
             .id("{id}")
             .name(nameBuilder -> nameBuilder)
             .description(descriptionBuilder -> descriptionBuilder)
             .custom(customBuilder -> customBuilder)
             .key("{key}")
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()
      Returns:
      id
    • getName

      @NotNull @Valid @NotNull @Valid LocalizedString getName()
      Returns:
      name
    • getDescription

      @NotNull @Valid @NotNull @Valid LocalizedString getDescription()
      Returns:
      description
    • getCustom

      @NotNull @Valid @NotNull @Valid CustomFields getCustom()
      Returns:
      custom
    • getKey

      @NotNull @NotNull String getKey()
      Returns:
      key
    • setId

      void setId(String id)
      set id
      Parameters:
      id - value to be set
    • setName

      void setName(LocalizedString name)
      set name
      Parameters:
      name - value to be set
    • setDescription

      void setDescription(LocalizedString description)
      set description
      Parameters:
      description - value to be set
    • setCustom

      void setCustom(CustomFields custom)
      set custom
      Parameters:
      custom - value to be set
    • setKey

      void setKey(String key)
      set key
      Parameters:
      key - value to be set
    • of

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

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

      @Nullable static Asset deepCopy(@Nullable Asset template)
      factory method to create a deep copy of Asset
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static AssetBuilder builder()
      builder factory method for Asset
      Returns:
      builder
    • builder

      static AssetBuilder builder(Asset template)
      create builder for Asset instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withAsset

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

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