Interface Asset
- All Superinterfaces:
Customizable<Asset>
,WithKey
Asset
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Asset asset = Asset.builder()
.id("{id}")
.plusSources(sourcesBuilder -> sourcesBuilder)
.name(nameBuilder -> nameBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic AssetBuilder
builder()
builder factory method for Assetstatic AssetBuilder
create builder for Asset instancestatic Asset
factory method to create a deep copy of Asset@Valid CustomFields
Custom Fields defined for the Asset.@Valid LocalizedString
Description of the Asset.@NotNull String
getId()
Unique identifier of the Asset.getKey()
User-defined identifier of the Asset.@NotNull @Valid LocalizedString
getName()
Name of the Asset.@NotNull @Valid List<AssetSource>
getTags()
Keywords for categorizing and organizing Assets.static Asset
of()
factory methodstatic Asset
factory method to create a shallow copy Assetvoid
setCustom
(CustomFields custom) Custom Fields defined for the Asset.void
setDescription
(LocalizedString description) Description of the Asset.void
Unique identifier of the Asset.void
User-defined identifier of the Asset.void
setName
(LocalizedString name) Name of the Asset.void
setSources
(AssetSource... sources) set sourcesvoid
setSources
(List<AssetSource> sources) set sourcesvoid
Keywords for categorizing and organizing Assets.void
Keywords for categorizing and organizing Assets.static com.fasterxml.jackson.core.type.TypeReference<Asset>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
-
Method Details
-
getId
Unique identifier of the Asset.
- Returns:
- id
-
getSources
- Returns:
- sources
-
getName
Name of the Asset.
- Returns:
- name
-
getDescription
Description of the Asset.
- Returns:
- description
-
getTags
Keywords for categorizing and organizing Assets.
- Returns:
- tags
-
getCustom
Custom Fields defined for the Asset.
- Specified by:
getCustom
in interfaceCustomizable<Asset>
- Returns:
- custom
-
getKey
String getKey()User-defined identifier of the Asset. It is unique per Category or ProductVariant.
-
setId
Unique identifier of the Asset.
- Parameters:
id
- value to be set
-
setSources
set sources- Parameters:
sources
- values to be set
-
setSources
set sources- Parameters:
sources
- values to be set
-
setName
Name of the Asset.
- Parameters:
name
- value to be set
-
setDescription
Description of the Asset.
- Parameters:
description
- value to be set
-
setTags
Keywords for categorizing and organizing Assets.
- Parameters:
tags
- values to be set
-
setTags
Keywords for categorizing and organizing Assets.
- Parameters:
tags
- values to be set
-
setCustom
Custom Fields defined for the Asset.
- Specified by:
setCustom
in interfaceCustomizable<Asset>
- Parameters:
custom
- value to be set
-
setKey
User-defined identifier of the Asset. It is unique per Category or ProductVariant.
- Parameters:
key
- value to be set
-
of
factory method- Returns:
- instance of Asset
-
of
factory method to create a shallow copy Asset- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of Asset- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Asset- Returns:
- builder
-
builder
create builder for Asset instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withAsset
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-