software.amazon.awssdk.services.pinpoint.DefaultPinpointClient Maven / Gradle / Ivy
Show all versions of pinpoint Show documentation
/*
* 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.pinpoint;
import java.util.Collections;
import java.util.List;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
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.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
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.pinpoint.internal.PinpointServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.pinpoint.model.BadRequestException;
import software.amazon.awssdk.services.pinpoint.model.ConflictException;
import software.amazon.awssdk.services.pinpoint.model.CreateAppRequest;
import software.amazon.awssdk.services.pinpoint.model.CreateAppResponse;
import software.amazon.awssdk.services.pinpoint.model.CreateCampaignRequest;
import software.amazon.awssdk.services.pinpoint.model.CreateCampaignResponse;
import software.amazon.awssdk.services.pinpoint.model.CreateEmailTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.CreateEmailTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.CreateExportJobRequest;
import software.amazon.awssdk.services.pinpoint.model.CreateExportJobResponse;
import software.amazon.awssdk.services.pinpoint.model.CreateImportJobRequest;
import software.amazon.awssdk.services.pinpoint.model.CreateImportJobResponse;
import software.amazon.awssdk.services.pinpoint.model.CreateInAppTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.CreateInAppTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.CreateJourneyRequest;
import software.amazon.awssdk.services.pinpoint.model.CreateJourneyResponse;
import software.amazon.awssdk.services.pinpoint.model.CreatePushTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.CreatePushTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.CreateRecommenderConfigurationRequest;
import software.amazon.awssdk.services.pinpoint.model.CreateRecommenderConfigurationResponse;
import software.amazon.awssdk.services.pinpoint.model.CreateSegmentRequest;
import software.amazon.awssdk.services.pinpoint.model.CreateSegmentResponse;
import software.amazon.awssdk.services.pinpoint.model.CreateSmsTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.CreateSmsTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.CreateVoiceTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.CreateVoiceTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteAdmChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteAdmChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteApnsChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteApnsChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteApnsSandboxChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteApnsSandboxChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteApnsVoipChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteApnsVoipChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteApnsVoipSandboxChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteApnsVoipSandboxChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteAppRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteAppResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteBaiduChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteBaiduChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteCampaignRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteCampaignResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteEmailChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteEmailChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteEmailTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteEmailTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteEndpointRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteEndpointResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteEventStreamRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteEventStreamResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteGcmChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteGcmChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteInAppTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteInAppTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteJourneyRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteJourneyResponse;
import software.amazon.awssdk.services.pinpoint.model.DeletePushTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.DeletePushTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteRecommenderConfigurationRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteRecommenderConfigurationResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteSegmentRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteSegmentResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteSmsChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteSmsChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteSmsTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteSmsTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteUserEndpointsRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteUserEndpointsResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteVoiceChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteVoiceChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.DeleteVoiceTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteVoiceTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.ForbiddenException;
import software.amazon.awssdk.services.pinpoint.model.GetAdmChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.GetAdmChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.GetApnsChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.GetApnsChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.GetApnsSandboxChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.GetApnsSandboxChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.GetApnsVoipChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.GetApnsVoipChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.GetApnsVoipSandboxChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.GetApnsVoipSandboxChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.GetAppRequest;
import software.amazon.awssdk.services.pinpoint.model.GetAppResponse;
import software.amazon.awssdk.services.pinpoint.model.GetApplicationDateRangeKpiRequest;
import software.amazon.awssdk.services.pinpoint.model.GetApplicationDateRangeKpiResponse;
import software.amazon.awssdk.services.pinpoint.model.GetApplicationSettingsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetApplicationSettingsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetAppsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetAppsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetBaiduChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.GetBaiduChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.GetCampaignActivitiesRequest;
import software.amazon.awssdk.services.pinpoint.model.GetCampaignActivitiesResponse;
import software.amazon.awssdk.services.pinpoint.model.GetCampaignDateRangeKpiRequest;
import software.amazon.awssdk.services.pinpoint.model.GetCampaignDateRangeKpiResponse;
import software.amazon.awssdk.services.pinpoint.model.GetCampaignRequest;
import software.amazon.awssdk.services.pinpoint.model.GetCampaignResponse;
import software.amazon.awssdk.services.pinpoint.model.GetCampaignVersionRequest;
import software.amazon.awssdk.services.pinpoint.model.GetCampaignVersionResponse;
import software.amazon.awssdk.services.pinpoint.model.GetCampaignVersionsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetCampaignVersionsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetCampaignsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetCampaignsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetChannelsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetChannelsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetEmailChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.GetEmailChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.GetEmailTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.GetEmailTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.GetEndpointRequest;
import software.amazon.awssdk.services.pinpoint.model.GetEndpointResponse;
import software.amazon.awssdk.services.pinpoint.model.GetEventStreamRequest;
import software.amazon.awssdk.services.pinpoint.model.GetEventStreamResponse;
import software.amazon.awssdk.services.pinpoint.model.GetExportJobRequest;
import software.amazon.awssdk.services.pinpoint.model.GetExportJobResponse;
import software.amazon.awssdk.services.pinpoint.model.GetExportJobsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetExportJobsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetGcmChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.GetGcmChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.GetImportJobRequest;
import software.amazon.awssdk.services.pinpoint.model.GetImportJobResponse;
import software.amazon.awssdk.services.pinpoint.model.GetImportJobsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetImportJobsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetInAppMessagesRequest;
import software.amazon.awssdk.services.pinpoint.model.GetInAppMessagesResponse;
import software.amazon.awssdk.services.pinpoint.model.GetInAppTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.GetInAppTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.GetJourneyDateRangeKpiRequest;
import software.amazon.awssdk.services.pinpoint.model.GetJourneyDateRangeKpiResponse;
import software.amazon.awssdk.services.pinpoint.model.GetJourneyExecutionActivityMetricsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetJourneyExecutionActivityMetricsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetJourneyExecutionMetricsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetJourneyExecutionMetricsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetJourneyRequest;
import software.amazon.awssdk.services.pinpoint.model.GetJourneyResponse;
import software.amazon.awssdk.services.pinpoint.model.GetJourneyRunExecutionActivityMetricsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetJourneyRunExecutionActivityMetricsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetJourneyRunExecutionMetricsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetJourneyRunExecutionMetricsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetJourneyRunsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetJourneyRunsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetPushTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.GetPushTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.GetRecommenderConfigurationRequest;
import software.amazon.awssdk.services.pinpoint.model.GetRecommenderConfigurationResponse;
import software.amazon.awssdk.services.pinpoint.model.GetRecommenderConfigurationsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetRecommenderConfigurationsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetSegmentExportJobsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetSegmentExportJobsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetSegmentImportJobsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetSegmentImportJobsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetSegmentRequest;
import software.amazon.awssdk.services.pinpoint.model.GetSegmentResponse;
import software.amazon.awssdk.services.pinpoint.model.GetSegmentVersionRequest;
import software.amazon.awssdk.services.pinpoint.model.GetSegmentVersionResponse;
import software.amazon.awssdk.services.pinpoint.model.GetSegmentVersionsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetSegmentVersionsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetSegmentsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetSegmentsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetSmsChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.GetSmsChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.GetSmsTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.GetSmsTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.GetUserEndpointsRequest;
import software.amazon.awssdk.services.pinpoint.model.GetUserEndpointsResponse;
import software.amazon.awssdk.services.pinpoint.model.GetVoiceChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.GetVoiceChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.GetVoiceTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.GetVoiceTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.InternalServerErrorException;
import software.amazon.awssdk.services.pinpoint.model.ListJourneysRequest;
import software.amazon.awssdk.services.pinpoint.model.ListJourneysResponse;
import software.amazon.awssdk.services.pinpoint.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.pinpoint.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.pinpoint.model.ListTemplateVersionsRequest;
import software.amazon.awssdk.services.pinpoint.model.ListTemplateVersionsResponse;
import software.amazon.awssdk.services.pinpoint.model.ListTemplatesRequest;
import software.amazon.awssdk.services.pinpoint.model.ListTemplatesResponse;
import software.amazon.awssdk.services.pinpoint.model.MethodNotAllowedException;
import software.amazon.awssdk.services.pinpoint.model.NotFoundException;
import software.amazon.awssdk.services.pinpoint.model.PayloadTooLargeException;
import software.amazon.awssdk.services.pinpoint.model.PhoneNumberValidateRequest;
import software.amazon.awssdk.services.pinpoint.model.PhoneNumberValidateResponse;
import software.amazon.awssdk.services.pinpoint.model.PinpointException;
import software.amazon.awssdk.services.pinpoint.model.PutEventStreamRequest;
import software.amazon.awssdk.services.pinpoint.model.PutEventStreamResponse;
import software.amazon.awssdk.services.pinpoint.model.PutEventsRequest;
import software.amazon.awssdk.services.pinpoint.model.PutEventsResponse;
import software.amazon.awssdk.services.pinpoint.model.RemoveAttributesRequest;
import software.amazon.awssdk.services.pinpoint.model.RemoveAttributesResponse;
import software.amazon.awssdk.services.pinpoint.model.SendMessagesRequest;
import software.amazon.awssdk.services.pinpoint.model.SendMessagesResponse;
import software.amazon.awssdk.services.pinpoint.model.SendOtpMessageRequest;
import software.amazon.awssdk.services.pinpoint.model.SendOtpMessageResponse;
import software.amazon.awssdk.services.pinpoint.model.SendUsersMessagesRequest;
import software.amazon.awssdk.services.pinpoint.model.SendUsersMessagesResponse;
import software.amazon.awssdk.services.pinpoint.model.TagResourceRequest;
import software.amazon.awssdk.services.pinpoint.model.TagResourceResponse;
import software.amazon.awssdk.services.pinpoint.model.TooManyRequestsException;
import software.amazon.awssdk.services.pinpoint.model.UntagResourceRequest;
import software.amazon.awssdk.services.pinpoint.model.UntagResourceResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateAdmChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateAdmChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateApnsChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateApnsChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateApnsSandboxChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateApnsSandboxChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateApnsVoipChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateApnsVoipChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateApnsVoipSandboxChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateApnsVoipSandboxChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateApplicationSettingsRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateApplicationSettingsResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateBaiduChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateBaiduChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateCampaignRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateCampaignResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateEmailChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateEmailChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateEmailTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateEmailTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateEndpointRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateEndpointResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateEndpointsBatchRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateEndpointsBatchResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateGcmChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateGcmChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateInAppTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateInAppTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateJourneyRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateJourneyResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateJourneyStateRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateJourneyStateResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdatePushTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdatePushTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateRecommenderConfigurationRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateRecommenderConfigurationResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateSegmentRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateSegmentResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateSmsChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateSmsChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateSmsTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateSmsTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateTemplateActiveVersionRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateTemplateActiveVersionResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateVoiceChannelRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateVoiceChannelResponse;
import software.amazon.awssdk.services.pinpoint.model.UpdateVoiceTemplateRequest;
import software.amazon.awssdk.services.pinpoint.model.UpdateVoiceTemplateResponse;
import software.amazon.awssdk.services.pinpoint.model.VerifyOtpMessageRequest;
import software.amazon.awssdk.services.pinpoint.model.VerifyOtpMessageResponse;
import software.amazon.awssdk.services.pinpoint.transform.CreateAppRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.CreateCampaignRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.CreateEmailTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.CreateExportJobRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.CreateImportJobRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.CreateInAppTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.CreateJourneyRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.CreatePushTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.CreateRecommenderConfigurationRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.CreateSegmentRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.CreateSmsTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.CreateVoiceTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteAdmChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteApnsChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteApnsSandboxChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteApnsVoipChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteApnsVoipSandboxChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteAppRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteBaiduChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteCampaignRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteEmailChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteEmailTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteEndpointRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteEventStreamRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteGcmChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteInAppTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteJourneyRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeletePushTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteRecommenderConfigurationRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteSegmentRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteSmsChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteSmsTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteUserEndpointsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteVoiceChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.DeleteVoiceTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetAdmChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetApnsChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetApnsSandboxChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetApnsVoipChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetApnsVoipSandboxChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetAppRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetApplicationDateRangeKpiRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetApplicationSettingsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetAppsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetBaiduChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetCampaignActivitiesRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetCampaignDateRangeKpiRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetCampaignRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetCampaignVersionRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetCampaignVersionsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetCampaignsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetChannelsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetEmailChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetEmailTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetEndpointRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetEventStreamRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetExportJobRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetExportJobsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetGcmChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetImportJobRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetImportJobsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetInAppMessagesRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetInAppTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetJourneyDateRangeKpiRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetJourneyExecutionActivityMetricsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetJourneyExecutionMetricsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetJourneyRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetJourneyRunExecutionActivityMetricsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetJourneyRunExecutionMetricsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetJourneyRunsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetPushTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetRecommenderConfigurationRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetRecommenderConfigurationsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetSegmentExportJobsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetSegmentImportJobsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetSegmentRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetSegmentVersionRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetSegmentVersionsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetSegmentsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetSmsChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetSmsTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetUserEndpointsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetVoiceChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.GetVoiceTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.ListJourneysRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.ListTemplateVersionsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.ListTemplatesRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.PhoneNumberValidateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.PutEventStreamRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.PutEventsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.RemoveAttributesRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.SendMessagesRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.SendOtpMessageRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.SendUsersMessagesRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateAdmChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateApnsChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateApnsSandboxChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateApnsVoipChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateApnsVoipSandboxChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateApplicationSettingsRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateBaiduChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateCampaignRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateEmailChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateEmailTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateEndpointRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateEndpointsBatchRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateGcmChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateInAppTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateJourneyRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateJourneyStateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdatePushTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateRecommenderConfigurationRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateSegmentRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateSmsChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateSmsTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateTemplateActiveVersionRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateVoiceChannelRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.UpdateVoiceTemplateRequestMarshaller;
import software.amazon.awssdk.services.pinpoint.transform.VerifyOtpMessageRequestMarshaller;
import software.amazon.awssdk.utils.Logger;
/**
* Internal implementation of {@link PinpointClient}.
*
* @see PinpointClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultPinpointClient implements PinpointClient {
private static final Logger log = Logger.loggerFor(DefaultPinpointClient.class);
private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
.serviceProtocol(AwsServiceProtocol.REST_JSON).build();
private final SyncClientHandler clientHandler;
private final AwsJsonProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultPinpointClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration.toBuilder().option(SdkClientOption.SDK_CLIENT, this).build();
this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
}
/**
*
* Creates an application.
*
*
* @param createAppRequest
* @return Result of the CreateApp operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.CreateApp
* @see AWS API
* Documentation
*/
@Override
public CreateAppResponse createApp(CreateAppRequest createAppRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateAppResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createAppRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createAppRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateApp");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateApp").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(createAppRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateAppRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a new campaign for an application or updates the settings of an existing campaign for an application.
*
*
* @param createCampaignRequest
* @return Result of the CreateCampaign operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.CreateCampaign
* @see AWS API
* Documentation
*/
@Override
public CreateCampaignResponse createCampaign(CreateCampaignRequest createCampaignRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateCampaignResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createCampaignRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createCampaignRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateCampaign");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateCampaign").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createCampaignRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateCampaignRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a message template for messages that are sent through the email channel.
*
*
* @param createEmailTemplateRequest
* @return Result of the CreateEmailTemplate operation returned by the service.
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.CreateEmailTemplate
* @see AWS
* API Documentation
*/
@Override
public CreateEmailTemplateResponse createEmailTemplate(CreateEmailTemplateRequest createEmailTemplateRequest)
throws MethodNotAllowedException, TooManyRequestsException, BadRequestException, InternalServerErrorException,
ForbiddenException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateEmailTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createEmailTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createEmailTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateEmailTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateEmailTemplate").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createEmailTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateEmailTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates an export job for an application.
*
*
* @param createExportJobRequest
* @return Result of the CreateExportJob operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.CreateExportJob
* @see AWS API
* Documentation
*/
@Override
public CreateExportJobResponse createExportJob(CreateExportJobRequest createExportJobRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateExportJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createExportJobRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createExportJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateExportJob");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateExportJob").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createExportJobRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateExportJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates an import job for an application.
*
*
* @param createImportJobRequest
* @return Result of the CreateImportJob operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.CreateImportJob
* @see AWS API
* Documentation
*/
@Override
public CreateImportJobResponse createImportJob(CreateImportJobRequest createImportJobRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateImportJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createImportJobRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createImportJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateImportJob");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateImportJob").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createImportJobRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateImportJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a new message template for messages using the in-app message channel.
*
*
* @param createInAppTemplateRequest
* @return Result of the CreateInAppTemplate operation returned by the service.
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.CreateInAppTemplate
* @see AWS
* API Documentation
*/
@Override
public CreateInAppTemplateResponse createInAppTemplate(CreateInAppTemplateRequest createInAppTemplateRequest)
throws MethodNotAllowedException, TooManyRequestsException, BadRequestException, InternalServerErrorException,
ForbiddenException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateInAppTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createInAppTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createInAppTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateInAppTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateInAppTemplate").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createInAppTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateInAppTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a journey for an application.
*
*
* @param createJourneyRequest
* @return Result of the CreateJourney operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.CreateJourney
* @see AWS API
* Documentation
*/
@Override
public CreateJourneyResponse createJourney(CreateJourneyRequest createJourneyRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateJourneyResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createJourneyRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createJourneyRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateJourney");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateJourney").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createJourneyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateJourneyRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a message template for messages that are sent through a push notification channel.
*
*
* @param createPushTemplateRequest
* @return Result of the CreatePushTemplate operation returned by the service.
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.CreatePushTemplate
* @see AWS
* API Documentation
*/
@Override
public CreatePushTemplateResponse createPushTemplate(CreatePushTemplateRequest createPushTemplateRequest)
throws MethodNotAllowedException, TooManyRequestsException, BadRequestException, InternalServerErrorException,
ForbiddenException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreatePushTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createPushTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createPushTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreatePushTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreatePushTemplate").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createPushTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreatePushTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates an Amazon Pinpoint configuration for a recommender model.
*
*
* @param createRecommenderConfigurationRequest
* @return Result of the CreateRecommenderConfiguration operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.CreateRecommenderConfiguration
* @see AWS API Documentation
*/
@Override
public CreateRecommenderConfigurationResponse createRecommenderConfiguration(
CreateRecommenderConfigurationRequest createRecommenderConfigurationRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateRecommenderConfigurationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createRecommenderConfigurationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
createRecommenderConfigurationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateRecommenderConfiguration");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateRecommenderConfiguration").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createRecommenderConfigurationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateRecommenderConfigurationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a new segment for an application or updates the configuration, dimension, and other settings for an
* existing segment that's associated with an application.
*
*
* @param createSegmentRequest
* @return Result of the CreateSegment operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.CreateSegment
* @see AWS API
* Documentation
*/
@Override
public CreateSegmentResponse createSegment(CreateSegmentRequest createSegmentRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateSegmentResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createSegmentRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createSegmentRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateSegment");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateSegment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createSegmentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateSegmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a message template for messages that are sent through the SMS channel.
*
*
* @param createSmsTemplateRequest
* @return Result of the CreateSmsTemplate operation returned by the service.
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.CreateSmsTemplate
* @see AWS
* API Documentation
*/
@Override
public CreateSmsTemplateResponse createSmsTemplate(CreateSmsTemplateRequest createSmsTemplateRequest)
throws MethodNotAllowedException, TooManyRequestsException, BadRequestException, InternalServerErrorException,
ForbiddenException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateSmsTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createSmsTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createSmsTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateSmsTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateSmsTemplate").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createSmsTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateSmsTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a message template for messages that are sent through the voice channel.
*
*
* @param createVoiceTemplateRequest
* @return Result of the CreateVoiceTemplate operation returned by the service.
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.CreateVoiceTemplate
* @see AWS
* API Documentation
*/
@Override
public CreateVoiceTemplateResponse createVoiceTemplate(CreateVoiceTemplateRequest createVoiceTemplateRequest)
throws MethodNotAllowedException, TooManyRequestsException, BadRequestException, InternalServerErrorException,
ForbiddenException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateVoiceTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createVoiceTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createVoiceTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateVoiceTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateVoiceTemplate").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createVoiceTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateVoiceTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disables the ADM channel for an application and deletes any existing settings for the channel.
*
*
* @param deleteAdmChannelRequest
* @return Result of the DeleteAdmChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteAdmChannel
* @see AWS API
* Documentation
*/
@Override
public DeleteAdmChannelResponse deleteAdmChannel(DeleteAdmChannelRequest deleteAdmChannelRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteAdmChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAdmChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAdmChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAdmChannel");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteAdmChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteAdmChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteAdmChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disables the APNs channel for an application and deletes any existing settings for the channel.
*
*
* @param deleteApnsChannelRequest
* @return Result of the DeleteApnsChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteApnsChannel
* @see AWS
* API Documentation
*/
@Override
public DeleteApnsChannelResponse deleteApnsChannel(DeleteApnsChannelRequest deleteApnsChannelRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteApnsChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteApnsChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteApnsChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteApnsChannel");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteApnsChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteApnsChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteApnsChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disables the APNs sandbox channel for an application and deletes any existing settings for the channel.
*
*
* @param deleteApnsSandboxChannelRequest
* @return Result of the DeleteApnsSandboxChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteApnsSandboxChannel
* @see AWS API Documentation
*/
@Override
public DeleteApnsSandboxChannelResponse deleteApnsSandboxChannel(
DeleteApnsSandboxChannelRequest deleteApnsSandboxChannelRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteApnsSandboxChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteApnsSandboxChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteApnsSandboxChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteApnsSandboxChannel");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteApnsSandboxChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteApnsSandboxChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteApnsSandboxChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disables the APNs VoIP channel for an application and deletes any existing settings for the channel.
*
*
* @param deleteApnsVoipChannelRequest
* @return Result of the DeleteApnsVoipChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteApnsVoipChannel
* @see AWS API Documentation
*/
@Override
public DeleteApnsVoipChannelResponse deleteApnsVoipChannel(DeleteApnsVoipChannelRequest deleteApnsVoipChannelRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteApnsVoipChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteApnsVoipChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteApnsVoipChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteApnsVoipChannel");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteApnsVoipChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteApnsVoipChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteApnsVoipChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disables the APNs VoIP sandbox channel for an application and deletes any existing settings for the channel.
*
*
* @param deleteApnsVoipSandboxChannelRequest
* @return Result of the DeleteApnsVoipSandboxChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteApnsVoipSandboxChannel
* @see AWS API Documentation
*/
@Override
public DeleteApnsVoipSandboxChannelResponse deleteApnsVoipSandboxChannel(
DeleteApnsVoipSandboxChannelRequest deleteApnsVoipSandboxChannelRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteApnsVoipSandboxChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteApnsVoipSandboxChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteApnsVoipSandboxChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteApnsVoipSandboxChannel");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteApnsVoipSandboxChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteApnsVoipSandboxChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteApnsVoipSandboxChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes an application.
*
*
* @param deleteAppRequest
* @return Result of the DeleteApp operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteApp
* @see AWS API
* Documentation
*/
@Override
public DeleteAppResponse deleteApp(DeleteAppRequest deleteAppRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteAppResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAppRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAppRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteApp");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteApp").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(deleteAppRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteAppRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disables the Baidu channel for an application and deletes any existing settings for the channel.
*
*
* @param deleteBaiduChannelRequest
* @return Result of the DeleteBaiduChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteBaiduChannel
* @see AWS
* API Documentation
*/
@Override
public DeleteBaiduChannelResponse deleteBaiduChannel(DeleteBaiduChannelRequest deleteBaiduChannelRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteBaiduChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteBaiduChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteBaiduChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteBaiduChannel");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteBaiduChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteBaiduChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteBaiduChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a campaign from an application.
*
*
* @param deleteCampaignRequest
* @return Result of the DeleteCampaign operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteCampaign
* @see AWS API
* Documentation
*/
@Override
public DeleteCampaignResponse deleteCampaign(DeleteCampaignRequest deleteCampaignRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteCampaignResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteCampaignRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteCampaignRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteCampaign");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteCampaign").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteCampaignRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteCampaignRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disables the email channel for an application and deletes any existing settings for the channel.
*
*
* @param deleteEmailChannelRequest
* @return Result of the DeleteEmailChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteEmailChannel
* @see AWS
* API Documentation
*/
@Override
public DeleteEmailChannelResponse deleteEmailChannel(DeleteEmailChannelRequest deleteEmailChannelRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteEmailChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteEmailChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteEmailChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteEmailChannel");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteEmailChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteEmailChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteEmailChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a message template for messages that were sent through the email channel.
*
*
* @param deleteEmailTemplateRequest
* @return Result of the DeleteEmailTemplate operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteEmailTemplate
* @see AWS
* API Documentation
*/
@Override
public DeleteEmailTemplateResponse deleteEmailTemplate(DeleteEmailTemplateRequest deleteEmailTemplateRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteEmailTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteEmailTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteEmailTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteEmailTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteEmailTemplate").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteEmailTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteEmailTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes an endpoint from an application.
*
*
* @param deleteEndpointRequest
* @return Result of the DeleteEndpoint operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteEndpoint
* @see AWS API
* Documentation
*/
@Override
public DeleteEndpointResponse deleteEndpoint(DeleteEndpointRequest deleteEndpointRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteEndpointResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteEndpointRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteEndpointRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteEndpoint");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteEndpoint").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteEndpointRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteEndpointRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the event stream for an application.
*
*
* @param deleteEventStreamRequest
* @return Result of the DeleteEventStream operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteEventStream
* @see AWS
* API Documentation
*/
@Override
public DeleteEventStreamResponse deleteEventStream(DeleteEventStreamRequest deleteEventStreamRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteEventStreamResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteEventStreamRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteEventStreamRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteEventStream");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteEventStream").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteEventStreamRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteEventStreamRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disables the GCM channel for an application and deletes any existing settings for the channel.
*
*
* @param deleteGcmChannelRequest
* @return Result of the DeleteGcmChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteGcmChannel
* @see AWS API
* Documentation
*/
@Override
public DeleteGcmChannelResponse deleteGcmChannel(DeleteGcmChannelRequest deleteGcmChannelRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteGcmChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteGcmChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteGcmChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteGcmChannel");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteGcmChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteGcmChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteGcmChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a message template for messages sent using the in-app message channel.
*
*
* @param deleteInAppTemplateRequest
* @return Result of the DeleteInAppTemplate operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteInAppTemplate
* @see AWS
* API Documentation
*/
@Override
public DeleteInAppTemplateResponse deleteInAppTemplate(DeleteInAppTemplateRequest deleteInAppTemplateRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteInAppTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteInAppTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteInAppTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteInAppTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteInAppTemplate").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteInAppTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteInAppTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a journey from an application.
*
*
* @param deleteJourneyRequest
* @return Result of the DeleteJourney operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteJourney
* @see AWS API
* Documentation
*/
@Override
public DeleteJourneyResponse deleteJourney(DeleteJourneyRequest deleteJourneyRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteJourneyResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteJourneyRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteJourneyRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteJourney");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteJourney").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteJourneyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteJourneyRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a message template for messages that were sent through a push notification channel.
*
*
* @param deletePushTemplateRequest
* @return Result of the DeletePushTemplate operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeletePushTemplate
* @see AWS
* API Documentation
*/
@Override
public DeletePushTemplateResponse deletePushTemplate(DeletePushTemplateRequest deletePushTemplateRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeletePushTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deletePushTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deletePushTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeletePushTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeletePushTemplate").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deletePushTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeletePushTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes an Amazon Pinpoint configuration for a recommender model.
*
*
* @param deleteRecommenderConfigurationRequest
* @return Result of the DeleteRecommenderConfiguration operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteRecommenderConfiguration
* @see AWS API Documentation
*/
@Override
public DeleteRecommenderConfigurationResponse deleteRecommenderConfiguration(
DeleteRecommenderConfigurationRequest deleteRecommenderConfigurationRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteRecommenderConfigurationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteRecommenderConfigurationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteRecommenderConfigurationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRecommenderConfiguration");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteRecommenderConfiguration").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteRecommenderConfigurationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteRecommenderConfigurationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a segment from an application.
*
*
* @param deleteSegmentRequest
* @return Result of the DeleteSegment operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteSegment
* @see AWS API
* Documentation
*/
@Override
public DeleteSegmentResponse deleteSegment(DeleteSegmentRequest deleteSegmentRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteSegmentResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteSegmentRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSegmentRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSegment");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteSegment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteSegmentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteSegmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disables the SMS channel for an application and deletes any existing settings for the channel.
*
*
* @param deleteSmsChannelRequest
* @return Result of the DeleteSmsChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteSmsChannel
* @see AWS API
* Documentation
*/
@Override
public DeleteSmsChannelResponse deleteSmsChannel(DeleteSmsChannelRequest deleteSmsChannelRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteSmsChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteSmsChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSmsChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSmsChannel");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteSmsChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteSmsChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteSmsChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a message template for messages that were sent through the SMS channel.
*
*
* @param deleteSmsTemplateRequest
* @return Result of the DeleteSmsTemplate operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteSmsTemplate
* @see AWS
* API Documentation
*/
@Override
public DeleteSmsTemplateResponse deleteSmsTemplate(DeleteSmsTemplateRequest deleteSmsTemplateRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteSmsTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteSmsTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSmsTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSmsTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteSmsTemplate").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteSmsTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteSmsTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes all the endpoints that are associated with a specific user ID.
*
*
* @param deleteUserEndpointsRequest
* @return Result of the DeleteUserEndpoints operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteUserEndpoints
* @see AWS
* API Documentation
*/
@Override
public DeleteUserEndpointsResponse deleteUserEndpoints(DeleteUserEndpointsRequest deleteUserEndpointsRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteUserEndpointsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteUserEndpointsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteUserEndpointsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteUserEndpoints");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteUserEndpoints").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteUserEndpointsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteUserEndpointsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disables the voice channel for an application and deletes any existing settings for the channel.
*
*
* @param deleteVoiceChannelRequest
* @return Result of the DeleteVoiceChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteVoiceChannel
* @see AWS
* API Documentation
*/
@Override
public DeleteVoiceChannelResponse deleteVoiceChannel(DeleteVoiceChannelRequest deleteVoiceChannelRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteVoiceChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteVoiceChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteVoiceChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteVoiceChannel");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteVoiceChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteVoiceChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteVoiceChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a message template for messages that were sent through the voice channel.
*
*
* @param deleteVoiceTemplateRequest
* @return Result of the DeleteVoiceTemplate operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.DeleteVoiceTemplate
* @see AWS
* API Documentation
*/
@Override
public DeleteVoiceTemplateResponse deleteVoiceTemplate(DeleteVoiceTemplateRequest deleteVoiceTemplateRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteVoiceTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteVoiceTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteVoiceTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteVoiceTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteVoiceTemplate").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteVoiceTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteVoiceTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status and settings of the ADM channel for an application.
*
*
* @param getAdmChannelRequest
* @return Result of the GetAdmChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetAdmChannel
* @see AWS API
* Documentation
*/
@Override
public GetAdmChannelResponse getAdmChannel(GetAdmChannelRequest getAdmChannelRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetAdmChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAdmChannelRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getAdmChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAdmChannel");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetAdmChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getAdmChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetAdmChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status and settings of the APNs channel for an application.
*
*
* @param getApnsChannelRequest
* @return Result of the GetApnsChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetApnsChannel
* @see AWS API
* Documentation
*/
@Override
public GetApnsChannelResponse getApnsChannel(GetApnsChannelRequest getApnsChannelRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetApnsChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getApnsChannelRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getApnsChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetApnsChannel");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetApnsChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getApnsChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetApnsChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status and settings of the APNs sandbox channel for an application.
*
*
* @param getApnsSandboxChannelRequest
* @return Result of the GetApnsSandboxChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetApnsSandboxChannel
* @see AWS API Documentation
*/
@Override
public GetApnsSandboxChannelResponse getApnsSandboxChannel(GetApnsSandboxChannelRequest getApnsSandboxChannelRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetApnsSandboxChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getApnsSandboxChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getApnsSandboxChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetApnsSandboxChannel");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetApnsSandboxChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getApnsSandboxChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetApnsSandboxChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status and settings of the APNs VoIP channel for an application.
*
*
* @param getApnsVoipChannelRequest
* @return Result of the GetApnsVoipChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetApnsVoipChannel
* @see AWS
* API Documentation
*/
@Override
public GetApnsVoipChannelResponse getApnsVoipChannel(GetApnsVoipChannelRequest getApnsVoipChannelRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetApnsVoipChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getApnsVoipChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getApnsVoipChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetApnsVoipChannel");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetApnsVoipChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getApnsVoipChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetApnsVoipChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status and settings of the APNs VoIP sandbox channel for an application.
*
*
* @param getApnsVoipSandboxChannelRequest
* @return Result of the GetApnsVoipSandboxChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetApnsVoipSandboxChannel
* @see AWS API Documentation
*/
@Override
public GetApnsVoipSandboxChannelResponse getApnsVoipSandboxChannel(
GetApnsVoipSandboxChannelRequest getApnsVoipSandboxChannelRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetApnsVoipSandboxChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getApnsVoipSandboxChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getApnsVoipSandboxChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetApnsVoipSandboxChannel");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetApnsVoipSandboxChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getApnsVoipSandboxChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetApnsVoipSandboxChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about an application.
*
*
* @param getAppRequest
* @return Result of the GetApp operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetApp
* @see AWS API
* Documentation
*/
@Override
public GetAppResponse getApp(GetAppRequest getAppRequest) throws BadRequestException, InternalServerErrorException,
PayloadTooLargeException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException,
AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetAppResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAppRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getAppRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetApp");
return clientHandler.execute(new ClientExecutionParams().withOperationName("GetApp")
.withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getAppRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetAppRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves (queries) pre-aggregated data for a standard metric that applies to an application.
*
*
* @param getApplicationDateRangeKpiRequest
* @return Result of the GetApplicationDateRangeKpi operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetApplicationDateRangeKpi
* @see AWS API Documentation
*/
@Override
public GetApplicationDateRangeKpiResponse getApplicationDateRangeKpi(
GetApplicationDateRangeKpiRequest getApplicationDateRangeKpiRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetApplicationDateRangeKpiResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getApplicationDateRangeKpiRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getApplicationDateRangeKpiRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetApplicationDateRangeKpi");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetApplicationDateRangeKpi").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getApplicationDateRangeKpiRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetApplicationDateRangeKpiRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the settings for an application.
*
*
* @param getApplicationSettingsRequest
* @return Result of the GetApplicationSettings operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetApplicationSettings
* @see AWS API Documentation
*/
@Override
public GetApplicationSettingsResponse getApplicationSettings(GetApplicationSettingsRequest getApplicationSettingsRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetApplicationSettingsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getApplicationSettingsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getApplicationSettingsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetApplicationSettings");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetApplicationSettings").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getApplicationSettingsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetApplicationSettingsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about all the applications that are associated with your Amazon Pinpoint account.
*
*
* @param getAppsRequest
* @return Result of the GetApps operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetApps
* @see AWS API
* Documentation
*/
@Override
public GetAppsResponse getApps(GetAppsRequest getAppsRequest) throws BadRequestException, InternalServerErrorException,
PayloadTooLargeException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException,
AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetAppsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAppsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getAppsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetApps");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetApps").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getAppsRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetAppsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status and settings of the Baidu channel for an application.
*
*
* @param getBaiduChannelRequest
* @return Result of the GetBaiduChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetBaiduChannel
* @see AWS API
* Documentation
*/
@Override
public GetBaiduChannelResponse getBaiduChannel(GetBaiduChannelRequest getBaiduChannelRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetBaiduChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getBaiduChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getBaiduChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetBaiduChannel");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetBaiduChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getBaiduChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetBaiduChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status, configuration, and other settings for a campaign.
*
*
* @param getCampaignRequest
* @return Result of the GetCampaign operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetCampaign
* @see AWS API
* Documentation
*/
@Override
public GetCampaignResponse getCampaign(GetCampaignRequest getCampaignRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetCampaignResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCampaignRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getCampaignRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCampaign");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetCampaign").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getCampaignRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetCampaignRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about all the activities for a campaign.
*
*
* @param getCampaignActivitiesRequest
* @return Result of the GetCampaignActivities operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetCampaignActivities
* @see AWS API Documentation
*/
@Override
public GetCampaignActivitiesResponse getCampaignActivities(GetCampaignActivitiesRequest getCampaignActivitiesRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetCampaignActivitiesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCampaignActivitiesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getCampaignActivitiesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCampaignActivities");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetCampaignActivities").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getCampaignActivitiesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetCampaignActivitiesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves (queries) pre-aggregated data for a standard metric that applies to a campaign.
*
*
* @param getCampaignDateRangeKpiRequest
* @return Result of the GetCampaignDateRangeKpi operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetCampaignDateRangeKpi
* @see AWS API Documentation
*/
@Override
public GetCampaignDateRangeKpiResponse getCampaignDateRangeKpi(GetCampaignDateRangeKpiRequest getCampaignDateRangeKpiRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetCampaignDateRangeKpiResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCampaignDateRangeKpiRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getCampaignDateRangeKpiRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCampaignDateRangeKpi");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetCampaignDateRangeKpi").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getCampaignDateRangeKpiRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetCampaignDateRangeKpiRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status, configuration, and other settings for a specific version of a campaign.
*
*
* @param getCampaignVersionRequest
* @return Result of the GetCampaignVersion operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetCampaignVersion
* @see AWS
* API Documentation
*/
@Override
public GetCampaignVersionResponse getCampaignVersion(GetCampaignVersionRequest getCampaignVersionRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetCampaignVersionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCampaignVersionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getCampaignVersionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCampaignVersion");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetCampaignVersion").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getCampaignVersionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetCampaignVersionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status, configuration, and other settings for all versions of a campaign.
*
*
* @param getCampaignVersionsRequest
* @return Result of the GetCampaignVersions operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetCampaignVersions
* @see AWS
* API Documentation
*/
@Override
public GetCampaignVersionsResponse getCampaignVersions(GetCampaignVersionsRequest getCampaignVersionsRequest)
throws BadRequestException, InternalServerErrorException, PayloadTooLargeException, ForbiddenException,
NotFoundException, MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException,
PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetCampaignVersionsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCampaignVersionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getCampaignVersionsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCampaignVersions");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetCampaignVersions").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getCampaignVersionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetCampaignVersionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status, configuration, and other settings for all the campaigns that are
* associated with an application.
*
*
* @param getCampaignsRequest
* @return Result of the GetCampaigns operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetCampaigns
* @see AWS API
* Documentation
*/
@Override
public GetCampaignsResponse getCampaigns(GetCampaignsRequest getCampaignsRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetCampaignsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCampaignsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getCampaignsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCampaigns");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetCampaigns").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getCampaignsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetCampaignsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the history and status of each channel for an application.
*
*
* @param getChannelsRequest
* @return Result of the GetChannels operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetChannels
* @see AWS API
* Documentation
*/
@Override
public GetChannelsResponse getChannels(GetChannelsRequest getChannelsRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetChannelsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getChannelsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getChannelsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetChannels");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetChannels").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getChannelsRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetChannelsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status and settings of the email channel for an application.
*
*
* @param getEmailChannelRequest
* @return Result of the GetEmailChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetEmailChannel
* @see AWS API
* Documentation
*/
@Override
public GetEmailChannelResponse getEmailChannel(GetEmailChannelRequest getEmailChannelRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetEmailChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getEmailChannelRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getEmailChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetEmailChannel");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetEmailChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getEmailChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetEmailChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves the content and settings of a message template for messages that are sent through the email channel.
*
*
* @param getEmailTemplateRequest
* @return Result of the GetEmailTemplate operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetEmailTemplate
* @see AWS API
* Documentation
*/
@Override
public GetEmailTemplateResponse getEmailTemplate(GetEmailTemplateRequest getEmailTemplateRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetEmailTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getEmailTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getEmailTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetEmailTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetEmailTemplate").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getEmailTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetEmailTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the settings and attributes of a specific endpoint for an application.
*
*
* @param getEndpointRequest
* @return Result of the GetEndpoint operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetEndpoint
* @see AWS API
* Documentation
*/
@Override
public GetEndpointResponse getEndpoint(GetEndpointRequest getEndpointRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetEndpointResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getEndpointRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getEndpointRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetEndpoint");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetEndpoint").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getEndpointRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetEndpointRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the event stream settings for an application.
*
*
* @param getEventStreamRequest
* @return Result of the GetEventStream operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetEventStream
* @see AWS API
* Documentation
*/
@Override
public GetEventStreamResponse getEventStream(GetEventStreamRequest getEventStreamRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetEventStreamResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getEventStreamRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getEventStreamRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetEventStream");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetEventStream").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getEventStreamRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetEventStreamRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status and settings of a specific export job for an application.
*
*
* @param getExportJobRequest
* @return Result of the GetExportJob operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetExportJob
* @see AWS API
* Documentation
*/
@Override
public GetExportJobResponse getExportJob(GetExportJobRequest getExportJobRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetExportJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getExportJobRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getExportJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetExportJob");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetExportJob").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getExportJobRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetExportJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status and settings of all the export jobs for an application.
*
*
* @param getExportJobsRequest
* @return Result of the GetExportJobs operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetExportJobs
* @see AWS API
* Documentation
*/
@Override
public GetExportJobsResponse getExportJobs(GetExportJobsRequest getExportJobsRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetExportJobsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getExportJobsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getExportJobsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetExportJobs");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetExportJobs").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getExportJobsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetExportJobsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status and settings of the GCM channel for an application.
*
*
* @param getGcmChannelRequest
* @return Result of the GetGcmChannel operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetGcmChannel
* @see AWS API
* Documentation
*/
@Override
public GetGcmChannelResponse getGcmChannel(GetGcmChannelRequest getGcmChannelRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetGcmChannelResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getGcmChannelRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getGcmChannelRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetGcmChannel");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetGcmChannel").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getGcmChannelRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetGcmChannelRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status and settings of a specific import job for an application.
*
*
* @param getImportJobRequest
* @return Result of the GetImportJob operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetImportJob
* @see AWS API
* Documentation
*/
@Override
public GetImportJobResponse getImportJob(GetImportJobRequest getImportJobRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetImportJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getImportJobRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getImportJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetImportJob");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetImportJob").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getImportJobRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetImportJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about the status and settings of all the import jobs for an application.
*
*
* @param getImportJobsRequest
* @return Result of the GetImportJobs operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetImportJobs
* @see AWS API
* Documentation
*/
@Override
public GetImportJobsResponse getImportJobs(GetImportJobsRequest getImportJobsRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetImportJobsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getImportJobsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getImportJobsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetImportJobs");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetImportJobs").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getImportJobsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetImportJobsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves the in-app messages targeted for the provided endpoint ID.
*
*
* @param getInAppMessagesRequest
* @return Result of the GetInAppMessages operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetInAppMessages
* @see AWS API
* Documentation
*/
@Override
public GetInAppMessagesResponse getInAppMessages(GetInAppMessagesRequest getInAppMessagesRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetInAppMessagesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getInAppMessagesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getInAppMessagesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Pinpoint");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetInAppMessages");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetInAppMessages").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getInAppMessagesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetInAppMessagesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves the content and settings of a message template for messages sent through the in-app channel.
*
*
* @param getInAppTemplateRequest
* @return Result of the GetInAppTemplate operation returned by the service.
* @throws BadRequestException
* The request contains a syntax error (BadRequestException).
* @throws InternalServerErrorException
* The request failed due to an unknown internal server error, exception, or failure
* (InternalServerErrorException).
* @throws PayloadTooLargeException
* The request failed because the payload for the body of the request is too large
* (RequestEntityTooLargeException).
* @throws ForbiddenException
* The request was denied because access to the specified resource is forbidden (ForbiddenException).
* @throws NotFoundException
* The request failed because the specified resource was not found (NotFoundException).
* @throws MethodNotAllowedException
* The request failed because the method is not allowed for the specified resource
* (MethodNotAllowedException).
* @throws TooManyRequestsException
* The request failed because too many requests were sent during a certain amount of time
* (TooManyRequestsException).
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws PinpointException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PinpointClient.GetInAppTemplate
* @see AWS API
* Documentation
*/
@Override
public GetInAppTemplateResponse getInAppTemplate(GetInAppTemplateRequest getInAppTemplateRequest) throws BadRequestException,
InternalServerErrorException, PayloadTooLargeException, ForbiddenException, NotFoundException,
MethodNotAllowedException, TooManyRequestsException, AwsServiceException, SdkClientException, PinpointException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetInAppTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getInAppTemplateRequest,
this.clientConfiguration);
List