Class WorkObjectFlexpaneError.Builder

java.lang.Object
com.hubspot.slack.client.methods.params.chat.workobject.flexpane.WorkObjectFlexpaneError.Builder
Enclosing class:
WorkObjectFlexpaneError

@Generated(from="WorkObjectFlexpaneErrorIF", generator="Immutables") @NotThreadSafe public static final class WorkObjectFlexpaneError.Builder extends Object
Builds instances of type WorkObjectFlexpaneError. 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

      Fill a builder with attribute values from the provided WorkObjectFlexpaneErrorIF 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
    • setStatus

      Initializes the value for the status attribute.
      Parameters:
      status - The value for status
      Returns:
      this builder for use in a chained invocation
    • setCustomTitle

      public final WorkObjectFlexpaneError.Builder setCustomTitle(@Nullable String customTitle)
      Initializes the optional value customTitle to customTitle.
      Parameters:
      customTitle - The value for customTitle, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setCustomTitle

      public final WorkObjectFlexpaneError.Builder setCustomTitle(Optional<String> customTitle)
      Initializes the optional value customTitle to customTitle.
      Parameters:
      customTitle - The value for customTitle
      Returns:
      this builder for use in a chained invocation
    • setCustomMessage

      public final WorkObjectFlexpaneError.Builder setCustomMessage(@Nullable String customMessage)
      Initializes the optional value customMessage to customMessage.
      Parameters:
      customMessage - The value for customMessage, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setCustomMessage

      public final WorkObjectFlexpaneError.Builder setCustomMessage(Optional<String> customMessage)
      Initializes the optional value customMessage to customMessage.
      Parameters:
      customMessage - The value for customMessage
      Returns:
      this builder for use in a chained invocation
    • setMessageFormat

      public final WorkObjectFlexpaneError.Builder setMessageFormat(MessageFormat messageFormat)
      Initializes the value for the messageFormat attribute.
      Parameters:
      messageFormat - The value for messageFormat
      Returns:
      this builder for use in a chained invocation
    • addActions

      public final WorkObjectFlexpaneError.Builder addActions(WorkObjectAction element)
      Adds one element to actions list.
      Parameters:
      element - A actions element
      Returns:
      this builder for use in a chained invocation
    • addActions

      public final WorkObjectFlexpaneError.Builder addActions(WorkObjectAction... elements)
      Adds elements to actions list.
      Parameters:
      elements - An array of actions elements
      Returns:
      this builder for use in a chained invocation
    • setActions

      public final WorkObjectFlexpaneError.Builder setActions(Iterable<? extends WorkObjectAction> elements)
      Sets or replaces all elements for actions list.
      Parameters:
      elements - An iterable of actions elements
      Returns:
      this builder for use in a chained invocation
    • addAllActions

      public final WorkObjectFlexpaneError.Builder addAllActions(Iterable<? extends WorkObjectAction> elements)
      Adds elements to actions list.
      Parameters:
      elements - An iterable of actions elements
      Returns:
      this builder for use in a chained invocation
    • build

      public WorkObjectFlexpaneError build()
      Returns:
      An immutable instance of WorkObjectFlexpaneError
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing