whenCompleted = executeFuture.whenComplete((r, e) -> {
if (e != null) {
diff --git a/codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/sra/test-json-client-class.java b/codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/sra/test-json-client-class.java
index 2fd06ccb9d6d..2ac6c6ae6d23 100644
--- a/codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/sra/test-json-client-class.java
+++ b/codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/sra/test-json-client-class.java
@@ -10,6 +10,7 @@
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.awscore.retry.AwsRetryStrategy;
+import software.amazon.awssdk.checksums.DefaultChecksumAlgorithm;
import software.amazon.awssdk.core.CredentialType;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
@@ -315,9 +316,9 @@ public GetOperationWithChecksumResponse getOperationWithChecksum(
.withMetricCollector(apiCallMetricCollector)
.putExecutionAttribute(
SdkInternalExecutionAttribute.HTTP_CHECKSUM,
- HttpChecksum.builder().requestChecksumRequired(true)
+ HttpChecksum.builder().requestChecksumRequired(true).isRequestStreaming(false)
.requestAlgorithm(getOperationWithChecksumRequest.checksumAlgorithmAsString())
- .isRequestStreaming(false).build())
+ .requestAlgorithmHeader("x-amz-sdk-checksum-algorithm").build())
.withMarshaller(new GetOperationWithChecksumRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -596,11 +597,11 @@ public PaginatedOperationWithoutResultKeyResponse paginatedOperationWithoutResul
* The content to send to the service. A {@link RequestBody} can be created using one of several factory
* methods for various sources of data. For example, to create a request body from a file you can do the
* following.
- *
+ *
*
* {@code RequestBody.fromFile(new File("myfile.txt"))}
*
- *
+ *
* See documentation in {@link RequestBody} for additional details and which sources of data are supported.
* The service documentation for the request content is as follows '
*
@@ -663,10 +664,14 @@ public ReturnT putOperationWithChecksum(PutOperationWithChecksumReques
.withMetricCollector(apiCallMetricCollector)
.putExecutionAttribute(
SdkInternalExecutionAttribute.HTTP_CHECKSUM,
- HttpChecksum.builder().requestChecksumRequired(false)
+ HttpChecksum
+ .builder()
+ .requestChecksumRequired(false)
+ .isRequestStreaming(true)
.requestValidationMode(putOperationWithChecksumRequest.checksumModeAsString())
- .responseAlgorithms("CRC32C", "CRC32", "SHA1", "SHA256").isRequestStreaming(true)
- .build())
+ .responseAlgorithmsV2(DefaultChecksumAlgorithm.CRC32C,
+ DefaultChecksumAlgorithm.CRC32, DefaultChecksumAlgorithm.SHA1,
+ DefaultChecksumAlgorithm.SHA256).build())
.withRequestBody(requestBody)
.withMarshaller(
StreamingRequestMarshaller.builder()
diff --git a/codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/sra/test-query-async-client-class.java b/codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/sra/test-query-async-client-class.java
index 1e5fd3a8ff1e..5c97f4ae619c 100644
--- a/codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/sra/test-query-async-client-class.java
+++ b/codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/sra/test-query-async-client-class.java
@@ -16,6 +16,7 @@
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.awscore.retry.AwsRetryStrategy;
+import software.amazon.awssdk.checksums.DefaultChecksumAlgorithm;
import software.amazon.awssdk.codegen.internal.UtilsTest;
import software.amazon.awssdk.core.CredentialType;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
@@ -109,7 +110,7 @@ final class DefaultQueryAsyncClient implements QueryAsyncClient {
private static final Logger log = LoggerFactory.getLogger(DefaultQueryAsyncClient.class);
private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
- .serviceProtocol(AwsServiceProtocol.QUERY).build();
+ .serviceProtocol(AwsServiceProtocol.QUERY).build();
private final AsyncClientHandler clientHandler;
@@ -154,27 +155,27 @@ protected DefaultQueryAsyncClient(SdkClientConfiguration clientConfiguration) {
public CompletableFuture aPostOperation(APostOperationRequest aPostOperationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(aPostOperationRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, aPostOperationRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "APostOperation");
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(APostOperationResponse::builder);
+ .createResponseHandler(APostOperationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
String hostPrefix = "foo-";
String resolvedHostExpression = "foo-";
CompletableFuture executeFuture = clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("APostOperation").withProtocolMetadata(protocolMetadata)
- .withMarshaller(new APostOperationRequestMarshaller(protocolFactory))
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
- .hostPrefixExpression(resolvedHostExpression).withInput(aPostOperationRequest));
+ .execute(new ClientExecutionParams()
+ .withOperationName("APostOperation").withProtocolMetadata(protocolMetadata)
+ .withMarshaller(new APostOperationRequestMarshaller(protocolFactory))
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
+ .hostPrefixExpression(resolvedHostExpression).withInput(aPostOperationRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -212,29 +213,29 @@ public CompletableFuture aPostOperation(APostOperationRe
*/
@Override
public CompletableFuture aPostOperationWithOutput(
- APostOperationWithOutputRequest aPostOperationWithOutputRequest) {
+ APostOperationWithOutputRequest aPostOperationWithOutputRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(aPostOperationWithOutputRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, aPostOperationWithOutputRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "APostOperationWithOutput");
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(APostOperationWithOutputResponse::builder);
+ .createResponseHandler(APostOperationWithOutputResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("APostOperationWithOutput").withProtocolMetadata(protocolMetadata)
- .withMarshaller(new APostOperationWithOutputRequestMarshaller(protocolFactory))
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
- .withInput(aPostOperationWithOutputRequest));
+ .execute(new ClientExecutionParams()
+ .withOperationName("APostOperationWithOutput").withProtocolMetadata(protocolMetadata)
+ .withMarshaller(new APostOperationWithOutputRequestMarshaller(protocolFactory))
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
+ .withInput(aPostOperationWithOutputRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -268,29 +269,29 @@ public CompletableFuture aPostOperationWithOut
*/
@Override
public CompletableFuture bearerAuthOperation(
- BearerAuthOperationRequest bearerAuthOperationRequest) {
+ BearerAuthOperationRequest bearerAuthOperationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(bearerAuthOperationRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, bearerAuthOperationRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BearerAuthOperation");
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(BearerAuthOperationResponse::builder);
+ .createResponseHandler(BearerAuthOperationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("BearerAuthOperation").withProtocolMetadata(protocolMetadata)
- .withMarshaller(new BearerAuthOperationRequestMarshaller(protocolFactory))
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .credentialType(CredentialType.TOKEN).withRequestConfiguration(clientConfiguration)
- .withMetricCollector(apiCallMetricCollector).withInput(bearerAuthOperationRequest));
+ .execute(new ClientExecutionParams()
+ .withOperationName("BearerAuthOperation").withProtocolMetadata(protocolMetadata)
+ .withMarshaller(new BearerAuthOperationRequestMarshaller(protocolFactory))
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .credentialType(CredentialType.TOKEN).withRequestConfiguration(clientConfiguration)
+ .withMetricCollector(apiCallMetricCollector).withInput(bearerAuthOperationRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -324,36 +325,37 @@ public CompletableFuture bearerAuthOperation(
*/
@Override
public CompletableFuture getOperationWithChecksum(
- GetOperationWithChecksumRequest getOperationWithChecksumRequest) {
+ GetOperationWithChecksumRequest getOperationWithChecksumRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getOperationWithChecksumRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getOperationWithChecksumRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetOperationWithChecksum");
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(GetOperationWithChecksumResponse::builder);
+ .createResponseHandler(GetOperationWithChecksumResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("GetOperationWithChecksum")
- .withProtocolMetadata(protocolMetadata)
- .withMarshaller(new GetOperationWithChecksumRequestMarshaller(protocolFactory))
- .withResponseHandler(responseHandler)
- .withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration)
- .withMetricCollector(apiCallMetricCollector)
- .putExecutionAttribute(
- SdkInternalExecutionAttribute.HTTP_CHECKSUM,
- HttpChecksum.builder().requestChecksumRequired(true)
- .requestAlgorithm(getOperationWithChecksumRequest.checksumAlgorithmAsString())
- .isRequestStreaming(false).build()).withInput(getOperationWithChecksumRequest));
+ .execute(new ClientExecutionParams()
+ .withOperationName("GetOperationWithChecksum")
+ .withProtocolMetadata(protocolMetadata)
+ .withMarshaller(new GetOperationWithChecksumRequestMarshaller(protocolFactory))
+ .withResponseHandler(responseHandler)
+ .withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration)
+ .withMetricCollector(apiCallMetricCollector)
+ .putExecutionAttribute(
+ SdkInternalExecutionAttribute.HTTP_CHECKSUM,
+ HttpChecksum.builder().requestChecksumRequired(true).isRequestStreaming(false)
+ .requestAlgorithm(getOperationWithChecksumRequest.checksumAlgorithmAsString())
+ .requestAlgorithmHeader("x-amz-sdk-checksum-algorithm").build())
+ .withInput(getOperationWithChecksumRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -388,33 +390,33 @@ public CompletableFuture getOperationWithCheck
*/
@Override
public CompletableFuture operationWithChecksumRequired(
- OperationWithChecksumRequiredRequest operationWithChecksumRequiredRequest) {
+ OperationWithChecksumRequiredRequest operationWithChecksumRequiredRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(operationWithChecksumRequiredRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
- operationWithChecksumRequiredRequest.overrideConfiguration().orElse(null));
+ operationWithChecksumRequiredRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithChecksumRequired");
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithChecksumRequiredResponse::builder);
+ .createResponseHandler(OperationWithChecksumRequiredResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithChecksumRequired")
- .withProtocolMetadata(protocolMetadata)
- .withMarshaller(new OperationWithChecksumRequiredRequestMarshaller(protocolFactory))
- .withResponseHandler(responseHandler)
- .withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration)
- .withMetricCollector(apiCallMetricCollector)
- .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED,
- HttpChecksumRequired.create()).withInput(operationWithChecksumRequiredRequest));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithChecksumRequired")
+ .withProtocolMetadata(protocolMetadata)
+ .withMarshaller(new OperationWithChecksumRequiredRequestMarshaller(protocolFactory))
+ .withResponseHandler(responseHandler)
+ .withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration)
+ .withMetricCollector(apiCallMetricCollector)
+ .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED,
+ HttpChecksumRequired.create()).withInput(operationWithChecksumRequiredRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -448,29 +450,29 @@ public CompletableFuture operationWithChe
*/
@Override
public CompletableFuture operationWithContextParam(
- OperationWithContextParamRequest operationWithContextParamRequest) {
+ OperationWithContextParamRequest operationWithContextParamRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(operationWithContextParamRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, operationWithContextParamRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithContextParam");
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithContextParamResponse::builder);
+ .createResponseHandler(OperationWithContextParamResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithContextParam").withProtocolMetadata(protocolMetadata)
- .withMarshaller(new OperationWithContextParamRequestMarshaller(protocolFactory))
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
- .withInput(operationWithContextParamRequest));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithContextParam").withProtocolMetadata(protocolMetadata)
+ .withMarshaller(new OperationWithContextParamRequestMarshaller(protocolFactory))
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
+ .withInput(operationWithContextParamRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -504,30 +506,30 @@ public CompletableFuture operationWithContext
*/
@Override
public CompletableFuture operationWithCustomMember(
- OperationWithCustomMemberRequest operationWithCustomMemberRequest) {
+ OperationWithCustomMemberRequest operationWithCustomMemberRequest) {
operationWithCustomMemberRequest = UtilsTest.dummyRequestModifier(operationWithCustomMemberRequest);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(operationWithCustomMemberRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, operationWithCustomMemberRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithCustomMember");
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithCustomMemberResponse::builder);
+ .createResponseHandler(OperationWithCustomMemberResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithCustomMember").withProtocolMetadata(protocolMetadata)
- .withMarshaller(new OperationWithCustomMemberRequestMarshaller(protocolFactory))
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
- .withInput(operationWithCustomMemberRequest));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithCustomMember").withProtocolMetadata(protocolMetadata)
+ .withMarshaller(new OperationWithCustomMemberRequestMarshaller(protocolFactory))
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
+ .withInput(operationWithCustomMemberRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -563,30 +565,30 @@ public CompletableFuture operationWithCustomM
*/
@Override
public CompletableFuture operationWithCustomizedOperationContextParam(
- OperationWithCustomizedOperationContextParamRequest operationWithCustomizedOperationContextParamRequest) {
+ OperationWithCustomizedOperationContextParamRequest operationWithCustomizedOperationContextParamRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(
- operationWithCustomizedOperationContextParamRequest, this.clientConfiguration);
+ operationWithCustomizedOperationContextParamRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
- operationWithCustomizedOperationContextParamRequest.overrideConfiguration().orElse(null));
+ operationWithCustomizedOperationContextParamRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithCustomizedOperationContextParam");
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithCustomizedOperationContextParamResponse::builder);
+ .createResponseHandler(OperationWithCustomizedOperationContextParamResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithCustomizedOperationContextParam")
- .withProtocolMetadata(protocolMetadata)
- .withMarshaller(new OperationWithCustomizedOperationContextParamRequestMarshaller(protocolFactory))
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
- .withInput(operationWithCustomizedOperationContextParamRequest));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithCustomizedOperationContextParam")
+ .withProtocolMetadata(protocolMetadata)
+ .withMarshaller(new OperationWithCustomizedOperationContextParamRequestMarshaller(protocolFactory))
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
+ .withInput(operationWithCustomizedOperationContextParamRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -622,29 +624,29 @@ public CompletableFuture o
*/
@Override
public CompletableFuture operationWithMapOperationContextParam(
- OperationWithMapOperationContextParamRequest operationWithMapOperationContextParamRequest) {
+ OperationWithMapOperationContextParamRequest operationWithMapOperationContextParamRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(operationWithMapOperationContextParamRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
- operationWithMapOperationContextParamRequest.overrideConfiguration().orElse(null));
+ operationWithMapOperationContextParamRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithMapOperationContextParam");
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithMapOperationContextParamResponse::builder);
+ .createResponseHandler(OperationWithMapOperationContextParamResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithMapOperationContextParam").withProtocolMetadata(protocolMetadata)
- .withMarshaller(new OperationWithMapOperationContextParamRequestMarshaller(protocolFactory))
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
- .withInput(operationWithMapOperationContextParamRequest));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithMapOperationContextParam").withProtocolMetadata(protocolMetadata)
+ .withMarshaller(new OperationWithMapOperationContextParamRequestMarshaller(protocolFactory))
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
+ .withInput(operationWithMapOperationContextParamRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -678,29 +680,29 @@ public CompletableFuture operatio
*/
@Override
public CompletableFuture operationWithNoneAuthType(
- OperationWithNoneAuthTypeRequest operationWithNoneAuthTypeRequest) {
+ OperationWithNoneAuthTypeRequest operationWithNoneAuthTypeRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(operationWithNoneAuthTypeRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, operationWithNoneAuthTypeRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithNoneAuthType");
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithNoneAuthTypeResponse::builder);
+ .createResponseHandler(OperationWithNoneAuthTypeResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithNoneAuthType").withProtocolMetadata(protocolMetadata)
- .withMarshaller(new OperationWithNoneAuthTypeRequestMarshaller(protocolFactory))
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
- .withInput(operationWithNoneAuthTypeRequest));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithNoneAuthType").withProtocolMetadata(protocolMetadata)
+ .withMarshaller(new OperationWithNoneAuthTypeRequestMarshaller(protocolFactory))
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
+ .withInput(operationWithNoneAuthTypeRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -736,29 +738,29 @@ public CompletableFuture operationWithNoneAut
*/
@Override
public CompletableFuture operationWithOperationContextParam(
- OperationWithOperationContextParamRequest operationWithOperationContextParamRequest) {
+ OperationWithOperationContextParamRequest operationWithOperationContextParamRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(operationWithOperationContextParamRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
- operationWithOperationContextParamRequest.overrideConfiguration().orElse(null));
+ operationWithOperationContextParamRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithOperationContextParam");
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithOperationContextParamResponse::builder);
+ .createResponseHandler(OperationWithOperationContextParamResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithOperationContextParam").withProtocolMetadata(protocolMetadata)
- .withMarshaller(new OperationWithOperationContextParamRequestMarshaller(protocolFactory))
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
- .withInput(operationWithOperationContextParamRequest));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithOperationContextParam").withProtocolMetadata(protocolMetadata)
+ .withMarshaller(new OperationWithOperationContextParamRequestMarshaller(protocolFactory))
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
+ .withInput(operationWithOperationContextParamRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -793,34 +795,34 @@ public CompletableFuture operationWi
*/
@Override
public CompletableFuture operationWithRequestCompression(
- OperationWithRequestCompressionRequest operationWithRequestCompressionRequest) {
+ OperationWithRequestCompressionRequest operationWithRequestCompressionRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(operationWithRequestCompressionRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
- operationWithRequestCompressionRequest.overrideConfiguration().orElse(null));
+ operationWithRequestCompressionRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithRequestCompression");
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithRequestCompressionResponse::builder);
+ .createResponseHandler(OperationWithRequestCompressionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithRequestCompression")
- .withProtocolMetadata(protocolMetadata)
- .withMarshaller(new OperationWithRequestCompressionRequestMarshaller(protocolFactory))
- .withResponseHandler(responseHandler)
- .withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration)
- .withMetricCollector(apiCallMetricCollector)
- .putExecutionAttribute(SdkInternalExecutionAttribute.REQUEST_COMPRESSION,
- RequestCompression.builder().encodings("gzip").isStreaming(false).build())
- .withInput(operationWithRequestCompressionRequest));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithRequestCompression")
+ .withProtocolMetadata(protocolMetadata)
+ .withMarshaller(new OperationWithRequestCompressionRequestMarshaller(protocolFactory))
+ .withResponseHandler(responseHandler)
+ .withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration)
+ .withMetricCollector(apiCallMetricCollector)
+ .putExecutionAttribute(SdkInternalExecutionAttribute.REQUEST_COMPRESSION,
+ RequestCompression.builder().encodings("gzip").isStreaming(false).build())
+ .withInput(operationWithRequestCompressionRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -855,29 +857,29 @@ public CompletableFuture operationWithR
*/
@Override
public CompletableFuture operationWithStaticContextParams(
- OperationWithStaticContextParamsRequest operationWithStaticContextParamsRequest) {
+ OperationWithStaticContextParamsRequest operationWithStaticContextParamsRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(operationWithStaticContextParamsRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
- operationWithStaticContextParamsRequest.overrideConfiguration().orElse(null));
+ operationWithStaticContextParamsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithStaticContextParams");
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithStaticContextParamsResponse::builder);
+ .createResponseHandler(OperationWithStaticContextParamsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithStaticContextParams").withProtocolMetadata(protocolMetadata)
- .withMarshaller(new OperationWithStaticContextParamsRequestMarshaller(protocolFactory))
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
- .withInput(operationWithStaticContextParamsRequest));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithStaticContextParams").withProtocolMetadata(protocolMetadata)
+ .withMarshaller(new OperationWithStaticContextParamsRequestMarshaller(protocolFactory))
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
+ .withInput(operationWithStaticContextParamsRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -929,52 +931,56 @@ public CompletableFuture operationWith
*/
@Override
public CompletableFuture putOperationWithChecksum(
- PutOperationWithChecksumRequest putOperationWithChecksumRequest, AsyncRequestBody requestBody,
- AsyncResponseTransformer asyncResponseTransformer) {
+ PutOperationWithChecksumRequest putOperationWithChecksumRequest, AsyncRequestBody requestBody,
+ AsyncResponseTransformer asyncResponseTransformer) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putOperationWithChecksumRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, putOperationWithChecksumRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutOperationWithChecksum");
Pair, CompletableFuture> pair = AsyncResponseTransformerUtils
- .wrapWithEndOfStreamFuture(asyncResponseTransformer);
+ .wrapWithEndOfStreamFuture(asyncResponseTransformer);
asyncResponseTransformer = pair.left();
CompletableFuture endOfStreamFuture = pair.right();
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(PutOperationWithChecksumResponse::builder);
+ .createResponseHandler(PutOperationWithChecksumResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler.execute(
- new ClientExecutionParams()
- .withOperationName("PutOperationWithChecksum")
- .withProtocolMetadata(protocolMetadata)
- .withMarshaller(
- AsyncStreamingRequestMarshaller.builder()
- .delegateMarshaller(new PutOperationWithChecksumRequestMarshaller(protocolFactory))
- .asyncRequestBody(requestBody).build())
- .withResponseHandler(responseHandler)
- .withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration)
- .withMetricCollector(apiCallMetricCollector)
- .putExecutionAttribute(
- SdkInternalExecutionAttribute.HTTP_CHECKSUM,
- HttpChecksum.builder().requestChecksumRequired(false)
- .requestValidationMode(putOperationWithChecksumRequest.checksumModeAsString())
- .responseAlgorithms("CRC32C", "CRC32", "SHA1", "SHA256").isRequestStreaming(true)
- .build()).withAsyncRequestBody(requestBody)
- .withInput(putOperationWithChecksumRequest), asyncResponseTransformer);
+ new ClientExecutionParams()
+ .withOperationName("PutOperationWithChecksum")
+ .withProtocolMetadata(protocolMetadata)
+ .withMarshaller(
+ AsyncStreamingRequestMarshaller.builder()
+ .delegateMarshaller(new PutOperationWithChecksumRequestMarshaller(protocolFactory))
+ .asyncRequestBody(requestBody).build())
+ .withResponseHandler(responseHandler)
+ .withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration)
+ .withMetricCollector(apiCallMetricCollector)
+ .putExecutionAttribute(
+ SdkInternalExecutionAttribute.HTTP_CHECKSUM,
+ HttpChecksum
+ .builder()
+ .requestChecksumRequired(false)
+ .isRequestStreaming(true)
+ .requestValidationMode(putOperationWithChecksumRequest.checksumModeAsString())
+ .responseAlgorithmsV2(DefaultChecksumAlgorithm.CRC32C,
+ DefaultChecksumAlgorithm.CRC32, DefaultChecksumAlgorithm.SHA1,
+ DefaultChecksumAlgorithm.SHA256).build()).withAsyncRequestBody(requestBody)
+ .withInput(putOperationWithChecksumRequest), asyncResponseTransformer);
CompletableFuture whenCompleteFuture = null;
AsyncResponseTransformer finalAsyncResponseTransformer = asyncResponseTransformer;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
if (e != null) {
runAndLogError(log, "Exception thrown in exceptionOccurred callback, ignoring",
- () -> finalAsyncResponseTransformer.exceptionOccurred(e));
+ () -> finalAsyncResponseTransformer.exceptionOccurred(e));
}
endOfStreamFuture.whenComplete((r2, e2) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -984,7 +990,7 @@ public CompletableFuture putOperationWithChecksum(
} catch (Throwable t) {
AsyncResponseTransformer finalAsyncResponseTransformer = asyncResponseTransformer;
runAndLogError(log, "Exception thrown in exceptionOccurred callback, ignoring",
- () -> finalAsyncResponseTransformer.exceptionOccurred(t));
+ () -> finalAsyncResponseTransformer.exceptionOccurred(t));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
@@ -1017,33 +1023,33 @@ public CompletableFuture putOperationWithChecksum(
*/
@Override
public CompletableFuture streamingInputOperation(
- StreamingInputOperationRequest streamingInputOperationRequest, AsyncRequestBody requestBody) {
+ StreamingInputOperationRequest streamingInputOperationRequest, AsyncRequestBody requestBody) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(streamingInputOperationRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, streamingInputOperationRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StreamingInputOperation");
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(StreamingInputOperationResponse::builder);
+ .createResponseHandler(StreamingInputOperationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("StreamingInputOperation")
- .withProtocolMetadata(protocolMetadata)
- .withMarshaller(
- AsyncStreamingRequestMarshaller.builder()
- .delegateMarshaller(new StreamingInputOperationRequestMarshaller(protocolFactory))
- .asyncRequestBody(requestBody).build()).withResponseHandler(responseHandler)
- .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
- .withMetricCollector(apiCallMetricCollector).withAsyncRequestBody(requestBody)
- .withInput(streamingInputOperationRequest));
+ .execute(new ClientExecutionParams()
+ .withOperationName("StreamingInputOperation")
+ .withProtocolMetadata(protocolMetadata)
+ .withMarshaller(
+ AsyncStreamingRequestMarshaller.builder()
+ .delegateMarshaller(new StreamingInputOperationRequestMarshaller(protocolFactory))
+ .asyncRequestBody(requestBody).build()).withResponseHandler(responseHandler)
+ .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
+ .withMetricCollector(apiCallMetricCollector).withAsyncRequestBody(requestBody)
+ .withInput(streamingInputOperationRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -1082,40 +1088,40 @@ public CompletableFuture streamingInputOperatio
*/
@Override
public CompletableFuture streamingOutputOperation(
- StreamingOutputOperationRequest streamingOutputOperationRequest,
- AsyncResponseTransformer asyncResponseTransformer) {
+ StreamingOutputOperationRequest streamingOutputOperationRequest,
+ AsyncResponseTransformer asyncResponseTransformer) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(streamingOutputOperationRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, streamingOutputOperationRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StreamingOutputOperation");
Pair, CompletableFuture> pair = AsyncResponseTransformerUtils
- .wrapWithEndOfStreamFuture(asyncResponseTransformer);
+ .wrapWithEndOfStreamFuture(asyncResponseTransformer);
asyncResponseTransformer = pair.left();
CompletableFuture endOfStreamFuture = pair.right();
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(StreamingOutputOperationResponse::builder);
+ .createResponseHandler(StreamingOutputOperationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler.execute(
- new ClientExecutionParams()
- .withOperationName("StreamingOutputOperation").withProtocolMetadata(protocolMetadata)
- .withMarshaller(new StreamingOutputOperationRequestMarshaller(protocolFactory))
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
- .withInput(streamingOutputOperationRequest), asyncResponseTransformer);
+ new ClientExecutionParams()
+ .withOperationName("StreamingOutputOperation").withProtocolMetadata(protocolMetadata)
+ .withMarshaller(new StreamingOutputOperationRequestMarshaller(protocolFactory))
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
+ .withInput(streamingOutputOperationRequest), asyncResponseTransformer);
CompletableFuture whenCompleteFuture = null;
AsyncResponseTransformer finalAsyncResponseTransformer = asyncResponseTransformer;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
if (e != null) {
runAndLogError(log, "Exception thrown in exceptionOccurred callback, ignoring",
- () -> finalAsyncResponseTransformer.exceptionOccurred(e));
+ () -> finalAsyncResponseTransformer.exceptionOccurred(e));
}
endOfStreamFuture.whenComplete((r2, e2) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
@@ -1125,7 +1131,7 @@ public CompletableFuture streamingOutputOperation(
} catch (Throwable t) {
AsyncResponseTransformer finalAsyncResponseTransformer = asyncResponseTransformer;
runAndLogError(log, "Exception thrown in exceptionOccurred callback, ignoring",
- () -> finalAsyncResponseTransformer.exceptionOccurred(t));
+ () -> finalAsyncResponseTransformer.exceptionOccurred(t));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
@@ -1148,15 +1154,15 @@ public final String serviceName() {
private AwsQueryProtocolFactory init() {
return AwsQueryProtocolFactory
- .builder()
- .registerModeledException(
- ExceptionMetadata.builder().errorCode("InvalidInput")
- .exceptionBuilderSupplier(InvalidInputException::builder).httpStatusCode(400).build())
- .clientConfiguration(clientConfiguration).defaultServiceExceptionSupplier(QueryException::builder).build();
+ .builder()
+ .registerModeledException(
+ ExceptionMetadata.builder().errorCode("InvalidInput")
+ .exceptionBuilderSupplier(InvalidInputException::builder).httpStatusCode(400).build())
+ .clientConfiguration(clientConfiguration).defaultServiceExceptionSupplier(QueryException::builder).build();
}
private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration,
- RequestOverrideConfiguration requestOverrideConfiguration) {
+ RequestOverrideConfiguration requestOverrideConfiguration) {
List publishers = null;
if (requestOverrideConfiguration != null) {
publishers = requestOverrideConfiguration.metricPublishers();
diff --git a/codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/sra/test-query-client-class.java b/codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/sra/test-query-client-class.java
index 922e2559ce82..5961432e145d 100644
--- a/codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/sra/test-query-client-class.java
+++ b/codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/sra/test-query-client-class.java
@@ -10,6 +10,7 @@
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.awscore.retry.AwsRetryStrategy;
+import software.amazon.awssdk.checksums.DefaultChecksumAlgorithm;
import software.amazon.awssdk.codegen.internal.UtilsTest;
import software.amazon.awssdk.core.CredentialType;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
@@ -102,7 +103,7 @@ final class DefaultQueryClient implements QueryClient {
private static final Logger log = Logger.loggerFor(DefaultQueryClient.class);
private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
- .serviceProtocol(AwsServiceProtocol.QUERY).build();
+ .serviceProtocol(AwsServiceProtocol.QUERY).build();
private final SyncClientHandler clientHandler;
@@ -138,17 +139,17 @@ protected DefaultQueryClient(SdkClientConfiguration clientConfiguration) {
*/
@Override
public APostOperationResponse aPostOperation(APostOperationRequest aPostOperationRequest) throws InvalidInputException,
- AwsServiceException, SdkClientException, QueryException {
+ AwsServiceException, SdkClientException, QueryException {
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(APostOperationResponse::builder);
+ .createResponseHandler(APostOperationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(aPostOperationRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, aPostOperationRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "APostOperation");
@@ -156,11 +157,11 @@ public APostOperationResponse aPostOperation(APostOperationRequest aPostOperatio
String resolvedHostExpression = "foo-";
return clientHandler.execute(new ClientExecutionParams()
- .withOperationName("APostOperation").withProtocolMetadata(protocolMetadata)
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .hostPrefixExpression(resolvedHostExpression).withRequestConfiguration(clientConfiguration)
- .withInput(aPostOperationRequest).withMetricCollector(apiCallMetricCollector)
- .withMarshaller(new APostOperationRequestMarshaller(protocolFactory)));
+ .withOperationName("APostOperation").withProtocolMetadata(protocolMetadata)
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .hostPrefixExpression(resolvedHostExpression).withRequestConfiguration(clientConfiguration)
+ .withInput(aPostOperationRequest).withMetricCollector(apiCallMetricCollector)
+ .withMarshaller(new APostOperationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
@@ -188,30 +189,30 @@ public APostOperationResponse aPostOperation(APostOperationRequest aPostOperatio
*/
@Override
public APostOperationWithOutputResponse aPostOperationWithOutput(
- APostOperationWithOutputRequest aPostOperationWithOutputRequest) throws InvalidInputException, AwsServiceException,
- SdkClientException, QueryException {
+ APostOperationWithOutputRequest aPostOperationWithOutputRequest) throws InvalidInputException, AwsServiceException,
+ SdkClientException, QueryException {
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(APostOperationWithOutputResponse::builder);
+ .createResponseHandler(APostOperationWithOutputResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(aPostOperationWithOutputRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, aPostOperationWithOutputRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "APostOperationWithOutput");
return clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("APostOperationWithOutput").withProtocolMetadata(protocolMetadata)
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration).withInput(aPostOperationWithOutputRequest)
- .withMetricCollector(apiCallMetricCollector)
- .withMarshaller(new APostOperationWithOutputRequestMarshaller(protocolFactory)));
+ .execute(new ClientExecutionParams()
+ .withOperationName("APostOperationWithOutput").withProtocolMetadata(protocolMetadata)
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration).withInput(aPostOperationWithOutputRequest)
+ .withMetricCollector(apiCallMetricCollector)
+ .withMarshaller(new APostOperationWithOutputRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
@@ -235,28 +236,28 @@ public APostOperationWithOutputResponse aPostOperationWithOutput(
*/
@Override
public BearerAuthOperationResponse bearerAuthOperation(BearerAuthOperationRequest bearerAuthOperationRequest)
- throws AwsServiceException, SdkClientException, QueryException {
+ throws AwsServiceException, SdkClientException, QueryException {
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(BearerAuthOperationResponse::builder);
+ .createResponseHandler(BearerAuthOperationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(bearerAuthOperationRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, bearerAuthOperationRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BearerAuthOperation");
return clientHandler.execute(new ClientExecutionParams()
- .withOperationName("BearerAuthOperation").withProtocolMetadata(protocolMetadata)
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .credentialType(CredentialType.TOKEN).withRequestConfiguration(clientConfiguration)
- .withInput(bearerAuthOperationRequest).withMetricCollector(apiCallMetricCollector)
- .withMarshaller(new BearerAuthOperationRequestMarshaller(protocolFactory)));
+ .withOperationName("BearerAuthOperation").withProtocolMetadata(protocolMetadata)
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .credentialType(CredentialType.TOKEN).withRequestConfiguration(clientConfiguration)
+ .withInput(bearerAuthOperationRequest).withMetricCollector(apiCallMetricCollector)
+ .withMarshaller(new BearerAuthOperationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
@@ -280,38 +281,38 @@ public BearerAuthOperationResponse bearerAuthOperation(BearerAuthOperationReques
*/
@Override
public GetOperationWithChecksumResponse getOperationWithChecksum(
- GetOperationWithChecksumRequest getOperationWithChecksumRequest) throws AwsServiceException, SdkClientException,
- QueryException {
+ GetOperationWithChecksumRequest getOperationWithChecksumRequest) throws AwsServiceException, SdkClientException,
+ QueryException {
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(GetOperationWithChecksumResponse::builder);
+ .createResponseHandler(GetOperationWithChecksumResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getOperationWithChecksumRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getOperationWithChecksumRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetOperationWithChecksum");
return clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("GetOperationWithChecksum")
- .withProtocolMetadata(protocolMetadata)
- .withResponseHandler(responseHandler)
- .withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration)
- .withInput(getOperationWithChecksumRequest)
- .withMetricCollector(apiCallMetricCollector)
- .putExecutionAttribute(
- SdkInternalExecutionAttribute.HTTP_CHECKSUM,
- HttpChecksum.builder().requestChecksumRequired(true)
- .requestAlgorithm(getOperationWithChecksumRequest.checksumAlgorithmAsString())
- .isRequestStreaming(false).build())
- .withMarshaller(new GetOperationWithChecksumRequestMarshaller(protocolFactory)));
+ .execute(new ClientExecutionParams()
+ .withOperationName("GetOperationWithChecksum")
+ .withProtocolMetadata(protocolMetadata)
+ .withResponseHandler(responseHandler)
+ .withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration)
+ .withInput(getOperationWithChecksumRequest)
+ .withMetricCollector(apiCallMetricCollector)
+ .putExecutionAttribute(
+ SdkInternalExecutionAttribute.HTTP_CHECKSUM,
+ HttpChecksum.builder().requestChecksumRequired(true).isRequestStreaming(false)
+ .requestAlgorithm(getOperationWithChecksumRequest.checksumAlgorithmAsString())
+ .requestAlgorithmHeader("x-amz-sdk-checksum-algorithm").build())
+ .withMarshaller(new GetOperationWithChecksumRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
@@ -335,35 +336,35 @@ public GetOperationWithChecksumResponse getOperationWithChecksum(
*/
@Override
public OperationWithChecksumRequiredResponse operationWithChecksumRequired(
- OperationWithChecksumRequiredRequest operationWithChecksumRequiredRequest) throws AwsServiceException,
- SdkClientException, QueryException {
+ OperationWithChecksumRequiredRequest operationWithChecksumRequiredRequest) throws AwsServiceException,
+ SdkClientException, QueryException {
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithChecksumRequiredResponse::builder);
+ .createResponseHandler(OperationWithChecksumRequiredResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(operationWithChecksumRequiredRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
- operationWithChecksumRequiredRequest.overrideConfiguration().orElse(null));
+ operationWithChecksumRequiredRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithChecksumRequired");
return clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithChecksumRequired")
- .withProtocolMetadata(protocolMetadata)
- .withResponseHandler(responseHandler)
- .withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration)
- .withInput(operationWithChecksumRequiredRequest)
- .withMetricCollector(apiCallMetricCollector)
- .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED,
- HttpChecksumRequired.create())
- .withMarshaller(new OperationWithChecksumRequiredRequestMarshaller(protocolFactory)));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithChecksumRequired")
+ .withProtocolMetadata(protocolMetadata)
+ .withResponseHandler(responseHandler)
+ .withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration)
+ .withInput(operationWithChecksumRequiredRequest)
+ .withMetricCollector(apiCallMetricCollector)
+ .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED,
+ HttpChecksumRequired.create())
+ .withMarshaller(new OperationWithChecksumRequiredRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
@@ -387,30 +388,30 @@ public OperationWithChecksumRequiredResponse operationWithChecksumRequired(
*/
@Override
public OperationWithContextParamResponse operationWithContextParam(
- OperationWithContextParamRequest operationWithContextParamRequest) throws AwsServiceException, SdkClientException,
- QueryException {
+ OperationWithContextParamRequest operationWithContextParamRequest) throws AwsServiceException, SdkClientException,
+ QueryException {
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithContextParamResponse::builder);
+ .createResponseHandler(OperationWithContextParamResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(operationWithContextParamRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, operationWithContextParamRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithContextParam");
return clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithContextParam").withProtocolMetadata(protocolMetadata)
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration).withInput(operationWithContextParamRequest)
- .withMetricCollector(apiCallMetricCollector)
- .withMarshaller(new OperationWithContextParamRequestMarshaller(protocolFactory)));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithContextParam").withProtocolMetadata(protocolMetadata)
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration).withInput(operationWithContextParamRequest)
+ .withMetricCollector(apiCallMetricCollector)
+ .withMarshaller(new OperationWithContextParamRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
@@ -434,31 +435,31 @@ public OperationWithContextParamResponse operationWithContextParam(
*/
@Override
public OperationWithCustomMemberResponse operationWithCustomMember(
- OperationWithCustomMemberRequest operationWithCustomMemberRequest) throws AwsServiceException, SdkClientException,
- QueryException {
+ OperationWithCustomMemberRequest operationWithCustomMemberRequest) throws AwsServiceException, SdkClientException,
+ QueryException {
operationWithCustomMemberRequest = UtilsTest.dummyRequestModifier(operationWithCustomMemberRequest);
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithCustomMemberResponse::builder);
+ .createResponseHandler(OperationWithCustomMemberResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(operationWithCustomMemberRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, operationWithCustomMemberRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithCustomMember");
return clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithCustomMember").withProtocolMetadata(protocolMetadata)
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration).withInput(operationWithCustomMemberRequest)
- .withMetricCollector(apiCallMetricCollector)
- .withMarshaller(new OperationWithCustomMemberRequestMarshaller(protocolFactory)));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithCustomMember").withProtocolMetadata(protocolMetadata)
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration).withInput(operationWithCustomMemberRequest)
+ .withMetricCollector(apiCallMetricCollector)
+ .withMarshaller(new OperationWithCustomMemberRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
@@ -483,31 +484,31 @@ public OperationWithCustomMemberResponse operationWithCustomMember(
*/
@Override
public OperationWithCustomizedOperationContextParamResponse operationWithCustomizedOperationContextParam(
- OperationWithCustomizedOperationContextParamRequest operationWithCustomizedOperationContextParamRequest)
- throws AwsServiceException, SdkClientException, QueryException {
+ OperationWithCustomizedOperationContextParamRequest operationWithCustomizedOperationContextParamRequest)
+ throws AwsServiceException, SdkClientException, QueryException {
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithCustomizedOperationContextParamResponse::builder);
+ .createResponseHandler(OperationWithCustomizedOperationContextParamResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(
- operationWithCustomizedOperationContextParamRequest, this.clientConfiguration);
+ operationWithCustomizedOperationContextParamRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
- operationWithCustomizedOperationContextParamRequest.overrideConfiguration().orElse(null));
+ operationWithCustomizedOperationContextParamRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithCustomizedOperationContextParam");
return clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithCustomizedOperationContextParam")
- .withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
- .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
- .withInput(operationWithCustomizedOperationContextParamRequest)
- .withMetricCollector(apiCallMetricCollector)
- .withMarshaller(new OperationWithCustomizedOperationContextParamRequestMarshaller(protocolFactory)));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithCustomizedOperationContextParam")
+ .withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
+ .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
+ .withInput(operationWithCustomizedOperationContextParamRequest)
+ .withMetricCollector(apiCallMetricCollector)
+ .withMarshaller(new OperationWithCustomizedOperationContextParamRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
@@ -532,30 +533,30 @@ public OperationWithCustomizedOperationContextParamResponse operationWithCustomi
*/
@Override
public OperationWithMapOperationContextParamResponse operationWithMapOperationContextParam(
- OperationWithMapOperationContextParamRequest operationWithMapOperationContextParamRequest)
- throws AwsServiceException, SdkClientException, QueryException {
+ OperationWithMapOperationContextParamRequest operationWithMapOperationContextParamRequest)
+ throws AwsServiceException, SdkClientException, QueryException {
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithMapOperationContextParamResponse::builder);
+ .createResponseHandler(OperationWithMapOperationContextParamResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(operationWithMapOperationContextParamRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
- operationWithMapOperationContextParamRequest.overrideConfiguration().orElse(null));
+ operationWithMapOperationContextParamRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithMapOperationContextParam");
return clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithMapOperationContextParam").withProtocolMetadata(protocolMetadata)
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration)
- .withInput(operationWithMapOperationContextParamRequest).withMetricCollector(apiCallMetricCollector)
- .withMarshaller(new OperationWithMapOperationContextParamRequestMarshaller(protocolFactory)));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithMapOperationContextParam").withProtocolMetadata(protocolMetadata)
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration)
+ .withInput(operationWithMapOperationContextParamRequest).withMetricCollector(apiCallMetricCollector)
+ .withMarshaller(new OperationWithMapOperationContextParamRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
@@ -579,30 +580,30 @@ public OperationWithMapOperationContextParamResponse operationWithMapOperationCo
*/
@Override
public OperationWithNoneAuthTypeResponse operationWithNoneAuthType(
- OperationWithNoneAuthTypeRequest operationWithNoneAuthTypeRequest) throws AwsServiceException, SdkClientException,
- QueryException {
+ OperationWithNoneAuthTypeRequest operationWithNoneAuthTypeRequest) throws AwsServiceException, SdkClientException,
+ QueryException {
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithNoneAuthTypeResponse::builder);
+ .createResponseHandler(OperationWithNoneAuthTypeResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(operationWithNoneAuthTypeRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, operationWithNoneAuthTypeRequest
- .overrideConfiguration().orElse(null));
+ .overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithNoneAuthType");
return clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithNoneAuthType").withProtocolMetadata(protocolMetadata)
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration).withInput(operationWithNoneAuthTypeRequest)
- .withMetricCollector(apiCallMetricCollector)
- .withMarshaller(new OperationWithNoneAuthTypeRequestMarshaller(protocolFactory)));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithNoneAuthType").withProtocolMetadata(protocolMetadata)
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration).withInput(operationWithNoneAuthTypeRequest)
+ .withMetricCollector(apiCallMetricCollector)
+ .withMarshaller(new OperationWithNoneAuthTypeRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
@@ -627,30 +628,30 @@ public OperationWithNoneAuthTypeResponse operationWithNoneAuthType(
*/
@Override
public OperationWithOperationContextParamResponse operationWithOperationContextParam(
- OperationWithOperationContextParamRequest operationWithOperationContextParamRequest) throws AwsServiceException,
- SdkClientException, QueryException {
+ OperationWithOperationContextParamRequest operationWithOperationContextParamRequest) throws AwsServiceException,
+ SdkClientException, QueryException {
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithOperationContextParamResponse::builder);
+ .createResponseHandler(OperationWithOperationContextParamResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(operationWithOperationContextParamRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
- operationWithOperationContextParamRequest.overrideConfiguration().orElse(null));
+ operationWithOperationContextParamRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
- .create("ApiCall");
+ .create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Query Service");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "OperationWithOperationContextParam");
return clientHandler
- .execute(new ClientExecutionParams()
- .withOperationName("OperationWithOperationContextParam").withProtocolMetadata(protocolMetadata)
- .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
- .withRequestConfiguration(clientConfiguration).withInput(operationWithOperationContextParamRequest)
- .withMetricCollector(apiCallMetricCollector)
- .withMarshaller(new OperationWithOperationContextParamRequestMarshaller(protocolFactory)));
+ .execute(new ClientExecutionParams()
+ .withOperationName("OperationWithOperationContextParam").withProtocolMetadata(protocolMetadata)
+ .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
+ .withRequestConfiguration(clientConfiguration).withInput(operationWithOperationContextParamRequest)
+ .withMetricCollector(apiCallMetricCollector)
+ .withMarshaller(new OperationWithOperationContextParamRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
@@ -674,35 +675,35 @@ public OperationWithOperationContextParamResponse operationWithOperationContextP
*/
@Override
public OperationWithRequestCompressionResponse operationWithRequestCompression(
- OperationWithRequestCompressionRequest operationWithRequestCompressionRequest) throws AwsServiceException,
- SdkClientException, QueryException {
+ OperationWithRequestCompressionRequest operationWithRequestCompressionRequest) throws AwsServiceException,
+ SdkClientException, QueryException {
HttpResponseHandler responseHandler = protocolFactory
- .createResponseHandler(OperationWithRequestCompressionResponse::builder);
+ .createResponseHandler(OperationWithRequestCompressionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(operationWithRequestCompressionRequest,
- this.clientConfiguration);
+ this.clientConfiguration);
List