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

     Asset asset = Asset.builder()
             .key("{key}")
             .plusSources(sourcesBuilder -> sourcesBuilder)
             .name(nameBuilder -> nameBuilder)
             .build()
 
  • Method Summary

    Modifier and Type
    Method
    Description
    builder factory method for Asset
    builder(Asset template)
    create builder for Asset instance
    static Asset
    deepCopy(Asset template)
    factory method to create a deep copy of Asset
    @Valid Custom
    The representation to be sent to the server when creating a resource with custom fields.
    A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
    @NotNull String
    User-defined identifier for the asset.
    @NotNull @Valid LocalizedString
    A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
    @NotNull @Valid List<AssetSource>
     
     
    static Asset
    of()
    factory method
    static Asset
    of(Asset template)
    factory method to create a shallow copy Asset
    void
    setCustom(Custom custom)
    The representation to be sent to the server when creating a resource with custom fields.
    void
    A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
    void
    User-defined identifier for the asset.
    void
    A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
    void
    setSources(AssetSource... sources)
    set sources
    void
    set sources
    void
    setTags(String... tags)
    set tags
    void
    set tags
    static com.fasterxml.jackson.core.type.TypeReference<Asset>
    gives a TypeReference for usage with Jackson DataBind
    default <T> T
    accessor map function
  • Method Details

    • getKey

      @NotNull @NotNull String getKey()

      User-defined identifier for the asset. Asset keys are unique inside their container (a product variant or a category).

      Returns:
      key
    • getSources

      @NotNull @Valid @NotNull @Valid List<AssetSource> getSources()
      Returns:
      sources
    • getName

      @NotNull @Valid @NotNull @Valid LocalizedString getName()

      A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.

      {
          "de": "Hundefutter",
          "en": "dog food"
        }
        
      Returns:
      name
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.

      {
          "de": "Hundefutter",
          "en": "dog food"
        }
        
      Returns:
      description
    • getTags

      List<String> getTags()
      Returns:
      tags
    • getCustom

      @Valid @Valid Custom getCustom()

      The representation to be sent to the server when creating a resource with custom fields.

      Returns:
      custom
    • setKey

      void setKey(String key)

      User-defined identifier for the asset. Asset keys are unique inside their container (a product variant or a category).

      Parameters:
      key - value to be set
    • setSources

      void setSources(AssetSource... sources)
      set sources
      Parameters:
      sources - values to be set
    • setSources

      void setSources(List<AssetSource> sources)
      set sources
      Parameters:
      sources - values to be set
    • setName

      void setName(LocalizedString name)

      A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.

      {
          "de": "Hundefutter",
          "en": "dog food"
        }
        
      Parameters:
      name - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.

      {
          "de": "Hundefutter",
          "en": "dog food"
        }
        
      Parameters:
      description - value to be set
    • setTags

      void setTags(String... tags)
      set tags
      Parameters:
      tags - values to be set
    • setTags

      void setTags(List<String> tags)
      set tags
      Parameters:
      tags - values to be set
    • setCustom

      void setCustom(Custom custom)

      The representation to be sent to the server when creating a resource with custom fields.

      Parameters:
      custom - 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