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

software.amazon.awssdk.services.alexaforbusiness.DefaultAlexaForBusinessAsyncClient Maven / Gradle / Ivy

/*
 * 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.alexaforbusiness;

import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletableFuture;
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.client.handler.AwsAsyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.SdkRequest;
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.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.alexaforbusiness.internal.AlexaForBusinessServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.alexaforbusiness.model.AlexaForBusinessException;
import software.amazon.awssdk.services.alexaforbusiness.model.AlreadyExistsException;
import software.amazon.awssdk.services.alexaforbusiness.model.ApproveSkillRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.ApproveSkillResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.AssociateContactWithAddressBookRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.AssociateContactWithAddressBookResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.AssociateDeviceWithNetworkProfileRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.AssociateDeviceWithNetworkProfileResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.AssociateDeviceWithRoomRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.AssociateDeviceWithRoomResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.AssociateSkillGroupWithRoomRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.AssociateSkillGroupWithRoomResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.AssociateSkillWithSkillGroupRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.AssociateSkillWithSkillGroupResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.AssociateSkillWithUsersRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.AssociateSkillWithUsersResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.ConcurrentModificationException;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateAddressBookRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateAddressBookResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateBusinessReportScheduleRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateBusinessReportScheduleResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateConferenceProviderRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateConferenceProviderResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateContactRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateContactResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateGatewayGroupRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateGatewayGroupResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateNetworkProfileRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateNetworkProfileResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateProfileRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateProfileResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateRoomRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateRoomResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateSkillGroupRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateSkillGroupResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateUserRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.CreateUserResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteAddressBookRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteAddressBookResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteBusinessReportScheduleRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteBusinessReportScheduleResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteConferenceProviderRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteConferenceProviderResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteContactRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteContactResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteDeviceRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteDeviceResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteDeviceUsageDataRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteDeviceUsageDataResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteGatewayGroupRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteGatewayGroupResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteNetworkProfileRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteNetworkProfileResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteProfileRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteProfileResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteRoomRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteRoomResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteRoomSkillParameterRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteRoomSkillParameterResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteSkillAuthorizationRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteSkillAuthorizationResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteSkillGroupRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteSkillGroupResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteUserRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DeleteUserResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DeviceNotRegisteredException;
import software.amazon.awssdk.services.alexaforbusiness.model.DisassociateContactFromAddressBookRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DisassociateContactFromAddressBookResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DisassociateDeviceFromRoomRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DisassociateDeviceFromRoomResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DisassociateSkillFromSkillGroupRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DisassociateSkillFromSkillGroupResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DisassociateSkillFromUsersRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DisassociateSkillFromUsersResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.DisassociateSkillGroupFromRoomRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.DisassociateSkillGroupFromRoomResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.ForgetSmartHomeAppliancesRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.ForgetSmartHomeAppliancesResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.GetAddressBookRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.GetAddressBookResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.GetConferencePreferenceRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.GetConferencePreferenceResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.GetConferenceProviderRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.GetConferenceProviderResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.GetContactRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.GetContactResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.GetDeviceRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.GetDeviceResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.GetGatewayGroupRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.GetGatewayGroupResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.GetGatewayRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.GetGatewayResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.GetInvitationConfigurationRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.GetInvitationConfigurationResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.GetNetworkProfileRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.GetNetworkProfileResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.GetProfileRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.GetProfileResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.GetRoomRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.GetRoomResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.GetRoomSkillParameterRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.GetRoomSkillParameterResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.GetSkillGroupRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.GetSkillGroupResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.InvalidCertificateAuthorityException;
import software.amazon.awssdk.services.alexaforbusiness.model.InvalidDeviceException;
import software.amazon.awssdk.services.alexaforbusiness.model.InvalidSecretsManagerResourceException;
import software.amazon.awssdk.services.alexaforbusiness.model.InvalidServiceLinkedRoleStateException;
import software.amazon.awssdk.services.alexaforbusiness.model.InvalidUserStatusException;
import software.amazon.awssdk.services.alexaforbusiness.model.LimitExceededException;
import software.amazon.awssdk.services.alexaforbusiness.model.ListBusinessReportSchedulesRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.ListBusinessReportSchedulesResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.ListConferenceProvidersRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.ListConferenceProvidersResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.ListDeviceEventsRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.ListDeviceEventsResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.ListGatewayGroupsRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.ListGatewayGroupsResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.ListGatewaysRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.ListGatewaysResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.ListSkillsRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.ListSkillsResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.ListSkillsStoreCategoriesRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.ListSkillsStoreCategoriesResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.ListSkillsStoreSkillsByCategoryRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.ListSkillsStoreSkillsByCategoryResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.ListSmartHomeAppliancesRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.ListSmartHomeAppliancesResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.ListTagsRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.ListTagsResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.NameInUseException;
import software.amazon.awssdk.services.alexaforbusiness.model.NotFoundException;
import software.amazon.awssdk.services.alexaforbusiness.model.PutConferencePreferenceRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.PutConferencePreferenceResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.PutInvitationConfigurationRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.PutInvitationConfigurationResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.PutRoomSkillParameterRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.PutRoomSkillParameterResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.PutSkillAuthorizationRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.PutSkillAuthorizationResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.RegisterAvsDeviceRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.RegisterAvsDeviceResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.RejectSkillRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.RejectSkillResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.ResolveRoomRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.ResolveRoomResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.ResourceAssociatedException;
import software.amazon.awssdk.services.alexaforbusiness.model.ResourceInUseException;
import software.amazon.awssdk.services.alexaforbusiness.model.RevokeInvitationRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.RevokeInvitationResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchAddressBooksRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchAddressBooksResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchContactsRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchContactsResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchDevicesRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchDevicesResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchNetworkProfilesRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchNetworkProfilesResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchProfilesRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchProfilesResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchRoomsRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchRoomsResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchSkillGroupsRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchSkillGroupsResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchUsersRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.SearchUsersResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.SendAnnouncementRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.SendAnnouncementResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.SendInvitationRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.SendInvitationResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.SkillNotLinkedException;
import software.amazon.awssdk.services.alexaforbusiness.model.StartDeviceSyncRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.StartDeviceSyncResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.StartSmartHomeApplianceDiscoveryRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.StartSmartHomeApplianceDiscoveryResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.TagResourceRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.TagResourceResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.UnauthorizedException;
import software.amazon.awssdk.services.alexaforbusiness.model.UntagResourceRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.UntagResourceResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateAddressBookRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateAddressBookResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateBusinessReportScheduleRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateBusinessReportScheduleResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateConferenceProviderRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateConferenceProviderResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateContactRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateContactResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateDeviceRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateDeviceResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateGatewayGroupRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateGatewayGroupResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateGatewayRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateGatewayResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateNetworkProfileRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateNetworkProfileResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateProfileRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateProfileResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateRoomRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateRoomResponse;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateSkillGroupRequest;
import software.amazon.awssdk.services.alexaforbusiness.model.UpdateSkillGroupResponse;
import software.amazon.awssdk.services.alexaforbusiness.transform.ApproveSkillRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.AssociateContactWithAddressBookRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.AssociateDeviceWithNetworkProfileRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.AssociateDeviceWithRoomRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.AssociateSkillGroupWithRoomRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.AssociateSkillWithSkillGroupRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.AssociateSkillWithUsersRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.CreateAddressBookRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.CreateBusinessReportScheduleRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.CreateConferenceProviderRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.CreateContactRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.CreateGatewayGroupRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.CreateNetworkProfileRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.CreateProfileRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.CreateRoomRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.CreateSkillGroupRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.CreateUserRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DeleteAddressBookRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DeleteBusinessReportScheduleRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DeleteConferenceProviderRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DeleteContactRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DeleteDeviceRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DeleteDeviceUsageDataRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DeleteGatewayGroupRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DeleteNetworkProfileRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DeleteProfileRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DeleteRoomRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DeleteRoomSkillParameterRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DeleteSkillAuthorizationRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DeleteSkillGroupRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DeleteUserRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DisassociateContactFromAddressBookRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DisassociateDeviceFromRoomRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DisassociateSkillFromSkillGroupRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DisassociateSkillFromUsersRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.DisassociateSkillGroupFromRoomRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.ForgetSmartHomeAppliancesRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.GetAddressBookRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.GetConferencePreferenceRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.GetConferenceProviderRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.GetContactRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.GetDeviceRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.GetGatewayGroupRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.GetGatewayRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.GetInvitationConfigurationRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.GetNetworkProfileRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.GetProfileRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.GetRoomRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.GetRoomSkillParameterRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.GetSkillGroupRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.ListBusinessReportSchedulesRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.ListConferenceProvidersRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.ListDeviceEventsRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.ListGatewayGroupsRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.ListGatewaysRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.ListSkillsRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.ListSkillsStoreCategoriesRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.ListSkillsStoreSkillsByCategoryRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.ListSmartHomeAppliancesRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.ListTagsRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.PutConferencePreferenceRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.PutInvitationConfigurationRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.PutRoomSkillParameterRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.PutSkillAuthorizationRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.RegisterAvsDeviceRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.RejectSkillRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.ResolveRoomRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.RevokeInvitationRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.SearchAddressBooksRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.SearchContactsRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.SearchDevicesRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.SearchNetworkProfilesRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.SearchProfilesRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.SearchRoomsRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.SearchSkillGroupsRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.SearchUsersRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.SendAnnouncementRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.SendInvitationRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.StartDeviceSyncRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.StartSmartHomeApplianceDiscoveryRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.UpdateAddressBookRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.UpdateBusinessReportScheduleRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.UpdateConferenceProviderRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.UpdateContactRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.UpdateDeviceRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.UpdateGatewayGroupRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.UpdateGatewayRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.UpdateNetworkProfileRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.UpdateProfileRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.UpdateRoomRequestMarshaller;
import software.amazon.awssdk.services.alexaforbusiness.transform.UpdateSkillGroupRequestMarshaller;
import software.amazon.awssdk.utils.CompletableFutureUtils;

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

    private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
            .serviceProtocol(AwsServiceProtocol.AWS_JSON).build();

    private final AsyncClientHandler clientHandler;

    private final AwsJsonProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

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

    /**
     * 

* Associates a skill with the organization under the customer's AWS account. If a skill is private, the user * implicitly accepts access to this skill during enablement. *

* * @param approveSkillRequest * @return A Java Future containing the result of the ApproveSkill operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • LimitExceededException You are performing an action that would put you beyond your account's limits.
  • *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.ApproveSkill * @see AWS * API Documentation */ @Override public CompletableFuture approveSkill(ApproveSkillRequest approveSkillRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(approveSkillRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, approveSkillRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ApproveSkill"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ApproveSkillResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ApproveSkill").withProtocolMetadata(protocolMetadata) .withMarshaller(new ApproveSkillRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(approveSkillRequest)); 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); } } /** *

* Associates a contact with a given address book. *

* * @param associateContactWithAddressBookRequest * @return A Java Future containing the result of the AssociateContactWithAddressBook operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • LimitExceededException You are performing an action that would put you beyond your account's limits.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.AssociateContactWithAddressBook * @see AWS API Documentation */ @Override public CompletableFuture associateContactWithAddressBook( AssociateContactWithAddressBookRequest associateContactWithAddressBookRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateContactWithAddressBookRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateContactWithAddressBookRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateContactWithAddressBook"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateContactWithAddressBookResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateContactWithAddressBook").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateContactWithAddressBookRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateContactWithAddressBookRequest)); 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); } } /** *

* Associates a device with the specified network profile. *

* * @param associateDeviceWithNetworkProfileRequest * @return A Java Future containing the result of the AssociateDeviceWithNetworkProfile operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • DeviceNotRegisteredException The request failed because this device is no longer registered and * therefore no longer managed by this account.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.AssociateDeviceWithNetworkProfile * @see AWS API Documentation */ @Override public CompletableFuture associateDeviceWithNetworkProfile( AssociateDeviceWithNetworkProfileRequest associateDeviceWithNetworkProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateDeviceWithNetworkProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateDeviceWithNetworkProfileRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateDeviceWithNetworkProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, AssociateDeviceWithNetworkProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateDeviceWithNetworkProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateDeviceWithNetworkProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateDeviceWithNetworkProfileRequest)); 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); } } /** *

* Associates a device with a given room. This applies all the settings from the room profile to the device, and all * the skills in any skill groups added to that room. This operation requires the device to be online, or else a * manual sync is required. *

* * @param associateDeviceWithRoomRequest * @return A Java Future containing the result of the AssociateDeviceWithRoom operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • LimitExceededException You are performing an action that would put you beyond your account's limits.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • DeviceNotRegisteredException The request failed because this device is no longer registered and * therefore no longer managed by this account.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.AssociateDeviceWithRoom * @see AWS API Documentation */ @Override public CompletableFuture associateDeviceWithRoom( AssociateDeviceWithRoomRequest associateDeviceWithRoomRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateDeviceWithRoomRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateDeviceWithRoomRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateDeviceWithRoom"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateDeviceWithRoomResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateDeviceWithRoom").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateDeviceWithRoomRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateDeviceWithRoomRequest)); 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); } } /** *

* Associates a skill group with a given room. This enables all skills in the associated skill group on all devices * in the room. *

* * @param associateSkillGroupWithRoomRequest * @return A Java Future containing the result of the AssociateSkillGroupWithRoom operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.AssociateSkillGroupWithRoom * @see AWS API Documentation */ @Override public CompletableFuture associateSkillGroupWithRoom( AssociateSkillGroupWithRoomRequest associateSkillGroupWithRoomRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateSkillGroupWithRoomRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateSkillGroupWithRoomRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateSkillGroupWithRoom"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateSkillGroupWithRoomResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateSkillGroupWithRoom").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateSkillGroupWithRoomRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateSkillGroupWithRoomRequest)); 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); } } /** *

* Associates a skill with a skill group. *

* * @param associateSkillWithSkillGroupRequest * @return A Java Future containing the result of the AssociateSkillWithSkillGroup operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • NotFoundException The resource is not found.
  • *
  • SkillNotLinkedException The skill must be linked to a third-party account.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.AssociateSkillWithSkillGroup * @see AWS API Documentation */ @Override public CompletableFuture associateSkillWithSkillGroup( AssociateSkillWithSkillGroupRequest associateSkillWithSkillGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateSkillWithSkillGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateSkillWithSkillGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateSkillWithSkillGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateSkillWithSkillGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateSkillWithSkillGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateSkillWithSkillGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateSkillWithSkillGroupRequest)); 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); } } /** *

* Makes a private skill available for enrolled users to enable on their devices. *

* * @param associateSkillWithUsersRequest * @return A Java Future containing the result of the AssociateSkillWithUsers operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.AssociateSkillWithUsers * @see AWS API Documentation */ @Override public CompletableFuture associateSkillWithUsers( AssociateSkillWithUsersRequest associateSkillWithUsersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateSkillWithUsersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateSkillWithUsersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateSkillWithUsers"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateSkillWithUsersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateSkillWithUsers").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateSkillWithUsersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateSkillWithUsersRequest)); 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 address book with the specified details. *

