Interface Variant.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Variant.Builder,Variant>, SdkBuilder<Variant.Builder,Variant>, SdkPojo
Enclosing class:
Variant

@Mutable @NotThreadSafe public static interface Variant.Builder extends SdkPojo, CopyableBuilder<Variant.Builder,Variant>
  • Method Details

    • name

      Variant.Builder name(String name)

      The name of the variant. Must be C for control or T1 for treatment.

      Parameters:
      name - The name of the variant. Must be C for control or T1 for treatment.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • weight

      Variant.Builder weight(Integer weight)

      The percentage of traffic to route to this variant. Weights across all variants must sum to 100.

      Parameters:
      weight - The percentage of traffic to route to this variant. Weights across all variants must sum to 100.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • variantConfiguration

      Variant.Builder variantConfiguration(VariantConfiguration variantConfiguration)

      The configuration for this variant, including the configuration bundle or target reference.

      Parameters:
      variantConfiguration - The configuration for this variant, including the configuration bundle or target reference.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • variantConfiguration

      default Variant.Builder variantConfiguration(Consumer<VariantConfiguration.Builder> variantConfiguration)

      The configuration for this variant, including the configuration bundle or target reference.

      This is a convenience method that creates an instance of the VariantConfiguration.Builder avoiding the need to create one manually via VariantConfiguration.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to variantConfiguration(VariantConfiguration).

      Parameters:
      variantConfiguration - a consumer that will call methods on VariantConfiguration.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: