@NotThreadSafe public static final class ImmutableErrorDetails.Builder extends Object
ImmutableErrorDetails.
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 |
|---|---|
ImmutableErrorDetails |
build()
Builds a new
ImmutableErrorDetails. |
ImmutableErrorDetails.Builder |
errorCode(ErrorCode errorCode)
Initializes the value for the
errorCode attribute. |
ImmutableErrorDetails.Builder |
errorMessage(String errorMessage)
Initializes the value for the
errorMessage attribute. |
ImmutableErrorDetails.Builder |
from(ErrorDetails instance)
Fill a builder with attribute values from the provided
ErrorDetails instance. |
ImmutableErrorDetails.Builder |
retryAfterSeconds(Integer retryAfterSeconds)
Initializes the value for the
retryAfterSeconds attribute. |
public final ImmutableErrorDetails.Builder from(ErrorDetails instance)
ErrorDetails 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 ImmutableErrorDetails.Builder errorCode(ErrorCode errorCode)
errorCode attribute.errorCode - The value for errorCodethis builder for use in a chained invocationpublic final ImmutableErrorDetails.Builder retryAfterSeconds(@Nullable Integer retryAfterSeconds)
retryAfterSeconds attribute.retryAfterSeconds - The value for retryAfterSeconds (can be null)this builder for use in a chained invocationpublic final ImmutableErrorDetails.Builder errorMessage(String errorMessage)
errorMessage attribute.errorMessage - The value for errorMessagethis builder for use in a chained invocationpublic ImmutableErrorDetails build()
ImmutableErrorDetails.IllegalStateException - if any required attributes are missingCopyright © 2021–2022 Amazon Web Services. All rights reserved.