Class SetCustomFieldChangeBuilder

java.lang.Object
com.commercetools.history.models.change.SetCustomFieldChangeBuilder
All Implemented Interfaces:
Builder<SetCustomFieldChange>

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

     SetCustomFieldChange setCustomFieldChange = SetCustomFieldChange.builder()
             .change("{change}")
             .name("{name}")
             .customTypeId("{customTypeId}")
             .build()
 
  • Constructor Details

    • SetCustomFieldChangeBuilder

      public SetCustomFieldChangeBuilder()
  • Method Details

    • change

      public SetCustomFieldChangeBuilder change(String change)
      set the value to the change
      Parameters:
      change - value to be set
      Returns:
      Builder
    • previousValue

      public SetCustomFieldChangeBuilder previousValue(Object previousValue)

      Value before the change.

      Parameters:
      previousValue - value to be set
      Returns:
      Builder
    • nextValue

      public SetCustomFieldChangeBuilder nextValue(Object nextValue)

      Value after the change.

      Parameters:
      nextValue - value to be set
      Returns:
      Builder
    • name

      public SetCustomFieldChangeBuilder name(String name)

      Name of the Custom Field.

      Parameters:
      name - value to be set
      Returns:
      Builder
    • customTypeId

      public SetCustomFieldChangeBuilder customTypeId(String customTypeId)

      id of the referenced Type.

      Parameters:
      customTypeId - value to be set
      Returns:
      Builder
    • getChange

      public String getChange()
      value of change}
      Returns:
      change
    • getPreviousValue

      public Object getPreviousValue()

      Value before the change.

      Returns:
      previousValue
    • getNextValue

      public Object getNextValue()

      Value after the change.

      Returns:
      nextValue
    • getName

      public String getName()

      Name of the Custom Field.

      Returns:
      name
    • getCustomTypeId

      public String getCustomTypeId()

      id of the referenced Type.

      Returns:
      customTypeId
    • build

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

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

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

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