Package io.dialob.api.proto
Class ImmutableActionItem
- java.lang.Object
-
- io.dialob.api.proto.ImmutableActionItem
-
- All Implemented Interfaces:
ActionItem,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableActionItem extends Object implements ActionItem
Immutable implementation ofActionItem.Use the builder to create immutable instances:
ImmutableActionItem.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableActionItem.BuilderBuilds instances of typeImmutableActionItem.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableActionItem.Builderbuilder()Creates a builder forImmutableActionItem.static ImmutableActionItemcopyOf(ActionItem instance)Creates an immutable copy of aActionItemvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableActionItemthat have equal attribute values.StringgetActiveItem()Set<Action.Type>getAllowedActions()BooleangetAnswered()List<String>getAvailableItems()List<String>getClassName()StringgetDescription()BooleangetDisabled()StringgetId()BooleangetInactive()List<String>getItems()StringgetLabel()Map<String,Object>getProps()BooleangetRequired()StringgetType()ObjectgetValue()StringgetValueSetId()StringgetView()inthashCode()Computes a hash code from attributes:id,type,view,label,description,inactive,disabled,required,className,value,items,activeItem,availableItems,allowedActions,answered,valueSetId,props.StringtoString()Prints the immutable valueActionItemwith attribute values.ImmutableActionItemwithActiveItem(String value)Copy the current immutable object by setting a value for theactiveItemattribute.ImmutableActionItemwithAllowedActions(Action.Type... elements)Copy the current immutable object with elements that replace the content ofallowedActions.ImmutableActionItemwithAllowedActions(Iterable<Action.Type> elements)Copy the current immutable object with elements that replace the content ofallowedActions.ImmutableActionItemwithAnswered(Boolean value)Copy the current immutable object by setting a value for theansweredattribute.ImmutableActionItemwithAvailableItems(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofavailableItems.ImmutableActionItemwithAvailableItems(String... elements)Copy the current immutable object with elements that replace the content ofavailableItems.ImmutableActionItemwithClassName(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofclassName.ImmutableActionItemwithClassName(String... elements)Copy the current immutable object with elements that replace the content ofclassName.ImmutableActionItemwithDescription(String value)Copy the current immutable object by setting a value for thedescriptionattribute.ImmutableActionItemwithDisabled(Boolean value)Copy the current immutable object by setting a value for thedisabledattribute.ImmutableActionItemwithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableActionItemwithInactive(Boolean value)Copy the current immutable object by setting a value for theinactiveattribute.ImmutableActionItemwithItems(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofitems.ImmutableActionItemwithItems(String... elements)Copy the current immutable object with elements that replace the content ofitems.ImmutableActionItemwithLabel(String value)Copy the current immutable object by setting a value for thelabelattribute.ImmutableActionItemwithProps(Map<String,? extends Object> entries)Copy the current immutable object by replacing thepropsmap with the specified map.ImmutableActionItemwithRequired(Boolean value)Copy the current immutable object by setting a value for therequiredattribute.ImmutableActionItemwithType(String value)Copy the current immutable object by setting a value for thetypeattribute.ImmutableActionItemwithValue(Object value)Copy the current immutable object by setting a value for thevalueattribute.ImmutableActionItemwithValueSetId(String value)Copy the current immutable object by setting a value for thevalueSetIdattribute.ImmutableActionItemwithView(String value)Copy the current immutable object by setting a value for theviewattribute.
-
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getIdin interfaceActionItem- Returns:
- The value of the
idattribute
-
getType
public String getType()
- Specified by:
getTypein interfaceActionItem- Returns:
- The value of the
typeattribute
-
getView
public String getView()
- Specified by:
getViewin interfaceActionItem- Returns:
- The value of the
viewattribute
-
getLabel
public String getLabel()
- Specified by:
getLabelin interfaceActionItem- Returns:
- The value of the
labelattribute
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceActionItem- Returns:
- The value of the
descriptionattribute
-
getInactive
public Boolean getInactive()
- Specified by:
getInactivein interfaceActionItem- Returns:
- The value of the
inactiveattribute
-
getDisabled
public Boolean getDisabled()
- Specified by:
getDisabledin interfaceActionItem- Returns:
- The value of the
disabledattribute
-
getRequired
public Boolean getRequired()
- Specified by:
getRequiredin interfaceActionItem- Returns:
- The value of the
requiredattribute
-
getClassName
public List<String> getClassName()
- Specified by:
getClassNamein interfaceActionItem- Returns:
- The value of the
classNameattribute
-
getValue
public Object getValue()
- Specified by:
getValuein interfaceActionItem- Returns:
- The value of the
valueattribute
-
getItems
public List<String> getItems()
- Specified by:
getItemsin interfaceActionItem- Returns:
- The value of the
itemsattribute
-
getActiveItem
public String getActiveItem()
- Specified by:
getActiveItemin interfaceActionItem- Returns:
- The value of the
activeItemattribute
-
getAvailableItems
public List<String> getAvailableItems()
- Specified by:
getAvailableItemsin interfaceActionItem- Returns:
- The value of the
availableItemsattribute
-
getAllowedActions
public Set<Action.Type> getAllowedActions()
- Specified by:
getAllowedActionsin interfaceActionItem- Returns:
- The value of the
allowedActionsattribute
-
getAnswered
public Boolean getAnswered()
- Specified by:
getAnsweredin interfaceActionItem- Returns:
- The value of the
answeredattribute
-
getValueSetId
public String getValueSetId()
- Specified by:
getValueSetIdin interfaceActionItem- Returns:
- The value of the
valueSetIdattribute
-
getProps
public Map<String,Object> getProps()
- Specified by:
getPropsin interfaceActionItem- Returns:
- The value of the
propsattribute
-
withId
public final ImmutableActionItem withId(String value)
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withType
public final ImmutableActionItem withType(String value)
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy of the
thisobject
-
withView
public final ImmutableActionItem withView(String value)
Copy the current immutable object by setting a value for theviewattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for view (can benull)- Returns:
- A modified copy of the
thisobject
-
withLabel
public final ImmutableActionItem withLabel(String value)
Copy the current immutable object by setting a value for thelabelattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for label (can benull)- Returns:
- A modified copy of the
thisobject
-
withDescription
public final ImmutableActionItem withDescription(String value)
Copy the current immutable object by setting a value for thedescriptionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for description (can benull)- Returns:
- A modified copy of the
thisobject
-
withInactive
public final ImmutableActionItem withInactive(Boolean value)
Copy the current immutable object by setting a value for theinactiveattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for inactive (can benull)- Returns:
- A modified copy of the
thisobject
-
withDisabled
public final ImmutableActionItem withDisabled(Boolean value)
Copy the current immutable object by setting a value for thedisabledattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for disabled (can benull)- Returns:
- A modified copy of the
thisobject
-
withRequired
public final ImmutableActionItem withRequired(Boolean value)
Copy the current immutable object by setting a value for therequiredattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for required (can benull)- Returns:
- A modified copy of the
thisobject
-
withClassName
public final ImmutableActionItem withClassName(String... elements)
Copy the current immutable object with elements that replace the content ofclassName.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withClassName
public final ImmutableActionItem withClassName(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofclassName. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of className elements to set- Returns:
- A modified copy of
thisobject
-
withValue
public final ImmutableActionItem withValue(Object value)
Copy the current immutable object by setting a value for thevalueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value (can benull)- Returns:
- A modified copy of the
thisobject
-
withItems
public final ImmutableActionItem withItems(String... elements)
Copy the current immutable object with elements that replace the content ofitems.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withItems
public final ImmutableActionItem withItems(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofitems. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of items elements to set- Returns:
- A modified copy of
thisobject
-
withActiveItem
public final ImmutableActionItem withActiveItem(String value)
Copy the current immutable object by setting a value for theactiveItemattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for activeItem (can benull)- Returns:
- A modified copy of the
thisobject
-
withAvailableItems
public final ImmutableActionItem withAvailableItems(String... elements)
Copy the current immutable object with elements that replace the content ofavailableItems.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAvailableItems
public final ImmutableActionItem withAvailableItems(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofavailableItems. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of availableItems elements to set- Returns:
- A modified copy of
thisobject
-
withAllowedActions
public final ImmutableActionItem withAllowedActions(Action.Type... elements)
Copy the current immutable object with elements that replace the content ofallowedActions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAllowedActions
public final ImmutableActionItem withAllowedActions(Iterable<Action.Type> elements)
Copy the current immutable object with elements that replace the content ofallowedActions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of allowedActions elements to set- Returns:
- A modified copy of
thisobject
-
withAnswered
public final ImmutableActionItem withAnswered(Boolean value)
Copy the current immutable object by setting a value for theansweredattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for answered (can benull)- Returns:
- A modified copy of the
thisobject
-
withValueSetId
public final ImmutableActionItem withValueSetId(String value)
Copy the current immutable object by setting a value for thevalueSetIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for valueSetId (can benull)- Returns:
- A modified copy of the
thisobject
-
withProps
public final ImmutableActionItem withProps(Map<String,? extends Object> entries)
Copy the current immutable object by replacing thepropsmap 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 returningthis.- Parameters:
entries- The entries to be added to the props map- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableActionItemthat have equal attribute values.
-
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.
-
toString
public String toString()
Prints the immutable valueActionItemwith attribute values.
-
copyOf
public static ImmutableActionItem copyOf(ActionItem instance)
Creates an immutable copy of aActionItemvalue. 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 forImmutableActionItem.ImmutableActionItem.builder() .id(String) // requiredid.type(String) // requiredtype.view(String | null) // nullableview.label(String | null) // nullablelabel.description(String | null) // nullabledescription.inactive(Boolean | null) // nullableinactive.disabled(Boolean | null) // nullabledisabled.required(Boolean | null) // nullablerequired.className(List<String> | null) // nullableclassName.value(Object | null) // nullablevalue.items(List<String> | null) // nullableitems.activeItem(String | null) // nullableactiveItem.availableItems(List<String> | null) // nullableavailableItems.allowedActions(Set<io.dialob.api.proto.Action.Type> | null) // nullableallowedActions.answered(Boolean | null) // nullableanswered.valueSetId(String | null) // nullablevalueSetId.props(Map<String, Object> | null) // nullableprops.build();- Returns:
- A new ImmutableActionItem builder
-
-