Class ProductDraftImportBuilder
- All Implemented Interfaces:
Builder<ProductDraftImport>
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()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMaps toProductData.categories.An array of related ProductVariants.attributes(Attribute... attributes) set values to the attributesattributes(List<Attribute> attributes) set value to the attributesbuild()builds ProductDraftImport with checking for non-null required valuesbuilds ProductDraftImport without checking for non-null required valuescategories(CategoryKeyReference... categories) Maps toProductData.categories.categories(List<CategoryKeyReference> categories) Maps toProductData.categories.description(LocalizedString description) Maps toProductData.description.Maps toProductData.description.value of attributes}Maps toProductData.categories.Maps toProductData.description.getKey()User-defined unique identifier.The master ProductVariant.Maps toProductData.metaDescription.Maps toProductData.metaKeywords.Maps toProductData.metaTitle.getName()Maps toProductData.name.Maps toProduct.priceMode.Maps toProduct.productType.Determines the published status and current/staged projection of the Product.Maps toProductData.searchKeywords.getSlug()Maps toProductData.slug.getState()Maps toProduct.state.Maps toProduct.taxCategory.An array of related ProductVariants.User-defined unique identifier.masterVariant(ProductVariantDraftImport masterVariant) The master ProductVariant.The master ProductVariant.metaDescription(LocalizedString metaDescription) Maps toProductData.metaDescription.Maps toProductData.metaDescription.metaKeywords(LocalizedString metaKeywords) Maps toProductData.metaKeywords.Maps toProductData.metaKeywords.metaTitle(LocalizedString metaTitle) Maps toProductData.metaTitle.Maps toProductData.metaTitle.name(LocalizedString name) Maps toProductData.name.Maps toProductData.name.static ProductDraftImportBuilderof()factory method for an instance of ProductDraftImportBuilderstatic ProductDraftImportBuilderof(ProductDraftImport template) create builder for ProductDraftImport instanceplusAttributes(Attribute... attributes) add values to the attributesplusAttributes(Function<AttributeBuilder, Builder<? extends Attribute>> builder) add a value to the attributes using the builder functionplusCategories(CategoryKeyReference... categories) Maps toProductData.categories.Maps toProductData.categories.plusVariants(ProductVariantDraftImport... variants) An array of related ProductVariants.An array of related ProductVariants.priceMode(ProductPriceModeEnum priceMode) Maps toProduct.priceMode.productType(ProductTypeKeyReference productType) Maps toProduct.productType.Maps toProduct.productType.Determines the published status and current/staged projection of the Product.searchKeywords(SearchKeywords searchKeywords) Maps toProductData.searchKeywords.Maps toProductData.searchKeywords.Maps toProductData.categories.An array of related ProductVariants.slug(LocalizedString slug) Maps toProductData.slug.Maps toProductData.slug.state(StateKeyReference state) Maps toProduct.state.Maps toProduct.state.taxCategory(TaxCategoryKeyReference taxCategory) Maps toProduct.taxCategory.Maps toProduct.taxCategory.variants(ProductVariantDraftImport... variants) An array of related ProductVariants.variants(List<ProductVariantDraftImport> variants) An array of related ProductVariants.withAttributes(Function<AttributeBuilder, Builder<? extends Attribute>> builder) set the value to the attributes using the builder functionMaps toProductData.categories.Maps toProductData.description.The master ProductVariant.Maps toProductData.metaDescription.Maps toProductData.metaKeywords.Maps toProductData.metaTitle.Maps toProductData.name.Maps toProduct.productType.Maps toProductData.searchKeywords.Maps toProductData.slug.Maps toProduct.state.Maps toProduct.taxCategory.An array of related ProductVariants.
-
Constructor Details
-
ProductDraftImportBuilder
public ProductDraftImportBuilder()
-
-
Method Details
-
key
User-defined unique identifier. If a Product with this
keyexists, it is updated with the imported data.- Parameters:
key- value to be set- Returns:
- Builder
-
productType
public ProductDraftImportBuilder productType(Function<ProductTypeKeyReferenceBuilder, ProductTypeKeyReferenceBuilder> builder) Maps to
Product.productType. If the referenced ProductType does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced ProductType is created.- Parameters:
builder- function to build the productType value- Returns:
- Builder
-
withProductType
public ProductDraftImportBuilder withProductType(Function<ProductTypeKeyReferenceBuilder, ProductTypeKeyReference> builder) Maps to
Product.productType. If the referenced ProductType does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced ProductType is created.- Parameters:
builder- function to build the productType value- Returns:
- Builder
-
productType
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- Returns:
- Builder
-
name
public ProductDraftImportBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Maps to
ProductData.name.- Parameters:
builder- function to build the name value- Returns:
- Builder
-
withName
Maps to
ProductData.name.- Parameters:
builder- function to build the name value- Returns:
- Builder
-
name
Maps to
ProductData.name.- Parameters:
name- value to be set- Returns:
- Builder
-
slug
public ProductDraftImportBuilder slug(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Maps to
ProductData.slug.- Parameters:
builder- function to build the slug value- Returns:
- Builder
-
withSlug
Maps to
ProductData.slug.- Parameters:
builder- function to build the slug value- Returns:
- Builder
-
slug
Maps to
ProductData.slug.- Parameters:
slug- value to be set- Returns:
- Builder
-
description
public ProductDraftImportBuilder description(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Maps to
ProductData.description.- Parameters:
builder- function to build the description value- Returns:
- Builder
-
withDescription
public ProductDraftImportBuilder withDescription(Function<LocalizedStringBuilder, LocalizedString> builder) Maps to
ProductData.description.- Parameters:
builder- function to build the description value- Returns:
- Builder
-
description
Maps to
ProductData.description.- Parameters:
description- value to be set- Returns:
- Builder
-
categories
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- value to be set- Returns:
- Builder
-
categories
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- value to be set- Returns:
- Builder
-
plusCategories
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- value to be set- Returns:
- Builder
-
plusCategories
public ProductDraftImportBuilder plusCategories(Function<CategoryKeyReferenceBuilder, CategoryKeyReferenceBuilder> builder) Maps to
ProductData.categories. If the referenced Categories do not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Categories are created.- Parameters:
builder- function to build the categories value- Returns:
- Builder
-
withCategories
public ProductDraftImportBuilder withCategories(Function<CategoryKeyReferenceBuilder, CategoryKeyReferenceBuilder> builder) Maps to
ProductData.categories. If the referenced Categories do not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Categories are created.- Parameters:
builder- function to build the categories value- Returns:
- Builder
-
addCategories
public ProductDraftImportBuilder addCategories(Function<CategoryKeyReferenceBuilder, CategoryKeyReference> builder) Maps to
ProductData.categories. If the referenced Categories do not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Categories are created.- Parameters:
builder- function to build the categories value- Returns:
- Builder
-
setCategories
public ProductDraftImportBuilder setCategories(Function<CategoryKeyReferenceBuilder, CategoryKeyReference> builder) Maps to
ProductData.categories. If the referenced Categories do not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Categories are created.- Parameters:
builder- function to build the categories value- Returns:
- Builder
-
attributes
set values to the attributes- Parameters:
attributes- value to be set- Returns:
- Builder
-
attributes
set value to the attributes- Parameters:
attributes- value to be set- Returns:
- Builder
-
plusAttributes
add values to the attributes- Parameters:
attributes- value to be set- Returns:
- Builder
-
plusAttributes
public ProductDraftImportBuilder plusAttributes(Function<AttributeBuilder, Builder<? extends Attribute>> builder) add a value to the attributes using the builder function- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
withAttributes
public ProductDraftImportBuilder withAttributes(Function<AttributeBuilder, Builder<? extends Attribute>> builder) set the value to the attributes using the builder function- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
metaTitle
public ProductDraftImportBuilder metaTitle(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Maps to
ProductData.metaTitle.- Parameters:
builder- function to build the metaTitle value- Returns:
- Builder
-
withMetaTitle
public ProductDraftImportBuilder withMetaTitle(Function<LocalizedStringBuilder, LocalizedString> builder) Maps to
ProductData.metaTitle.- Parameters:
builder- function to build the metaTitle value- Returns:
- Builder
-
metaTitle
Maps to
ProductData.metaTitle.- Parameters:
metaTitle- value to be set- Returns:
- Builder
-
metaDescription
public ProductDraftImportBuilder metaDescription(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Maps to
ProductData.metaDescription.- Parameters:
builder- function to build the metaDescription value- Returns:
- Builder
-
withMetaDescription
public ProductDraftImportBuilder withMetaDescription(Function<LocalizedStringBuilder, LocalizedString> builder) Maps to
ProductData.metaDescription.- Parameters:
builder- function to build the metaDescription value- Returns:
- Builder
-
metaDescription
Maps to
ProductData.metaDescription.- Parameters:
metaDescription- value to be set- Returns:
- Builder
-
metaKeywords
public ProductDraftImportBuilder metaKeywords(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Maps to
ProductData.metaKeywords.- Parameters:
builder- function to build the metaKeywords value- Returns:
- Builder
-
withMetaKeywords
public ProductDraftImportBuilder withMetaKeywords(Function<LocalizedStringBuilder, LocalizedString> builder) Maps to
ProductData.metaKeywords.- Parameters:
builder- function to build the metaKeywords value- Returns:
- Builder
-
metaKeywords
Maps to
ProductData.metaKeywords.- Parameters:
metaKeywords- value to be set- Returns:
- Builder
-
masterVariant
public ProductDraftImportBuilder masterVariant(Function<ProductVariantDraftImportBuilder, ProductVariantDraftImportBuilder> builder) The master ProductVariant. Required if
variantscontains at least one ProductVariant.- Parameters:
builder- function to build the masterVariant value- Returns:
- Builder
-
withMasterVariant
public ProductDraftImportBuilder withMasterVariant(Function<ProductVariantDraftImportBuilder, ProductVariantDraftImport> builder) The master ProductVariant. Required if
variantscontains at least one ProductVariant.- Parameters:
builder- function to build the masterVariant value- Returns:
- Builder
-
masterVariant
The master ProductVariant. Required if
variantscontains at least one ProductVariant.- Parameters:
masterVariant- value to be set- Returns:
- Builder
-
variants
An array of related ProductVariants.
- Parameters:
variants- value to be set- Returns:
- Builder
-
variants
An array of related ProductVariants.
- Parameters:
variants- value to be set- Returns:
- Builder
-
plusVariants
An array of related ProductVariants.
- Parameters:
variants- value to be set- Returns:
- Builder
-
plusVariants
public ProductDraftImportBuilder plusVariants(Function<ProductVariantDraftImportBuilder, ProductVariantDraftImportBuilder> builder) An array of related ProductVariants.
- Parameters:
builder- function to build the variants value- Returns:
- Builder
-
withVariants
public ProductDraftImportBuilder withVariants(Function<ProductVariantDraftImportBuilder, ProductVariantDraftImportBuilder> builder) An array of related ProductVariants.
- Parameters:
builder- function to build the variants value- Returns:
- Builder
-
addVariants
public ProductDraftImportBuilder addVariants(Function<ProductVariantDraftImportBuilder, ProductVariantDraftImport> builder) An array of related ProductVariants.
- Parameters:
builder- function to build the variants value- Returns:
- Builder
-
setVariants
public ProductDraftImportBuilder setVariants(Function<ProductVariantDraftImportBuilder, ProductVariantDraftImport> builder) An array of related ProductVariants.
- Parameters:
builder- function to build the variants value- Returns:
- Builder
-
taxCategory
public ProductDraftImportBuilder taxCategory(Function<TaxCategoryKeyReferenceBuilder, TaxCategoryKeyReferenceBuilder> builder) Maps to
Product.taxCategory. If the referenced TaxCategory does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced TaxCategory is created.- Parameters:
builder- function to build the taxCategory value- Returns:
- Builder
-
withTaxCategory
public ProductDraftImportBuilder withTaxCategory(Function<TaxCategoryKeyReferenceBuilder, TaxCategoryKeyReference> builder) Maps to
Product.taxCategory. If the referenced TaxCategory does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced TaxCategory is created.- Parameters:
builder- function to build the taxCategory value- Returns:
- Builder
-
taxCategory
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- Returns:
- Builder
-
searchKeywords
public ProductDraftImportBuilder searchKeywords(Function<SearchKeywordsBuilder, SearchKeywordsBuilder> builder) Maps to
ProductData.searchKeywords.- Parameters:
builder- function to build the searchKeywords value- Returns:
- Builder
-
withSearchKeywords
public ProductDraftImportBuilder withSearchKeywords(Function<SearchKeywordsBuilder, SearchKeywords> builder) Maps to
ProductData.searchKeywords.- Parameters:
builder- function to build the searchKeywords value- Returns:
- Builder
-
searchKeywords
Maps to
ProductData.searchKeywords.- Parameters:
searchKeywords- value to be set- Returns:
- Builder
-
state
public ProductDraftImportBuilder state(Function<StateKeyReferenceBuilder, StateKeyReferenceBuilder> builder) Maps to
Product.state. If the referenced State does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced State is created.- Parameters:
builder- function to build the state value- Returns:
- Builder
-
withState
public ProductDraftImportBuilder withState(Function<StateKeyReferenceBuilder, StateKeyReference> builder) Maps to
Product.state. If the referenced State does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced State is created.- Parameters:
builder- function to build the state value- Returns:
- Builder
-
state
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- Returns:
- Builder
-
publish
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- Returns:
- Builder
-
priceMode
Maps to
Product.priceMode. If not provided, the existingProduct.priceModeis not changed.- Parameters:
priceMode- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier. If a Product with this
keyexists, it is updated with the imported data.- 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
value of attributes}- 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
Determines the published status and current/staged projection of the Product. For more information, see Managing the published state of Products.
- Returns:
- publish
-
getPriceMode
Maps to
Product.priceMode. If not provided, the existingProduct.priceModeis not changed.- Returns:
- priceMode
-
build
builds ProductDraftImport with checking for non-null required values- Specified by:
buildin interfaceBuilder<ProductDraftImport>- Returns:
- ProductDraftImport
-
buildUnchecked
builds ProductDraftImport without checking for non-null required values- Returns:
- ProductDraftImport
-
of
factory method for an instance of ProductDraftImportBuilder- Returns:
- builder
-
of
create builder for ProductDraftImport instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-