Class AssignedProductSelectionBuilder

java.lang.Object
com.commercetools.api.models.product_selection.AssignedProductSelectionBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<AssignedProductSelection>

public class AssignedProductSelectionBuilder extends Object implements io.vrap.rmf.base.client.Builder<AssignedProductSelection>
AssignedProductSelectionBuilder
Example to create an instance using the builder pattern

     AssignedProductSelection assignedProductSelection = AssignedProductSelection.builder()
             .productSelection(productSelectionBuilder -> productSelectionBuilder)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .build()
 
  • Constructor Details

    • AssignedProductSelectionBuilder

      public AssignedProductSelectionBuilder()
  • Method Details

    • productSelection

      Reference to the Product Selection that this assignment is part of.

      Parameters:
      builder - function to build the productSelection value
      Returns:
      Builder
    • withProductSelection

      Reference to the Product Selection that this assignment is part of.

      Parameters:
      builder - function to build the productSelection value
      Returns:
      Builder
    • productSelection

      public AssignedProductSelectionBuilder productSelection(ProductSelectionReference productSelection)

      Reference to the Product Selection that this assignment is part of.

      Parameters:
      productSelection - value to be set
      Returns:
      Builder
    • variantSelection

      public AssignedProductSelectionBuilder variantSelection(@Nullable ProductVariantSelection variantSelection)

      Defines which Variants of the Product will be included in the Product Selection.

      This field is only available for assignments to a Product Selection with Individual ProductSelectionMode.

      Parameters:
      variantSelection - value to be set
      Returns:
      Builder
    • variantSelection

      public AssignedProductSelectionBuilder variantSelection(Function<ProductVariantSelectionBuilder,io.vrap.rmf.base.client.Builder<? extends ProductVariantSelection>> builder)

      Defines which Variants of the Product will be included in the Product Selection.

      This field is only available for assignments to a Product Selection with Individual ProductSelectionMode.

      Parameters:
      builder - function to build the variantSelection value
      Returns:
      Builder
    • variantExclusion

      Defines which Variants of the Product will be excluded from the Product Selection.

      This field is only available for assignments to a Product Selection with IndividualExclusion ProductSelectionMode.

      Parameters:
      builder - function to build the variantExclusion value
      Returns:
      Builder
    • withVariantExclusion

      Defines which Variants of the Product will be excluded from the Product Selection.

      This field is only available for assignments to a Product Selection with IndividualExclusion ProductSelectionMode.

      Parameters:
      builder - function to build the variantExclusion value
      Returns:
      Builder
    • variantExclusion

      public AssignedProductSelectionBuilder variantExclusion(@Nullable ProductVariantExclusion variantExclusion)

      Defines which Variants of the Product will be excluded from the Product Selection.

      This field is only available for assignments to a Product Selection with IndividualExclusion ProductSelectionMode.

      Parameters:
      variantExclusion - value to be set
      Returns:
      Builder
    • createdAt

      public AssignedProductSelectionBuilder createdAt(ZonedDateTime createdAt)

      Date and time (UTC) this assignment was initially created.

      Parameters:
      createdAt - value to be set
      Returns:
      Builder
    • getProductSelection

      public ProductSelectionReference getProductSelection()

      Reference to the Product Selection that this assignment is part of.

      Returns:
      productSelection
    • getVariantSelection

      @Nullable public ProductVariantSelection getVariantSelection()

      Defines which Variants of the Product will be included in the Product Selection.

      This field is only available for assignments to a Product Selection with Individual ProductSelectionMode.

      Returns:
      variantSelection
    • getVariantExclusion

      @Nullable public ProductVariantExclusion getVariantExclusion()

      Defines which Variants of the Product will be excluded from the Product Selection.

      This field is only available for assignments to a Product Selection with IndividualExclusion ProductSelectionMode.

      Returns:
      variantExclusion
    • getCreatedAt

      public ZonedDateTime getCreatedAt()

      Date and time (UTC) this assignment was initially created.

      Returns:
      createdAt
    • build

      public AssignedProductSelection build()
      builds AssignedProductSelection with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<AssignedProductSelection>
      Returns:
      AssignedProductSelection
    • buildUnchecked

      public AssignedProductSelection buildUnchecked()
      builds AssignedProductSelection without checking for non-null required values
      Returns:
      AssignedProductSelection
    • of

      public static AssignedProductSelectionBuilder of()
      factory method for an instance of AssignedProductSelectionBuilder
      Returns:
      builder
    • of

      create builder for AssignedProductSelection instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder