All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.iotfleetwise.DefaultIoTFleetWiseAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Io T Fleet Wise module holds the client classes that are used for communicating with Io T Fleet Wise.

There is a newer version: 2.29.39
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.iotfleetwise;

import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.awscore.client.handler.AwsAsyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.AsyncClientHandler;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.util.VersionInfo;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.json.AwsJsonProtocol;
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.JsonOperationMetadata;
import software.amazon.awssdk.services.iotfleetwise.model.AccessDeniedException;
import software.amazon.awssdk.services.iotfleetwise.model.AssociateVehicleFleetRequest;
import software.amazon.awssdk.services.iotfleetwise.model.AssociateVehicleFleetResponse;
import software.amazon.awssdk.services.iotfleetwise.model.BatchCreateVehicleRequest;
import software.amazon.awssdk.services.iotfleetwise.model.BatchCreateVehicleResponse;
import software.amazon.awssdk.services.iotfleetwise.model.BatchUpdateVehicleRequest;
import software.amazon.awssdk.services.iotfleetwise.model.BatchUpdateVehicleResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ConflictException;
import software.amazon.awssdk.services.iotfleetwise.model.CreateCampaignRequest;
import software.amazon.awssdk.services.iotfleetwise.model.CreateCampaignResponse;
import software.amazon.awssdk.services.iotfleetwise.model.CreateDecoderManifestRequest;
import software.amazon.awssdk.services.iotfleetwise.model.CreateDecoderManifestResponse;
import software.amazon.awssdk.services.iotfleetwise.model.CreateFleetRequest;
import software.amazon.awssdk.services.iotfleetwise.model.CreateFleetResponse;
import software.amazon.awssdk.services.iotfleetwise.model.CreateModelManifestRequest;
import software.amazon.awssdk.services.iotfleetwise.model.CreateModelManifestResponse;
import software.amazon.awssdk.services.iotfleetwise.model.CreateSignalCatalogRequest;
import software.amazon.awssdk.services.iotfleetwise.model.CreateSignalCatalogResponse;
import software.amazon.awssdk.services.iotfleetwise.model.CreateVehicleRequest;
import software.amazon.awssdk.services.iotfleetwise.model.CreateVehicleResponse;
import software.amazon.awssdk.services.iotfleetwise.model.DecoderManifestValidationException;
import software.amazon.awssdk.services.iotfleetwise.model.DeleteCampaignRequest;
import software.amazon.awssdk.services.iotfleetwise.model.DeleteCampaignResponse;
import software.amazon.awssdk.services.iotfleetwise.model.DeleteDecoderManifestRequest;
import software.amazon.awssdk.services.iotfleetwise.model.DeleteDecoderManifestResponse;
import software.amazon.awssdk.services.iotfleetwise.model.DeleteFleetRequest;
import software.amazon.awssdk.services.iotfleetwise.model.DeleteFleetResponse;
import software.amazon.awssdk.services.iotfleetwise.model.DeleteModelManifestRequest;
import software.amazon.awssdk.services.iotfleetwise.model.DeleteModelManifestResponse;
import software.amazon.awssdk.services.iotfleetwise.model.DeleteSignalCatalogRequest;
import software.amazon.awssdk.services.iotfleetwise.model.DeleteSignalCatalogResponse;
import software.amazon.awssdk.services.iotfleetwise.model.DeleteVehicleRequest;
import software.amazon.awssdk.services.iotfleetwise.model.DeleteVehicleResponse;
import software.amazon.awssdk.services.iotfleetwise.model.DisassociateVehicleFleetRequest;
import software.amazon.awssdk.services.iotfleetwise.model.DisassociateVehicleFleetResponse;
import software.amazon.awssdk.services.iotfleetwise.model.GetCampaignRequest;
import software.amazon.awssdk.services.iotfleetwise.model.GetCampaignResponse;
import software.amazon.awssdk.services.iotfleetwise.model.GetDecoderManifestRequest;
import software.amazon.awssdk.services.iotfleetwise.model.GetDecoderManifestResponse;
import software.amazon.awssdk.services.iotfleetwise.model.GetFleetRequest;
import software.amazon.awssdk.services.iotfleetwise.model.GetFleetResponse;
import software.amazon.awssdk.services.iotfleetwise.model.GetLoggingOptionsRequest;
import software.amazon.awssdk.services.iotfleetwise.model.GetLoggingOptionsResponse;
import software.amazon.awssdk.services.iotfleetwise.model.GetModelManifestRequest;
import software.amazon.awssdk.services.iotfleetwise.model.GetModelManifestResponse;
import software.amazon.awssdk.services.iotfleetwise.model.GetRegisterAccountStatusRequest;
import software.amazon.awssdk.services.iotfleetwise.model.GetRegisterAccountStatusResponse;
import software.amazon.awssdk.services.iotfleetwise.model.GetSignalCatalogRequest;
import software.amazon.awssdk.services.iotfleetwise.model.GetSignalCatalogResponse;
import software.amazon.awssdk.services.iotfleetwise.model.GetVehicleRequest;
import software.amazon.awssdk.services.iotfleetwise.model.GetVehicleResponse;
import software.amazon.awssdk.services.iotfleetwise.model.GetVehicleStatusRequest;
import software.amazon.awssdk.services.iotfleetwise.model.GetVehicleStatusResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ImportDecoderManifestRequest;
import software.amazon.awssdk.services.iotfleetwise.model.ImportDecoderManifestResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ImportSignalCatalogRequest;
import software.amazon.awssdk.services.iotfleetwise.model.ImportSignalCatalogResponse;
import software.amazon.awssdk.services.iotfleetwise.model.InternalServerException;
import software.amazon.awssdk.services.iotfleetwise.model.InvalidNodeException;
import software.amazon.awssdk.services.iotfleetwise.model.InvalidSignalsException;
import software.amazon.awssdk.services.iotfleetwise.model.IoTFleetWiseException;
import software.amazon.awssdk.services.iotfleetwise.model.IoTFleetWiseRequest;
import software.amazon.awssdk.services.iotfleetwise.model.LimitExceededException;
import software.amazon.awssdk.services.iotfleetwise.model.ListCampaignsRequest;
import software.amazon.awssdk.services.iotfleetwise.model.ListCampaignsResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ListDecoderManifestNetworkInterfacesRequest;
import software.amazon.awssdk.services.iotfleetwise.model.ListDecoderManifestNetworkInterfacesResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ListDecoderManifestSignalsRequest;
import software.amazon.awssdk.services.iotfleetwise.model.ListDecoderManifestSignalsResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ListDecoderManifestsRequest;
import software.amazon.awssdk.services.iotfleetwise.model.ListDecoderManifestsResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ListFleetsForVehicleRequest;
import software.amazon.awssdk.services.iotfleetwise.model.ListFleetsForVehicleResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ListFleetsRequest;
import software.amazon.awssdk.services.iotfleetwise.model.ListFleetsResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ListModelManifestNodesRequest;
import software.amazon.awssdk.services.iotfleetwise.model.ListModelManifestNodesResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ListModelManifestsRequest;
import software.amazon.awssdk.services.iotfleetwise.model.ListModelManifestsResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ListSignalCatalogNodesRequest;
import software.amazon.awssdk.services.iotfleetwise.model.ListSignalCatalogNodesResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ListSignalCatalogsRequest;
import software.amazon.awssdk.services.iotfleetwise.model.ListSignalCatalogsResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.iotfleetwise.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ListVehiclesInFleetRequest;
import software.amazon.awssdk.services.iotfleetwise.model.ListVehiclesInFleetResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ListVehiclesRequest;
import software.amazon.awssdk.services.iotfleetwise.model.ListVehiclesResponse;
import software.amazon.awssdk.services.iotfleetwise.model.PutLoggingOptionsRequest;
import software.amazon.awssdk.services.iotfleetwise.model.PutLoggingOptionsResponse;
import software.amazon.awssdk.services.iotfleetwise.model.RegisterAccountRequest;
import software.amazon.awssdk.services.iotfleetwise.model.RegisterAccountResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ResourceNotFoundException;
import software.amazon.awssdk.services.iotfleetwise.model.TagResourceRequest;
import software.amazon.awssdk.services.iotfleetwise.model.TagResourceResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ThrottlingException;
import software.amazon.awssdk.services.iotfleetwise.model.UntagResourceRequest;
import software.amazon.awssdk.services.iotfleetwise.model.UntagResourceResponse;
import software.amazon.awssdk.services.iotfleetwise.model.UpdateCampaignRequest;
import software.amazon.awssdk.services.iotfleetwise.model.UpdateCampaignResponse;
import software.amazon.awssdk.services.iotfleetwise.model.UpdateDecoderManifestRequest;
import software.amazon.awssdk.services.iotfleetwise.model.UpdateDecoderManifestResponse;
import software.amazon.awssdk.services.iotfleetwise.model.UpdateFleetRequest;
import software.amazon.awssdk.services.iotfleetwise.model.UpdateFleetResponse;
import software.amazon.awssdk.services.iotfleetwise.model.UpdateModelManifestRequest;
import software.amazon.awssdk.services.iotfleetwise.model.UpdateModelManifestResponse;
import software.amazon.awssdk.services.iotfleetwise.model.UpdateSignalCatalogRequest;
import software.amazon.awssdk.services.iotfleetwise.model.UpdateSignalCatalogResponse;
import software.amazon.awssdk.services.iotfleetwise.model.UpdateVehicleRequest;
import software.amazon.awssdk.services.iotfleetwise.model.UpdateVehicleResponse;
import software.amazon.awssdk.services.iotfleetwise.model.ValidationException;
import software.amazon.awssdk.services.iotfleetwise.paginators.GetVehicleStatusPublisher;
import software.amazon.awssdk.services.iotfleetwise.paginators.ListCampaignsPublisher;
import software.amazon.awssdk.services.iotfleetwise.paginators.ListDecoderManifestNetworkInterfacesPublisher;
import software.amazon.awssdk.services.iotfleetwise.paginators.ListDecoderManifestSignalsPublisher;
import software.amazon.awssdk.services.iotfleetwise.paginators.ListDecoderManifestsPublisher;
import software.amazon.awssdk.services.iotfleetwise.paginators.ListFleetsForVehiclePublisher;
import software.amazon.awssdk.services.iotfleetwise.paginators.ListFleetsPublisher;
import software.amazon.awssdk.services.iotfleetwise.paginators.ListModelManifestNodesPublisher;
import software.amazon.awssdk.services.iotfleetwise.paginators.ListModelManifestsPublisher;
import software.amazon.awssdk.services.iotfleetwise.paginators.ListSignalCatalogNodesPublisher;
import software.amazon.awssdk.services.iotfleetwise.paginators.ListSignalCatalogsPublisher;
import software.amazon.awssdk.services.iotfleetwise.paginators.ListVehiclesInFleetPublisher;
import software.amazon.awssdk.services.iotfleetwise.paginators.ListVehiclesPublisher;
import software.amazon.awssdk.services.iotfleetwise.transform.AssociateVehicleFleetRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.BatchCreateVehicleRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.BatchUpdateVehicleRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.CreateCampaignRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.CreateDecoderManifestRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.CreateFleetRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.CreateModelManifestRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.CreateSignalCatalogRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.CreateVehicleRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.DeleteCampaignRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.DeleteDecoderManifestRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.DeleteFleetRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.DeleteModelManifestRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.DeleteSignalCatalogRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.DeleteVehicleRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.DisassociateVehicleFleetRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.GetCampaignRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.GetDecoderManifestRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.GetFleetRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.GetLoggingOptionsRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.GetModelManifestRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.GetRegisterAccountStatusRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.GetSignalCatalogRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.GetVehicleRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.GetVehicleStatusRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.ImportDecoderManifestRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.ImportSignalCatalogRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.ListCampaignsRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.ListDecoderManifestNetworkInterfacesRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.ListDecoderManifestSignalsRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.ListDecoderManifestsRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.ListFleetsForVehicleRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.ListFleetsRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.ListModelManifestNodesRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.ListModelManifestsRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.ListSignalCatalogNodesRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.ListSignalCatalogsRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.ListVehiclesInFleetRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.ListVehiclesRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.PutLoggingOptionsRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.RegisterAccountRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.UpdateCampaignRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.UpdateDecoderManifestRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.UpdateFleetRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.UpdateModelManifestRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.UpdateSignalCatalogRequestMarshaller;
import software.amazon.awssdk.services.iotfleetwise.transform.UpdateVehicleRequestMarshaller;
import software.amazon.awssdk.utils.CompletableFutureUtils;

