Interface ProductTailoring
- All Superinterfaces:
BaseResource
A single ProductTailoring representation contains the current and the staged representation of its product data tailored per Store.
Example to create an instance using the builder pattern
ProductTailoring productTailoring = ProductTailoring.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.store(storeBuilder -> storeBuilder)
.product(productBuilder -> productBuilder)
.published(true)
.current(currentBuilder -> currentBuilder)
.staged(stagedBuilder -> stagedBuilder)
.hasStagedChanges(true)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProductTailoringBuilder
builder()
builder factory method for ProductTailoringstatic ProductTailoringBuilder
builder
(ProductTailoring template) create builder for ProductTailoring instancestatic ProductTailoring
deepCopy
(ProductTailoring template) factory method to create a deep copy of ProductTailoring@NotNull ZonedDateTime
Date and time (UTC) the ProductTailoring was initially created.@Valid CreatedBy
IDs and references that created the ProductTailoring.@NotNull @Valid ProductTailoringData
Current (published) data of the ProductTailoring.@NotNull Boolean
true
if thestaged
data is different from thecurrent
data.@NotNull String
getId()
Unique identifier of the ProductTailoring.getKey()
User-defined unique identifier of the ProductTailoring.@NotNull ZonedDateTime
Date and time (UTC) the ProductTailoring was last updated.@Valid LastModifiedBy
IDs and references that last modified the ProductTailoring.@NotNull @Valid ProductReference
Reference to the Product the ProductTailoring belongs to.@NotNull Boolean
true
if the ProductTailoring is published.@NotNull @Valid ProductTailoringData
Staged (unpublished) data of the ProductTailoring.@NotNull @Valid StoreKeyReference
getStore()
The Store to which the ProductTailoring belongs.@NotNull Long
Current version of the ProductTailoring.@Valid List<WarningObject>
Warnings about processing of a request.static ProductTailoring
of()
factory methodstatic ProductTailoring
of
(ProductTailoring template) factory method to create a shallow copy ProductTailoringvoid
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the ProductTailoring was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the ProductTailoring.void
setCurrent
(ProductTailoringData current) Current (published) data of the ProductTailoring.void
setHasStagedChanges
(Boolean hasStagedChanges) true
if thestaged
data is different from thecurrent
data.void
Unique identifier of the ProductTailoring.void
User-defined unique identifier of the ProductTailoring.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the ProductTailoring was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the ProductTailoring.void
setProduct
(ProductReference product) Reference to the Product the ProductTailoring belongs to.void
setPublished
(Boolean published) true
if the ProductTailoring is published.void
setStaged
(ProductTailoringData staged) Staged (unpublished) data of the ProductTailoring.void
setStore
(StoreKeyReference store) The Store to which the ProductTailoring belongs.void
setVersion
(Long version) Current version of the ProductTailoring.void
setWarnings
(WarningObject... warnings) Warnings about processing of a request.void
setWarnings
(List<WarningObject> warnings) Warnings about processing of a request.static com.fasterxml.jackson.core.type.TypeReference<ProductTailoring>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withProductTailoring
(Function<ProductTailoring, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
-
Method Details
-
getId
Unique identifier of the ProductTailoring.
- Specified by:
getId
in interfaceBaseResource
- Returns:
- id
-
getVersion
Current version of the ProductTailoring.
- Specified by:
getVersion
in interfaceBaseResource
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the ProductTailoring was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the ProductTailoring was last updated.
- Specified by:
getLastModifiedAt
in interfaceBaseResource
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the ProductTailoring.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the ProductTailoring.
- Returns:
- createdBy
-
getKey
String getKey()User-defined unique identifier of the ProductTailoring.
- Returns:
- key
-
getStore
The Store to which the ProductTailoring belongs.
- Returns:
- store
-
getProduct
Reference to the Product the ProductTailoring belongs to.
- Returns:
- product
-
getPublished
true
if the ProductTailoring is published.- Returns:
- published
-
getCurrent
Current (published) data of the ProductTailoring.
- Returns:
- current
-
getStaged
Staged (unpublished) data of the ProductTailoring.
- Returns:
- staged
-
getHasStagedChanges
true
if thestaged
data is different from thecurrent
data.- Returns:
- hasStagedChanges
-
getWarnings
Warnings about processing of a request. Appears in response to requests with response status code
202 Accepted
.- Returns:
- warnings
-
setId
Unique identifier of the ProductTailoring.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the ProductTailoring.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setCreatedAt
Date and time (UTC) the ProductTailoring was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the ProductTailoring was last updated.
- Specified by:
setLastModifiedAt
in interfaceBaseResource
- Parameters:
lastModifiedAt
- value to be set
-
setLastModifiedBy
IDs and references that last modified the ProductTailoring.
- Parameters:
lastModifiedBy
- value to be set
-
setCreatedBy
IDs and references that created the ProductTailoring.
- Parameters:
createdBy
- value to be set
-
setKey
User-defined unique identifier of the ProductTailoring.
- Parameters:
key
- value to be set
-
setStore
The Store to which the ProductTailoring belongs.
- Parameters:
store
- value to be set
-
setProduct
Reference to the Product the ProductTailoring belongs to.
- Parameters:
product
- value to be set
-
setPublished
true
if the ProductTailoring is published.- Parameters:
published
- value to be set
-
setCurrent
Current (published) data of the ProductTailoring.
- Parameters:
current
- value to be set
-
setStaged
Staged (unpublished) data of the ProductTailoring.
- Parameters:
staged
- value to be set
-
setHasStagedChanges
true
if thestaged
data is different from thecurrent
data.- Parameters:
hasStagedChanges
- value to be set
-
setWarnings
Warnings about processing of a request. Appears in response to requests with response status code
202 Accepted
.- Parameters:
warnings
- values to be set
-
setWarnings
Warnings about processing of a request. Appears in response to requests with response status code
202 Accepted
.- Parameters:
warnings
- values to be set
-
of
factory method- Returns:
- instance of ProductTailoring
-
of
factory method to create a shallow copy ProductTailoring- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ProductTailoring- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductTailoring- Returns:
- builder
-
builder
create builder for ProductTailoring instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductTailoring
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
-