Interface AssetDraft
- All Superinterfaces:
CustomizableDraft<AssetDraft>
,Draft<AssetDraft>
,WithKey
AssetDraft
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
AssetDraft assetDraft = AssetDraft.builder()
.plusSources(sourcesBuilder -> sourcesBuilder)
.name(nameBuilder -> nameBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic AssetDraftBuilder
builder()
builder factory method for AssetDraftstatic AssetDraftBuilder
builder
(AssetDraft template) create builder for AssetDraft instancestatic AssetDraft
deepCopy
(AssetDraft template) factory method to create a deep copy of AssetDraft@Valid CustomFieldsDraft
Custom Fields defined for the Asset.@Valid LocalizedString
Description of the Asset.getKey()
User-defined identifier for the Asset.@NotNull @Valid LocalizedString
getName()
Name of the Asset.@NotNull @Valid List<AssetSource>
getTags()
Keywords for categorizing and organizing Assets.static AssetDraft
of()
factory methodstatic AssetDraft
of
(AssetDraft template) factory method to create a shallow copy AssetDraftvoid
setCustom
(CustomFieldsDraft custom) Custom Fields defined for the Asset.void
setDescription
(LocalizedString description) Description of the Asset.void
User-defined identifier for 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<AssetDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withAssetDraft
(Function<AssetDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
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 interfaceCustomizableDraft<AssetDraft>
- Returns:
- custom
-
getKey
String getKey()User-defined identifier for the Asset. Must be unique per Category or ProductVariant.
-
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 interfaceCustomizableDraft<AssetDraft>
- Parameters:
custom
- value to be set
-
setKey
User-defined identifier for the Asset. Must be unique per Category or ProductVariant.
- Parameters:
key
- value to be set
-
of
factory method- Returns:
- instance of AssetDraft
-
of
factory method to create a shallow copy AssetDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of AssetDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for AssetDraft- Returns:
- builder
-
builder
create builder for AssetDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withAssetDraft
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
-