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().

  • Method Details

    • getText

      public String getText()
      Specified by:
      getText in interface WorkObjectActionIF
      Returns:
      The value of the text attribute
    • getActionId

      public String getActionId()
      Specified by:
      getActionId in interface WorkObjectActionIF
      Returns:
      The value of the actionId attribute
    • getValue

      public Optional<String> getValue()
      Specified by:
      getValue in interface WorkObjectActionIF
      Returns:
      The value of the value attribute
    • getStyle

      public Optional<WorkObjectActionStyle> getStyle()
      Specified by:
      getStyle in interface WorkObjectActionIF
      Returns:
      The value of the style attribute
    • getUrl

      public Optional<String> getUrl()
      Specified by:
      getUrl in interface WorkObjectActionIF
      Returns:
      The value of the url attribute
    • getAccessibilityLabel

      public Optional<String> getAccessibilityLabel()
      Specified by:
      getAccessibilityLabel in interface WorkObjectActionIF
      Returns:
      The value of the accessibilityLabel attribute
    • withText

      public final WorkObjectAction withText(String value)
      Copy the current immutable object by setting a value for the text attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for text
      Returns:
      A modified copy or the this object
    • withActionId

      public final WorkObjectAction withActionId(String value)
      Copy the current immutable object by setting a value for the actionId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for actionId
      Returns:
      A modified copy or the this object
    • withValue

      public final WorkObjectAction withValue(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional value attribute.
      Parameters:
      value - The value for value, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withValue

      public final WorkObjectAction withValue(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the value attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for value
      Returns:
      A modified copy or this if not changed
    • withStyle

      public final WorkObjectAction withStyle(@Nullable WorkObjectActionStyle value)
      Copy the current immutable object by setting a present value for the optional style attribute.
      Parameters:
      value - The value for style, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withStyle

      public final WorkObjectAction withStyle(Optional<? extends WorkObjectActionStyle> optional)
      Copy the current immutable object by setting an optional value for the style attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for style
      Returns:
      A modified copy or this if not changed
    • withUrl

      public final WorkObjectAction withUrl(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional url attribute.
      Parameters:
      value - The value for url, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withUrl

      public final WorkObjectAction withUrl(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the url attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for url
      Returns:
      A modified copy or this if not changed
    • withAccessibilityLabel

      public final WorkObjectAction withAccessibilityLabel(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional accessibilityLabel attribute.
      Parameters:
      value - The value for accessibilityLabel, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withAccessibilityLabel

      public final WorkObjectAction withAccessibilityLabel(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the accessibilityLabel attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for accessibilityLabel
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of WorkObjectAction 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: text, actionId, value, style, url, accessibilityLabel.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static WorkObjectAction copyOf(WorkObjectActionIF instance)
      Creates an immutable copy of a WorkObjectActionIF 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 WorkObjectAction instance
    • builder

      public static WorkObjectAction.Builder builder()
      Creates a builder for WorkObjectAction.
       WorkObjectAction.builder()
          .setText(String) // required text
          .setActionId(String) // required actionId
          .setValue(Optional<String>) // optional value
          .setStyle(Optional<com.hubspot.slack.client.methods.params.chat.workobject.actions.WorkObjectActionStyle>) // optional style
          .setUrl(Optional<String>) // optional url
          .setAccessibilityLabel(Optional<String>) // optional accessibilityLabel
          .build();
       
      Returns:
      A new WorkObjectAction builder