Class ProductTypeReferenceBuilder

java.lang.Object
com.commercetools.api.models.product_type.ProductTypeReferenceBuilder
All Implemented Interfaces:
Builder<ProductTypeReference>

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

     ProductTypeReference productTypeReference = ProductTypeReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

    • ProductTypeReferenceBuilder

      public ProductTypeReferenceBuilder()
  • Method Details

    • id

      Unique identifier of the referenced ProductType.

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

      Contains the representation of the expanded ProductType. Only present in responses to requests with Reference Expansion for ProductTypes.

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

      Contains the representation of the expanded ProductType. Only present in responses to requests with Reference Expansion for ProductTypes.

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

      Contains the representation of the expanded ProductType. Only present in responses to requests with Reference Expansion for ProductTypes.

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

      public String getId()

      Unique identifier of the referenced ProductType.

      Returns:
      id
    • getObj

      @Nullable public ProductType getObj()

      Contains the representation of the expanded ProductType. Only present in responses to requests with Reference Expansion for ProductTypes.

      Returns:
      obj
    • build

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

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

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

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