Class ExtensionReferenceBuilder

java.lang.Object
com.commercetools.api.models.extension.ExtensionReferenceBuilder
All Implemented Interfaces:
Builder<ExtensionReference>

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

     ExtensionReference extensionReference = ExtensionReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

    • ExtensionReferenceBuilder

      public ExtensionReferenceBuilder()
  • Method Details

    • id

      Unique identifier of the referenced Extension.

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

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

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

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

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

      public ExtensionReferenceBuilder obj(@Nullable Extension obj)

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

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

      public String getId()

      Unique identifier of the referenced Extension.

      Returns:
      id
    • getObj

      @Nullable public Extension getObj()

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

      Returns:
      obj
    • build

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

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

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

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