Class CustomObjectReferenceBuilder

java.lang.Object
com.commercetools.api.models.custom_object.CustomObjectReferenceBuilder
All Implemented Interfaces:
Builder<CustomObjectReference>

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

     CustomObjectReference customObjectReference = CustomObjectReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

    • CustomObjectReferenceBuilder

      public CustomObjectReferenceBuilder()
  • Method Details

    • id

      Unique identifier of the referenced CustomObject.

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

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

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

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

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

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

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

      public String getId()

      Unique identifier of the referenced CustomObject.

      Returns:
      id
    • getObj

      @Nullable public CustomObject getObj()

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

      Returns:
      obj
    • build

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

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

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

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