* * @param createAddressBookRequest * @return A Java Future containing the result of the CreateAddressBook operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AlreadyExistsException The resource being created already exists.
  • *
  • LimitExceededException You are performing an action that would put you beyond your account's limits.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.CreateAddressBook * @see AWS API Documentation */ @Override public CompletableFuture createAddressBook(CreateAddressBookRequest createAddressBookRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createAddressBookRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createAddressBookRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateAddressBook"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateAddressBookResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateAddressBook").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateAddressBookRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createAddressBookRequest)); 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 recurring schedule for usage reports to deliver to the specified S3 location with a specified daily or * weekly interval. *

* * @param createBusinessReportScheduleRequest * @return A Java Future containing the result of the CreateBusinessReportSchedule operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AlreadyExistsException The resource being created already exists.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.CreateBusinessReportSchedule * @see AWS API Documentation */ @Override public CompletableFuture createBusinessReportSchedule( CreateBusinessReportScheduleRequest createBusinessReportScheduleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createBusinessReportScheduleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createBusinessReportScheduleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateBusinessReportSchedule"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateBusinessReportScheduleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateBusinessReportSchedule").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateBusinessReportScheduleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createBusinessReportScheduleRequest)); 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 a new conference provider under the user's AWS account. *

* * @param createConferenceProviderRequest * @return A Java Future containing the result of the CreateConferenceProvider operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AlreadyExistsException The resource being created already exists.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.CreateConferenceProvider * @see AWS API Documentation */ @Override public CompletableFuture createConferenceProvider( CreateConferenceProviderRequest createConferenceProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createConferenceProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createConferenceProviderRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConferenceProvider"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateConferenceProviderResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateConferenceProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateConferenceProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createConferenceProviderRequest)); 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 contact with the specified details. *

* * @param createContactRequest * @return A Java Future containing the result of the CreateContact operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AlreadyExistsException The resource being created already exists.
  • *
  • LimitExceededException You are performing an action that would put you beyond your account's limits.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.CreateContact * @see AWS API Documentation */ @Override public CompletableFuture createContact(CreateContactRequest createContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createContactRequest)); 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 gateway group with the specified details. *

* * @param createGatewayGroupRequest * @return A Java Future containing the result of the CreateGatewayGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AlreadyExistsException The resource being created already exists.
  • *
  • LimitExceededException You are performing an action that would put you beyond your account's limits.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.CreateGatewayGroup * @see AWS API Documentation */ @Override public CompletableFuture createGatewayGroup(CreateGatewayGroupRequest createGatewayGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createGatewayGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createGatewayGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateGatewayGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateGatewayGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateGatewayGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateGatewayGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createGatewayGroupRequest)); 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 network profile with the specified details. *

* * @param createNetworkProfileRequest * @return A Java Future containing the result of the CreateNetworkProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AlreadyExistsException The resource being created already exists.
  • *
  • LimitExceededException You are performing an action that would put you beyond your account's limits.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • InvalidCertificateAuthorityException The Certificate Authority can't issue or revoke a certificate.
  • *
  • InvalidServiceLinkedRoleStateException The service linked role is locked for deletion.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.CreateNetworkProfile * @see AWS API Documentation */ @Override public CompletableFuture createNetworkProfile( CreateNetworkProfileRequest createNetworkProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createNetworkProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createNetworkProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateNetworkProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateNetworkProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateNetworkProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateNetworkProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createNetworkProfileRequest)); 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 new room profile with the specified details. *

* * @param createProfileRequest * @return A Java Future containing the result of the CreateProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • LimitExceededException You are performing an action that would put you beyond your account's limits.
  • *
  • AlreadyExistsException The resource being created already exists.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.CreateProfile * @see AWS API Documentation */ @Override public CompletableFuture createProfile(CreateProfileRequest createProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createProfileRequest)); 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 room with the specified details. *

* * @param createRoomRequest * @return A Java Future containing the result of the CreateRoom operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AlreadyExistsException The resource being created already exists.
  • *
  • LimitExceededException You are performing an action that would put you beyond your account's limits.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.CreateRoom * @see AWS * API Documentation */ @Override public CompletableFuture createRoom(CreateRoomRequest createRoomRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createRoomRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createRoomRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateRoom"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateRoomResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("CreateRoom") .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateRoomRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createRoomRequest)); 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 skill group with a specified name and description. *

* * @param createSkillGroupRequest * @return A Java Future containing the result of the CreateSkillGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AlreadyExistsException The resource being created already exists.
  • *
  • LimitExceededException You are performing an action that would put you beyond your account's limits.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.CreateSkillGroup * @see AWS API Documentation */ @Override public CompletableFuture createSkillGroup(CreateSkillGroupRequest createSkillGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createSkillGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createSkillGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateSkillGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateSkillGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateSkillGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateSkillGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createSkillGroupRequest)); 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 user. *

* * @param createUserRequest * @return A Java Future containing the result of the CreateUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceInUseException The resource in the request is already in use.
  • *
  • LimitExceededException You are performing an action that would put you beyond your account's limits.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.CreateUser * @see AWS * API Documentation */ @Override public CompletableFuture createUser(CreateUserRequest createUserRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createUserRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateUser"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("CreateUser") .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createUserRequest)); 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 an address book by the address book ARN. *

* * @param deleteAddressBookRequest * @return A Java Future containing the result of the DeleteAddressBook operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DeleteAddressBook * @see AWS API Documentation */ @Override public CompletableFuture deleteAddressBook(DeleteAddressBookRequest deleteAddressBookRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAddressBookRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAddressBookRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAddressBook"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteAddressBookResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteAddressBook").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteAddressBookRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteAddressBookRequest)); 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 the recurring report delivery schedule with the specified schedule ARN. *

* * @param deleteBusinessReportScheduleRequest * @return A Java Future containing the result of the DeleteBusinessReportSchedule operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DeleteBusinessReportSchedule * @see AWS API Documentation */ @Override public CompletableFuture deleteBusinessReportSchedule( DeleteBusinessReportScheduleRequest deleteBusinessReportScheduleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteBusinessReportScheduleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteBusinessReportScheduleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteBusinessReportSchedule"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteBusinessReportScheduleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteBusinessReportSchedule").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteBusinessReportScheduleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteBusinessReportScheduleRequest)); 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 conference provider. *

* * @param deleteConferenceProviderRequest * @return A Java Future containing the result of the DeleteConferenceProvider operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DeleteConferenceProvider * @see AWS API Documentation */ @Override public CompletableFuture deleteConferenceProvider( DeleteConferenceProviderRequest deleteConferenceProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConferenceProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConferenceProviderRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConferenceProvider"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteConferenceProviderResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteConferenceProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteConferenceProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteConferenceProviderRequest)); 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 contact by the contact ARN. *

* * @param deleteContactRequest * @return A Java Future containing the result of the DeleteContact operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DeleteContact * @see AWS API Documentation */ @Override public CompletableFuture deleteContact(DeleteContactRequest deleteContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteContactRequest)); 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 a device from Alexa For Business. *

* * @param deleteDeviceRequest * @return A Java Future containing the result of the DeleteDevice operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • InvalidCertificateAuthorityException The Certificate Authority can't issue or revoke a certificate.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DeleteDevice * @see AWS * API Documentation */ @Override public CompletableFuture deleteDevice(DeleteDeviceRequest deleteDeviceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteDeviceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDeviceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDevice"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteDeviceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteDevice").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteDeviceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteDeviceRequest)); 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); } } /** *

* When this action is called for a specified shared device, it allows authorized users to delete the device's * entire previous history of voice input data and associated response data. This action can be called once every 24 * hours for a specific shared device. *

* * @param deleteDeviceUsageDataRequest * @return A Java Future containing the result of the DeleteDeviceUsageData operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • DeviceNotRegisteredException The request failed because this device is no longer registered and * therefore no longer managed by this account.
  • *
  • LimitExceededException You are performing an action that would put you beyond your account's limits.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DeleteDeviceUsageData * @see AWS API Documentation */ @Override public CompletableFuture deleteDeviceUsageData( DeleteDeviceUsageDataRequest deleteDeviceUsageDataRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteDeviceUsageDataRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDeviceUsageDataRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDeviceUsageData"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteDeviceUsageDataResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteDeviceUsageData").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteDeviceUsageDataRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteDeviceUsageDataRequest)); 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 gateway group. *

* * @param deleteGatewayGroupRequest * @return A Java Future containing the result of the DeleteGatewayGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceAssociatedException Another resource is associated with the resource in the request.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DeleteGatewayGroup * @see AWS API Documentation */ @Override public CompletableFuture deleteGatewayGroup(DeleteGatewayGroupRequest deleteGatewayGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteGatewayGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteGatewayGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteGatewayGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteGatewayGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteGatewayGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteGatewayGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteGatewayGroupRequest)); 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 network profile by the network profile ARN. *

