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
-
Method Summary
Modifier and TypeMethodDescriptionThe Reference to the Categories with which the ProductDraft is associated.An array of related Product Variants.build()
builds ProductDraftImport with checking for non-null required valuesbuilds ProductDraftImport without checking for non-null required valuescategories
(CategoryKeyReference... categories) The Reference to the Categories with which the ProductDraft is associated.categories
(List<CategoryKeyReference> categories) The Reference to the Categories with which the ProductDraft is associated.description
(LocalizedString description) Maps toProduct.description
.Maps toProduct.description
.The Reference to the Categories with which the ProductDraft is associated.Maps toProduct.description
.getKey()
User-defined unique identifier.The master Product variant.A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.getName()
value of name}Determines the type of Prices the API uses.TheproductType
of a Product.Determines the published status and current/staged projection of the Product.Search keywords are primarily used by the suggester but are also considered for the full-text search.getSlug()
Human-readable identifiers usually used as deep-link URL to the related product.getState()
The Reference to the State with which the ProductDraft is associated.The Reference to the TaxCategory with which the ProductDraft is associated.An array of related Product Variants.User-defined unique identifier.masterVariant
(ProductVariantDraftImport masterVariant) The master Product variant.The master Product variant.metaDescription
(LocalizedString metaDescription) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.metaKeywords
(LocalizedString metaKeywords) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.metaTitle
(LocalizedString metaTitle) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.name
(LocalizedString name) set the value to the nameset the value to the name using the builder functionstatic ProductDraftImportBuilder
of()
factory method for an instance of ProductDraftImportBuilderstatic ProductDraftImportBuilder
of
(ProductDraftImport template) create builder for ProductDraftImport instanceplusCategories
(CategoryKeyReference... categories) The Reference to the Categories with which the ProductDraft is associated.The Reference to the Categories with which the ProductDraft is associated.plusVariants
(ProductVariantDraftImport... variants) An array of related Product Variants.An array of related Product Variants.priceMode
(ProductPriceModeEnum priceMode) Determines the type of Prices the API uses.productType
(ProductTypeKeyReference productType) TheproductType
of a Product.TheproductType
of a Product.Determines the published status and current/staged projection of the Product.searchKeywords
(SearchKeywords searchKeywords) Search keywords are primarily used by the suggester but are also considered for the full-text search.Search keywords are primarily used by the suggester but are also considered for the full-text search.The Reference to the Categories with which the ProductDraft is associated.An array of related Product Variants.slug
(LocalizedString slug) Human-readable identifiers usually used as deep-link URL to the related product.Human-readable identifiers usually used as deep-link URL to the related product.state
(StateKeyReference state) The Reference to the State with which the ProductDraft is associated.The Reference to the State with which the ProductDraft is associated.taxCategory
(TaxCategoryKeyReference taxCategory) The Reference to the TaxCategory with which the ProductDraft is associated.The Reference to the TaxCategory with which the ProductDraft is associated.variants
(ProductVariantDraftImport... variants) An array of related Product Variants.variants
(List<ProductVariantDraftImport> variants) An array of related Product Variants.The Reference to the Categories with which the ProductDraft is associated.Maps toProduct.description
.The master Product variant.A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.set the value to the name using the builder functionTheproductType
of a Product.Search keywords are primarily used by the suggester but are also considered for the full-text search.Human-readable identifiers usually used as deep-link URL to the related product.The Reference to the State with which the ProductDraft is associated.The Reference to the TaxCategory with which the ProductDraft is associated.An array of related Product Variants.
-
Constructor Details
-
ProductDraftImportBuilder
public ProductDraftImportBuilder()
-
-
Method Details
-
key
User-defined unique identifier. If a Product with this
key
exists, it will be updated with the imported data.- Parameters:
key
- value to be set- Returns:
- Builder
-
productType
public ProductDraftImportBuilder productType(Function<ProductTypeKeyReferenceBuilder, ProductTypeKeyReferenceBuilder> builder) The
productType
of a Product. Maps toProduct.productType
. The Reference to the ProductType with which the ProductDraft is associated. If referenced ProductType does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary ProductType is created.- Parameters:
builder
- function to build the productType value- Returns:
- Builder
-
withProductType
public ProductDraftImportBuilder withProductType(Function<ProductTypeKeyReferenceBuilder, ProductTypeKeyReference> builder) The
productType
of a Product. Maps toProduct.productType
. The Reference to the ProductType with which the ProductDraft is associated. If referenced ProductType does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary ProductType is created.- Parameters:
builder
- function to build the productType value- Returns:
- Builder
-
productType
The
productType
of a Product. Maps toProduct.productType
. The Reference to the ProductType with which the ProductDraft is associated. If referenced ProductType does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary ProductType is created.- Parameters:
productType
- value to be set- Returns:
- Builder
-
name
public ProductDraftImportBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) set the value to the name using the builder function- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
set the value to the name using the builder function- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
set the value to the name- Parameters:
name
- value to be set- Returns:
- Builder
-
slug
public ProductDraftImportBuilder slug(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Human-readable identifiers usually used as deep-link URL to the related product. Each slug must be unique across a project, but a product can have the same slug for different languages. Allowed are alphabetic, numeric, underscore (_) and hyphen (-) characters.
- Parameters:
builder
- function to build the slug value- Returns:
- Builder
-
withSlug
Human-readable identifiers usually used as deep-link URL to the related product. Each slug must be unique across a project, but a product can have the same slug for different languages. Allowed are alphabetic, numeric, underscore (_) and hyphen (-) characters.
- Parameters:
builder
- function to build the slug value- Returns:
- Builder
-
slug
Human-readable identifiers usually used as deep-link URL to the related product. Each slug must be unique across a project, but a product can have the same slug for different languages. Allowed are alphabetic, numeric, underscore (_) and hyphen (-) characters.
- Parameters:
slug
- value to be set- Returns:
- Builder
-
description
public ProductDraftImportBuilder description(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Maps to
Product.description
.- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
withDescription
public ProductDraftImportBuilder withDescription(Function<LocalizedStringBuilder, LocalizedString> builder) Maps to
Product.description
.- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
description
Maps to
Product.description
.- Parameters:
description
- value to be set- Returns:
- Builder
-
categories
The Reference to the Categories with which the ProductDraft is associated. If referenced Categories do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Categories are created.- Parameters:
categories
- value to be set- Returns:
- Builder
-
categories
The Reference to the Categories with which the ProductDraft is associated. If referenced Categories do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Categories are created.- Parameters:
categories
- value to be set- Returns:
- Builder
-
plusCategories
The Reference to the Categories with which the ProductDraft is associated. If referenced Categories do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Categories are created.- Parameters:
categories
- value to be set- Returns:
- Builder
-
plusCategories
public ProductDraftImportBuilder plusCategories(Function<CategoryKeyReferenceBuilder, CategoryKeyReferenceBuilder> builder) The Reference to the Categories with which the ProductDraft is associated. If referenced Categories do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Categories are created.- Parameters:
builder
- function to build the categories value- Returns:
- Builder
-
withCategories
public ProductDraftImportBuilder withCategories(Function<CategoryKeyReferenceBuilder, CategoryKeyReferenceBuilder> builder) The Reference to the Categories with which the ProductDraft is associated. If referenced Categories do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Categories are created.- Parameters:
builder
- function to build the categories value- Returns:
- Builder
-
addCategories
public ProductDraftImportBuilder addCategories(Function<CategoryKeyReferenceBuilder, CategoryKeyReference> builder) The Reference to the Categories with which the ProductDraft is associated. If referenced Categories do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Categories are created.- Parameters:
builder
- function to build the categories value- Returns:
- Builder
-
setCategories
public ProductDraftImportBuilder setCategories(Function<CategoryKeyReferenceBuilder, CategoryKeyReference> builder) The Reference to the Categories with which the ProductDraft is associated. If referenced Categories do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Categories are created.- Parameters:
builder
- function to build the categories value- Returns:
- Builder
-
metaTitle
public ProductDraftImportBuilder metaTitle(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Parameters:
builder
- function to build the metaTitle value- Returns:
- Builder
-
withMetaTitle
public ProductDraftImportBuilder withMetaTitle(Function<LocalizedStringBuilder, LocalizedString> builder) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Parameters:
builder
- function to build the metaTitle value- Returns:
- Builder
-
metaTitle
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Parameters:
metaTitle
- value to be set- Returns:
- Builder
-
metaDescription
public ProductDraftImportBuilder metaDescription(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Parameters:
builder
- function to build the metaDescription value- Returns:
- Builder
-
withMetaDescription
public ProductDraftImportBuilder withMetaDescription(Function<LocalizedStringBuilder, LocalizedString> builder) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Parameters:
builder
- function to build the metaDescription value- Returns:
- Builder
-
metaDescription
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Parameters:
metaDescription
- value to be set- Returns:
- Builder
-
metaKeywords
public ProductDraftImportBuilder metaKeywords(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Parameters:
builder
- function to build the metaKeywords value- Returns:
- Builder
-
withMetaKeywords
public ProductDraftImportBuilder withMetaKeywords(Function<LocalizedStringBuilder, LocalizedString> builder) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Parameters:
builder
- function to build the metaKeywords value- Returns:
- Builder
-
metaKeywords
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Parameters:
metaKeywords
- value to be set- Returns:
- Builder
-
masterVariant
public ProductDraftImportBuilder masterVariant(Function<ProductVariantDraftImportBuilder, ProductVariantDraftImportBuilder> builder) The master Product variant. Required if the
variants
array contains a Product Variant.- Parameters:
builder
- function to build the masterVariant value- Returns:
- Builder
-
withMasterVariant
public ProductDraftImportBuilder withMasterVariant(Function<ProductVariantDraftImportBuilder, ProductVariantDraftImport> builder) The master Product variant. Required if the
variants
array contains a Product Variant.- Parameters:
builder
- function to build the masterVariant value- Returns:
- Builder
-
masterVariant
The master Product variant. Required if the
variants
array contains a Product Variant.- Parameters:
masterVariant
- value to be set- Returns:
- Builder
-
variants
An array of related Product Variants.
- Parameters:
variants
- value to be set- Returns:
- Builder
-
variants
An array of related Product Variants.
- Parameters:
variants
- value to be set- Returns:
- Builder
-
plusVariants
An array of related Product Variants.
- Parameters:
variants
- value to be set- Returns:
- Builder
-
plusVariants
public ProductDraftImportBuilder plusVariants(Function<ProductVariantDraftImportBuilder, ProductVariantDraftImportBuilder> builder) An array of related Product Variants.
- Parameters:
builder
- function to build the variants value- Returns:
- Builder
-
withVariants
public ProductDraftImportBuilder withVariants(Function<ProductVariantDraftImportBuilder, ProductVariantDraftImportBuilder> builder) An array of related Product Variants.
- Parameters:
builder
- function to build the variants value- Returns:
- Builder
-
addVariants
public ProductDraftImportBuilder addVariants(Function<ProductVariantDraftImportBuilder, ProductVariantDraftImport> builder) An array of related Product Variants.
- Parameters:
builder
- function to build the variants value- Returns:
- Builder
-
setVariants
public ProductDraftImportBuilder setVariants(Function<ProductVariantDraftImportBuilder, ProductVariantDraftImport> builder) An array of related Product Variants.
- Parameters:
builder
- function to build the variants value- Returns:
- Builder
-
taxCategory
public ProductDraftImportBuilder taxCategory(Function<TaxCategoryKeyReferenceBuilder, TaxCategoryKeyReferenceBuilder> builder) The Reference to the TaxCategory with which the ProductDraft is associated. If referenced TaxCategory does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary TaxCategory is created.- Parameters:
builder
- function to build the taxCategory value- Returns:
- Builder
-
withTaxCategory
public ProductDraftImportBuilder withTaxCategory(Function<TaxCategoryKeyReferenceBuilder, TaxCategoryKeyReference> builder) The Reference to the TaxCategory with which the ProductDraft is associated. If referenced TaxCategory does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary TaxCategory is created.- Parameters:
builder
- function to build the taxCategory value- Returns:
- Builder
-
taxCategory
The Reference to the TaxCategory with which the ProductDraft is associated. If referenced TaxCategory does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary TaxCategory is created.- Parameters:
taxCategory
- value to be set- Returns:
- Builder
-
searchKeywords
public ProductDraftImportBuilder searchKeywords(Function<SearchKeywordsBuilder, SearchKeywordsBuilder> builder) Search keywords are primarily used by the suggester but are also considered for the full-text search. SearchKeywords is a JSON object where the keys are of IETF language tag. The value to a language tag key is an array of SearchKeyword for the specific language.
{ "en": [ { "text": "Multi tool" }, { "text": "Swiss Army Knife", "suggestTokenizer": { "type": "whitespace" } } ], "de": [ { "text": "Schweizer Messer", "suggestTokenizer": { "type": "custom", "inputs": ["schweizer messer", "offiziersmesser", "sackmesser"] } } ] }
- Parameters:
builder
- function to build the searchKeywords value- Returns:
- Builder
-
withSearchKeywords
public ProductDraftImportBuilder withSearchKeywords(Function<SearchKeywordsBuilder, SearchKeywords> builder) Search keywords are primarily used by the suggester but are also considered for the full-text search. SearchKeywords is a JSON object where the keys are of IETF language tag. The value to a language tag key is an array of SearchKeyword for the specific language.
{ "en": [ { "text": "Multi tool" }, { "text": "Swiss Army Knife", "suggestTokenizer": { "type": "whitespace" } } ], "de": [ { "text": "Schweizer Messer", "suggestTokenizer": { "type": "custom", "inputs": ["schweizer messer", "offiziersmesser", "sackmesser"] } } ] }
- Parameters:
builder
- function to build the searchKeywords value- Returns:
- Builder
-
searchKeywords
Search keywords are primarily used by the suggester but are also considered for the full-text search. SearchKeywords is a JSON object where the keys are of IETF language tag. The value to a language tag key is an array of SearchKeyword for the specific language.
{ "en": [ { "text": "Multi tool" }, { "text": "Swiss Army Knife", "suggestTokenizer": { "type": "whitespace" } } ], "de": [ { "text": "Schweizer Messer", "suggestTokenizer": { "type": "custom", "inputs": ["schweizer messer", "offiziersmesser", "sackmesser"] } } ] }
- Parameters:
searchKeywords
- value to be set- Returns:
- Builder
-
state
public ProductDraftImportBuilder state(Function<StateKeyReferenceBuilder, StateKeyReferenceBuilder> builder) The Reference to the State with which the ProductDraft is associated. If referenced State does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary State is created.- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
public ProductDraftImportBuilder withState(Function<StateKeyReferenceBuilder, StateKeyReference> builder) The Reference to the State with which the ProductDraft is associated. If referenced State does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary State is created.- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
The Reference to the State with which the ProductDraft is associated. If referenced State does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary 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
Determines the type of Prices the API uses. See ProductPriceMode for more details. If not provided, the existing
Product.priceMode
is not changed.- Parameters:
priceMode
- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier. If a Product with this
key
exists, it will be updated with the imported data.- Returns:
- key
-
getProductType
The
productType
of a Product. Maps toProduct.productType
. The Reference to the ProductType with which the ProductDraft is associated. If referenced ProductType does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary ProductType is created.- Returns:
- productType
-
getName
value of name}- Returns:
- name
-
getSlug
Human-readable identifiers usually used as deep-link URL to the related product. Each slug must be unique across a project, but a product can have the same slug for different languages. Allowed are alphabetic, numeric, underscore (_) and hyphen (-) characters.
- Returns:
- slug
-
getDescription
Maps to
Product.description
.- Returns:
- description
-
getCategories
The Reference to the Categories with which the ProductDraft is associated. If referenced Categories do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Categories are created.- Returns:
- categories
-
getMetaTitle
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Returns:
- metaTitle
-
getMetaDescription
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Returns:
- metaDescription
-
getMetaKeywords
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Returns:
- metaKeywords
-
getMasterVariant
The master Product variant. Required if the
variants
array contains a Product Variant.- Returns:
- masterVariant
-
getVariants
An array of related Product Variants.
- Returns:
- variants
-
getTaxCategory
The Reference to the TaxCategory with which the ProductDraft is associated. If referenced TaxCategory does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary TaxCategory is created.- Returns:
- taxCategory
-
getSearchKeywords
Search keywords are primarily used by the suggester but are also considered for the full-text search. SearchKeywords is a JSON object where the keys are of IETF language tag. The value to a language tag key is an array of SearchKeyword for the specific language.
{ "en": [ { "text": "Multi tool" }, { "text": "Swiss Army Knife", "suggestTokenizer": { "type": "whitespace" } } ], "de": [ { "text": "Schweizer Messer", "suggestTokenizer": { "type": "custom", "inputs": ["schweizer messer", "offiziersmesser", "sackmesser"] } } ] }
- Returns:
- searchKeywords
-
getState
The Reference to the State with which the ProductDraft is associated. If referenced State does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary 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
Determines the type of Prices the API uses. See ProductPriceMode for more details. If not provided, the existing
Product.priceMode
is not changed.- Returns:
- priceMode
-
build
builds ProductDraftImport with checking for non-null required values- Specified by:
build
in 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
-