Class JsonProtocolMarshallerBuilder
- java.lang.Object
-
- software.amazon.awssdk.protocols.json.internal.marshall.JsonProtocolMarshallerBuilder
-
public final class JsonProtocolMarshallerBuilder extends Object
Builder to create an appropriate implementation ofProtocolMarshaller
for JSON based services.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ProtocolMarshaller<SdkHttpFullRequest>
build()
JsonProtocolMarshallerBuilder
contentType(String contentType)
static JsonProtocolMarshallerBuilder
create()
JsonProtocolMarshallerBuilder
endpoint(URI endpoint)
JsonProtocolMarshallerBuilder
hasAwsQueryCompatible(boolean hasAwsQueryCompatible)
JsonProtocolMarshallerBuilder
jsonGenerator(StructuredJsonGenerator jsonGenerator)
Sets the implementation ofStructuredJsonGenerator
which allows writing JSON or JSON like (i.e.JsonProtocolMarshallerBuilder
operationInfo(OperationInfo operationInfo)
JsonProtocolMarshallerBuilder
protocolMetadata(AwsJsonProtocolMetadata protocolMetadata)
JsonProtocolMarshallerBuilder
sendExplicitNullForPayload(boolean sendExplicitNullForPayload)
-
-
-
Method Detail
-
create
public static JsonProtocolMarshallerBuilder create()
- Returns:
- New instance of
JsonProtocolMarshallerBuilder
.
-
endpoint
public JsonProtocolMarshallerBuilder endpoint(URI endpoint)
- Parameters:
endpoint
- Endpoint to set on the marshalled request.- Returns:
- This builder for method chaining.
-
jsonGenerator
public JsonProtocolMarshallerBuilder jsonGenerator(StructuredJsonGenerator jsonGenerator)
Sets the implementation ofStructuredJsonGenerator
which allows writing JSON or JSON like (i.e. CBOR and Ion) data formats.- Parameters:
jsonGenerator
- Generator to use.- Returns:
- This builder for method chaining.
-
contentType
public JsonProtocolMarshallerBuilder contentType(String contentType)
- Parameters:
contentType
- The content type to set on the marshalled requests.- Returns:
- This builder for method chaining.
-
operationInfo
public JsonProtocolMarshallerBuilder operationInfo(OperationInfo operationInfo)
- Parameters:
operationInfo
- Metadata about the operation like URI, HTTP method, etc.- Returns:
- This builder for method chaining.
-
sendExplicitNullForPayload
public JsonProtocolMarshallerBuilder sendExplicitNullForPayload(boolean sendExplicitNullForPayload)
- Parameters:
sendExplicitNullForPayload
- True if an explicit JSON null should be sent as the body when the payload member is null. SeeNullAsEmptyBodyProtocolRequestMarshaller
.
-
protocolMetadata
public JsonProtocolMarshallerBuilder protocolMetadata(AwsJsonProtocolMetadata protocolMetadata)
- Parameters:
protocolMetadata
-
-
hasAwsQueryCompatible
public JsonProtocolMarshallerBuilder hasAwsQueryCompatible(boolean hasAwsQueryCompatible)
- Parameters:
hasAwsQueryCompatible
- True if the service is AWS Query compatible, (has the @awsQueryCompatible trait)
-
build
public ProtocolMarshaller<SdkHttpFullRequest> build()
- Returns:
- New instance of
ProtocolMarshaller
. IfsendExplicitNullForPayload
is true then the marshaller will be wrapped withNullAsEmptyBodyProtocolRequestMarshaller
.
-
-