Interface VariantValues


public interface VariantValues
VariantValues
Example to create an instance using the builder pattern

     VariantValues variantValues = VariantValues.builder()
             .plusPrices(pricesBuilder -> pricesBuilder)
             .plusAttributes(attributesBuilder -> attributesBuilder)
             .build()
 
  • Method Details

    • getSku

      String getSku()
      Returns:
      sku
    • getPrices

      @NotNull @Valid @NotNull @Valid List<PriceImport> getPrices()
      Returns:
      prices
    • getAttributes

      @NotNull @Valid @NotNull @Valid List<Attribute> getAttributes()
      Returns:
      attributes
    • setSku

      void setSku(String sku)
      set sku
      Parameters:
      sku - value to be set
    • setPrices

      void setPrices(PriceImport... prices)
      set prices
      Parameters:
      prices - values to be set
    • setPrices

      void setPrices(List<PriceImport> prices)
      set prices
      Parameters:
      prices - values to be set
    • setAttributes

      void setAttributes(Attribute... attributes)
      set attributes
      Parameters:
      attributes - values to be set
    • setAttributes

      void setAttributes(List<Attribute> attributes)
      set attributes
      Parameters:
      attributes - values to be set
    • of

      static VariantValues of()
      factory method
      Returns:
      instance of VariantValues
    • of

      static VariantValues of(VariantValues template)
      factory method to create a shallow copy VariantValues
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

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

      static VariantValuesBuilder builder()
      builder factory method for VariantValues
      Returns:
      builder
    • builder

      static VariantValuesBuilder builder(VariantValues template)
      create builder for VariantValues instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withVariantValues

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

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