Class CategoryReferenceBuilder

java.lang.Object
com.commercetools.api.models.category.CategoryReferenceBuilder
All Implemented Interfaces:
Builder<CategoryReference>

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

     CategoryReference categoryReference = CategoryReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

    • CategoryReferenceBuilder

      public CategoryReferenceBuilder()
  • Method Details

    • id

      Unique identifier of the referenced Category.

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

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

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

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

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

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

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

      public String getId()

      Unique identifier of the referenced Category.

      Returns:
      id
    • getObj

      @Nullable public Category getObj()

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

      Returns:
      obj
    • build

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

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

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

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