Class ImmutableActionItem

  • All Implemented Interfaces:
    ActionItem, Serializable

    @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    public final class ImmutableActionItem
    extends Object
    implements ActionItem
    Immutable implementation of ActionItem.

    Use the builder to create immutable instances: ImmutableActionItem.builder().

    See Also:
    Serialized Form
    • Method Detail

      • getId

        public String getId()
        Specified by:
        getId in interface ActionItem
        Returns:
        The value of the id attribute
      • getType

        public String getType()
        Specified by:
        getType in interface ActionItem
        Returns:
        The value of the type attribute
      • getView

        public String getView()
        Specified by:
        getView in interface ActionItem
        Returns:
        The value of the view attribute
      • getLabel

        public String getLabel()
        Specified by:
        getLabel in interface ActionItem
        Returns:
        The value of the label attribute
      • getDescription

        public String getDescription()
        Specified by:
        getDescription in interface ActionItem
        Returns:
        The value of the description attribute
      • getInactive

        public Boolean getInactive()
        Specified by:
        getInactive in interface ActionItem
        Returns:
        The value of the inactive attribute
      • getDisabled

        public Boolean getDisabled()
        Specified by:
        getDisabled in interface ActionItem
        Returns:
        The value of the disabled attribute
      • getRequired

        public Boolean getRequired()
        Specified by:
        getRequired in interface ActionItem
        Returns:
        The value of the required attribute
      • getValue

        public Object getValue()
        Specified by:
        getValue in interface ActionItem
        Returns:
        The value of the value attribute
      • getActiveItem

        public String getActiveItem()
        Specified by:
        getActiveItem in interface ActionItem
        Returns:
        The value of the activeItem attribute
      • getAnswered

        public Boolean getAnswered()
        Specified by:
        getAnswered in interface ActionItem
        Returns:
        The value of the answered attribute
      • getValueSetId

        public String getValueSetId()
        Specified by:
        getValueSetId in interface ActionItem
        Returns:
        The value of the valueSetId attribute
      • withId

        public final ImmutableActionItem withId​(String value)
        Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for id
        Returns:
        A modified copy of the this object
      • withType

        public final ImmutableActionItem withType​(String value)
        Copy the current immutable object by setting a value for the type attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for type
        Returns:
        A modified copy of the this object
      • withView

        public final ImmutableActionItem withView​(String value)
        Copy the current immutable object by setting a value for the view attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for view (can be null)
        Returns:
        A modified copy of the this object
      • withLabel

        public final ImmutableActionItem withLabel​(String value)
        Copy the current immutable object by setting a value for the label attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for label (can be null)
        Returns:
        A modified copy of the this object
      • withDescription

        public final ImmutableActionItem withDescription​(String value)
        Copy the current immutable object by setting a value for the description attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for description (can be null)
        Returns:
        A modified copy of the this object
      • withInactive

        public final ImmutableActionItem withInactive​(Boolean value)
        Copy the current immutable object by setting a value for the inactive attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for inactive (can be null)
        Returns:
        A modified copy of the this object
      • withDisabled

        public final ImmutableActionItem withDisabled​(Boolean value)
        Copy the current immutable object by setting a value for the disabled attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for disabled (can be null)
        Returns:
        A modified copy of the this object
      • withRequired

        public final ImmutableActionItem withRequired​(Boolean value)
        Copy the current immutable object by setting a value for the required attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for required (can be null)
        Returns:
        A modified copy of the this object
      • withClassName

        public final ImmutableActionItem withClassName​(String... elements)
        Copy the current immutable object with elements that replace the content of className.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withClassName

        public final ImmutableActionItem withClassName​(Iterable<String> elements)
        Copy the current immutable object with elements that replace the content of className. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of className elements to set
        Returns:
        A modified copy of this object
      • withValue

        public final ImmutableActionItem withValue​(Object value)
        Copy the current immutable object by setting a value for the value attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for value (can be null)
        Returns:
        A modified copy of the this object
      • withItems

        public final ImmutableActionItem withItems​(String... elements)
        Copy the current immutable object with elements that replace the content of items.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withItems

        public final ImmutableActionItem withItems​(Iterable<String> elements)
        Copy the current immutable object with elements that replace the content of items. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of items elements to set
        Returns:
        A modified copy of this object
      • withActiveItem

        public final ImmutableActionItem withActiveItem​(String value)
        Copy the current immutable object by setting a value for the activeItem attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for activeItem (can be null)
        Returns:
        A modified copy of the this object
      • withAvailableItems

        public final ImmutableActionItem withAvailableItems​(String... elements)
        Copy the current immutable object with elements that replace the content of availableItems.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withAvailableItems

        public final ImmutableActionItem withAvailableItems​(Iterable<String> elements)
        Copy the current immutable object with elements that replace the content of availableItems. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of availableItems elements to set
        Returns:
        A modified copy of this object
      • withAllowedActions

        public final ImmutableActionItem withAllowedActions​(Action.Type... elements)
        Copy the current immutable object with elements that replace the content of allowedActions.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withAllowedActions

        public final ImmutableActionItem withAllowedActions​(Iterable<Action.Type> elements)
        Copy the current immutable object with elements that replace the content of allowedActions. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of allowedActions elements to set
        Returns:
        A modified copy of this object
      • withAnswered

        public final ImmutableActionItem withAnswered​(Boolean value)
        Copy the current immutable object by setting a value for the answered attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for answered (can be null)
        Returns:
        A modified copy of the this object
      • withValueSetId

        public final ImmutableActionItem withValueSetId​(String value)
        Copy the current immutable object by setting a value for the valueSetId attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for valueSetId (can be null)
        Returns:
        A modified copy of the this object
      • withProps

        public final ImmutableActionItem withProps​(Map<String,​? extends Object> entries)
        Copy the current immutable object by replacing the props map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        entries - The entries to be added to the props map
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableActionItem that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: id, type, view, label, description, inactive, disabled, required, className, value, items, activeItem, availableItems, allowedActions, answered, valueSetId, props.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value ActionItem with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableActionItem copyOf​(ActionItem instance)
        Creates an immutable copy of a ActionItem value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable ActionItem instance
      • builder

        public static ImmutableActionItem.Builder builder()
        Creates a builder for ImmutableActionItem.
         ImmutableActionItem.builder()
            .id(String) // required id
            .type(String) // required type
            .view(String | null) // nullable view
            .label(String | null) // nullable label
            .description(String | null) // nullable description
            .inactive(Boolean | null) // nullable inactive
            .disabled(Boolean | null) // nullable disabled
            .required(Boolean | null) // nullable required
            .className(List&lt;String&gt; | null) // nullable className
            .value(Object | null) // nullable value
            .items(List&lt;String&gt; | null) // nullable items
            .activeItem(String | null) // nullable activeItem
            .availableItems(List&lt;String&gt; | null) // nullable availableItems
            .allowedActions(Set&lt;io.dialob.api.proto.Action.Type&gt; | null) // nullable allowedActions
            .answered(Boolean | null) // nullable answered
            .valueSetId(String | null) // nullable valueSetId
            .props(Map&lt;String, Object&gt; | null) // nullable props
            .build();
         
        Returns:
        A new ImmutableActionItem builder