Class AssociateRoleUpdateBuilder

java.lang.Object
com.commercetools.api.models.associate_role.AssociateRoleUpdateBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<AssociateRoleUpdate>

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

     AssociateRoleUpdate associateRoleUpdate = AssociateRoleUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • AssociateRoleUpdateBuilder

      public AssociateRoleUpdateBuilder()
  • Method Details

    • version

      public AssociateRoleUpdateBuilder version(Long version)

      Expected version of the AssociateRole on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

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

      Update actions to be performed on the AssociateRole.

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

      Update actions to be performed on the AssociateRole.

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

      public AssociateRoleUpdateBuilder plusActions(AssociateRoleUpdateAction... actions)

      Update actions to be performed on the AssociateRole.

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

      public AssociateRoleUpdateBuilder plusActions(Function<AssociateRoleUpdateActionBuilder,io.vrap.rmf.base.client.Builder<? extends AssociateRoleUpdateAction>> builder)

      Update actions to be performed on the AssociateRole.

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

      public AssociateRoleUpdateBuilder withActions(Function<AssociateRoleUpdateActionBuilder,io.vrap.rmf.base.client.Builder<? extends AssociateRoleUpdateAction>> builder)

      Update actions to be performed on the AssociateRole.

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

      public Long getVersion()

      Expected version of the AssociateRole on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      Returns:
      version
    • getActions

      public List<AssociateRoleUpdateAction> getActions()

      Update actions to be performed on the AssociateRole.

      Returns:
      actions
    • build

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

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

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

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