* * @param deleteNetworkProfileRequest * @return A Java Future containing the result of the DeleteNetworkProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceInUseException The resource in the request is already in use.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DeleteNetworkProfile * @see AWS API Documentation */ @Override public CompletableFuture deleteNetworkProfile( DeleteNetworkProfileRequest deleteNetworkProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteNetworkProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteNetworkProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteNetworkProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteNetworkProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteNetworkProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteNetworkProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteNetworkProfileRequest)); 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 room profile by the profile ARN. *

* * @param deleteProfileRequest * @return A Java Future containing the result of the DeleteProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DeleteProfile * @see AWS API Documentation */ @Override public CompletableFuture deleteProfile(DeleteProfileRequest deleteProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteProfileRequest)); 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 room by the room ARN. *

* * @param deleteRoomRequest * @return A Java Future containing the result of the DeleteRoom operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DeleteRoom * @see AWS * API Documentation */ @Override public CompletableFuture deleteRoom(DeleteRoomRequest deleteRoomRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteRoomRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteRoomRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRoom"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteRoomResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("DeleteRoom") .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteRoomRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteRoomRequest)); 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 room skill parameter details by room, skill, and parameter key ID. *

* * @param deleteRoomSkillParameterRequest * @return A Java Future containing the result of the DeleteRoomSkillParameter operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DeleteRoomSkillParameter * @see AWS API Documentation */ @Override public CompletableFuture deleteRoomSkillParameter( DeleteRoomSkillParameterRequest deleteRoomSkillParameterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteRoomSkillParameterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteRoomSkillParameterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRoomSkillParameter"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteRoomSkillParameterResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteRoomSkillParameter").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteRoomSkillParameterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteRoomSkillParameterRequest)); 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); } } /** *

* Unlinks a third-party account from a skill. *

* * @param deleteSkillAuthorizationRequest * @return A Java Future containing the result of the DeleteSkillAuthorization operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DeleteSkillAuthorization * @see AWS API Documentation */ @Override public CompletableFuture deleteSkillAuthorization( DeleteSkillAuthorizationRequest deleteSkillAuthorizationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteSkillAuthorizationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSkillAuthorizationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSkillAuthorization"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteSkillAuthorizationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteSkillAuthorization").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteSkillAuthorizationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteSkillAuthorizationRequest)); 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 skill group by skill group ARN. *

* * @param deleteSkillGroupRequest * @return A Java Future containing the result of the DeleteSkillGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DeleteSkillGroup * @see AWS API Documentation */ @Override public CompletableFuture deleteSkillGroup(DeleteSkillGroupRequest deleteSkillGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteSkillGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSkillGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSkillGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteSkillGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteSkillGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteSkillGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteSkillGroupRequest)); 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 specified user by user ARN and enrollment ARN. *

* * @param deleteUserRequest * @return A Java Future containing the result of the DeleteUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DeleteUser * @see AWS * API Documentation */ @Override public CompletableFuture deleteUser(DeleteUserRequest deleteUserRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteUserRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteUser"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("DeleteUser") .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteUserRequest)); 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); } } /** *

* Disassociates a contact from a given address book. *

* * @param disassociateContactFromAddressBookRequest * @return A Java Future containing the result of the DisassociateContactFromAddressBook operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DisassociateContactFromAddressBook * @see AWS API Documentation */ @Override public CompletableFuture disassociateContactFromAddressBook( DisassociateContactFromAddressBookRequest disassociateContactFromAddressBookRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateContactFromAddressBookRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateContactFromAddressBookRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateContactFromAddressBook"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DisassociateContactFromAddressBookResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateContactFromAddressBook").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateContactFromAddressBookRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateContactFromAddressBookRequest)); 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); } } /** *

* Disassociates a device from its current room. The device continues to be connected to the Wi-Fi network and is * still registered to the account. The device settings and skills are removed from the room. *

* * @param disassociateDeviceFromRoomRequest * @return A Java Future containing the result of the DisassociateDeviceFromRoom operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • DeviceNotRegisteredException The request failed because this device is no longer registered and * therefore no longer managed by this account.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DisassociateDeviceFromRoom * @see AWS API Documentation */ @Override public CompletableFuture disassociateDeviceFromRoom( DisassociateDeviceFromRoomRequest disassociateDeviceFromRoomRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateDeviceFromRoomRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateDeviceFromRoomRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateDeviceFromRoom"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DisassociateDeviceFromRoomResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateDeviceFromRoom").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateDeviceFromRoomRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateDeviceFromRoomRequest)); 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); } } /** *

* Disassociates a skill from a skill group. *

* * @param disassociateSkillFromSkillGroupRequest * @return A Java Future containing the result of the DisassociateSkillFromSkillGroup operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DisassociateSkillFromSkillGroup * @see AWS API Documentation */ @Override public CompletableFuture disassociateSkillFromSkillGroup( DisassociateSkillFromSkillGroupRequest disassociateSkillFromSkillGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateSkillFromSkillGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateSkillFromSkillGroupRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateSkillFromSkillGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DisassociateSkillFromSkillGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateSkillFromSkillGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateSkillFromSkillGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateSkillFromSkillGroupRequest)); 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); } } /** *

* Makes a private skill unavailable for enrolled users and prevents them from enabling it on their devices. *

* * @param disassociateSkillFromUsersRequest * @return A Java Future containing the result of the DisassociateSkillFromUsers operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DisassociateSkillFromUsers * @see AWS API Documentation */ @Override public CompletableFuture disassociateSkillFromUsers( DisassociateSkillFromUsersRequest disassociateSkillFromUsersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateSkillFromUsersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateSkillFromUsersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateSkillFromUsers"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DisassociateSkillFromUsersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateSkillFromUsers").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateSkillFromUsersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateSkillFromUsersRequest)); 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); } } /** *

* Disassociates a skill group from a specified room. This disables all skills in the skill group on all devices in * the room. *

* * @param disassociateSkillGroupFromRoomRequest * @return A Java Future containing the result of the DisassociateSkillGroupFromRoom operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.DisassociateSkillGroupFromRoom * @see AWS API Documentation */ @Override public CompletableFuture disassociateSkillGroupFromRoom( DisassociateSkillGroupFromRoomRequest disassociateSkillGroupFromRoomRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateSkillGroupFromRoomRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateSkillGroupFromRoomRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateSkillGroupFromRoom"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DisassociateSkillGroupFromRoomResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateSkillGroupFromRoom").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateSkillGroupFromRoomRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateSkillGroupFromRoomRequest)); 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); } } /** *

* Forgets smart home appliances associated to a room. *

* * @param forgetSmartHomeAppliancesRequest * @return A Java Future containing the result of the ForgetSmartHomeAppliances operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.ForgetSmartHomeAppliances * @see AWS API Documentation */ @Override public CompletableFuture forgetSmartHomeAppliances( ForgetSmartHomeAppliancesRequest forgetSmartHomeAppliancesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(forgetSmartHomeAppliancesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, forgetSmartHomeAppliancesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ForgetSmartHomeAppliances"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ForgetSmartHomeAppliancesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ForgetSmartHomeAppliances").withProtocolMetadata(protocolMetadata) .withMarshaller(new ForgetSmartHomeAppliancesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(forgetSmartHomeAppliancesRequest)); 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); } } /** *

* Gets address the book details by the address book ARN. *

* * @param getAddressBookRequest * @return A Java Future containing the result of the GetAddressBook operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.GetAddressBook * @see AWS API Documentation */ @Override public CompletableFuture getAddressBook(GetAddressBookRequest getAddressBookRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAddressBookRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAddressBookRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAddressBook"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetAddressBookResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAddressBook").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAddressBookRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getAddressBookRequest)); 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 existing conference preferences. *

