Class ReferenceSetFieldBuilder

java.lang.Object
com.commercetools.importapi.models.customfields.ReferenceSetFieldBuilder
All Implemented Interfaces:
Builder<ReferenceSetField>

public class ReferenceSetFieldBuilder extends Object implements Builder<ReferenceSetField>
ReferenceSetFieldBuilder
Example to create an instance using the builder pattern

     ReferenceSetField referenceSetField = ReferenceSetField.builder()
             .plusValue(valueBuilder -> valueBuilder)
             .build()
 
  • Constructor Details

    • ReferenceSetFieldBuilder

      public ReferenceSetFieldBuilder()
  • Method Details

    • value

      public ReferenceSetFieldBuilder value(KeyReference... value)

      JSON array of references, each referencing an existing resource by key. The order of items in the array is not fixed.

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

      JSON array of references, each referencing an existing resource by key. The order of items in the array is not fixed.

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

      public ReferenceSetFieldBuilder plusValue(KeyReference... value)

      JSON array of references, each referencing an existing resource by key. The order of items in the array is not fixed.

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

      JSON array of references, each referencing an existing resource by key. The order of items in the array is not fixed.

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

      JSON array of references, each referencing an existing resource by key. The order of items in the array is not fixed.

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

      public List<KeyReference> getValue()

      JSON array of references, each referencing an existing resource by key. The order of items in the array is not fixed.

      Returns:
      value
    • build

      public ReferenceSetField build()
      builds ReferenceSetField with checking for non-null required values
      Specified by:
      build in interface Builder<ReferenceSetField>
      Returns:
      ReferenceSetField
    • buildUnchecked

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

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

      public static ReferenceSetFieldBuilder of(ReferenceSetField template)
      create builder for ReferenceSetField instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder