Interface ProductSetDefaultVariantAction

All Superinterfaces:
ProductUpdateAction, ResourceUpdateAction<ProductUpdateAction>

public interface ProductSetDefaultVariantAction extends ProductUpdateAction

Sets the defaultVariant of the Product. Only available for Projects with productCatalogModel set to Modular. The Variant must belong to the Product. If variant is omitted, any existing default Variant is cleared.


Example to create an instance using the builder pattern

     ProductSetDefaultVariantAction productSetDefaultVariantAction = ProductSetDefaultVariantAction.builder()
             .build()
 
  • Field Details

    • SET_DEFAULT_VARIANT

      static final String SET_DEFAULT_VARIANT
      discriminator value for ProductSetDefaultVariantAction
      See Also:
  • Method Details

    • getVariant

      @Valid @Valid VariantResourceIdentifier getVariant()

      The Variant to set as default. If empty, any existing value will be removed.

      Returns:
      variant
    • getStaged

      Boolean getStaged()

      If true, only the staged defaultVariant is updated. If false, both the current and staged defaultVariant are updated.

      Returns:
      staged
    • setVariant

      void setVariant(VariantResourceIdentifier variant)

      The Variant to set as default. If empty, any existing value will be removed.

      Parameters:
      variant - value to be set
    • setStaged

      void setStaged(Boolean staged)

      If true, only the staged defaultVariant is updated. If false, both the current and staged defaultVariant are updated.

      Parameters:
      staged - value to be set
    • of

      factory method
      Returns:
      instance of ProductSetDefaultVariantAction
    • of

      factory method to create a shallow copy ProductSetDefaultVariantAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

      Specified by:
      copyDeep in interface ProductUpdateAction
    • deepCopy

      @Nullable static ProductSetDefaultVariantAction deepCopy(@Nullable ProductSetDefaultVariantAction template)
      factory method to create a deep copy of ProductSetDefaultVariantAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ProductSetDefaultVariantAction
      Returns:
      builder
    • builder

      create builder for ProductSetDefaultVariantAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductSetDefaultVariantAction

      default <T> T withProductSetDefaultVariantAction(Function<ProductSetDefaultVariantAction,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static tools.jackson.core.type.TypeReference<ProductSetDefaultVariantAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference