Interface ProductRemoveImageAction
- All Superinterfaces:
ProductUpdateAction
,ResourceUpdateAction<ProductUpdateAction>
- All Known Implementing Classes:
ProductRemoveImageActionImpl
Removes a Product image and deletes it from the Content Delivery Network (external images are not deleted). Deletion from the CDN is not instant, which means the image file itself will stay available for some time after the deletion. Either variantId
or sku
is required.
Example to create an instance using the builder pattern
ProductRemoveImageAction productRemoveImageAction = ProductRemoveImageAction.builder()
.imageUrl("{imageUrl}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ProductRemoveImageAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ProductRemoveImageActionbuilder
(ProductRemoveImageAction template) create builder for ProductRemoveImageAction instancestatic ProductRemoveImageAction
deepCopy
(ProductRemoveImageAction template) factory method to create a deep copy of ProductRemoveImageAction@NotNull String
The URL of the image to remove.getSku()
Thesku
of the ProductVariant to update.Iftrue
, only the staged image is removed.Theid
of the ProductVariant to update.static ProductRemoveImageAction
of()
factory methodstatic ProductRemoveImageAction
of
(ProductRemoveImageAction template) factory method to create a shallow copy ProductRemoveImageActionvoid
setImageUrl
(String imageUrl) The URL of the image to remove.void
Thesku
of the ProductVariant to update.void
Iftrue
, only the staged image is removed.void
setVariantId
(Long variantId) Theid
of the ProductVariant to update.static com.fasterxml.jackson.core.type.TypeReference<ProductRemoveImageAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.product.ProductUpdateAction
getAction, withProductUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
REMOVE_IMAGE
discriminator value for ProductRemoveImageAction- See Also:
-
-
Method Details
-
getVariantId
Long getVariantId()The
id
of the ProductVariant to update.- Returns:
- variantId
-
getSku
String getSku()The
sku
of the ProductVariant to update.- Returns:
- sku
-
getImageUrl
The URL of the image to remove.
- Returns:
- imageUrl
-
getStaged
Boolean getStaged()If
true
, only the staged image is removed. Iffalse
, both the current and staged image is removed.- Returns:
- staged
-
setVariantId
The
id
of the ProductVariant to update.- Parameters:
variantId
- value to be set
-
setSku
The
sku
of the ProductVariant to update.- Parameters:
sku
- value to be set
-
setImageUrl
The URL of the image to remove.
- Parameters:
imageUrl
- value to be set
-
setStaged
If
true
, only the staged image is removed. Iffalse
, both the current and staged image is removed.- Parameters:
staged
- value to be set
-
of
factory method- Returns:
- instance of ProductRemoveImageAction
-
of
factory method to create a shallow copy ProductRemoveImageAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ProductRemoveImageAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductRemoveImageAction- Returns:
- builder
-
builder
create builder for ProductRemoveImageAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductRemoveImageAction
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
-