Interface ProductSelection
- All Superinterfaces:
BaseResource,Customizable<ProductSelection>,DomainResource<ProductSelection>,Identifiable<ProductSelection>,ProductSelectionMixin,Referencable<ProductSelection>,ResourceIdentifiable<ProductSelection>,Versioned<ProductSelection>,WithKey
Example to create an instance using the builder pattern
ProductSelection productSelection = ProductSelection.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.name(nameBuilder -> nameBuilder)
.productCount(0.3)
.mode(ProductSelectionMode.INDIVIDUAL)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProductSelectionBuilderbuilder()builder factory method for ProductSelectionstatic ProductSelectionBuilderbuilder(ProductSelection template) create builder for ProductSelection instancecopyDeep()static ProductSelectiondeepCopy(ProductSelection template) factory method to create a deep copy of ProductSelection@NotNull ZonedDateTimeDate and time (UTC) the ProductSelection was initially created.@Valid CreatedByPresent on resources created after 1/02/2019 except for events not tracked.@Valid CustomFieldsCustom Fields of the ProductSelection.@NotNull StringgetId()Unique identifier of the ProductSelection.getKey()User-defined unique identifier of the ProductSelection.@NotNull ZonedDateTimeDate and time (UTC) the ProductSelection was last updated.@Valid LastModifiedByPresent on resources updated after 1/02/2019 except for events not tracked.@NotNull ProductSelectionModegetMode()Specifies in which way the Products are assigned to the ProductSelection.@NotNull @Valid LocalizedStringgetName()Name of the ProductSelection.@NotNull IntegerNumber of Products that are currently assigned to this ProductSelection.@NotNull LongCurrent version of the ProductSelection.static ProductSelectionof()factory methodstatic ProductSelectionof(ProductSelection template) factory method to create a shallow copy ProductSelectionstatic ReferenceTypeIdvoidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the ProductSelection was initially created.voidsetCreatedBy(CreatedBy createdBy) Present on resources created after 1/02/2019 except for events not tracked.voidsetCustom(CustomFields custom) Custom Fields of the ProductSelection.voidUnique identifier of the ProductSelection.voidUser-defined unique identifier of the ProductSelection.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the ProductSelection was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) Present on resources updated after 1/02/2019 except for events not tracked.voidsetMode(ProductSelectionMode mode) Specifies in which way the Products are assigned to the ProductSelection.voidsetName(LocalizedString name) Name of the ProductSelection.voidsetProductCount(Integer productCount) Number of Products that are currently assigned to this ProductSelection.voidsetVersion(Long version) Current version of the ProductSelection.static com.fasterxml.jackson.core.type.TypeReference<ProductSelection>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithProductSelection(Function<ProductSelection, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResourceMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizableMethods inherited from interface com.commercetools.api.models.DomainResource
getMethods inherited from interface com.commercetools.api.models.product_selection.ProductSelectionMixin
toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the ProductSelection.
- Specified by:
getIdin interfaceBaseResource- Specified by:
getIdin interfaceDomainResource<ProductSelection>- Specified by:
getIdin interfaceIdentifiable<ProductSelection>- Specified by:
getIdin interfaceVersioned<ProductSelection>- Returns:
- id
-
getVersion
Current version of the ProductSelection.
- Specified by:
getVersionin interfaceBaseResource- Specified by:
getVersionin interfaceDomainResource<ProductSelection>- Specified by:
getVersionin interfaceVersioned<ProductSelection>- Returns:
- version
-
getCreatedAt
Date and time (UTC) the ProductSelection was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the ProductSelection was last updated.
- Specified by:
getLastModifiedAtin interfaceBaseResource- Returns:
- lastModifiedAt
-
getLastModifiedBy
Present on resources updated after 1/02/2019 except for events not tracked.
- Returns:
- lastModifiedBy
-
getCreatedBy
Present on resources created after 1/02/2019 except for events not tracked.
- Returns:
- createdBy
-
getKey
String getKey()User-defined unique identifier of the ProductSelection.
-
getName
Name of the ProductSelection.
- Returns:
- name
-
getProductCount
Number of Products that are currently assigned to this ProductSelection.
- Returns:
- productCount
-
getMode
Specifies in which way the Products are assigned to the ProductSelection. Currently, the only way of doing this is to specify each Product individually, either by including or excluding them explicitly.
- Returns:
- mode
-
getCustom
Custom Fields of the ProductSelection.
- Specified by:
getCustomin interfaceCustomizable<ProductSelection>- Returns:
- custom
-
setId
Unique identifier of the ProductSelection.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the ProductSelection.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setCreatedAt
Date and time (UTC) the ProductSelection was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the ProductSelection was last updated.
- Specified by:
setLastModifiedAtin interfaceBaseResource- Parameters:
lastModifiedAt- value to be set
-
setLastModifiedBy
Present on resources updated after 1/02/2019 except for events not tracked.
- Parameters:
lastModifiedBy- value to be set
-
setCreatedBy
Present on resources created after 1/02/2019 except for events not tracked.
- Parameters:
createdBy- value to be set
-
setKey
User-defined unique identifier of the ProductSelection.
- Parameters:
key- value to be set
-
setName
Name of the ProductSelection.
- Parameters:
name- value to be set
-
setProductCount
Number of Products that are currently assigned to this ProductSelection.
- Parameters:
productCount- value to be set
-
setMode
Specifies in which way the Products are assigned to the ProductSelection. Currently, the only way of doing this is to specify each Product individually, either by including or excluding them explicitly.
- Parameters:
mode- value to be set
-
setCustom
Custom Fields of the ProductSelection.
- Specified by:
setCustomin interfaceCustomizable<ProductSelection>- Parameters:
custom- value to be set
-
of
factory method- Returns:
- instance of ProductSelection
-
of
factory method to create a shallow copy ProductSelection- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ProductSelection copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
deepCopy
factory method to create a deep copy of ProductSelection- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductSelection- Returns:
- builder
-
builder
create builder for ProductSelection instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withProductSelection
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
referenceTypeId
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-