Class ProductVariantImportImpl

java.lang.Object
com.commercetools.importapi.models.productvariants.ProductVariantImportImpl
All Implemented Interfaces:
ImportResource, ProductVariantImport, io.vrap.rmf.base.client.ModelBase

public class ProductVariantImportImpl extends Object implements ProductVariantImport, io.vrap.rmf.base.client.ModelBase

The data representation for a ProductVariant to be imported that is persisted as a ProductVariant in the Project.

  • Constructor Details

    • ProductVariantImportImpl

      public ProductVariantImportImpl()
      create empty instance
  • Method Details

    • getKey

      public String getKey()

      User-defined unique identifier. If a ProductVariant with this key exists on the specified product, it will be updated with the imported data.

      Specified by:
      getKey in interface ImportResource
      Specified by:
      getKey in interface ProductVariantImport
      Returns:
      key
    • getSku

      public String getSku()

      Maps to ProductVariant.sku.

      Specified by:
      getSku in interface ProductVariantImport
      Returns:
      sku
    • getIsMasterVariant

      public Boolean getIsMasterVariant()

      Maps to ProductVariant.isMasterVariant.

      Specified by:
      getIsMasterVariant in interface ProductVariantImport
      Returns:
      isMasterVariant
    • getAttributes

      public List<Attribute> 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.

      Specified by:
      getAttributes in interface ProductVariantImport
      Returns:
      attributes
    • getImages

      public List<Image> getImages()

      Maps to ProductVariant.images.

      Specified by:
      getImages in interface ProductVariantImport
      Returns:
      images
    • getAssets

      public List<Asset> getAssets()

      Maps to ProductVariant.assets.

      Specified by:
      getAssets in interface ProductVariantImport
      Returns:
      assets
    • getPublish

      public Boolean getPublish()

      If publish is set to either true or false, both staged and current projections are set to the same value provided by the import data. If publish is not set, the staged projection is set to the provided import data, but the current projection stays unchanged. However, if the import data contains no update, that is, if it matches the staged projection of the existing Product, the import induces no change in the existing Product whether publish is set or not.

      Specified by:
      getPublish in interface ProductVariantImport
      Returns:
      publish
    • getProduct

      public ProductKeyReference getProduct()

      The Product to which this Product Variant belongs. Maps to ProductVariant.product. The Reference to the Product with which the ProductVariant is associated. If referenced Product does not exist, the state of the ImportOperation will be set to unresolved until the necessary Product is created.

      Specified by:
      getProduct in interface ProductVariantImport
      Returns:
      product
    • setKey

      public void setKey(String key)
      Description copied from interface: ProductVariantImport

      User-defined unique identifier. If a ProductVariant with this key exists on the specified product, it will be updated with the imported data.

      Specified by:
      setKey in interface ImportResource
      Specified by:
      setKey in interface ProductVariantImport
      Parameters:
      key - value to be set
    • setSku

      public void setSku(String sku)
      Description copied from interface: ProductVariantImport

      Maps to ProductVariant.sku.

      Specified by:
      setSku in interface ProductVariantImport
      Parameters:
      sku - value to be set
    • setIsMasterVariant

      public void setIsMasterVariant(Boolean isMasterVariant)
      Description copied from interface: ProductVariantImport

      Maps to ProductVariant.isMasterVariant.

      Specified by:
      setIsMasterVariant in interface ProductVariantImport
      Parameters:
      isMasterVariant - value to be set
    • setAttributes

      public void setAttributes(Attribute... attributes)
      Description copied from interface: ProductVariantImport

      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.

      Specified by:
      setAttributes in interface ProductVariantImport
      Parameters:
      attributes - values to be set
    • setAttributes

      public void setAttributes(List<Attribute> attributes)
      Description copied from interface: ProductVariantImport

      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.

      Specified by:
      setAttributes in interface ProductVariantImport
      Parameters:
      attributes - values to be set
    • setImages

      public void setImages(Image... images)
      Description copied from interface: ProductVariantImport

      Maps to ProductVariant.images.

      Specified by:
      setImages in interface ProductVariantImport
      Parameters:
      images - values to be set
    • setImages

      public void setImages(List<Image> images)
      Description copied from interface: ProductVariantImport

      Maps to ProductVariant.images.

      Specified by:
      setImages in interface ProductVariantImport
      Parameters:
      images - values to be set
    • setAssets

      public void setAssets(Asset... assets)
      Description copied from interface: ProductVariantImport

      Maps to ProductVariant.assets.

      Specified by:
      setAssets in interface ProductVariantImport
      Parameters:
      assets - values to be set
    • setAssets

      public void setAssets(List<Asset> assets)
      Description copied from interface: ProductVariantImport

      Maps to ProductVariant.assets.

      Specified by:
      setAssets in interface ProductVariantImport
      Parameters:
      assets - values to be set
    • setPublish

      public void setPublish(Boolean publish)
      Description copied from interface: ProductVariantImport

      If publish is set to either true or false, both staged and current projections are set to the same value provided by the import data. If publish is not set, the staged projection is set to the provided import data, but the current projection stays unchanged. However, if the import data contains no update, that is, if it matches the staged projection of the existing Product, the import induces no change in the existing Product whether publish is set or not.

      Specified by:
      setPublish in interface ProductVariantImport
      Parameters:
      publish - value to be set
    • setProduct

      public void setProduct(ProductKeyReference product)
      Description copied from interface: ProductVariantImport

      The Product to which this Product Variant belongs. Maps to ProductVariant.product. The Reference to the Product with which the ProductVariant is associated. If referenced Product does not exist, the state of the ImportOperation will be set to unresolved until the necessary Product is created.

      Specified by:
      setProduct in interface ProductVariantImport
      Parameters:
      product - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object