Class CartKeyReferenceBuilder

java.lang.Object
com.commercetools.importapi.models.common.CartKeyReferenceBuilder
All Implemented Interfaces:
Builder<CartKeyReference>

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

     CartKeyReference cartKeyReference = CartKeyReference.builder()
             .key("{key}")
             .build()
 
  • Constructor Details

    • CartKeyReferenceBuilder

      public CartKeyReferenceBuilder()
  • Method Details

    • key

      public CartKeyReferenceBuilder key(String key)
      set the value to the key
      Parameters:
      key - value to be set
      Returns:
      Builder
    • getKey

      public String getKey()
      value of key}
      Returns:
      key
    • build

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

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

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

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