Class ChannelReferenceBuilder

java.lang.Object
com.commercetools.api.models.channel.ChannelReferenceBuilder
All Implemented Interfaces:
Builder<ChannelReference>

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

     ChannelReference channelReference = ChannelReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

    • ChannelReferenceBuilder

      public ChannelReferenceBuilder()
  • Method Details

    • id

      Unique identifier of the referenced Channel.

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

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

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

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

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

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

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

      public String getId()

      Unique identifier of the referenced Channel.

      Returns:
      id
    • getObj

      @Nullable public Channel getObj()

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

      Returns:
      obj
    • build

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

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

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

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