Class ProductVariantPatchImpl
- All Implemented Interfaces:
ProductVariantPatch
,io.vrap.rmf.base.client.ModelBase
Representation for an update of a ProductVariant. Use this type to import updates for existing ProductVariants in a Project.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Maps toProductVariant.attributes
.The ProductVariant to which this patch is applied.Iffalse
, the attribute changes are applied to both current and staged projected representations of the Product.int
hashCode()
void
setAttributes
(Attributes attributes) Maps toProductVariant.attributes
.void
setProductVariant
(ProductVariantKeyReference productVariant) The ProductVariant to which this patch is applied.void
Iffalse
, the attribute changes are applied to both current and staged projected representations of the Product.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.importapi.models.productvariants.ProductVariantPatch
withProductVariantPatch
-
Constructor Details
-
ProductVariantPatchImpl
public ProductVariantPatchImpl()create empty instance
-
-
Method Details
-
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 tounresolved
until the necessary ProductVariant is created.- Specified by:
getProductVariant
in interfaceProductVariantPatch
- Returns:
- productVariant
-
getAttributes
Maps to
ProductVariant.attributes
.- The referenced Attribute must be defined in an existing ProductType, or the
state
of the ImportOperation will bevalidationFailed
. - Setting the value of a non-required Attribute to
null
will remove the Attribute. - Attempting to set a
null
value to a required Attribute will make the import operation fail with an InvalidOperation error. - Importing LocalizableTextAttributes or LocalizableTextSetAttributes follows an override pattern, meaning that omitted localized fields will be deleted, new fields will be created, and existing fields will be updated. You can also delete localized fields by setting their value to
null
.
- Specified by:
getAttributes
in interfaceProductVariantPatch
- Returns:
- attributes
- The referenced Attribute must be defined in an existing ProductType, or the
-
getStaged
If
false
, the attribute changes are applied to both current and staged projected representations of the Product.- Specified by:
getStaged
in interfaceProductVariantPatch
- Returns:
- staged
-
setProductVariant
Description copied from interface:ProductVariantPatch
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 tounresolved
until the necessary ProductVariant is created.- Specified by:
setProductVariant
in interfaceProductVariantPatch
- Parameters:
productVariant
- value to be set
-
setAttributes
Description copied from interface:ProductVariantPatch
Maps to
ProductVariant.attributes
.- The referenced Attribute must be defined in an existing ProductType, or the
state
of the ImportOperation will bevalidationFailed
. - Setting the value of a non-required Attribute to
null
will remove the Attribute. - Attempting to set a
null
value to a required Attribute will make the import operation fail with an InvalidOperation error. - Importing LocalizableTextAttributes or LocalizableTextSetAttributes follows an override pattern, meaning that omitted localized fields will be deleted, new fields will be created, and existing fields will be updated. You can also delete localized fields by setting their value to
null
.
- Specified by:
setAttributes
in interfaceProductVariantPatch
- Parameters:
attributes
- value to be set
- The referenced Attribute must be defined in an existing ProductType, or the
-
setStaged
Description copied from interface:ProductVariantPatch
If
false
, the attribute changes are applied to both current and staged projected representations of the Product.- Specified by:
setStaged
in interfaceProductVariantPatch
- Parameters:
staged
- value to be set
-
equals
-
hashCode
-