@NotThreadSafe public static final class SlackError.Builder extends Object
SlackError.
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.
| Modifier and Type | Method and Description |
|---|---|
SlackError |
build()
Builds a new
SlackError. |
SlackError.Builder |
from(SlackErrorIF instance)
Fill a builder with attribute values from the provided
SlackErrorIF instance. |
SlackError.Builder |
setError(String error)
Initializes the value for the
error attribute. |
SlackError.Builder |
setType(SlackErrorType type)
Initializes the value for the
type attribute. |
public final SlackError.Builder from(SlackErrorIF instance)
SlackErrorIF instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SlackError.Builder setType(SlackErrorType type)
type attribute.
If not set, this attribute will have a default value as returned by the initializer of type.
type - The value for typethis builder for use in a chained invocationpublic final SlackError.Builder setError(String error)
error attribute.error - The value for errorthis builder for use in a chained invocationpublic SlackError build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
SlackError.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.