Interface ProductDraftImport
- All Superinterfaces:
ImportResource
The representation of a Product Draft for the import purpose.
Example to create an instance using the builder pattern
ProductDraftImport productDraftImport = ProductDraftImport.builder()
.key("{key}")
.productType(productTypeBuilder -> productTypeBuilder)
.name(nameBuilder -> nameBuilder)
.slug(slugBuilder -> slugBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProductDraftImportBuilderbuilder()builder factory method for ProductDraftImportstatic ProductDraftImportBuilderbuilder(ProductDraftImport template) create builder for ProductDraftImport instancecopyDeep()static ProductDraftImportdeepCopy(ProductDraftImport template) factory method to create a deep copy of ProductDraftImport@Valid List<CategoryKeyReference>Maps toProductData.categories.@Valid LocalizedStringMaps toProductData.description.@NotNull StringgetKey()User-defined unique identifier.@Valid ProductVariantDraftImportThe master ProductVariant.@Valid LocalizedStringMaps toProductData.metaDescription.@Valid LocalizedStringMaps toProductData.metaKeywords.@Valid LocalizedStringMaps toProductData.metaTitle.@NotNull @Valid LocalizedStringgetName()Maps toProductData.name.Maps toProduct.priceMode.@NotNull @Valid ProductTypeKeyReferenceMaps toProduct.productType.Determines the published status and current/staged projection of the Product.@Valid SearchKeywordsMaps toProductData.searchKeywords.@NotNull @Valid LocalizedStringgetSlug()Maps toProductData.slug.@Valid StateKeyReferencegetState()Maps toProduct.state.@Valid TaxCategoryKeyReferenceMaps toProduct.taxCategory.@Valid List<ProductVariantDraftImport>An array of related ProductVariants.static ProductDraftImportof()factory methodstatic ProductDraftImportof(ProductDraftImport template) factory method to create a shallow copy ProductDraftImportvoidsetAttributes(Attribute... attributes) set attributesvoidsetAttributes(List<Attribute> attributes) set attributesvoidsetCategories(CategoryKeyReference... categories) Maps toProductData.categories.voidsetCategories(List<CategoryKeyReference> categories) Maps toProductData.categories.voidsetDescription(LocalizedString description) Maps toProductData.description.voidUser-defined unique identifier.voidsetMasterVariant(ProductVariantDraftImport masterVariant) The master ProductVariant.voidsetMetaDescription(LocalizedString metaDescription) Maps toProductData.metaDescription.voidsetMetaKeywords(LocalizedString metaKeywords) Maps toProductData.metaKeywords.voidsetMetaTitle(LocalizedString metaTitle) Maps toProductData.metaTitle.voidsetName(LocalizedString name) Maps toProductData.name.voidsetPriceMode(ProductPriceModeEnum priceMode) Maps toProduct.priceMode.voidsetProductType(ProductTypeKeyReference productType) Maps toProduct.productType.voidsetPublish(Boolean publish) Determines the published status and current/staged projection of the Product.voidsetSearchKeywords(SearchKeywords searchKeywords) Maps toProductData.searchKeywords.voidsetSlug(LocalizedString slug) Maps toProductData.slug.voidsetState(StateKeyReference state) Maps toProduct.state.voidsetTaxCategory(TaxCategoryKeyReference taxCategory) Maps toProduct.taxCategory.voidsetVariants(ProductVariantDraftImport... variants) An array of related ProductVariants.voidsetVariants(List<ProductVariantDraftImport> variants) An array of related ProductVariants.static com.fasterxml.jackson.core.type.TypeReference<ProductDraftImport>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithProductDraftImport(Function<ProductDraftImport, T> helper) accessor map functionMethods inherited from interface com.commercetools.importapi.models.common.ImportResource
withImportResource
-
Method Details
-
getKey
User-defined unique identifier. If a Product with this
keyexists, it is updated with the imported data.- Specified by:
getKeyin interfaceImportResource- Returns:
- key
-
getProductType
Maps to
Product.productType. If the referenced ProductType does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced ProductType is created.- Returns:
- productType
-
getName
Maps to
ProductData.name.- Returns:
- name
-
getSlug
Maps to
ProductData.slug.- Returns:
- slug
-
getDescription
Maps to
ProductData.description.- Returns:
- description
-
getCategories
Maps to
ProductData.categories. If the referenced Categories do not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Categories are created.- Returns:
- categories
-
getAttributes
- Returns:
- attributes
-
getMetaTitle
Maps to
ProductData.metaTitle.- Returns:
- metaTitle
-
getMetaDescription
Maps to
ProductData.metaDescription.- Returns:
- metaDescription
-
getMetaKeywords
Maps to
ProductData.metaKeywords.- Returns:
- metaKeywords
-
getMasterVariant
The master ProductVariant. Required if
variantscontains at least one ProductVariant.- Returns:
- masterVariant
-
getVariants
An array of related ProductVariants.
- Returns:
- variants
-
getTaxCategory
Maps to
Product.taxCategory. If the referenced TaxCategory does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced TaxCategory is created.- Returns:
- taxCategory
-
getSearchKeywords
Maps to
ProductData.searchKeywords.- Returns:
- searchKeywords
-
getState
Maps to
Product.state. If the referenced State does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced State is created.- Returns:
- state
-
getPublish
Boolean getPublish()Determines the published status and current/staged projection of the Product. For more information, see Managing the published state of Products.
- Returns:
- publish
-
getPriceMode
ProductPriceModeEnum getPriceMode()Maps to
Product.priceMode. If not provided, the existingProduct.priceModeis not changed.- Returns:
- priceMode
-
setKey
User-defined unique identifier. If a Product with this
keyexists, it is updated with the imported data.- Specified by:
setKeyin interfaceImportResource- Parameters:
key- value to be set
-
setProductType
Maps to
Product.productType. If the referenced ProductType does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced ProductType is created.- Parameters:
productType- value to be set
-
setName
Maps to
ProductData.name.- Parameters:
name- value to be set
-
setSlug
Maps to
ProductData.slug.- Parameters:
slug- value to be set
-
setDescription
Maps to
ProductData.description.- Parameters:
description- value to be set
-
setCategories
Maps to
ProductData.categories. If the referenced Categories do not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Categories are created.- Parameters:
categories- values to be set
-
setCategories
Maps to
ProductData.categories. If the referenced Categories do not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Categories are created.- Parameters:
categories- values to be set
-
setAttributes
set attributes- Parameters:
attributes- values to be set
-
setAttributes
set attributes- Parameters:
attributes- values to be set
-
setMetaTitle
Maps to
ProductData.metaTitle.- Parameters:
metaTitle- value to be set
-
setMetaDescription
Maps to
ProductData.metaDescription.- Parameters:
metaDescription- value to be set
-
setMetaKeywords
Maps to
ProductData.metaKeywords.- Parameters:
metaKeywords- value to be set
-
setMasterVariant
The master ProductVariant. Required if
variantscontains at least one ProductVariant.- Parameters:
masterVariant- value to be set
-
setVariants
An array of related ProductVariants.
- Parameters:
variants- values to be set
-
setVariants
An array of related ProductVariants.
- Parameters:
variants- values to be set
-
setTaxCategory
Maps to
Product.taxCategory. If the referenced TaxCategory does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced TaxCategory is created.- Parameters:
taxCategory- value to be set
-
setSearchKeywords
Maps to
ProductData.searchKeywords.- Parameters:
searchKeywords- value to be set
-
setState
Maps to
Product.state. If the referenced State does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced State is created.- Parameters:
state- value to be set
-
setPublish
Determines the published status and current/staged projection of the Product. For more information, see Managing the published state of Products.
- Parameters:
publish- value to be set
-
setPriceMode
Maps to
Product.priceMode. If not provided, the existingProduct.priceModeis not changed.- Parameters:
priceMode- value to be set
-
of
factory method- Returns:
- instance of ProductDraftImport
-
of
factory method to create a shallow copy ProductDraftImport- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ProductDraftImport copyDeep()- Specified by:
copyDeepin interfaceImportResource
-
deepCopy
factory method to create a deep copy of ProductDraftImport- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductDraftImport- Returns:
- builder
-
builder
create builder for ProductDraftImport instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withProductDraftImport
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
-