/**
 * Internal implementation of {@link IoTFleetWiseAsyncClient}.
 *
 * @see IoTFleetWiseAsyncClient#builder()
 */
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultIoTFleetWiseAsyncClient implements IoTFleetWiseAsyncClient {
    private static final Logger log = LoggerFactory.getLogger(DefaultIoTFleetWiseAsyncClient.class);

    private final AsyncClientHandler clientHandler;

    private final AwsJsonProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

    protected DefaultIoTFleetWiseAsyncClient(SdkClientConfiguration clientConfiguration) {
        this.clientHandler = new AwsAsyncClientHandler(clientConfiguration);
        this.clientConfiguration = clientConfiguration;
        this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
    }

    @Override
    public final String serviceName() {
        return SERVICE_NAME;
    }

    /**
     * 

* Adds, or associates, a vehicle with a fleet. *

* * @param associateVehicleFleetRequest * @return A Java Future containing the result of the AssociateVehicleFleet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.AssociateVehicleFleet * @see AWS API Documentation */ @Override public CompletableFuture associateVehicleFleet( AssociateVehicleFleetRequest associateVehicleFleetRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, associateVehicleFleetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateVehicleFleet"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateVehicleFleetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateVehicleFleet") .withMarshaller(new AssociateVehicleFleetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(associateVehicleFleetRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a group, or batch, of vehicles. *

* *

* You must specify a decoder manifest and a vehicle model (model manifest) for each vehicle. *

*
*

* For more information, see Create multiple * vehicles (AWS CLI) in the Amazon Web Services IoT FleetWise Developer Guide. *

* * @param batchCreateVehicleRequest * @return A Java Future containing the result of the BatchCreateVehicle operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • LimitExceededException A service quota was exceeded.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.BatchCreateVehicle * @see AWS API Documentation */ @Override public CompletableFuture batchCreateVehicle(BatchCreateVehicleRequest batchCreateVehicleRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, batchCreateVehicleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchCreateVehicle"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, BatchCreateVehicleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("BatchCreateVehicle") .withMarshaller(new BatchCreateVehicleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(batchCreateVehicleRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates a group, or batch, of vehicles. *

* *

* You must specify a decoder manifest and a vehicle model (model manifest) for each vehicle. *

*
*

* For more information, see Update multiple * vehicles (AWS CLI) in the Amazon Web Services IoT FleetWise Developer Guide. *

* * @param batchUpdateVehicleRequest * @return A Java Future containing the result of the BatchUpdateVehicle operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.BatchUpdateVehicle * @see AWS API Documentation */ @Override public CompletableFuture batchUpdateVehicle(BatchUpdateVehicleRequest batchUpdateVehicleRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, batchUpdateVehicleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchUpdateVehicle"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, BatchUpdateVehicleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("BatchUpdateVehicle") .withMarshaller(new BatchUpdateVehicleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(batchUpdateVehicleRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates an orchestration of data collection rules. The Amazon Web Services IoT FleetWise Edge Agent software * running in vehicles uses campaigns to decide how to collect and transfer data to the cloud. You create campaigns * in the cloud. After you or your team approve campaigns, Amazon Web Services IoT FleetWise automatically deploys * them to vehicles. *

*

* For more information, see Collect and transfer data * with campaigns in the Amazon Web Services IoT FleetWise Developer Guide. *

* * @param createCampaignRequest * @return A Java Future containing the result of the CreateCampaign operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • LimitExceededException A service quota was exceeded.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.CreateCampaign * @see AWS * API Documentation */ @Override public CompletableFuture createCampaign(CreateCampaignRequest createCampaignRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createCampaignRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateCampaign"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateCampaignResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateCampaign") .withMarshaller(new CreateCampaignRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createCampaignRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates the decoder manifest associated with a model manifest. To create a decoder manifest, the following must * be true: *

*
    *
  • *

    * Every signal decoder has a unique name. *

    *
  • *
  • *

    * Each signal decoder is associated with a network interface. *

    *
  • *
  • *

    * Each network interface has a unique ID. *

    *
  • *
  • *

    * The signal decoders are specified in the model manifest. *

    *
  • *
* * @param createDecoderManifestRequest * @return A Java Future containing the result of the CreateDecoderManifest operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • LimitExceededException A service quota was exceeded.
  • *
  • DecoderManifestValidationException The request couldn't be completed because it contains signal * decoders with one or more validation errors.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.CreateDecoderManifest * @see AWS API Documentation */ @Override public CompletableFuture createDecoderManifest( CreateDecoderManifestRequest createDecoderManifestRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createDecoderManifestRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDecoderManifest"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateDecoderManifestResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateDecoderManifest") .withMarshaller(new CreateDecoderManifestRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createDecoderManifestRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a fleet that represents a group of vehicles. *

* *

* You must create both a signal catalog and vehicles before you can create a fleet. *

*
*

* For more information, see Fleets in the Amazon * Web Services IoT FleetWise Developer Guide. *

* * @param createFleetRequest * @return A Java Future containing the result of the CreateFleet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • LimitExceededException A service quota was exceeded.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.CreateFleet * @see AWS API * Documentation */ @Override public CompletableFuture createFleet(CreateFleetRequest createFleetRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createFleetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateFleet"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateFleetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateFleet").withMarshaller(new CreateFleetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createFleetRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a vehicle model (model manifest) that specifies signals (attributes, branches, sensors, and actuators). *

*

* For more information, see Vehicle models in * the Amazon Web Services IoT FleetWise Developer Guide. *

* * @param createModelManifestRequest * @return A Java Future containing the result of the CreateModelManifest operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • LimitExceededException A service quota was exceeded.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • InvalidSignalsException The request couldn't be completed because it contains signals that aren't * valid.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.CreateModelManifest * @see AWS API Documentation */ @Override public CompletableFuture createModelManifest( CreateModelManifestRequest createModelManifestRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createModelManifestRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateModelManifest"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateModelManifestResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateModelManifest") .withMarshaller(new CreateModelManifestRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createModelManifestRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a collection of standardized signals that can be reused to create vehicle models. *

* * @param createSignalCatalogRequest * @return A Java Future containing the result of the CreateSignalCatalog operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • LimitExceededException A service quota was exceeded.
  • *
  • InvalidNodeException The specified node type doesn't match the expected node type for a node. You can * specify the node type as branch, sensor, actuator, or attribute.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • InvalidSignalsException The request couldn't be completed because it contains signals that aren't * valid.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.CreateSignalCatalog * @see AWS API Documentation */ @Override public CompletableFuture createSignalCatalog( CreateSignalCatalogRequest createSignalCatalogRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createSignalCatalogRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateSignalCatalog"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateSignalCatalogResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateSignalCatalog") .withMarshaller(new CreateSignalCatalogRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createSignalCatalogRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a vehicle, which is an instance of a vehicle model (model manifest). Vehicles created from the same * vehicle model consist of the same signals inherited from the vehicle model. *

* *

* If you have an existing Amazon Web Services IoT Thing, you can use Amazon Web Services IoT FleetWise to create a * vehicle and collect data from your thing. *

*
*

* For more information, see Create a vehicle * (AWS CLI) in the Amazon Web Services IoT FleetWise Developer Guide. *

* * @param createVehicleRequest * @return A Java Future containing the result of the CreateVehicle operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • LimitExceededException A service quota was exceeded.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.CreateVehicle * @see AWS * API Documentation */ @Override public CompletableFuture createVehicle(CreateVehicleRequest createVehicleRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createVehicleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateVehicle"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateVehicleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateVehicle") .withMarshaller(new CreateVehicleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createVehicleRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a data collection campaign. Deleting a campaign suspends all data collection and removes it from any * vehicles. *

* * @param deleteCampaignRequest * @return A Java Future containing the result of the DeleteCampaign operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.DeleteCampaign * @see AWS * API Documentation */ @Override public CompletableFuture deleteCampaign(DeleteCampaignRequest deleteCampaignRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteCampaignRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteCampaign"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteCampaignResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteCampaign") .withMarshaller(new DeleteCampaignRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteCampaignRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a decoder manifest. You can't delete a decoder manifest if it has vehicles associated with it. *

* *

* If the decoder manifest is successfully deleted, Amazon Web Services IoT FleetWise sends back an HTTP 200 * response with an empty body. *

*
* * @param deleteDecoderManifestRequest * @return A Java Future containing the result of the DeleteDecoderManifest operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.DeleteDecoderManifest * @see AWS API Documentation */ @Override public CompletableFuture deleteDecoderManifest( DeleteDecoderManifestRequest deleteDecoderManifestRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDecoderManifestRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDecoderManifest"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteDecoderManifestResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteDecoderManifest") .withMarshaller(new DeleteDecoderManifestRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteDecoderManifestRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a fleet. Before you delete a fleet, all vehicles must be dissociated from the fleet. For more * information, see Delete a fleet (AWS * CLI) in the Amazon Web Services IoT FleetWise Developer Guide. *

* *

* If the fleet is successfully deleted, Amazon Web Services IoT FleetWise sends back an HTTP 200 response with an * empty body. *

*
* * @param deleteFleetRequest * @return A Java Future containing the result of the DeleteFleet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.DeleteFleet * @see AWS API * Documentation */ @Override public CompletableFuture deleteFleet(DeleteFleetRequest deleteFleetRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteFleetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteFleet"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteFleetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteFleet").withMarshaller(new DeleteFleetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteFleetRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a vehicle model (model manifest). *

* *

* If the vehicle model is successfully deleted, Amazon Web Services IoT FleetWise sends back an HTTP 200 response * with an empty body. *

*
* * @param deleteModelManifestRequest * @return A Java Future containing the result of the DeleteModelManifest operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.DeleteModelManifest * @see AWS API Documentation */ @Override public CompletableFuture deleteModelManifest( DeleteModelManifestRequest deleteModelManifestRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteModelManifestRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteModelManifest"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteModelManifestResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteModelManifest") .withMarshaller(new DeleteModelManifestRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteModelManifestRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a signal catalog. *

* *

* If the signal catalog is successfully deleted, Amazon Web Services IoT FleetWise sends back an HTTP 200 response * with an empty body. *

*
* * @param deleteSignalCatalogRequest * @return A Java Future containing the result of the DeleteSignalCatalog operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.DeleteSignalCatalog * @see AWS API Documentation */ @Override public CompletableFuture deleteSignalCatalog( DeleteSignalCatalogRequest deleteSignalCatalogRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSignalCatalogRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSignalCatalog"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteSignalCatalogResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteSignalCatalog") .withMarshaller(new DeleteSignalCatalogRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteSignalCatalogRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a vehicle and removes it from any campaigns. *

* *

* If the vehicle is successfully deleted, Amazon Web Services IoT FleetWise sends back an HTTP 200 response with an * empty body. *

*
* * @param deleteVehicleRequest * @return A Java Future containing the result of the DeleteVehicle operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.DeleteVehicle * @see AWS * API Documentation */ @Override public CompletableFuture deleteVehicle(DeleteVehicleRequest deleteVehicleRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteVehicleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteVehicle"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteVehicleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteVehicle") .withMarshaller(new DeleteVehicleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteVehicleRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes, or disassociates, a vehicle from a fleet. Disassociating a vehicle from a fleet doesn't delete the * vehicle. *

* *

* If the vehicle is successfully dissociated from a fleet, Amazon Web Services IoT FleetWise sends back an HTTP 200 * response with an empty body. *

*
* * @param disassociateVehicleFleetRequest * @return A Java Future containing the result of the DisassociateVehicleFleet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.DisassociateVehicleFleet * @see AWS API Documentation */ @Override public CompletableFuture disassociateVehicleFleet( DisassociateVehicleFleetRequest disassociateVehicleFleetRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateVehicleFleetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateVehicleFleet"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DisassociateVehicleFleetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateVehicleFleet") .withMarshaller(new DisassociateVehicleFleetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(disassociateVehicleFleetRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about a campaign. *

* * @param getCampaignRequest * @return A Java Future containing the result of the GetCampaign operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.GetCampaign * @see AWS API * Documentation */ @Override public CompletableFuture getCampaign(GetCampaignRequest getCampaignRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getCampaignRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCampaign"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetCampaignResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetCampaign").withMarshaller(new GetCampaignRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getCampaignRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about a created decoder manifest. *

* * @param getDecoderManifestRequest * @return A Java Future containing the result of the GetDecoderManifest operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.GetDecoderManifest * @see AWS API Documentation */ @Override public CompletableFuture getDecoderManifest(GetDecoderManifestRequest getDecoderManifestRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getDecoderManifestRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetDecoderManifest"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetDecoderManifestResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetDecoderManifest") .withMarshaller(new GetDecoderManifestRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getDecoderManifestRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about a fleet. *

* * @param getFleetRequest * @return A Java Future containing the result of the GetFleet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.GetFleet * @see AWS API * Documentation */ @Override public CompletableFuture getFleet(GetFleetRequest getFleetRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getFleetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetFleet"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetFleetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("GetFleet") .withMarshaller(new GetFleetRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getFleetRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves the logging options. *

* * @param getLoggingOptionsRequest * @return A Java Future containing the result of the GetLoggingOptions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.GetLoggingOptions * @see AWS API Documentation */ @Override public CompletableFuture getLoggingOptions(GetLoggingOptionsRequest getLoggingOptionsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getLoggingOptionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetLoggingOptions"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetLoggingOptionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetLoggingOptions") .withMarshaller(new GetLoggingOptionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getLoggingOptionsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about a vehicle model (model manifest). *

* * @param getModelManifestRequest * @return A Java Future containing the result of the GetModelManifest operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.GetModelManifest * @see AWS * API Documentation */ @Override public CompletableFuture getModelManifest(GetModelManifestRequest getModelManifestRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getModelManifestRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetModelManifest"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetModelManifestResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetModelManifest") .withMarshaller(new GetModelManifestRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getModelManifestRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about the status of registering your Amazon Web Services account, IAM, and Amazon * Timestream resources so that Amazon Web Services IoT FleetWise can transfer your vehicle data to the Amazon Web * Services Cloud. *

*

* For more information, including step-by-step procedures, see Setting up Amazon Web * Services IoT FleetWise. *

* *

* This API operation doesn't require input parameters. *

*
* * @param getRegisterAccountStatusRequest * @return A Java Future containing the result of the GetRegisterAccountStatus operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.GetRegisterAccountStatus * @see AWS API Documentation */ @Override public CompletableFuture getRegisterAccountStatus( GetRegisterAccountStatusRequest getRegisterAccountStatusRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getRegisterAccountStatusRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetRegisterAccountStatus"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetRegisterAccountStatusResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetRegisterAccountStatus") .withMarshaller(new GetRegisterAccountStatusRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getRegisterAccountStatusRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about a signal catalog. *

* * @param getSignalCatalogRequest * @return A Java Future containing the result of the GetSignalCatalog operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.GetSignalCatalog * @see AWS * API Documentation */ @Override public CompletableFuture getSignalCatalog(GetSignalCatalogRequest getSignalCatalogRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getSignalCatalogRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetSignalCatalog"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetSignalCatalogResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetSignalCatalog") .withMarshaller(new GetSignalCatalogRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getSignalCatalogRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about a vehicle. *

* * @param getVehicleRequest * @return A Java Future containing the result of the GetVehicle operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.GetVehicle * @see AWS API * Documentation */ @Override public CompletableFuture getVehicle(GetVehicleRequest getVehicleRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getVehicleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetVehicle"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetVehicleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("GetVehicle") .withMarshaller(new GetVehicleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getVehicleRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about the status of a vehicle with any associated campaigns. *

* * @param getVehicleStatusRequest * @return A Java Future containing the result of the GetVehicleStatus operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.GetVehicleStatus * @see AWS * API Documentation */ @Override public CompletableFuture getVehicleStatus(GetVehicleStatusRequest getVehicleStatusRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getVehicleStatusRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetVehicleStatus"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetVehicleStatusResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetVehicleStatus") .withMarshaller(new GetVehicleStatusRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getVehicleStatusRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about the status of a vehicle with any associated campaigns. *

*
*

* This is a variant of * {@link #getVehicleStatus(software.amazon.awssdk.services.iotfleetwise.model.GetVehicleStatusRequest)} operation. * The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will * internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.GetVehicleStatusPublisher publisher = client.getVehicleStatusPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.GetVehicleStatusPublisher publisher = client.getVehicleStatusPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.iotfleetwise.model.GetVehicleStatusResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #getVehicleStatus(software.amazon.awssdk.services.iotfleetwise.model.GetVehicleStatusRequest)} * operation. *

* * @param getVehicleStatusRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.GetVehicleStatus * @see AWS * API Documentation */ public GetVehicleStatusPublisher getVehicleStatusPaginator(GetVehicleStatusRequest getVehicleStatusRequest) { return new GetVehicleStatusPublisher(this, applyPaginatorUserAgent(getVehicleStatusRequest)); } /** *

* Creates a decoder manifest using your existing CAN DBC file from your local device. *

* * @param importDecoderManifestRequest * @return A Java Future containing the result of the ImportDecoderManifest operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • DecoderManifestValidationException The request couldn't be completed because it contains signal * decoders with one or more validation errors.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • InvalidSignalsException The request couldn't be completed because it contains signals that aren't * valid.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ImportDecoderManifest * @see AWS API Documentation */ @Override public CompletableFuture importDecoderManifest( ImportDecoderManifestRequest importDecoderManifestRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, importDecoderManifestRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ImportDecoderManifest"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ImportDecoderManifestResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ImportDecoderManifest") .withMarshaller(new ImportDecoderManifestRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(importDecoderManifestRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a signal catalog using your existing VSS formatted content from your local device. *

* * @param importSignalCatalogRequest * @return A Java Future containing the result of the ImportSignalCatalog operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • LimitExceededException A service quota was exceeded.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • InvalidSignalsException The request couldn't be completed because it contains signals that aren't * valid.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ImportSignalCatalog * @see AWS API Documentation */ @Override public CompletableFuture importSignalCatalog( ImportSignalCatalogRequest importSignalCatalogRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, importSignalCatalogRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ImportSignalCatalog"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ImportSignalCatalogResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ImportSignalCatalog") .withMarshaller(new ImportSignalCatalogRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(importSignalCatalogRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists information about created campaigns. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*
* * @param listCampaignsRequest * @return A Java Future containing the result of the ListCampaigns operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListCampaigns * @see AWS * API Documentation */ @Override public CompletableFuture listCampaigns(ListCampaignsRequest listCampaignsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listCampaignsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListCampaigns"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListCampaignsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListCampaigns") .withMarshaller(new ListCampaignsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listCampaignsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists information about created campaigns. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*

*

* This is a variant of * {@link #listCampaigns(software.amazon.awssdk.services.iotfleetwise.model.ListCampaignsRequest)} operation. The * return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will * internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListCampaignsPublisher publisher = client.listCampaignsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListCampaignsPublisher publisher = client.listCampaignsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.iotfleetwise.model.ListCampaignsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listCampaigns(software.amazon.awssdk.services.iotfleetwise.model.ListCampaignsRequest)} operation. *

* * @param listCampaignsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListCampaigns * @see AWS * API Documentation */ public ListCampaignsPublisher listCampaignsPaginator(ListCampaignsRequest listCampaignsRequest) { return new ListCampaignsPublisher(this, applyPaginatorUserAgent(listCampaignsRequest)); } /** *

* Lists the network interfaces specified in a decoder manifest. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*
* * @param listDecoderManifestNetworkInterfacesRequest * @return A Java Future containing the result of the ListDecoderManifestNetworkInterfaces operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListDecoderManifestNetworkInterfaces * @see AWS API Documentation */ @Override public CompletableFuture listDecoderManifestNetworkInterfaces( ListDecoderManifestNetworkInterfacesRequest listDecoderManifestNetworkInterfacesRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listDecoderManifestNetworkInterfacesRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDecoderManifestNetworkInterfaces"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, ListDecoderManifestNetworkInterfacesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListDecoderManifestNetworkInterfaces") .withMarshaller(new ListDecoderManifestNetworkInterfacesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listDecoderManifestNetworkInterfacesRequest)); CompletableFuture whenCompleted = executeFuture .whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the network interfaces specified in a decoder manifest. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*

*

* This is a variant of * {@link #listDecoderManifestNetworkInterfaces(software.amazon.awssdk.services.iotfleetwise.model.ListDecoderManifestNetworkInterfacesRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListDecoderManifestNetworkInterfacesPublisher publisher = client.listDecoderManifestNetworkInterfacesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListDecoderManifestNetworkInterfacesPublisher publisher = client.listDecoderManifestNetworkInterfacesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.iotfleetwise.model.ListDecoderManifestNetworkInterfacesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listDecoderManifestNetworkInterfaces(software.amazon.awssdk.services.iotfleetwise.model.ListDecoderManifestNetworkInterfacesRequest)} * operation. *

* * @param listDecoderManifestNetworkInterfacesRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListDecoderManifestNetworkInterfaces * @see AWS API Documentation */ public ListDecoderManifestNetworkInterfacesPublisher listDecoderManifestNetworkInterfacesPaginator( ListDecoderManifestNetworkInterfacesRequest listDecoderManifestNetworkInterfacesRequest) { return new ListDecoderManifestNetworkInterfacesPublisher(this, applyPaginatorUserAgent(listDecoderManifestNetworkInterfacesRequest)); } /** *

* A list of information about signal decoders specified in a decoder manifest. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*
* * @param listDecoderManifestSignalsRequest * @return A Java Future containing the result of the ListDecoderManifestSignals operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListDecoderManifestSignals * @see AWS API Documentation */ @Override public CompletableFuture listDecoderManifestSignals( ListDecoderManifestSignalsRequest listDecoderManifestSignalsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listDecoderManifestSignalsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDecoderManifestSignals"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListDecoderManifestSignalsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListDecoderManifestSignals") .withMarshaller(new ListDecoderManifestSignalsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listDecoderManifestSignalsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* A list of information about signal decoders specified in a decoder manifest. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*

*

* This is a variant of * {@link #listDecoderManifestSignals(software.amazon.awssdk.services.iotfleetwise.model.ListDecoderManifestSignalsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListDecoderManifestSignalsPublisher publisher = client.listDecoderManifestSignalsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListDecoderManifestSignalsPublisher publisher = client.listDecoderManifestSignalsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.iotfleetwise.model.ListDecoderManifestSignalsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listDecoderManifestSignals(software.amazon.awssdk.services.iotfleetwise.model.ListDecoderManifestSignalsRequest)} * operation. *

* * @param listDecoderManifestSignalsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListDecoderManifestSignals * @see AWS API Documentation */ public ListDecoderManifestSignalsPublisher listDecoderManifestSignalsPaginator( ListDecoderManifestSignalsRequest listDecoderManifestSignalsRequest) { return new ListDecoderManifestSignalsPublisher(this, applyPaginatorUserAgent(listDecoderManifestSignalsRequest)); } /** *

* Lists decoder manifests. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*
* * @param listDecoderManifestsRequest * @return A Java Future containing the result of the ListDecoderManifests operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListDecoderManifests * @see AWS API Documentation */ @Override public CompletableFuture listDecoderManifests( ListDecoderManifestsRequest listDecoderManifestsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listDecoderManifestsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDecoderManifests"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListDecoderManifestsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListDecoderManifests") .withMarshaller(new ListDecoderManifestsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listDecoderManifestsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists decoder manifests. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*

*

* This is a variant of * {@link #listDecoderManifests(software.amazon.awssdk.services.iotfleetwise.model.ListDecoderManifestsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListDecoderManifestsPublisher publisher = client.listDecoderManifestsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListDecoderManifestsPublisher publisher = client.listDecoderManifestsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.iotfleetwise.model.ListDecoderManifestsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listDecoderManifests(software.amazon.awssdk.services.iotfleetwise.model.ListDecoderManifestsRequest)} * operation. *

* * @param listDecoderManifestsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListDecoderManifests * @see AWS API Documentation */ public ListDecoderManifestsPublisher listDecoderManifestsPaginator(ListDecoderManifestsRequest listDecoderManifestsRequest) { return new ListDecoderManifestsPublisher(this, applyPaginatorUserAgent(listDecoderManifestsRequest)); } /** *

* Retrieves information for each created fleet in an Amazon Web Services account. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*
* * @param listFleetsRequest * @return A Java Future containing the result of the ListFleets operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListFleets * @see AWS API * Documentation */ @Override public CompletableFuture listFleets(ListFleetsRequest listFleetsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listFleetsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListFleets"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListFleetsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("ListFleets") .withMarshaller(new ListFleetsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listFleetsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves a list of IDs for all fleets that the vehicle is associated with. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*
* * @param listFleetsForVehicleRequest * @return A Java Future containing the result of the ListFleetsForVehicle operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListFleetsForVehicle * @see AWS API Documentation */ @Override public CompletableFuture listFleetsForVehicle( ListFleetsForVehicleRequest listFleetsForVehicleRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listFleetsForVehicleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListFleetsForVehicle"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListFleetsForVehicleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListFleetsForVehicle") .withMarshaller(new ListFleetsForVehicleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listFleetsForVehicleRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves a list of IDs for all fleets that the vehicle is associated with. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*

*

* This is a variant of * {@link #listFleetsForVehicle(software.amazon.awssdk.services.iotfleetwise.model.ListFleetsForVehicleRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListFleetsForVehiclePublisher publisher = client.listFleetsForVehiclePaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListFleetsForVehiclePublisher publisher = client.listFleetsForVehiclePaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.iotfleetwise.model.ListFleetsForVehicleResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listFleetsForVehicle(software.amazon.awssdk.services.iotfleetwise.model.ListFleetsForVehicleRequest)} * operation. *

* * @param listFleetsForVehicleRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListFleetsForVehicle * @see AWS API Documentation */ public ListFleetsForVehiclePublisher listFleetsForVehiclePaginator(ListFleetsForVehicleRequest listFleetsForVehicleRequest) { return new ListFleetsForVehiclePublisher(this, applyPaginatorUserAgent(listFleetsForVehicleRequest)); } /** *

* Retrieves information for each created fleet in an Amazon Web Services account. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*

*

* This is a variant of {@link #listFleets(software.amazon.awssdk.services.iotfleetwise.model.ListFleetsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListFleetsPublisher publisher = client.listFleetsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListFleetsPublisher publisher = client.listFleetsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.iotfleetwise.model.ListFleetsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listFleets(software.amazon.awssdk.services.iotfleetwise.model.ListFleetsRequest)} operation. *

* * @param listFleetsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListFleets * @see AWS API * Documentation */ public ListFleetsPublisher listFleetsPaginator(ListFleetsRequest listFleetsRequest) { return new ListFleetsPublisher(this, applyPaginatorUserAgent(listFleetsRequest)); } /** *

* Lists information about nodes specified in a vehicle model (model manifest). *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*
* * @param listModelManifestNodesRequest * @return A Java Future containing the result of the ListModelManifestNodes operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • LimitExceededException A service quota was exceeded.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListModelManifestNodes * @see AWS API Documentation */ @Override public CompletableFuture listModelManifestNodes( ListModelManifestNodesRequest listModelManifestNodesRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listModelManifestNodesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListModelManifestNodes"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListModelManifestNodesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListModelManifestNodes") .withMarshaller(new ListModelManifestNodesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listModelManifestNodesRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists information about nodes specified in a vehicle model (model manifest). *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*

*

* This is a variant of * {@link #listModelManifestNodes(software.amazon.awssdk.services.iotfleetwise.model.ListModelManifestNodesRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListModelManifestNodesPublisher publisher = client.listModelManifestNodesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListModelManifestNodesPublisher publisher = client.listModelManifestNodesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.iotfleetwise.model.ListModelManifestNodesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listModelManifestNodes(software.amazon.awssdk.services.iotfleetwise.model.ListModelManifestNodesRequest)} * operation. *

* * @param listModelManifestNodesRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • LimitExceededException A service quota was exceeded.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListModelManifestNodes * @see AWS API Documentation */ public ListModelManifestNodesPublisher listModelManifestNodesPaginator( ListModelManifestNodesRequest listModelManifestNodesRequest) { return new ListModelManifestNodesPublisher(this, applyPaginatorUserAgent(listModelManifestNodesRequest)); } /** *

* Retrieves a list of vehicle models (model manifests). *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*
* * @param listModelManifestsRequest * @return A Java Future containing the result of the ListModelManifests operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListModelManifests * @see AWS API Documentation */ @Override public CompletableFuture listModelManifests(ListModelManifestsRequest listModelManifestsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listModelManifestsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListModelManifests"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListModelManifestsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListModelManifests") .withMarshaller(new ListModelManifestsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listModelManifestsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves a list of vehicle models (model manifests). *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*

*

* This is a variant of * {@link #listModelManifests(software.amazon.awssdk.services.iotfleetwise.model.ListModelManifestsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListModelManifestsPublisher publisher = client.listModelManifestsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListModelManifestsPublisher publisher = client.listModelManifestsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.iotfleetwise.model.ListModelManifestsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listModelManifests(software.amazon.awssdk.services.iotfleetwise.model.ListModelManifestsRequest)} * operation. *

* * @param listModelManifestsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListModelManifests * @see AWS API Documentation */ public ListModelManifestsPublisher listModelManifestsPaginator(ListModelManifestsRequest listModelManifestsRequest) { return new ListModelManifestsPublisher(this, applyPaginatorUserAgent(listModelManifestsRequest)); } /** *

* Lists of information about the signals (nodes) specified in a signal catalog. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*
* * @param listSignalCatalogNodesRequest * @return A Java Future containing the result of the ListSignalCatalogNodes operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • LimitExceededException A service quota was exceeded.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListSignalCatalogNodes * @see AWS API Documentation */ @Override public CompletableFuture listSignalCatalogNodes( ListSignalCatalogNodesRequest listSignalCatalogNodesRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listSignalCatalogNodesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSignalCatalogNodes"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListSignalCatalogNodesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSignalCatalogNodes") .withMarshaller(new ListSignalCatalogNodesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listSignalCatalogNodesRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists of information about the signals (nodes) specified in a signal catalog. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*

*

* This is a variant of * {@link #listSignalCatalogNodes(software.amazon.awssdk.services.iotfleetwise.model.ListSignalCatalogNodesRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListSignalCatalogNodesPublisher publisher = client.listSignalCatalogNodesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListSignalCatalogNodesPublisher publisher = client.listSignalCatalogNodesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.iotfleetwise.model.ListSignalCatalogNodesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listSignalCatalogNodes(software.amazon.awssdk.services.iotfleetwise.model.ListSignalCatalogNodesRequest)} * operation. *

* * @param listSignalCatalogNodesRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • LimitExceededException A service quota was exceeded.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListSignalCatalogNodes * @see AWS API Documentation */ public ListSignalCatalogNodesPublisher listSignalCatalogNodesPaginator( ListSignalCatalogNodesRequest listSignalCatalogNodesRequest) { return new ListSignalCatalogNodesPublisher(this, applyPaginatorUserAgent(listSignalCatalogNodesRequest)); } /** *

* Lists all the created signal catalogs in an Amazon Web Services account. *

*

* You can use to list information about each signal (node) specified in a signal catalog. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*
* * @param listSignalCatalogsRequest * @return A Java Future containing the result of the ListSignalCatalogs operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListSignalCatalogs * @see AWS API Documentation */ @Override public CompletableFuture listSignalCatalogs(ListSignalCatalogsRequest listSignalCatalogsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listSignalCatalogsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSignalCatalogs"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListSignalCatalogsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSignalCatalogs") .withMarshaller(new ListSignalCatalogsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listSignalCatalogsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all the created signal catalogs in an Amazon Web Services account. *

*

* You can use to list information about each signal (node) specified in a signal catalog. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*

*

* This is a variant of * {@link #listSignalCatalogs(software.amazon.awssdk.services.iotfleetwise.model.ListSignalCatalogsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListSignalCatalogsPublisher publisher = client.listSignalCatalogsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListSignalCatalogsPublisher publisher = client.listSignalCatalogsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.iotfleetwise.model.ListSignalCatalogsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listSignalCatalogs(software.amazon.awssdk.services.iotfleetwise.model.ListSignalCatalogsRequest)} * operation. *

* * @param listSignalCatalogsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListSignalCatalogs * @see AWS API Documentation */ public ListSignalCatalogsPublisher listSignalCatalogsPaginator(ListSignalCatalogsRequest listSignalCatalogsRequest) { return new ListSignalCatalogsPublisher(this, applyPaginatorUserAgent(listSignalCatalogsRequest)); } /** *

* Lists the tags (metadata) you have assigned to the resource. *

* * @param listTagsForResourceRequest * @return A Java Future containing the result of the ListTagsForResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListTagsForResource * @see AWS API Documentation */ @Override public CompletableFuture listTagsForResource( ListTagsForResourceRequest listTagsForResourceRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listTagsForResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTagsForResource"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListTagsForResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListTagsForResource") .withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listTagsForResourceRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves a list of summaries of created vehicles. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*
* * @param listVehiclesRequest * @return A Java Future containing the result of the ListVehicles operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListVehicles * @see AWS API * Documentation */ @Override public CompletableFuture listVehicles(ListVehiclesRequest listVehiclesRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listVehiclesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListVehicles"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListVehiclesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListVehicles").withMarshaller(new ListVehiclesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listVehiclesRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves a list of summaries of all vehicles associated with a fleet. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*
* * @param listVehiclesInFleetRequest * @return A Java Future containing the result of the ListVehiclesInFleet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListVehiclesInFleet * @see AWS API Documentation */ @Override public CompletableFuture listVehiclesInFleet( ListVehiclesInFleetRequest listVehiclesInFleetRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listVehiclesInFleetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListVehiclesInFleet"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListVehiclesInFleetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListVehiclesInFleet") .withMarshaller(new ListVehiclesInFleetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listVehiclesInFleetRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves a list of summaries of all vehicles associated with a fleet. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*

*

* This is a variant of * {@link #listVehiclesInFleet(software.amazon.awssdk.services.iotfleetwise.model.ListVehiclesInFleetRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListVehiclesInFleetPublisher publisher = client.listVehiclesInFleetPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListVehiclesInFleetPublisher publisher = client.listVehiclesInFleetPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.iotfleetwise.model.ListVehiclesInFleetResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listVehiclesInFleet(software.amazon.awssdk.services.iotfleetwise.model.ListVehiclesInFleetRequest)} * operation. *

* * @param listVehiclesInFleetRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListVehiclesInFleet * @see AWS API Documentation */ public ListVehiclesInFleetPublisher listVehiclesInFleetPaginator(ListVehiclesInFleetRequest listVehiclesInFleetRequest) { return new ListVehiclesInFleetPublisher(this, applyPaginatorUserAgent(listVehiclesInFleetRequest)); } /** *

* Retrieves a list of summaries of created vehicles. *

* *

* This API operation uses pagination. Specify the nextToken parameter in the request to return more * results. *

*

*

* This is a variant of * {@link #listVehicles(software.amazon.awssdk.services.iotfleetwise.model.ListVehiclesRequest)} operation. The * return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will * internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListVehiclesPublisher publisher = client.listVehiclesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.iotfleetwise.paginators.ListVehiclesPublisher publisher = client.listVehiclesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.iotfleetwise.model.ListVehiclesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listVehicles(software.amazon.awssdk.services.iotfleetwise.model.ListVehiclesRequest)} operation. *

* * @param listVehiclesRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.ListVehicles * @see AWS API * Documentation */ public ListVehiclesPublisher listVehiclesPaginator(ListVehiclesRequest listVehiclesRequest) { return new ListVehiclesPublisher(this, applyPaginatorUserAgent(listVehiclesRequest)); } /** *

* Creates or updates the logging option. *

* * @param putLoggingOptionsRequest * @return A Java Future containing the result of the PutLoggingOptions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.PutLoggingOptions * @see AWS API Documentation */ @Override public CompletableFuture putLoggingOptions(PutLoggingOptionsRequest putLoggingOptionsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, putLoggingOptionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutLoggingOptions"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, PutLoggingOptionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutLoggingOptions") .withMarshaller(new PutLoggingOptionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(putLoggingOptionsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Registers your Amazon Web Services account, IAM, and Amazon Timestream resources so Amazon Web Services IoT * FleetWise can transfer your vehicle data to the Amazon Web Services Cloud. For more information, including * step-by-step procedures, see Setting up Amazon Web * Services IoT FleetWise. *

* *

* An Amazon Web Services account is not the same thing as a "user account". An Amazon Web Services user is an identity that you create using Identity and Access Management (IAM) and takes * the form of either an IAM user or an * IAM role, both with credentials. A * single Amazon Web Services account can, and typically does, contain many users and roles. *

*
* * @param registerAccountRequest * @return A Java Future containing the result of the RegisterAccount operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.RegisterAccount * @see AWS * API Documentation */ @Override public CompletableFuture registerAccount(RegisterAccountRequest registerAccountRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, registerAccountRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RegisterAccount"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RegisterAccountResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RegisterAccount") .withMarshaller(new RegisterAccountRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(registerAccountRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds to or modifies the tags of the given resource. Tags are metadata which can be used to manage a resource. *

* * @param tagResourceRequest * @return A Java Future containing the result of the TagResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.TagResource * @see AWS API * Documentation */ @Override public CompletableFuture tagResource(TagResourceRequest tagResourceRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, tagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagResource"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, TagResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("TagResource").withMarshaller(new TagResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(tagResourceRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the given tags (metadata) from the resource. *

* * @param untagResourceRequest * @return A Java Future containing the result of the UntagResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.UntagResource * @see AWS * API Documentation */ @Override public CompletableFuture untagResource(UntagResourceRequest untagResourceRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, untagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagResource"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UntagResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UntagResource") .withMarshaller(new UntagResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(untagResourceRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates a campaign. *

* * @param updateCampaignRequest * @return A Java Future containing the result of the UpdateCampaign operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.UpdateCampaign * @see AWS * API Documentation */ @Override public CompletableFuture updateCampaign(UpdateCampaignRequest updateCampaignRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, updateCampaignRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateCampaign"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateCampaignResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateCampaign") .withMarshaller(new UpdateCampaignRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateCampaignRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates a decoder manifest. *

*

* A decoder manifest can only be updated when the status is DRAFT. Only ACTIVE decoder * manifests can be associated with vehicles. *

* * @param updateDecoderManifestRequest * @return A Java Future containing the result of the UpdateDecoderManifest operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • LimitExceededException A service quota was exceeded.
  • *
  • DecoderManifestValidationException The request couldn't be completed because it contains signal * decoders with one or more validation errors.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.UpdateDecoderManifest * @see AWS API Documentation */ @Override public CompletableFuture updateDecoderManifest( UpdateDecoderManifestRequest updateDecoderManifestRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, updateDecoderManifestRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateDecoderManifest"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateDecoderManifestResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateDecoderManifest") .withMarshaller(new UpdateDecoderManifestRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateDecoderManifestRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates the description of an existing fleet. *

* *

* If the fleet is successfully updated, Amazon Web Services IoT FleetWise sends back an HTTP 200 response with an * empty HTTP body. *

*
* * @param updateFleetRequest * @return A Java Future containing the result of the UpdateFleet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.UpdateFleet * @see AWS API * Documentation */ @Override public CompletableFuture updateFleet(UpdateFleetRequest updateFleetRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, updateFleetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateFleet"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateFleetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateFleet").withMarshaller(new UpdateFleetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateFleetRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates a vehicle model (model manifest). If created vehicles are associated with a vehicle model, it can't be * updated. *

* * @param updateModelManifestRequest * @return A Java Future containing the result of the UpdateModelManifest operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • InvalidSignalsException The request couldn't be completed because it contains signals that aren't * valid.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.UpdateModelManifest * @see AWS API Documentation */ @Override public CompletableFuture updateModelManifest( UpdateModelManifestRequest updateModelManifestRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, updateModelManifestRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateModelManifest"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateModelManifestResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateModelManifest") .withMarshaller(new UpdateModelManifestRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateModelManifestRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates a signal catalog. *

* * @param updateSignalCatalogRequest * @return A Java Future containing the result of the UpdateSignalCatalog operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • LimitExceededException A service quota was exceeded.
  • *
  • InvalidNodeException The specified node type doesn't match the expected node type for a node. You can * specify the node type as branch, sensor, actuator, or attribute.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • InvalidSignalsException The request couldn't be completed because it contains signals that aren't * valid.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.UpdateSignalCatalog * @see AWS API Documentation */ @Override public CompletableFuture updateSignalCatalog( UpdateSignalCatalogRequest updateSignalCatalogRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, updateSignalCatalogRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateSignalCatalog"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateSignalCatalogResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateSignalCatalog") .withMarshaller(new UpdateSignalCatalogRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateSignalCatalogRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates a vehicle. *

* * @param updateVehicleRequest * @return A Java Future containing the result of the UpdateVehicle operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request couldn't be completed because the server temporarily failed.
  • *
  • ResourceNotFoundException The resource wasn't found.
  • *
  • ConflictException The request has conflicting operations. This can occur if you're trying to perform * more than one operation on the same resource at the same time.
  • *
  • ThrottlingException The request couldn't be completed due to throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services * service.
  • *
  • AccessDeniedException You don't have sufficient permission to perform this action.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IoTFleetWiseException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IoTFleetWiseAsyncClient.UpdateVehicle * @see AWS * API Documentation */ @Override public CompletableFuture updateVehicle(UpdateVehicleRequest updateVehicleRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, updateVehicleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoTFleetWise"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateVehicle"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateVehicleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateVehicle") .withMarshaller(new UpdateVehicleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateVehicleRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } @Override public void close() { clientHandler.close(); } private > T init(T builder) { return builder .clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(IoTFleetWiseException::builder) .protocol(AwsJsonProtocol.AWS_JSON) .protocolVersion("1.0") .registerModeledException( ExceptionMetadata.builder().errorCode("ThrottlingException") .exceptionBuilderSupplier(ThrottlingException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DecoderManifestValidationException") .exceptionBuilderSupplier(DecoderManifestValidationException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InternalServerException") .exceptionBuilderSupplier(InternalServerException::builder).httpStatusCode(500).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidSignalsException") .exceptionBuilderSupplier(InvalidSignalsException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("LimitExceededException") .exceptionBuilderSupplier(LimitExceededException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AccessDeniedException") .exceptionBuilderSupplier(AccessDeniedException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ConflictException") .exceptionBuilderSupplier(ConflictException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceNotFoundException") .exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ValidationException") .exceptionBuilderSupplier(ValidationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidNodeException") .exceptionBuilderSupplier(InvalidNodeException::builder).httpStatusCode(400).build()); } private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration, RequestOverrideConfiguration requestOverrideConfiguration) { List publishers = null; if (requestOverrideConfiguration != null) { publishers = requestOverrideConfiguration.metricPublishers(); } if (publishers == null || publishers.isEmpty()) { publishers = clientConfiguration.option(SdkClientOption.METRIC_PUBLISHERS); } if (publishers == null) { publishers = Collections.emptyList(); } return publishers; } private T applyPaginatorUserAgent(T request) { Consumer userAgentApplier = b -> b.addApiName(ApiName.builder() .version(VersionInfo.SDK_VERSION).name("PAGINATED").build()); AwsRequestOverrideConfiguration overrideConfiguration = request.overrideConfiguration() .map(c -> c.toBuilder().applyMutation(userAgentApplier).build()) .orElse((AwsRequestOverrideConfiguration.builder().applyMutation(userAgentApplier).build())); return (T) request.toBuilder().overrideConfiguration(overrideConfiguration).build(); } private HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory, JsonOperationMetadata operationMetadata) { return protocolFactory.createErrorResponseHandler(operationMetadata); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy