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 Summary
Modifier and TypeMethodDescriptionaddActions(WorkObjectAction element) Adds one element toactionslist.addActions(WorkObjectAction... elements) Adds elements toactionslist.addAllActions(Iterable<? extends WorkObjectAction> elements) Adds elements toactionslist.build()Builds a newWorkObjectFlexpaneError.from(WorkObjectFlexpaneErrorIF instance) Fill a builder with attribute values from the providedWorkObjectFlexpaneErrorIFinstance.setActions(Iterable<? extends WorkObjectAction> elements) Sets or replaces all elements foractionslist.setCustomMessage(String customMessage) Initializes the optional valuecustomMessageto customMessage.setCustomMessage(Optional<String> customMessage) Initializes the optional valuecustomMessageto customMessage.setCustomTitle(String customTitle) Initializes the optional valuecustomTitleto customTitle.setCustomTitle(Optional<String> customTitle) Initializes the optional valuecustomTitleto customTitle.setMessageFormat(MessageFormat messageFormat) Initializes the value for themessageFormatattribute.Initializes the value for thestatusattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedWorkObjectFlexpaneErrorIFinstance. 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:
thisbuilder for use in a chained invocation
-
setStatus
Initializes the value for thestatusattribute.- Parameters:
status- The value for status- Returns:
thisbuilder for use in a chained invocation
-
setCustomTitle
Initializes the optional valuecustomTitleto customTitle.- Parameters:
customTitle- The value for customTitle,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setCustomTitle
Initializes the optional valuecustomTitleto customTitle.- Parameters:
customTitle- The value for customTitle- Returns:
thisbuilder for use in a chained invocation
-
setCustomMessage
Initializes the optional valuecustomMessageto customMessage.- Parameters:
customMessage- The value for customMessage,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setCustomMessage
Initializes the optional valuecustomMessageto customMessage.- Parameters:
customMessage- The value for customMessage- Returns:
thisbuilder for use in a chained invocation
-
setMessageFormat
Initializes the value for themessageFormatattribute.- Parameters:
messageFormat- The value for messageFormat- Returns:
thisbuilder for use in a chained invocation
-
addActions
Adds one element toactionslist.- Parameters:
element- A actions element- Returns:
thisbuilder for use in a chained invocation
-
addActions
Adds elements toactionslist.- Parameters:
elements- An array of actions elements- Returns:
thisbuilder for use in a chained invocation
-
setActions
public final WorkObjectFlexpaneError.Builder setActions(Iterable<? extends WorkObjectAction> elements) Sets or replaces all elements foractionslist.- Parameters:
elements- An iterable of actions elements- Returns:
thisbuilder for use in a chained invocation
-
addAllActions
public final WorkObjectFlexpaneError.Builder addAllActions(Iterable<? extends WorkObjectAction> elements) Adds elements toactionslist.- Parameters:
elements- An iterable of actions elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWorkObjectFlexpaneError.- Returns:
- An immutable instance of WorkObjectFlexpaneError
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-