Class AwsJsonProtocolErrorUnmarshaller.Builder
- java.lang.Object
-
- software.amazon.awssdk.protocols.json.internal.unmarshall.AwsJsonProtocolErrorUnmarshaller.Builder
-
- Enclosing class:
- AwsJsonProtocolErrorUnmarshaller
public static final class AwsJsonProtocolErrorUnmarshaller.Builder extends Object
Builder forAwsJsonProtocolErrorUnmarshaller
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AwsJsonProtocolErrorUnmarshaller
build()
AwsJsonProtocolErrorUnmarshaller.Builder
defaultExceptionSupplier(Supplier<SdkPojo> defaultExceptionSupplier)
Default exception type if "error code" does not match any known modeled exception.AwsJsonProtocolErrorUnmarshaller.Builder
errorCodeParser(ErrorCodeParser errorCodeParser)
Implementation ofErrorCodeParser
that can extract an error code or type from the JSON response.AwsJsonProtocolErrorUnmarshaller.Builder
errorMessageParser(ErrorMessageParser errorMessageParser)
Implementation that can extract an error message from the JSON response.AwsJsonProtocolErrorUnmarshaller.Builder
exceptionMetadataSupplier(Function<String,Optional<ExceptionMetadata>> exceptionMetadataSupplier)
AwsJsonProtocolErrorUnmarshaller.Builder
exceptions(List<ExceptionMetadata> exceptions)
Deprecated.AwsJsonProtocolErrorUnmarshaller.Builder
hasAwsQueryCompatible(boolean hasAwsQueryCompatible)
Provides a check on whether AwsQueryCompatible trait is found in Metadata.AwsJsonProtocolErrorUnmarshaller.Builder
jsonFactory(software.amazon.awssdk.thirdparty.jackson.core.JsonFactory jsonFactory)
JSON Factory to create a JSON parser.AwsJsonProtocolErrorUnmarshaller.Builder
jsonProtocolUnmarshaller(JsonProtocolUnmarshaller jsonProtocolUnmarshaller)
Underlying response unmarshaller.
-
-
-
Method Detail
-
jsonProtocolUnmarshaller
public AwsJsonProtocolErrorUnmarshaller.Builder jsonProtocolUnmarshaller(JsonProtocolUnmarshaller jsonProtocolUnmarshaller)
Underlying response unmarshaller. Exceptions for the JSON protocol are follow the same unmarshalling logic as success responses but with an additional "error type" that allows for polymorphic deserialization.- Returns:
- This builder for method chaining.
-
exceptions
@Deprecated public AwsJsonProtocolErrorUnmarshaller.Builder exceptions(List<ExceptionMetadata> exceptions)
Deprecated.List ofExceptionMetadata
to represent the modeled exceptions for the service. For AWS services the error type is a string representing the type of the modeled exception.- Returns:
- This builder for method chaining.
-
exceptionMetadataSupplier
public AwsJsonProtocolErrorUnmarshaller.Builder exceptionMetadataSupplier(Function<String,Optional<ExceptionMetadata>> exceptionMetadataSupplier)
-
errorMessageParser
public AwsJsonProtocolErrorUnmarshaller.Builder errorMessageParser(ErrorMessageParser errorMessageParser)
Implementation that can extract an error message from the JSON response. Implementations may look for a specific field in the JSON document or a specific header for example.- Returns:
- This builder for method chaining.
-
jsonFactory
public AwsJsonProtocolErrorUnmarshaller.Builder jsonFactory(software.amazon.awssdk.thirdparty.jackson.core.JsonFactory jsonFactory)
JSON Factory to create a JSON parser.- Returns:
- This builder for method chaining.
-
defaultExceptionSupplier
public AwsJsonProtocolErrorUnmarshaller.Builder defaultExceptionSupplier(Supplier<SdkPojo> defaultExceptionSupplier)
Default exception type if "error code" does not match any known modeled exception. This is the generated base exception for the service (i.e. DynamoDbException).- Returns:
- This builder for method chaining.
-
errorCodeParser
public AwsJsonProtocolErrorUnmarshaller.Builder errorCodeParser(ErrorCodeParser errorCodeParser)
Implementation ofErrorCodeParser
that can extract an error code or type from the JSON response. Implementations may look for a specific field in the JSON document or a specific header for example.- Returns:
- This builder for method chaining.
-
build
public AwsJsonProtocolErrorUnmarshaller build()
-
hasAwsQueryCompatible
public AwsJsonProtocolErrorUnmarshaller.Builder hasAwsQueryCompatible(boolean hasAwsQueryCompatible)
Provides a check on whether AwsQueryCompatible trait is found in Metadata. If true, error code will be derived from custom header. Otherwise, error code will be retrieved from its original source- Parameters:
hasAwsQueryCompatible
- boolean of whether the AwsQueryCompatible trait is found- Returns:
- This builder for method chaining.
-
-