Class ApprovalRuleUpdateBuilder

java.lang.Object
com.commercetools.api.models.approval_rule.ApprovalRuleUpdateBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<ApprovalRuleUpdate>

public class ApprovalRuleUpdateBuilder extends Object implements io.vrap.rmf.base.client.Builder<ApprovalRuleUpdate>
ApprovalRuleUpdateBuilder
Example to create an instance using the builder pattern

     ApprovalRuleUpdate approvalRuleUpdate = ApprovalRuleUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • ApprovalRuleUpdateBuilder

      public ApprovalRuleUpdateBuilder()
  • Method Details

    • version

      public ApprovalRuleUpdateBuilder version(Long version)

      Expected version of the ApprovalRule to which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

      Parameters:
      version - value to be set
      Returns:
      Builder
    • actions

      Update actions to be performed on the ApprovalRule.

      Parameters:
      actions - value to be set
      Returns:
      Builder
    • actions

      Update actions to be performed on the ApprovalRule.

      Parameters:
      actions - value to be set
      Returns:
      Builder
    • plusActions

      public ApprovalRuleUpdateBuilder plusActions(ApprovalRuleUpdateAction... actions)

      Update actions to be performed on the ApprovalRule.

      Parameters:
      actions - value to be set
      Returns:
      Builder
    • plusActions

      public ApprovalRuleUpdateBuilder plusActions(Function<ApprovalRuleUpdateActionBuilder,io.vrap.rmf.base.client.Builder<? extends ApprovalRuleUpdateAction>> builder)

      Update actions to be performed on the ApprovalRule.

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

      public ApprovalRuleUpdateBuilder withActions(Function<ApprovalRuleUpdateActionBuilder,io.vrap.rmf.base.client.Builder<? extends ApprovalRuleUpdateAction>> builder)

      Update actions to be performed on the ApprovalRule.

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

      public Long getVersion()

      Expected version of the ApprovalRule to which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

      Returns:
      version
    • getActions

      public List<ApprovalRuleUpdateAction> getActions()

      Update actions to be performed on the ApprovalRule.

      Returns:
      actions
    • build

      public ApprovalRuleUpdate build()
      builds ApprovalRuleUpdate with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<ApprovalRuleUpdate>
      Returns:
      ApprovalRuleUpdate
    • buildUnchecked

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

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

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