* * @param getConferencePreferenceRequest * @return A Java Future containing the result of the GetConferencePreference operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.GetConferencePreference * @see AWS API Documentation */ @Override public CompletableFuture getConferencePreference( GetConferencePreferenceRequest getConferencePreferenceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getConferencePreferenceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getConferencePreferenceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetConferencePreference"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetConferencePreferenceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetConferencePreference").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetConferencePreferenceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getConferencePreferenceRequest)); 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); } } /** *

* Gets details about a specific conference provider. *

* * @param getConferenceProviderRequest * @return A Java Future containing the result of the GetConferenceProvider operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.GetConferenceProvider * @see AWS API Documentation */ @Override public CompletableFuture getConferenceProvider( GetConferenceProviderRequest getConferenceProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getConferenceProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getConferenceProviderRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetConferenceProvider"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetConferenceProviderResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetConferenceProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetConferenceProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getConferenceProviderRequest)); 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); } } /** *

* Gets the contact details by the contact ARN. *

* * @param getContactRequest * @return A Java Future containing the result of the GetContact operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.GetContact * @see AWS * API Documentation */ @Override public CompletableFuture getContact(GetContactRequest getContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("GetContact") .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getContactRequest)); 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); } } /** *

* Gets the details of a device by device ARN. *

* * @param getDeviceRequest * @return A Java Future containing the result of the GetDevice operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.GetDevice * @see AWS * API Documentation */ @Override public CompletableFuture getDevice(GetDeviceRequest getDeviceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getDeviceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getDeviceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetDevice"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetDeviceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("GetDevice") .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetDeviceRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withMetricCollector(apiCallMetricCollector).withInput(getDeviceRequest)); 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 details of a gateway. *

* * @param getGatewayRequest * @return A Java Future containing the result of the GetGateway operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.GetGateway * @see AWS * API Documentation */ @Override public CompletableFuture getGateway(GetGatewayRequest getGatewayRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getGatewayRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getGatewayRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetGateway"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetGatewayResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("GetGateway") .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetGatewayRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getGatewayRequest)); 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 details of a gateway group. *

* * @param getGatewayGroupRequest * @return A Java Future containing the result of the GetGatewayGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.GetGatewayGroup * @see AWS API Documentation */ @Override public CompletableFuture getGatewayGroup(GetGatewayGroupRequest getGatewayGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getGatewayGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getGatewayGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetGatewayGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetGatewayGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetGatewayGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetGatewayGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getGatewayGroupRequest)); 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 configured values for the user enrollment invitation email template. *

* * @param getInvitationConfigurationRequest * @return A Java Future containing the result of the GetInvitationConfiguration operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.GetInvitationConfiguration * @see AWS API Documentation */ @Override public CompletableFuture getInvitationConfiguration( GetInvitationConfigurationRequest getInvitationConfigurationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getInvitationConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getInvitationConfigurationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetInvitationConfiguration"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetInvitationConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetInvitationConfiguration").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetInvitationConfigurationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getInvitationConfigurationRequest)); 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); } } /** *

* Gets the network profile details by the network profile ARN. *

* * @param getNetworkProfileRequest * @return A Java Future containing the result of the GetNetworkProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • InvalidSecretsManagerResourceException A password in SecretsManager is in an invalid state.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.GetNetworkProfile * @see AWS API Documentation */ @Override public CompletableFuture getNetworkProfile(GetNetworkProfileRequest getNetworkProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getNetworkProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getNetworkProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetNetworkProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetNetworkProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetNetworkProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetNetworkProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getNetworkProfileRequest)); 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); } } /** *

* Gets the details of a room profile by profile ARN. *

* * @param getProfileRequest * @return A Java Future containing the result of the GetProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.GetProfile * @see AWS * API Documentation */ @Override public CompletableFuture getProfile(GetProfileRequest getProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("GetProfile") .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getProfileRequest)); 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); } } /** *

* Gets room details by room ARN. *

* * @param getRoomRequest * @return A Java Future containing the result of the GetRoom operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.GetRoom * @see AWS API * Documentation */ @Override public CompletableFuture getRoom(GetRoomRequest getRoomRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getRoomRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getRoomRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetRoom"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetRoomResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("GetRoom") .withProtocolMetadata(protocolMetadata).withMarshaller(new GetRoomRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getRoomRequest)); 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); } } /** *

* Gets room skill parameter details by room, skill, and parameter key ARN. *

* * @param getRoomSkillParameterRequest * @return A Java Future containing the result of the GetRoomSkillParameter operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.GetRoomSkillParameter * @see AWS API Documentation */ @Override public CompletableFuture getRoomSkillParameter( GetRoomSkillParameterRequest getRoomSkillParameterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getRoomSkillParameterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getRoomSkillParameterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetRoomSkillParameter"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetRoomSkillParameterResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetRoomSkillParameter").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetRoomSkillParameterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getRoomSkillParameterRequest)); 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); } } /** *

* Gets skill group details by skill group ARN. *

* * @param getSkillGroupRequest * @return A Java Future containing the result of the GetSkillGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.GetSkillGroup * @see AWS API Documentation */ @Override public CompletableFuture getSkillGroup(GetSkillGroupRequest getSkillGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getSkillGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getSkillGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetSkillGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetSkillGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetSkillGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetSkillGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getSkillGroupRequest)); 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 details of the schedules that a user configured. A download URL of the report associated with each * schedule is returned every time this action is called. A new download URL is returned each time, and is valid for * 24 hours. *

* * @param listBusinessReportSchedulesRequest * @return A Java Future containing the result of the ListBusinessReportSchedules operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.ListBusinessReportSchedules * @see AWS API Documentation */ @Override public CompletableFuture listBusinessReportSchedules( ListBusinessReportSchedulesRequest listBusinessReportSchedulesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listBusinessReportSchedulesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listBusinessReportSchedulesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListBusinessReportSchedules"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListBusinessReportSchedulesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListBusinessReportSchedules").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListBusinessReportSchedulesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listBusinessReportSchedulesRequest)); 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 conference providers under a specific AWS account. *

* * @param listConferenceProvidersRequest * @return A Java Future containing the result of the ListConferenceProviders operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.ListConferenceProviders * @see AWS API Documentation */ @Override public CompletableFuture listConferenceProviders( ListConferenceProvidersRequest listConferenceProvidersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listConferenceProvidersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listConferenceProvidersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListConferenceProviders"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListConferenceProvidersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListConferenceProviders").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListConferenceProvidersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listConferenceProvidersRequest)); 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 device event history, including device connection status, for up to 30 days. *

* * @param listDeviceEventsRequest * @return A Java Future containing the result of the ListDeviceEvents operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.ListDeviceEvents * @see AWS API Documentation */ @Override public CompletableFuture listDeviceEvents(ListDeviceEventsRequest listDeviceEventsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listDeviceEventsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listDeviceEventsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDeviceEvents"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListDeviceEventsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListDeviceEvents").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListDeviceEventsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listDeviceEventsRequest)); 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 gateway group summaries. Use GetGatewayGroup to retrieve details of a specific gateway group. *

* * @param listGatewayGroupsRequest * @return A Java Future containing the result of the ListGatewayGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.ListGatewayGroups * @see AWS API Documentation */ @Override public CompletableFuture listGatewayGroups(ListGatewayGroupsRequest listGatewayGroupsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listGatewayGroupsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listGatewayGroupsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListGatewayGroups"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListGatewayGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListGatewayGroups").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListGatewayGroupsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listGatewayGroupsRequest)); 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 gateway summaries. Use GetGateway to retrieve details of a specific gateway. An optional * gateway group ARN can be provided to only retrieve gateway summaries of gateways that are associated with that * gateway group ARN. *

* * @param listGatewaysRequest * @return A Java Future containing the result of the ListGateways operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.ListGateways * @see AWS * API Documentation */ @Override public CompletableFuture listGateways(ListGatewaysRequest listGatewaysRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listGatewaysRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listGatewaysRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListGateways"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListGatewaysResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListGateways").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListGatewaysRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listGatewaysRequest)); 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 enabled skills in a specific skill group. *

