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 ProductDraftImportBuilder
builder()
builder factory method for ProductDraftImportstatic ProductDraftImportBuilder
builder
(ProductDraftImport template) create builder for ProductDraftImport instancecopyDeep()
static ProductDraftImport
deepCopy
(ProductDraftImport template) factory method to create a deep copy of ProductDraftImport@Valid List<CategoryKeyReference>
Maps toProductData.categories
.@Valid LocalizedString
Maps toProductData.description
.@NotNull String
getKey()
User-defined unique identifier.@Valid ProductVariantDraftImport
The master ProductVariant.@Valid LocalizedString
Maps toProductData.metaDescription
.@Valid LocalizedString
Maps toProductData.metaKeywords
.@Valid LocalizedString
Maps toProductData.metaTitle
.@NotNull @Valid LocalizedString
getName()
Maps toProductData.name
.Maps toProduct.priceMode
.@NotNull @Valid ProductTypeKeyReference
Maps toProduct.productType
.Determines the published status and current/staged projection of the Product.@Valid SearchKeywords
Maps toProductData.searchKeywords
.@NotNull @Valid LocalizedString
getSlug()
Maps toProductData.slug
.@Valid StateKeyReference
getState()
Maps toProduct.state
.@Valid TaxCategoryKeyReference
Maps toProduct.taxCategory
.@Valid List<ProductVariantDraftImport>
An array of related ProductVariants.static ProductDraftImport
of()
factory methodstatic ProductDraftImport
of
(ProductDraftImport template) factory method to create a shallow copy ProductDraftImportvoid
setAttributes
(Attribute... attributes) set attributesvoid
setAttributes
(List<Attribute> attributes) set attributesvoid
setCategories
(CategoryKeyReference... categories) Maps toProductData.categories
.void
setCategories
(List<CategoryKeyReference> categories) Maps toProductData.categories
.void
setDescription
(LocalizedString description) Maps toProductData.description
.void
User-defined unique identifier.void
setMasterVariant
(ProductVariantDraftImport masterVariant) The master ProductVariant.void
setMetaDescription
(LocalizedString metaDescription) Maps toProductData.metaDescription
.void
setMetaKeywords
(LocalizedString metaKeywords) Maps toProductData.metaKeywords
.void
setMetaTitle
(LocalizedString metaTitle) Maps toProductData.metaTitle
.void
setName
(LocalizedString name) Maps toProductData.name
.void
setPriceMode
(ProductPriceModeEnum priceMode) Maps toProduct.priceMode
.void
setProductType
(ProductTypeKeyReference productType) Maps toProduct.productType
.void
setPublish
(Boolean publish) Determines the published status and current/staged projection of the Product.void
setSearchKeywords
(SearchKeywords searchKeywords) Maps toProductData.searchKeywords
.void
setSlug
(LocalizedString slug) Maps toProductData.slug
.void
setState
(StateKeyReference state) Maps toProduct.state
.void
setTaxCategory
(TaxCategoryKeyReference taxCategory) Maps toProduct.taxCategory
.void
setVariants
(ProductVariantDraftImport... variants) An array of related ProductVariants.void
setVariants
(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> T
withProductDraftImport
(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
key
exists, it is updated with the imported data.- Specified by:
getKey
in interfaceImportResource
- Returns:
- key
-
getProductType
Maps to
Product.productType
. If the referenced ProductType does not exist, thestate
of the ImportOperation will be set tounresolved
until 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, thestate
of the ImportOperation will be set tounresolved
until 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
variants
contains 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, thestate
of the ImportOperation will be set tounresolved
until 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, thestate
of the ImportOperation will be set tounresolved
until 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.priceMode
is not changed.- Returns:
- priceMode
-
setKey
User-defined unique identifier. If a Product with this
key
exists, it is updated with the imported data.- Specified by:
setKey
in interfaceImportResource
- Parameters:
key
- value to be set
-
setProductType
Maps to
Product.productType
. If the referenced ProductType does not exist, thestate
of the ImportOperation will be set tounresolved
until 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, thestate
of the ImportOperation will be set tounresolved
until the referenced Categories are created.- Parameters:
categories
- values to be set
-
setCategories
Maps to
ProductData.categories
. If the referenced Categories do not exist, thestate
of the ImportOperation will be set tounresolved
until 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
variants
contains 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, thestate
of the ImportOperation will be set tounresolved
until 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, thestate
of the ImportOperation will be set tounresolved
until 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.priceMode
is 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:
copyDeep
in 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
-