Class StateSetRolesActionBuilder

java.lang.Object
com.commercetools.api.models.state.StateSetRolesActionBuilder
All Implemented Interfaces:
Builder<StateSetRolesAction>

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

     StateSetRolesAction stateSetRolesAction = StateSetRolesAction.builder()
             .plusRoles(rolesBuilder -> rolesBuilder)
             .build()
 
  • Constructor Details

    • StateSetRolesActionBuilder

      public StateSetRolesActionBuilder()
  • Method Details

    • roles

      public StateSetRolesActionBuilder roles(StateRoleEnum... roles)

      Value to set. If empty, any existing value will be removed.

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

      Value to set. If empty, any existing value will be removed.

      Parameters:
      roles - value to be set
      Returns:
      Builder
    • plusRoles

      public StateSetRolesActionBuilder plusRoles(StateRoleEnum... roles)

      Value to set. If empty, any existing value will be removed.

      Parameters:
      roles - value to be set
      Returns:
      Builder
    • getRoles

      public List<StateRoleEnum> getRoles()

      Value to set. If empty, any existing value will be removed.

      Returns:
      roles
    • build

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

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

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

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