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 ofProtocolMarshallerfor JSON based services.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ProtocolMarshaller<SdkHttpFullRequest>build()JsonProtocolMarshallerBuildercontentType(String contentType)static JsonProtocolMarshallerBuildercreate()JsonProtocolMarshallerBuilderendpoint(URI endpoint)JsonProtocolMarshallerBuilderhasAwsQueryCompatible(boolean hasAwsQueryCompatible)JsonProtocolMarshallerBuilderjsonGenerator(StructuredJsonGenerator jsonGenerator)Sets the implementation ofStructuredJsonGeneratorwhich allows writing JSON or JSON like (i.e.JsonProtocolMarshallerBuilderoperationInfo(OperationInfo operationInfo)JsonProtocolMarshallerBuilderprotocolMetadata(AwsJsonProtocolMetadata protocolMetadata)JsonProtocolMarshallerBuildersendExplicitNullForPayload(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 ofStructuredJsonGeneratorwhich 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. IfsendExplicitNullForPayloadis true then the marshaller will be wrapped withNullAsEmptyBodyProtocolRequestMarshaller.
-
-