* * @param listSkillsRequest * @return A Java Future containing the result of the ListSkills operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.ListSkills * @see AWS * API Documentation */ @Override public CompletableFuture listSkills(ListSkillsRequest listSkillsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSkillsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSkillsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSkills"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListSkillsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("ListSkills") .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListSkillsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listSkillsRequest)); 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 categories in the Alexa skill store. *

* * @param listSkillsStoreCategoriesRequest * @return A Java Future containing the result of the ListSkillsStoreCategories operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.ListSkillsStoreCategories * @see AWS API Documentation */ @Override public CompletableFuture listSkillsStoreCategories( ListSkillsStoreCategoriesRequest listSkillsStoreCategoriesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSkillsStoreCategoriesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSkillsStoreCategoriesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSkillsStoreCategories"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListSkillsStoreCategoriesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSkillsStoreCategories").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListSkillsStoreCategoriesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listSkillsStoreCategoriesRequest)); 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 skills in the Alexa skill store by category. *

* * @param listSkillsStoreSkillsByCategoryRequest * @return A Java Future containing the result of the ListSkillsStoreSkillsByCategory operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.ListSkillsStoreSkillsByCategory * @see AWS API Documentation */ @Override public CompletableFuture listSkillsStoreSkillsByCategory( ListSkillsStoreSkillsByCategoryRequest listSkillsStoreSkillsByCategoryRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSkillsStoreSkillsByCategoryRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSkillsStoreSkillsByCategoryRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSkillsStoreSkillsByCategory"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListSkillsStoreSkillsByCategoryResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSkillsStoreSkillsByCategory").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListSkillsStoreSkillsByCategoryRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listSkillsStoreSkillsByCategoryRequest)); 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 of the smart home appliances associated with a room. *

* * @param listSmartHomeAppliancesRequest * @return A Java Future containing the result of the ListSmartHomeAppliances operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.ListSmartHomeAppliances * @see AWS API Documentation */ @Override public CompletableFuture listSmartHomeAppliances( ListSmartHomeAppliancesRequest listSmartHomeAppliancesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSmartHomeAppliancesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSmartHomeAppliancesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSmartHomeAppliances"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListSmartHomeAppliancesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSmartHomeAppliances").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListSmartHomeAppliancesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listSmartHomeAppliancesRequest)); 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 tags for the specified resource. *

* * @param listTagsRequest * @return A Java Future containing the result of the ListTags operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.ListTags * @see AWS API * Documentation */ @Override public CompletableFuture listTags(ListTagsRequest listTagsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTagsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTagsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTags"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListTagsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("ListTags") .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListTagsRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withMetricCollector(apiCallMetricCollector).withInput(listTagsRequest)); 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); } } /** *

* Sets the conference preferences on a specific conference provider at the account level. *

* * @param putConferencePreferenceRequest * @return A Java Future containing the result of the PutConferencePreference operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.PutConferencePreference * @see AWS API Documentation */ @Override public CompletableFuture putConferencePreference( PutConferencePreferenceRequest putConferencePreferenceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putConferencePreferenceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putConferencePreferenceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutConferencePreference"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, PutConferencePreferenceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutConferencePreference").withProtocolMetadata(protocolMetadata) .withMarshaller(new PutConferencePreferenceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(putConferencePreferenceRequest)); 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); } } /** *

* Configures the email template for the user enrollment invitation with the specified attributes. *

* * @param putInvitationConfigurationRequest * @return A Java Future containing the result of the PutInvitationConfiguration operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.PutInvitationConfiguration * @see AWS API Documentation */ @Override public CompletableFuture putInvitationConfiguration( PutInvitationConfigurationRequest putInvitationConfigurationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putInvitationConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putInvitationConfigurationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutInvitationConfiguration"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, PutInvitationConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutInvitationConfiguration").withProtocolMetadata(protocolMetadata) .withMarshaller(new PutInvitationConfigurationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(putInvitationConfigurationRequest)); 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 room skill parameter details by room, skill, and parameter key ID. Not all skills have a room skill * parameter. *

* * @param putRoomSkillParameterRequest * @return A Java Future containing the result of the PutRoomSkillParameter operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.PutRoomSkillParameter * @see AWS API Documentation */ @Override public CompletableFuture putRoomSkillParameter( PutRoomSkillParameterRequest putRoomSkillParameterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putRoomSkillParameterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putRoomSkillParameterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutRoomSkillParameter"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, PutRoomSkillParameterResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutRoomSkillParameter").withProtocolMetadata(protocolMetadata) .withMarshaller(new PutRoomSkillParameterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(putRoomSkillParameterRequest)); 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); } } /** *

* Links a user's account to a third-party skill provider. If this API operation is called by an assumed IAM role, * the skill being linked must be a private skill. Also, the skill must be owned by the AWS account that assumed the * IAM role. *

* * @param putSkillAuthorizationRequest * @return A Java Future containing the result of the PutSkillAuthorization operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • UnauthorizedException The caller has no permissions to operate on the resource involved in the API * call.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.PutSkillAuthorization * @see AWS API Documentation */ @Override public CompletableFuture putSkillAuthorization( PutSkillAuthorizationRequest putSkillAuthorizationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putSkillAuthorizationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putSkillAuthorizationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutSkillAuthorization"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, PutSkillAuthorizationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutSkillAuthorization").withProtocolMetadata(protocolMetadata) .withMarshaller(new PutSkillAuthorizationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(putSkillAuthorizationRequest)); 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 an Alexa-enabled device built by an Original Equipment Manufacturer (OEM) using Alexa Voice Service * (AVS). *

* * @param registerAvsDeviceRequest * @return A Java Future containing the result of the RegisterAVSDevice operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • LimitExceededException You are performing an action that would put you beyond your account's limits.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • NotFoundException The resource is not found.
  • *
  • InvalidDeviceException The device is in an invalid state.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.RegisterAVSDevice * @see AWS API Documentation */ @Override public CompletableFuture registerAVSDevice(RegisterAvsDeviceRequest registerAvsDeviceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(registerAvsDeviceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, registerAvsDeviceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RegisterAVSDevice"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RegisterAvsDeviceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RegisterAVSDevice").withProtocolMetadata(protocolMetadata) .withMarshaller(new RegisterAvsDeviceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(registerAvsDeviceRequest)); 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); } } /** *

* Disassociates a skill from the organization under a user's AWS account. If the skill is a private skill, it moves * to an AcceptStatus of PENDING. Any private or public skill that is rejected can be added later by calling the * ApproveSkill API. *

* * @param rejectSkillRequest * @return A Java Future containing the result of the RejectSkill operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.RejectSkill * @see AWS * API Documentation */ @Override public CompletableFuture rejectSkill(RejectSkillRequest rejectSkillRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(rejectSkillRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, rejectSkillRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RejectSkill"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, RejectSkillResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RejectSkill").withProtocolMetadata(protocolMetadata) .withMarshaller(new RejectSkillRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(rejectSkillRequest)); 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); } } /** *

* Determines the details for the room from which a skill request was invoked. This operation is used by skill * developers. *

*

* To query ResolveRoom from an Alexa skill, the skill ID needs to be authorized. When the skill is using an AWS * Lambda function, the skill is automatically authorized when you publish your skill as a private skill to your AWS * account. Skills that are hosted using a custom web service must be manually authorized. To get your skill * authorized, contact AWS Support with your AWS account ID that queries the ResolveRoom API and skill ID. *

* * @param resolveRoomRequest * @return A Java Future containing the result of the ResolveRoom operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.ResolveRoom * @see AWS * API Documentation */ @Override public CompletableFuture resolveRoom(ResolveRoomRequest resolveRoomRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(resolveRoomRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, resolveRoomRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ResolveRoom"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ResolveRoomResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ResolveRoom").withProtocolMetadata(protocolMetadata) .withMarshaller(new ResolveRoomRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(resolveRoomRequest)); 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); } } /** *

* Revokes an invitation and invalidates the enrollment URL. *

* * @param revokeInvitationRequest * @return A Java Future containing the result of the RevokeInvitation operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.RevokeInvitation * @see AWS API Documentation */ @Override public CompletableFuture revokeInvitation(RevokeInvitationRequest revokeInvitationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(revokeInvitationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, revokeInvitationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RevokeInvitation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RevokeInvitationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RevokeInvitation").withProtocolMetadata(protocolMetadata) .withMarshaller(new RevokeInvitationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(revokeInvitationRequest)); 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); } } /** *

* Searches address books and lists the ones that meet a set of filter and sort criteria. *

* * @param searchAddressBooksRequest * @return A Java Future containing the result of the SearchAddressBooks operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.SearchAddressBooks * @see AWS API Documentation */ @Override public CompletableFuture searchAddressBooks(SearchAddressBooksRequest searchAddressBooksRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchAddressBooksRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchAddressBooksRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchAddressBooks"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchAddressBooksResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchAddressBooks").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchAddressBooksRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchAddressBooksRequest)); 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); } } /** *

* Searches contacts and lists the ones that meet a set of filter and sort criteria. *

* * @param searchContactsRequest * @return A Java Future containing the result of the SearchContacts operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.SearchContacts * @see AWS API Documentation */ @Override public CompletableFuture searchContacts(SearchContactsRequest searchContactsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchContactsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchContactsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchContacts"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchContactsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchContacts").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchContactsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchContactsRequest)); 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); } } /** *

* Searches devices and lists the ones that meet a set of filter criteria. *

* * @param searchDevicesRequest * @return A Java Future containing the result of the SearchDevices operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.SearchDevices * @see AWS API Documentation */ @Override public CompletableFuture searchDevices(SearchDevicesRequest searchDevicesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchDevicesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchDevicesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchDevices"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, SearchDevicesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchDevices").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchDevicesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchDevicesRequest)); 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); } } /** *

* Searches network profiles and lists the ones that meet a set of filter and sort criteria. *

* * @param searchNetworkProfilesRequest * @return A Java Future containing the result of the SearchNetworkProfiles operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.SearchNetworkProfiles * @see AWS API Documentation */ @Override public CompletableFuture searchNetworkProfiles( SearchNetworkProfilesRequest searchNetworkProfilesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchNetworkProfilesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchNetworkProfilesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchNetworkProfiles"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchNetworkProfilesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchNetworkProfiles").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchNetworkProfilesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchNetworkProfilesRequest)); 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); } } /** *

* Searches room profiles and lists the ones that meet a set of filter criteria. *

* * @param searchProfilesRequest * @return A Java Future containing the result of the SearchProfiles operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.SearchProfiles * @see AWS API Documentation */ @Override public CompletableFuture searchProfiles(SearchProfilesRequest searchProfilesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchProfilesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchProfilesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchProfiles"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchProfilesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchProfiles").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchProfilesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchProfilesRequest)); 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); } } /** *

* Searches rooms and lists the ones that meet a set of filter and sort criteria. *

* * @param searchRoomsRequest * @return A Java Future containing the result of the SearchRooms operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.SearchRooms * @see AWS * API Documentation */ @Override public CompletableFuture searchRooms(SearchRoomsRequest searchRoomsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchRoomsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchRoomsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchRooms"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, SearchRoomsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchRooms").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchRoomsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchRoomsRequest)); 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); } } /** *

* Searches skill groups and lists the ones that meet a set of filter and sort criteria. *

* * @param searchSkillGroupsRequest * @return A Java Future containing the result of the SearchSkillGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.SearchSkillGroups * @see AWS API Documentation */ @Override public CompletableFuture searchSkillGroups(SearchSkillGroupsRequest searchSkillGroupsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchSkillGroupsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchSkillGroupsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchSkillGroups"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SearchSkillGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchSkillGroups").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchSkillGroupsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchSkillGroupsRequest)); 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); } } /** *

* Searches users and lists the ones that meet a set of filter and sort criteria. *

* * @param searchUsersRequest * @return A Java Future containing the result of the SearchUsers operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.SearchUsers * @see AWS * API Documentation */ @Override public CompletableFuture searchUsers(SearchUsersRequest searchUsersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(searchUsersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchUsersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchUsers"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, SearchUsersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SearchUsers").withProtocolMetadata(protocolMetadata) .withMarshaller(new SearchUsersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(searchUsersRequest)); 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); } } /** *

* Triggers an asynchronous flow to send text, SSML, or audio announcements to rooms that are identified by a search * or filter. *

* * @param sendAnnouncementRequest * @return A Java Future containing the result of the SendAnnouncement operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • LimitExceededException You are performing an action that would put you beyond your account's limits.
  • *
  • AlreadyExistsException The resource being created already exists.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.SendAnnouncement * @see AWS API Documentation */ @Override public CompletableFuture sendAnnouncement(SendAnnouncementRequest sendAnnouncementRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(sendAnnouncementRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, sendAnnouncementRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SendAnnouncement"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SendAnnouncementResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SendAnnouncement").withProtocolMetadata(protocolMetadata) .withMarshaller(new SendAnnouncementRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(sendAnnouncementRequest)); 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); } } /** *

* Sends an enrollment invitation email with a URL to a user. The URL is valid for 30 days or until you call this * operation again, whichever comes first. *

* * @param sendInvitationRequest * @return A Java Future containing the result of the SendInvitation operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • InvalidUserStatusException The attempt to update a user is invalid due to the user's current status.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.SendInvitation * @see AWS API Documentation */ @Override public CompletableFuture sendInvitation(SendInvitationRequest sendInvitationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(sendInvitationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, sendInvitationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SendInvitation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SendInvitationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SendInvitation").withProtocolMetadata(protocolMetadata) .withMarshaller(new SendInvitationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(sendInvitationRequest)); 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); } } /** *

* Resets a device and its account to the known default settings. This clears all information and settings set by * previous users in the following ways: *

*
    *
  • *

    * Bluetooth - This unpairs all bluetooth devices paired with your echo device. *

    *
  • *
  • *

    * Volume - This resets the echo device's volume to the default value. *

    *
  • *
  • *

    * Notifications - This clears all notifications from your echo device. *

    *
  • *
  • *

    * Lists - This clears all to-do items from your echo device. *

    *
  • *
  • *

    * Settings - This internally syncs the room's profile (if the device is assigned to a room), contacts, address * books, delegation access for account linking, and communications (if enabled on the room profile). *

    *
  • *
* * @param startDeviceSyncRequest * @return A Java Future containing the result of the StartDeviceSync operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • DeviceNotRegisteredException The request failed because this device is no longer registered and * therefore no longer managed by this account.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.StartDeviceSync * @see AWS API Documentation */ @Override public CompletableFuture startDeviceSync(StartDeviceSyncRequest startDeviceSyncRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startDeviceSyncRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startDeviceSyncRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartDeviceSync"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartDeviceSyncResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StartDeviceSync").withProtocolMetadata(protocolMetadata) .withMarshaller(new StartDeviceSyncRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(startDeviceSyncRequest)); 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); } } /** *

* Initiates the discovery of any smart home appliances associated with the room. *

* * @param startSmartHomeApplianceDiscoveryRequest * @return A Java Future containing the result of the StartSmartHomeApplianceDiscovery operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.StartSmartHomeApplianceDiscovery * @see AWS API Documentation */ @Override public CompletableFuture startSmartHomeApplianceDiscovery( StartSmartHomeApplianceDiscoveryRequest startSmartHomeApplianceDiscoveryRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startSmartHomeApplianceDiscoveryRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startSmartHomeApplianceDiscoveryRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartSmartHomeApplianceDiscovery"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, StartSmartHomeApplianceDiscoveryResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StartSmartHomeApplianceDiscovery").withProtocolMetadata(protocolMetadata) .withMarshaller(new StartSmartHomeApplianceDiscoveryRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(startSmartHomeApplianceDiscoveryRequest)); 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 metadata tags to a specified 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. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.TagResource * @see AWS * API Documentation */ @Override public CompletableFuture tagResource(TagResourceRequest tagResourceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(tagResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); 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").withProtocolMetadata(protocolMetadata) .withMarshaller(new TagResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).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 metadata tags from a specified 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. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.UntagResource * @see AWS API Documentation */ @Override public CompletableFuture untagResource(UntagResourceRequest untagResourceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(untagResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); 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").withProtocolMetadata(protocolMetadata) .withMarshaller(new UntagResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).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 address book details by the address book ARN. *

* * @param updateAddressBookRequest * @return A Java Future containing the result of the UpdateAddressBook operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • NameInUseException The name sent in the request is already in use.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.UpdateAddressBook * @see AWS API Documentation */ @Override public CompletableFuture updateAddressBook(UpdateAddressBookRequest updateAddressBookRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateAddressBookRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateAddressBookRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateAddressBook"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateAddressBookResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateAddressBook").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateAddressBookRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateAddressBookRequest)); 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 configuration of the report delivery schedule with the specified schedule ARN. *

