Class ImmutableActionItem.Builder

java.lang.Object
io.dialob.api.proto.ImmutableActionItem.Builder
Enclosing class:
ImmutableActionItem

@NotThreadSafe public static final class ImmutableActionItem.Builder extends Object
Builds instances of type ImmutableActionItem. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      public final ImmutableActionItem.Builder from(ActionItem instance)
      Fill a builder with attribute values from the provided ActionItem instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • id

      public final ImmutableActionItem.Builder id(String id)
      Initializes the value for the id attribute.
      Parameters:
      id - The value for id
      Returns:
      this builder for use in a chained invocation
    • type

      public final ImmutableActionItem.Builder type(String type)
      Initializes the value for the type attribute.
      Parameters:
      type - The value for type
      Returns:
      this builder for use in a chained invocation
    • view

      public final ImmutableActionItem.Builder view(String view)
      Initializes the value for the view attribute.
      Parameters:
      view - The value for view (can be null)
      Returns:
      this builder for use in a chained invocation
    • label

      public final ImmutableActionItem.Builder label(String label)
      Initializes the value for the label attribute.
      Parameters:
      label - The value for label (can be null)
      Returns:
      this builder for use in a chained invocation
    • description

      public final ImmutableActionItem.Builder description(String description)
      Initializes the value for the description attribute.
      Parameters:
      description - The value for description (can be null)
      Returns:
      this builder for use in a chained invocation
    • inactive

      public final ImmutableActionItem.Builder inactive(Boolean inactive)
      Initializes the value for the inactive attribute.
      Parameters:
      inactive - The value for inactive (can be null)
      Returns:
      this builder for use in a chained invocation
    • disabled

      public final ImmutableActionItem.Builder disabled(Boolean disabled)
      Initializes the value for the disabled attribute.
      Parameters:
      disabled - The value for disabled (can be null)
      Returns:
      this builder for use in a chained invocation
    • required

      public final ImmutableActionItem.Builder required(Boolean required)
      Initializes the value for the required attribute.
      Parameters:
      required - The value for required (can be null)
      Returns:
      this builder for use in a chained invocation
    • addClassName

      public final ImmutableActionItem.Builder addClassName(String element)
      Adds one element to className list.
      Parameters:
      element - A className element
      Returns:
      this builder for use in a chained invocation
    • addClassName

      public final ImmutableActionItem.Builder addClassName(String... elements)
      Adds elements to className list.
      Parameters:
      elements - An array of className elements
      Returns:
      this builder for use in a chained invocation
    • className

      public final ImmutableActionItem.Builder className(Iterable<String> elements)
      Sets or replaces all elements for className list.
      Parameters:
      elements - An iterable of className elements
      Returns:
      this builder for use in a chained invocation
    • addAllClassName

      public final ImmutableActionItem.Builder addAllClassName(Iterable<String> elements)
      Adds elements to className list.
      Parameters:
      elements - An iterable of className elements
      Returns:
      this builder for use in a chained invocation
    • value

      public final ImmutableActionItem.Builder value(Object value)
      Initializes the value for the value attribute.
      Parameters:
      value - The value for value (can be null)
      Returns:
      this builder for use in a chained invocation
    • addItems

      public final ImmutableActionItem.Builder addItems(String element)
      Adds one element to items list.
      Parameters:
      element - A items element
      Returns:
      this builder for use in a chained invocation
    • addItems

      public final ImmutableActionItem.Builder addItems(String... elements)
      Adds elements to items list.
      Parameters:
      elements - An array of items elements
      Returns:
      this builder for use in a chained invocation
    • items

      public final ImmutableActionItem.Builder items(Iterable<String> elements)
      Sets or replaces all elements for items list.
      Parameters:
      elements - An iterable of items elements
      Returns:
      this builder for use in a chained invocation
    • addAllItems

      public final ImmutableActionItem.Builder addAllItems(Iterable<String> elements)
      Adds elements to items list.
      Parameters:
      elements - An iterable of items elements
      Returns:
      this builder for use in a chained invocation
    • activeItem

      public final ImmutableActionItem.Builder activeItem(String activeItem)
      Initializes the value for the activeItem attribute.
      Parameters:
      activeItem - The value for activeItem (can be null)
      Returns:
      this builder for use in a chained invocation
    • addAvailableItems

      public final ImmutableActionItem.Builder addAvailableItems(String element)
      Adds one element to availableItems list.
      Parameters:
      element - A availableItems element
      Returns:
      this builder for use in a chained invocation
    • addAvailableItems

      public final ImmutableActionItem.Builder addAvailableItems(String... elements)
      Adds elements to availableItems list.
      Parameters:
      elements - An array of availableItems elements
      Returns:
      this builder for use in a chained invocation
    • availableItems

      public final ImmutableActionItem.Builder availableItems(Iterable<String> elements)
      Sets or replaces all elements for availableItems list.
      Parameters:
      elements - An iterable of availableItems elements
      Returns:
      this builder for use in a chained invocation
    • addAllAvailableItems

      public final ImmutableActionItem.Builder addAllAvailableItems(Iterable<String> elements)
      Adds elements to availableItems list.
      Parameters:
      elements - An iterable of availableItems elements
      Returns:
      this builder for use in a chained invocation
    • addAllowedActions

      public final ImmutableActionItem.Builder addAllowedActions(Action.Type element)
      Adds one element to allowedActions set.
      Parameters:
      element - A allowedActions element
      Returns:
      this builder for use in a chained invocation
    • addAllowedActions

      public final ImmutableActionItem.Builder addAllowedActions(Action.Type... elements)
      Adds elements to allowedActions set.
      Parameters:
      elements - An array of allowedActions elements
      Returns:
      this builder for use in a chained invocation
    • allowedActions

      public final ImmutableActionItem.Builder allowedActions(Iterable<Action.Type> elements)
      Sets or replaces all elements for allowedActions set.
      Parameters:
      elements - An iterable of allowedActions elements
      Returns:
      this builder for use in a chained invocation
    • addAllAllowedActions

      public final ImmutableActionItem.Builder addAllAllowedActions(Iterable<Action.Type> elements)
      Adds elements to allowedActions set.
      Parameters:
      elements - An iterable of allowedActions elements
      Returns:
      this builder for use in a chained invocation
    • answered

      public final ImmutableActionItem.Builder answered(Boolean answered)
      Initializes the value for the answered attribute.
      Parameters:
      answered - The value for answered (can be null)
      Returns:
      this builder for use in a chained invocation
    • valueSetId

      public final ImmutableActionItem.Builder valueSetId(String valueSetId)
      Initializes the value for the valueSetId attribute.
      Parameters:
      valueSetId - The value for valueSetId (can be null)
      Returns:
      this builder for use in a chained invocation
    • putProps

      public final ImmutableActionItem.Builder putProps(@Nullable String key, @Nullable Object value)
      Put one entry to the props map.
      Parameters:
      key - The key in the props map
      value - The associated value in the props map
      Returns:
      this builder for use in a chained invocation
    • putProps

      public final ImmutableActionItem.Builder putProps(Map.Entry<String,? extends Object> entry)
      Put one entry to the props map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder for use in a chained invocation
    • props

      public final ImmutableActionItem.Builder props(Map<String,? extends Object> entries)
      Sets or replaces all mappings from the specified map as entries for the props map. Nulls are not permitted as keys or values, but parameter itself can be null
      Parameters:
      entries - The entries that will be added to the props map
      Returns:
      this builder for use in a chained invocation
    • putAllProps

      public final ImmutableActionItem.Builder putAllProps(Map<String,? extends Object> entries)
      Put all mappings from the specified map as entries to props map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the props map
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableActionItem build()
      Builds a new ImmutableActionItem.
      Returns:
      An immutable instance of ActionItem
      Throws:
      IllegalStateException - if any required attributes are missing