Class ZoneReferenceBuilder

java.lang.Object
com.commercetools.api.models.zone.ZoneReferenceBuilder
All Implemented Interfaces:
Builder<ZoneReference>

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

     ZoneReference zoneReference = ZoneReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

    • ZoneReferenceBuilder

      public ZoneReferenceBuilder()
  • Method Details

    • id

      public ZoneReferenceBuilder id(String id)

      Unique identifier of the referenced Zone.

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

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

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

      public ZoneReferenceBuilder withObj(Function<ZoneBuilder,Zone> builder)

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

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

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

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

      public String getId()

      Unique identifier of the referenced Zone.

      Returns:
      id
    • getObj

      @Nullable public Zone getObj()

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

      Returns:
      obj
    • build

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

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

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

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