Class RemoveAssetChangeBuilder

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

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

     RemoveAssetChange removeAssetChange = RemoveAssetChange.builder()
             .change("{change}")
             .previousValue(previousValueBuilder -> previousValueBuilder)
             .build()
 
  • Constructor Details

    • RemoveAssetChangeBuilder

      public RemoveAssetChangeBuilder()
  • Method Details

    • change

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

      Value before the change.

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

      public RemoveAssetChangeBuilder withPreviousValue(Function<AssetBuilder,Asset> builder)

      Value before the change.

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

      public RemoveAssetChangeBuilder previousValue(Asset previousValue)

      Value before the change.

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

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

      public Asset getPreviousValue()

      Value before the change.

      Returns:
      previousValue
    • build

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

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

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

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