java.lang.Object
com.commercetools.importapi.models.customfields.CustomBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<Custom>

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

     Custom custom = Custom.builder()
             .type(typeBuilder -> typeBuilder)
             .build()
 
  • Constructor Details

    • CustomBuilder

      public CustomBuilder()
  • Method Details

    • type

      The type that provides the field definitions for this object.

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

      The type that provides the field definitions for this object.

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

      public CustomBuilder type(TypeKeyReference type)

      The type that provides the field definitions for this object.

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

      The Custom Fields of this object.

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

      The Custom Fields of this object.

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

      public CustomBuilder fields(@Nullable FieldContainer fields)

      The Custom Fields of this object.

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

      public TypeKeyReference getType()

      The type that provides the field definitions for this object.

      Returns:
      type
    • getFields

      @Nullable public FieldContainer getFields()

      The Custom Fields of this object.

      Returns:
      fields
    • build

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

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

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

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