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 ProductSelectionBuilder
builder()
builder factory method for ProductSelectionstatic ProductSelectionBuilder
builder
(ProductSelection template) create builder for ProductSelection instancestatic ProductSelection
deepCopy
(ProductSelection template) factory method to create a deep copy of ProductSelection@NotNull ZonedDateTime
Date and time (UTC) the ProductSelection was initially created.@Valid CreatedBy
Present on resources created after 1/02/2019 except for events not tracked.@Valid CustomFields
Custom Fields of the ProductSelection.@NotNull String
getId()
Unique identifier of the ProductSelection.getKey()
User-defined unique identifier of the ProductSelection.@NotNull ZonedDateTime
Date and time (UTC) the ProductSelection was last updated.@Valid LastModifiedBy
Present on resources updated after 1/02/2019 except for events not tracked.@NotNull ProductSelectionMode
getMode()
Specifies in which way the Products are assigned to the ProductSelection.@NotNull @Valid LocalizedString
getName()
Name of the ProductSelection.@NotNull Integer
Number of Products that are currently assigned to this ProductSelection.@NotNull Long
Current version of the ProductSelection.static ProductSelection
of()
factory methodstatic ProductSelection
of
(ProductSelection template) factory method to create a shallow copy ProductSelectionstatic ReferenceTypeId
void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the ProductSelection was initially created.void
setCreatedBy
(CreatedBy createdBy) Present on resources created after 1/02/2019 except for events not tracked.void
setCustom
(CustomFields custom) Custom Fields of the ProductSelection.void
Unique identifier of the ProductSelection.void
User-defined unique identifier of the ProductSelection.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the ProductSelection was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) Present on resources updated after 1/02/2019 except for events not tracked.void
setMode
(ProductSelectionMode mode) Specifies in which way the Products are assigned to the ProductSelection.void
setName
(LocalizedString name) Name of the ProductSelection.void
setProductCount
(Integer productCount) Number of Products that are currently assigned to this ProductSelection.void
setVersion
(Long version) Current version of the ProductSelection.static com.fasterxml.jackson.core.type.TypeReference<ProductSelection>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withProductSelection
(Function<ProductSelection, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
Methods inherited from interface com.commercetools.api.models.DomainResource
get
Methods inherited from interface com.commercetools.api.models.product_selection.ProductSelectionMixin
toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the ProductSelection.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<ProductSelection>
- Specified by:
getId
in interfaceIdentifiable<ProductSelection>
- Specified by:
getId
in interfaceVersioned<ProductSelection>
- Returns:
- id
-
getVersion
Current version of the ProductSelection.
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<ProductSelection>
- Specified by:
getVersion
in interfaceVersioned<ProductSelection>
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the ProductSelection was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the ProductSelection was last updated.
- Specified by:
getLastModifiedAt
in 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:
getCustom
in interfaceCustomizable<ProductSelection>
- Returns:
- custom
-
setId
Unique identifier of the ProductSelection.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the ProductSelection.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setCreatedAt
Date and time (UTC) the ProductSelection was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the ProductSelection was last updated.
- Specified by:
setLastModifiedAt
in 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:
setCustom
in 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
-
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
-