Interface ProductRemoveImageAction
- All Superinterfaces:
ProductUpdateAction,ResourceUpdateAction<ProductUpdateAction>
Removes a Product image and deletes it from the Content Delivery Network (CDN) if it had been uploaded to our CDN. External images will not be deleted. The API deletes the removed image from the CDN in an eventual consistent way. Either variantId or sku is required.
Example to create an instance using the builder pattern
ProductRemoveImageAction productRemoveImageAction = ProductRemoveImageAction.builder()
.imageUrl("{imageUrl}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for ProductRemoveImageAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for ProductRemoveImageActionbuilder(ProductRemoveImageAction template) create builder for ProductRemoveImageAction instancecopyDeep()static ProductRemoveImageActiondeepCopy(ProductRemoveImageAction template) factory method to create a deep copy of ProductRemoveImageAction@NotNull StringThe URL of the image to remove.getSku()Theskuof the ProductVariant to update.Iftrue, only the staged image is removed.Theidof the ProductVariant to update.static ProductRemoveImageActionof()factory methodstatic ProductRemoveImageActionof(ProductRemoveImageAction template) factory method to create a shallow copy ProductRemoveImageActionvoidsetImageUrl(String imageUrl) The URL of the image to remove.voidTheskuof the ProductVariant to update.voidIftrue, only the staged image is removed.voidsetVariantId(Long variantId) Theidof the ProductVariant to update.static com.fasterxml.jackson.core.type.TypeReference<ProductRemoveImageAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.product.ProductUpdateAction
getAction, withProductUpdateActionMethods 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
idof the ProductVariant to update.- Returns:
- variantId
-
getSku
String getSku()The
skuof 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
idof the ProductVariant to update.- Parameters:
variantId- value to be set
-
setSku
The
skuof 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
-
copyDeep
ProductRemoveImageAction copyDeep()- Specified by:
copyDeepin interfaceProductUpdateAction
-
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
-