public interface ProductVariantPatch
Representation for an update of a ProductVariant. Use this type to import updates for existing ProductVariants in a Project.
ProductVariantPatch productVariantPatch = ProductVariantPatch.builder()
.productVariant(productVariantBuilder -> productVariantBuilder)
.build()
Modifier and Type | Method and Description |
---|---|
static ProductVariantPatchBuilder |
builder() |
static ProductVariantPatchBuilder |
builder(ProductVariantPatch template) |
@Valid Attributes |
getAttributes()
Maps to
ProductVariant.attributes . |
@NotNull @Valid ProductVariantKeyReference |
getProductVariant()
The ProductVariant to which this patch is applied.
|
Boolean |
getStaged()
If
false , the attribute changes are applied to both current and staged projected representations of the Product. |
static ProductVariantPatch |
of() |
static ProductVariantPatch |
of(ProductVariantPatch template) |
void |
setAttributes(Attributes attributes) |
void |
setProductVariant(ProductVariantKeyReference productVariant) |
void |
setStaged(Boolean staged) |
static com.fasterxml.jackson.core.type.TypeReference<ProductVariantPatch> |
typeReference() |
default <T> T |
withProductVariantPatch(Function<ProductVariantPatch,T> helper) |
@NotNull @Valid @NotNull @Valid ProductVariantKeyReference getProductVariant()
The ProductVariant to which this patch is applied. The Reference to the ProductVariant with which the ProductVariantPatch is associated. If referenced ProductVariant does not exist, the state
of the ImportOperation will be set to unresolved
until the necessary ProductVariant is created.
@Valid @Valid Attributes getAttributes()
Maps to ProductVariant.attributes
. The referenced attribute must be defined in an already existing ProductType in the Project, or the state
of the ImportOperation will be unresolved
.
Boolean getStaged()
If false
, the attribute changes are applied to both current and staged projected representations of the Product.
void setProductVariant(ProductVariantKeyReference productVariant)
void setAttributes(Attributes attributes)
void setStaged(Boolean staged)
static ProductVariantPatch of()
static ProductVariantPatch of(ProductVariantPatch template)
static ProductVariantPatchBuilder builder()
static ProductVariantPatchBuilder builder(ProductVariantPatch template)
default <T> T withProductVariantPatch(Function<ProductVariantPatch,T> helper)
static com.fasterxml.jackson.core.type.TypeReference<ProductVariantPatch> typeReference()