Interface VariantMoveImageToPositionAction
- All Superinterfaces:
VariantUpdateAction
Moves a Variant's image to a new position.
Example to create an instance using the builder pattern
VariantMoveImageToPositionAction variantMoveImageToPositionAction = VariantMoveImageToPositionAction.builder()
.imageUrl("{imageUrl}")
.position(0.3)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for VariantMoveImageToPositionAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for VariantMoveImageToPositionActionbuilder(VariantMoveImageToPositionAction template) create builder for VariantMoveImageToPositionAction instancecopyDeep()deepCopy(VariantMoveImageToPositionAction template) factory method to create a deep copy of VariantMoveImageToPositionAction@NotNull StringThe URL of the image to update.@NotNull LongPosition inimageswhere the image should be moved.Iftrue, only the stagedimagesis updated.of()factory methodof(VariantMoveImageToPositionAction template) factory method to create a shallow copy VariantMoveImageToPositionActionvoidsetImageUrl(String imageUrl) The URL of the image to update.voidsetPosition(Long position) Position inimageswhere the image should be moved.voidIftrue, only the stagedimagesis updated.static tools.jackson.core.type.TypeReference<VariantMoveImageToPositionAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.variant.VariantUpdateAction
getAction, withVariantUpdateAction
-
Field Details
-
MOVE_IMAGE_TO_POSITION
discriminator value for VariantMoveImageToPositionAction- See Also:
-
-
Method Details
-
getImageUrl
The URL of the image to update.
- Returns:
- imageUrl
-
getPosition
Position in
imageswhere the image should be moved. Must be between0and the total number of images minus1.- Returns:
- position
-
getStaged
Boolean getStaged()If
true, only the stagedimagesis updated. Iffalse, both the current and stagedimagesis updated.- Returns:
- staged
-
setImageUrl
The URL of the image to update.
- Parameters:
imageUrl- value to be set
-
setPosition
Position in
imageswhere the image should be moved. Must be between0and the total number of images minus1.- Parameters:
position- value to be set
-
setStaged
If
true, only the stagedimagesis updated. Iffalse, both the current and stagedimagesis updated.- Parameters:
staged- value to be set
-
of
factory method- Returns:
- instance of VariantMoveImageToPositionAction
-
of
factory method to create a shallow copy VariantMoveImageToPositionAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
VariantMoveImageToPositionAction copyDeep()- Specified by:
copyDeepin interfaceVariantUpdateAction
-
deepCopy
@Nullable static VariantMoveImageToPositionAction deepCopy(@Nullable VariantMoveImageToPositionAction template) factory method to create a deep copy of VariantMoveImageToPositionAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for VariantMoveImageToPositionAction- Returns:
- builder
-
builder
create builder for VariantMoveImageToPositionAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withVariantMoveImageToPositionAction
default <T> T withVariantMoveImageToPositionAction(Function<VariantMoveImageToPositionAction, T> helper) 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
-