* * @param updateBusinessReportScheduleRequest * @return A Java Future containing the result of the UpdateBusinessReportSchedule operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.UpdateBusinessReportSchedule * @see AWS API Documentation */ @Override public CompletableFuture updateBusinessReportSchedule( UpdateBusinessReportScheduleRequest updateBusinessReportScheduleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateBusinessReportScheduleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateBusinessReportScheduleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateBusinessReportSchedule"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateBusinessReportScheduleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateBusinessReportSchedule").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateBusinessReportScheduleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateBusinessReportScheduleRequest)); 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 an existing conference provider's settings. *

* * @param updateConferenceProviderRequest * @return A Java Future containing the result of the UpdateConferenceProvider operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.UpdateConferenceProvider * @see AWS API Documentation */ @Override public CompletableFuture updateConferenceProvider( UpdateConferenceProviderRequest updateConferenceProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateConferenceProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateConferenceProviderRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateConferenceProvider"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateConferenceProviderResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateConferenceProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateConferenceProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateConferenceProviderRequest)); 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 contact details by the contact ARN. *

* * @param updateContactRequest * @return A Java Future containing the result of the UpdateContact operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.UpdateContact * @see AWS API Documentation */ @Override public CompletableFuture updateContact(UpdateContactRequest updateContactRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateContactRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateContactRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateContact"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateContactResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateContact").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateContactRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateContactRequest)); 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 device name by device ARN. *

* * @param updateDeviceRequest * @return A Java Future containing the result of the UpdateDevice operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • DeviceNotRegisteredException The request failed because this device is no longer registered and * therefore no longer managed by this account.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.UpdateDevice * @see AWS * API Documentation */ @Override public CompletableFuture updateDevice(UpdateDeviceRequest updateDeviceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateDeviceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateDeviceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateDevice"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateDeviceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateDevice").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateDeviceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateDeviceRequest)); 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 details of a gateway. If any optional field is not provided, the existing corresponding value is left * unmodified. *

* * @param updateGatewayRequest * @return A Java Future containing the result of the UpdateGateway operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • NameInUseException The name sent in the request is already in use.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.UpdateGateway * @see AWS API Documentation */ @Override public CompletableFuture updateGateway(UpdateGatewayRequest updateGatewayRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateGatewayRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateGatewayRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateGateway"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateGatewayResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateGateway").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateGatewayRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateGatewayRequest)); 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 details of a gateway group. If any optional field is not provided, the existing corresponding value * is left unmodified. *

* * @param updateGatewayGroupRequest * @return A Java Future containing the result of the UpdateGatewayGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • NameInUseException The name sent in the request is already in use.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.UpdateGatewayGroup * @see AWS API Documentation */ @Override public CompletableFuture updateGatewayGroup(UpdateGatewayGroupRequest updateGatewayGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateGatewayGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateGatewayGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateGatewayGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateGatewayGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateGatewayGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateGatewayGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateGatewayGroupRequest)); 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 network profile by the network profile ARN. *

* * @param updateNetworkProfileRequest * @return A Java Future containing the result of the UpdateNetworkProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • NameInUseException The name sent in the request is already in use.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • InvalidCertificateAuthorityException The Certificate Authority can't issue or revoke a certificate.
  • *
  • InvalidSecretsManagerResourceException A password in SecretsManager is in an invalid state.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.UpdateNetworkProfile * @see AWS API Documentation */ @Override public CompletableFuture updateNetworkProfile( UpdateNetworkProfileRequest updateNetworkProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateNetworkProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateNetworkProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateNetworkProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateNetworkProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateNetworkProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateNetworkProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateNetworkProfileRequest)); 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 an existing room profile by room profile ARN. *

* * @param updateProfileRequest * @return A Java Future containing the result of the UpdateProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • NameInUseException The name sent in the request is already in use.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.UpdateProfile * @see AWS API Documentation */ @Override public CompletableFuture updateProfile(UpdateProfileRequest updateProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateProfile"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateProfileRequest)); 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 room details by room ARN. *

* * @param updateRoomRequest * @return A Java Future containing the result of the UpdateRoom operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • NameInUseException The name sent in the request is already in use.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.UpdateRoom * @see AWS * API Documentation */ @Override public CompletableFuture updateRoom(UpdateRoomRequest updateRoomRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateRoomRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateRoomRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateRoom"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateRoomResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("UpdateRoom") .withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateRoomRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateRoomRequest)); 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 skill group details by skill group ARN. *

* * @param updateSkillGroupRequest * @return A Java Future containing the result of the UpdateSkillGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • NotFoundException The resource is not found.
  • *
  • NameInUseException The name sent in the request is already in use.
  • *
  • ConcurrentModificationException There is a concurrent modification of resources.
  • *
  • 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.
  • *
  • AlexaForBusinessException Base class for all service exceptions. Unknown exceptions will be thrown as * an instance of this type.
  • *
* @sample AlexaForBusinessAsyncClient.UpdateSkillGroup * @see AWS API Documentation */ @Override public CompletableFuture updateSkillGroup(UpdateSkillGroupRequest updateSkillGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateSkillGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateSkillGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Alexa For Business"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateSkillGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateSkillGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateSkillGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateSkillGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateSkillGroupRequest)); 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 final AlexaForBusinessServiceClientConfiguration serviceClientConfiguration() { return new AlexaForBusinessServiceClientConfigurationBuilder(this.clientConfiguration.toBuilder()).build(); } @Override public final String serviceName() { return SERVICE_NAME; } private > T init(T builder) { return builder .clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(AlexaForBusinessException::builder) .protocol(AwsJsonProtocol.AWS_JSON) .protocolVersion("1.1") .registerModeledException( ExceptionMetadata.builder().errorCode("ConcurrentModificationException") .exceptionBuilderSupplier(ConcurrentModificationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidServiceLinkedRoleStateException") .exceptionBuilderSupplier(InvalidServiceLinkedRoleStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("LimitExceededException") .exceptionBuilderSupplier(LimitExceededException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SkillNotLinkedException") .exceptionBuilderSupplier(SkillNotLinkedException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceAssociatedException") .exceptionBuilderSupplier(ResourceAssociatedException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NameInUseException") .exceptionBuilderSupplier(NameInUseException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AlreadyExistsException") .exceptionBuilderSupplier(AlreadyExistsException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidSecretsManagerResourceException") .exceptionBuilderSupplier(InvalidSecretsManagerResourceException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceInUseException") .exceptionBuilderSupplier(ResourceInUseException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NotFoundException") .exceptionBuilderSupplier(NotFoundException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("UnauthorizedException") .exceptionBuilderSupplier(UnauthorizedException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidUserStatusException") .exceptionBuilderSupplier(InvalidUserStatusException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidCertificateAuthorityException") .exceptionBuilderSupplier(InvalidCertificateAuthorityException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidDeviceException") .exceptionBuilderSupplier(InvalidDeviceException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DeviceNotRegisteredException") .exceptionBuilderSupplier(DeviceNotRegisteredException::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 SdkClientConfiguration updateSdkClientConfiguration(SdkRequest request, SdkClientConfiguration clientConfiguration) { List plugins = request.overrideConfiguration().map(c -> c.plugins()).orElse(Collections.emptyList()); SdkClientConfiguration.Builder configuration = clientConfiguration.toBuilder(); if (plugins.isEmpty()) { return configuration.build(); } AlexaForBusinessServiceClientConfigurationBuilder serviceConfigBuilder = new AlexaForBusinessServiceClientConfigurationBuilder( configuration); for (SdkPlugin plugin : plugins) { plugin.configureClient(serviceConfigBuilder); } return configuration.build(); } private HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory, JsonOperationMetadata operationMetadata) { return protocolFactory.createErrorResponseHandler(operationMetadata); } @Override public void close() { clientHandler.close(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy