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 AssetDraftBuilderbuilder()builder factory method for AssetDraftstatic AssetDraftBuilderbuilder(AssetDraft template) create builder for AssetDraft instancecopyDeep()static AssetDraftdeepCopy(AssetDraft template) factory method to create a deep copy of AssetDraft@Valid CustomFieldsDraftCustom Fields defined for the Asset.@Valid LocalizedStringDescription of the Asset.getKey()User-defined identifier for the Asset.@NotNull @Valid LocalizedStringgetName()Name of the Asset.@NotNull @Valid List<AssetSource>getTags()Keywords for categorizing and organizing Assets.static AssetDraftof()factory methodstatic AssetDraftof(AssetDraft template) factory method to create a shallow copy AssetDraftvoidsetCustom(CustomFieldsDraft custom) Custom Fields defined for the Asset.voidsetDescription(LocalizedString description) Description of the Asset.voidUser-defined identifier for the Asset.voidsetName(LocalizedString name) Name of the Asset.voidsetSources(AssetSource... sources) set sourcesvoidsetSources(List<AssetSource> sources) set sourcesvoidKeywords for categorizing and organizing Assets.voidKeywords for categorizing and organizing Assets.static com.fasterxml.jackson.core.type.TypeReference<AssetDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithAssetDraft(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:
getCustomin 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:
setCustomin 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
-
copyDeep
AssetDraft copyDeep() -
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
-