Class WorkObjectAction
java.lang.Object
com.hubspot.slack.client.methods.params.chat.workobject.actions.WorkObjectAction
- All Implemented Interfaces:
WorkObjectActionIF
@Generated(from="WorkObjectActionIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class WorkObjectAction
extends Object
implements WorkObjectActionIF
Immutable implementation of
WorkObjectActionIF.
Use the builder to create immutable instances:
WorkObjectAction.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic WorkObjectAction.Builderbuilder()Creates a builder forWorkObjectAction.static WorkObjectActioncopyOf(WorkObjectActionIF instance) Creates an immutable copy of aWorkObjectActionIFvalue.booleanThis instance is equal to all instances ofWorkObjectActionthat have equal attribute values.getStyle()getText()getUrl()getValue()inthashCode()Computes a hash code from attributes:text,actionId,value,style,url,accessibilityLabel.toString()Prints the immutable valueWorkObjectActionwith attribute values.final WorkObjectActionwithAccessibilityLabel(String value) Copy the current immutable object by setting a present value for the optionalaccessibilityLabelattribute.final WorkObjectActionwithAccessibilityLabel(Optional<String> optional) Copy the current immutable object by setting an optional value for theaccessibilityLabelattribute.final WorkObjectActionwithActionId(String value) Copy the current immutable object by setting a value for theactionIdattribute.final WorkObjectActionwithStyle(WorkObjectActionStyle value) Copy the current immutable object by setting a present value for the optionalstyleattribute.final WorkObjectActionwithStyle(Optional<? extends WorkObjectActionStyle> optional) Copy the current immutable object by setting an optional value for thestyleattribute.final WorkObjectActionCopy the current immutable object by setting a value for thetextattribute.final WorkObjectActionCopy the current immutable object by setting a present value for the optionalurlattribute.final WorkObjectActionCopy the current immutable object by setting an optional value for theurlattribute.final WorkObjectActionCopy the current immutable object by setting a present value for the optionalvalueattribute.final WorkObjectActionCopy the current immutable object by setting an optional value for thevalueattribute.
-
Method Details
-
getText
- Specified by:
getTextin interfaceWorkObjectActionIF- Returns:
- The value of the
textattribute
-
getActionId
- Specified by:
getActionIdin interfaceWorkObjectActionIF- Returns:
- The value of the
actionIdattribute
-
getValue
- Specified by:
getValuein interfaceWorkObjectActionIF- Returns:
- The value of the
valueattribute
-
getStyle
- Specified by:
getStylein interfaceWorkObjectActionIF- Returns:
- The value of the
styleattribute
-
getUrl
- Specified by:
getUrlin interfaceWorkObjectActionIF- Returns:
- The value of the
urlattribute
-
getAccessibilityLabel
- Specified by:
getAccessibilityLabelin interfaceWorkObjectActionIF- Returns:
- The value of the
accessibilityLabelattribute
-
withText
Copy the current immutable object by setting a value for thetextattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for text- Returns:
- A modified copy or the
thisobject
-
withActionId
Copy the current immutable object by setting a value for theactionIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for actionId- Returns:
- A modified copy or the
thisobject
-
withValue
Copy the current immutable object by setting a present value for the optionalvalueattribute.- Parameters:
value- The value for value,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withValue
Copy the current immutable object by setting an optional value for thevalueattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for value- Returns:
- A modified copy or
thisif not changed
-
withStyle
Copy the current immutable object by setting a present value for the optionalstyleattribute.- Parameters:
value- The value for style,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withStyle
Copy the current immutable object by setting an optional value for thestyleattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for style- Returns:
- A modified copy or
thisif not changed
-
withUrl
Copy the current immutable object by setting a present value for the optionalurlattribute.- Parameters:
value- The value for url,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withUrl
Copy the current immutable object by setting an optional value for theurlattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for url- Returns:
- A modified copy or
thisif not changed
-
withAccessibilityLabel
Copy the current immutable object by setting a present value for the optionalaccessibilityLabelattribute.- Parameters:
value- The value for accessibilityLabel,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withAccessibilityLabel
Copy the current immutable object by setting an optional value for theaccessibilityLabelattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for accessibilityLabel- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofWorkObjectActionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:text,actionId,value,style,url,accessibilityLabel. -
toString
Prints the immutable valueWorkObjectActionwith attribute values. -
copyOf
Creates an immutable copy of aWorkObjectActionIFvalue. 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 WorkObjectAction instance
-
builder
Creates a builder forWorkObjectAction.WorkObjectAction.builder() .setText(String) // requiredtext.setActionId(String) // requiredactionId.setValue(Optional<String>) // optionalvalue.setStyle(Optional<com.hubspot.slack.client.methods.params.chat.workobject.actions.WorkObjectActionStyle>) // optionalstyle.setUrl(Optional<String>) // optionalurl.setAccessibilityLabel(Optional<String>) // optionalaccessibilityLabel.build();- Returns:
- A new WorkObjectAction builder
-