Interface ProductMoveImageToPositionAction
- All Superinterfaces:
ProductUpdateAction
,ResourceUpdateAction<ProductUpdateAction>
Either variantId
or sku
is required.
Example to create an instance using the builder pattern
ProductMoveImageToPositionAction productMoveImageToPositionAction = ProductMoveImageToPositionAction.builder()
.imageUrl("{imageUrl}")
.position(0.3)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ProductMoveImageToPositionAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ProductMoveImageToPositionActionbuilder
(ProductMoveImageToPositionAction template) create builder for ProductMoveImageToPositionAction instancedeepCopy
(ProductMoveImageToPositionAction template) factory method to create a deep copy of ProductMoveImageToPositionAction@NotNull String
The URL of the image to update.@NotNull Long
Position inimages
where the image should be moved.getSku()
Thesku
of the ProductVariant to update.Iftrue
, only the stagedimages
is updated.Theid
of the ProductVariant to update.of()
factory methodof
(ProductMoveImageToPositionAction template) factory method to create a shallow copy ProductMoveImageToPositionActionvoid
setImageUrl
(String imageUrl) The URL of the image to update.void
setPosition
(Long position) Position inimages
where the image should be moved.void
Thesku
of the ProductVariant to update.void
Iftrue
, only the stagedimages
is updated.void
setVariantId
(Long variantId) Theid
of the ProductVariant to update.static com.fasterxml.jackson.core.type.TypeReference<ProductMoveImageToPositionAction>
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
-
MOVE_IMAGE_TO_POSITION
discriminator value for ProductMoveImageToPositionAction- 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 update.
- Returns:
- imageUrl
-
getPosition
Position in
images
where the image should be moved. Must be between0
and the total number of images minus1
.- Returns:
- position
-
getStaged
Boolean getStaged()If
true
, only the stagedimages
is updated. Iffalse
, both the current and stagedimages
is updated.- 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 update.
- Parameters:
imageUrl
- value to be set
-
setPosition
Position in
images
where the image should be moved. Must be between0
and the total number of images minus1
.- Parameters:
position
- value to be set
-
setStaged
If
true
, only the stagedimages
is updated. Iffalse
, both the current and stagedimages
is updated.- Parameters:
staged
- value to be set
-
of
factory method- Returns:
- instance of ProductMoveImageToPositionAction
-
of
factory method to create a shallow copy ProductMoveImageToPositionAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ProductMoveImageToPositionAction deepCopy(@Nullable ProductMoveImageToPositionAction template) factory method to create a deep copy of ProductMoveImageToPositionAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductMoveImageToPositionAction- Returns:
- builder
-
builder
create builder for ProductMoveImageToPositionAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductMoveImageToPositionAction
default <T> T withProductMoveImageToPositionAction(Function<ProductMoveImageToPositionAction, T> helper) accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<ProductMoveImageToPositionAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-