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

com.amazonaws.services.pinpoint.AmazonPinpointClient Maven / Gradle / Ivy

Go to download

The AWS Android SDK for Amazon Pinpoint module holds the client classes that are used for communicating with Amazon Pinpoint Service

There is a newer version: 2.77.0
Show newest version
/*
 * Copyright 2010-2018 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 com.amazonaws.services.pinpoint;

import java.util.*;

import com.amazonaws.*;
import com.amazonaws.auth.*;
import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.metrics.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.util.AWSRequestMetrics.Field;

import com.amazonaws.services.pinpoint.model.*;
import com.amazonaws.services.pinpoint.model.transform.*;

/**
 * Client for accessing AmazonPinpoint. All service calls made using this client
 * are blocking, and will not return until the service call completes.
 * 

*/ public class AmazonPinpointClient extends AmazonWebServiceClient implements AmazonPinpoint { /** Provider for AWS credentials. */ private AWSCredentialsProvider awsCredentialsProvider; /** * List of exception unmarshallers for all AmazonPinpoint exceptions. */ protected List jsonErrorUnmarshallers; /** * Constructs a new client to invoke service methods on AmazonPinpoint. A * credentials provider chain will be used that searches for credentials in * this order: *

    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Instance profile credentials delivered through the Amazon EC2 * metadata service
  • *
*

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @see DefaultAWSCredentialsProviderChain */ @Deprecated public AmazonPinpointClient() { this(new DefaultAWSCredentialsProviderChain(), new ClientConfiguration()); } /** * Constructs a new client to invoke service methods on AmazonPinpoint. A * credentials provider chain will be used that searches for credentials in * this order: *

    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Instance profile credentials delivered through the Amazon EC2 * metadata service
  • *
*

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @param clientConfiguration The client configuration options controlling * how this client connects to AmazonPinpoint (ex: proxy * settings, retry counts, etc.). * @see DefaultAWSCredentialsProviderChain */ @Deprecated public AmazonPinpointClient(ClientConfiguration clientConfiguration) { this(new DefaultAWSCredentialsProviderChain(), clientConfiguration); } /** * Constructs a new client to invoke service methods on AmazonPinpoint using * the specified AWS account credentials. *

* If AWS session credentials are passed in, then those credentials will be * used to authenticate requests. Otherwise, if AWS long-term credentials * are passed in, then session management will be handled automatically by * the SDK. Callers are encouraged to use long-term credentials and let the * SDK handle starting and renewing sessions. *

* Automatically managed sessions will be shared among all clients that use * the same credentials and service endpoint. To opt out of this behavior, * explicitly provide an instance of {@link AWSCredentialsProvider} that * returns {@link AWSSessionCredentials}. *

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @param awsCredentials The AWS credentials (access key ID and secret key) * to use when authenticating with AWS services. */ public AmazonPinpointClient(AWSCredentials awsCredentials) { this(awsCredentials, new ClientConfiguration()); } /** * Constructs a new client to invoke service methods on AmazonPinpoint using * the specified AWS account credentials and client configuration options. *

* If AWS session credentials are passed in, then those credentials will be * used to authenticate requests. Otherwise, if AWS long-term credentials * are passed in, then session management will be handled automatically by * the SDK. Callers are encouraged to use long-term credentials and let the * SDK handle starting and renewing sessions. *

* Automatically managed sessions will be shared among all clients that use * the same credentials and service endpoint. To opt out of this behavior, * explicitly provide an instance of {@link AWSCredentialsProvider} that * returns {@link AWSSessionCredentials}. *

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @param awsCredentials The AWS credentials (access key ID and secret key) * to use when authenticating with AWS services. * @param clientConfiguration The client configuration options controlling * how this client connects to AmazonPinpoint (ex: proxy * settings, retry counts, etc.). */ public AmazonPinpointClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) { this(new StaticCredentialsProvider(awsCredentials), clientConfiguration); } /** * Constructs a new client to invoke service methods on AmazonPinpoint using * the specified AWS account credentials provider. *

* If AWS session credentials are passed in, then those credentials will be * used to authenticate requests. Otherwise, if AWS long-term credentials * are passed in, then session management will be handled automatically by * the SDK. Callers are encouraged to use long-term credentials and let the * SDK handle starting and renewing sessions. *

* Automatically managed sessions will be shared among all clients that use * the same credentials and service endpoint. To opt out of this behavior, * explicitly provide an instance of {@link AWSCredentialsProvider} that * returns {@link AWSSessionCredentials}. *

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @param awsCredentialsProvider The AWS credentials provider which will * provide credentials to authenticate requests with AWS * services. */ public AmazonPinpointClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, new ClientConfiguration()); } /** * Constructs a new client to invoke service methods on AmazonPinpoint using * the specified AWS account credentials provider and client configuration * options. *

* If AWS session credentials are passed in, then those credentials will be * used to authenticate requests. Otherwise, if AWS long-term credentials * are passed in, then session management will be handled automatically by * the SDK. Callers are encouraged to use long-term credentials and let the * SDK handle starting and renewing sessions. *

* Automatically managed sessions will be shared among all clients that use * the same credentials and service endpoint. To opt out of this behavior, * explicitly provide an instance of {@link AWSCredentialsProvider} that * returns {@link AWSSessionCredentials}. *

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @param awsCredentialsProvider The AWS credentials provider which will * provide credentials to authenticate requests with AWS * services. * @param clientConfiguration The client configuration options controlling * how this client connects to AmazonPinpoint (ex: proxy * settings, retry counts, etc.). */ public AmazonPinpointClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, new UrlHttpClient(clientConfiguration)); } /** * Constructs a new client to invoke service methods on AmazonPinpoint using * the specified AWS account credentials provider, client configuration * options and request metric collector. *

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @param awsCredentialsProvider The AWS credentials provider which will * provide credentials to authenticate requests with AWS * services. * @param clientConfiguration The client configuration options controlling * how this client connects to AmazonPinpoint (ex: proxy * settings, retry counts, etc.). * @param requestMetricCollector optional request metric collector */ @Deprecated public AmazonPinpointClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector) { super(adjustClientConfiguration(clientConfiguration), requestMetricCollector); this.awsCredentialsProvider = awsCredentialsProvider; init(); } /** * Constructs a new client to invoke service methods on AmazonPinpoint using * the specified AWS account credentials provider, client configuration * options and request metric collector. *

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @param awsCredentialsProvider The AWS credentials provider which will * provide credentials to authenticate requests with AWS * services. * @param clientConfiguration The client configuration options controlling * how this client connects to AmazonPinpoint (ex: proxy * settings, retry counts, etc.). * @param httpClient A http client */ public AmazonPinpointClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, HttpClient httpClient) { super(adjustClientConfiguration(clientConfiguration), httpClient); this.awsCredentialsProvider = awsCredentialsProvider; init(); } private void init() { jsonErrorUnmarshallers = new ArrayList(); jsonErrorUnmarshallers.add(new BadRequestExceptionUnmarshaller()); jsonErrorUnmarshallers.add(new ForbiddenExceptionUnmarshaller()); jsonErrorUnmarshallers.add(new InternalServerErrorExceptionUnmarshaller()); jsonErrorUnmarshallers.add(new MethodNotAllowedExceptionUnmarshaller()); jsonErrorUnmarshallers.add(new NotFoundExceptionUnmarshaller()); jsonErrorUnmarshallers.add(new TooManyRequestsExceptionUnmarshaller()); jsonErrorUnmarshallers.add(new JsonErrorUnmarshaller()); // calling this.setEndPoint(...) will also modify the signer accordingly this.setEndpoint("pinpoint.us-east-1.amazonaws.com"); this.endpointPrefix = "pinpoint"; HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain( "/com/amazonaws/services/pinpoint/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain( "/com/amazonaws/services/pinpoint/request.handler2s")); } private static ClientConfiguration adjustClientConfiguration(ClientConfiguration orig) { ClientConfiguration config = orig; return config; } /** * Creates or updates an app. * * @param createAppRequest * @return createAppResult The response from the CreateApp service method, * as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public CreateAppResult createApp(CreateAppRequest createAppRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(createAppRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateAppRequestMarshaller().marshall(createAppRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new CreateAppResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Creates or updates a campaign. * * @param createCampaignRequest * @return createCampaignResult The response from the CreateCampaign service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public CreateCampaignResult createCampaign(CreateCampaignRequest createCampaignRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(createCampaignRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateCampaignRequestMarshaller().marshall(createCampaignRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new CreateCampaignResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Creates an export job. * * @param createExportJobRequest * @return createExportJobResult The response from the CreateExportJob * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public CreateExportJobResult createExportJob(CreateExportJobRequest createExportJobRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(createExportJobRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateExportJobRequestMarshaller().marshall(createExportJobRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new CreateExportJobResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Creates or updates an import job. * * @param createImportJobRequest * @return createImportJobResult The response from the CreateImportJob * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public CreateImportJobResult createImportJob(CreateImportJobRequest createImportJobRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(createImportJobRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateImportJobRequestMarshaller().marshall(createImportJobRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new CreateImportJobResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Used to create or update a segment. * * @param createSegmentRequest * @return createSegmentResult The response from the CreateSegment service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public CreateSegmentResult createSegment(CreateSegmentRequest createSegmentRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(createSegmentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateSegmentRequestMarshaller().marshall(createSegmentRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new CreateSegmentResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Delete an ADM channel * * @param deleteAdmChannelRequest * @return deleteAdmChannelResult The response from the DeleteAdmChannel * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public DeleteAdmChannelResult deleteAdmChannel(DeleteAdmChannelRequest deleteAdmChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(deleteAdmChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteAdmChannelRequestMarshaller().marshall(deleteAdmChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new DeleteAdmChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Deletes the APNs channel for an app. * * @param deleteApnsChannelRequest * @return deleteApnsChannelResult The response from the DeleteApnsChannel * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public DeleteApnsChannelResult deleteApnsChannel( DeleteApnsChannelRequest deleteApnsChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(deleteApnsChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteApnsChannelRequestMarshaller() .marshall(deleteApnsChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new DeleteApnsChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Delete an APNS sandbox channel * * @param deleteApnsSandboxChannelRequest * @return deleteApnsSandboxChannelResult The response from the * DeleteApnsSandboxChannel service method, as returned by * AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public DeleteApnsSandboxChannelResult deleteApnsSandboxChannel( DeleteApnsSandboxChannelRequest deleteApnsSandboxChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(deleteApnsSandboxChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteApnsSandboxChannelRequestMarshaller() .marshall(deleteApnsSandboxChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new DeleteApnsSandboxChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Delete an APNS VoIP channel * * @param deleteApnsVoipChannelRequest * @return deleteApnsVoipChannelResult The response from the * DeleteApnsVoipChannel service method, as returned by * AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public DeleteApnsVoipChannelResult deleteApnsVoipChannel( DeleteApnsVoipChannelRequest deleteApnsVoipChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(deleteApnsVoipChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteApnsVoipChannelRequestMarshaller() .marshall(deleteApnsVoipChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new DeleteApnsVoipChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Delete an APNS VoIP sandbox channel * * @param deleteApnsVoipSandboxChannelRequest * @return deleteApnsVoipSandboxChannelResult The response from the * DeleteApnsVoipSandboxChannel service method, as returned by * AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public DeleteApnsVoipSandboxChannelResult deleteApnsVoipSandboxChannel( DeleteApnsVoipSandboxChannelRequest deleteApnsVoipSandboxChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(deleteApnsVoipSandboxChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteApnsVoipSandboxChannelRequestMarshaller() .marshall(deleteApnsVoipSandboxChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new DeleteApnsVoipSandboxChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Deletes an app. * * @param deleteAppRequest * @return deleteAppResult The response from the DeleteApp service method, * as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public DeleteAppResult deleteApp(DeleteAppRequest deleteAppRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(deleteAppRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteAppRequestMarshaller().marshall(deleteAppRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new DeleteAppResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Delete a BAIDU GCM channel * * @param deleteBaiduChannelRequest * @return deleteBaiduChannelResult The response from the DeleteBaiduChannel * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public DeleteBaiduChannelResult deleteBaiduChannel( DeleteBaiduChannelRequest deleteBaiduChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(deleteBaiduChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteBaiduChannelRequestMarshaller() .marshall(deleteBaiduChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new DeleteBaiduChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Deletes a campaign. * * @param deleteCampaignRequest * @return deleteCampaignResult The response from the DeleteCampaign service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public DeleteCampaignResult deleteCampaign(DeleteCampaignRequest deleteCampaignRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(deleteCampaignRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteCampaignRequestMarshaller().marshall(deleteCampaignRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new DeleteCampaignResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Delete an email channel * * @param deleteEmailChannelRequest * @return deleteEmailChannelResult The response from the DeleteEmailChannel * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public DeleteEmailChannelResult deleteEmailChannel( DeleteEmailChannelRequest deleteEmailChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(deleteEmailChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteEmailChannelRequestMarshaller() .marshall(deleteEmailChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new DeleteEmailChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Deletes an endpoint. * * @param deleteEndpointRequest * @return deleteEndpointResult The response from the DeleteEndpoint service * method, as returned by AmazonPinpoint. * @throws BadRequestException 400 response * @throws InternalServerErrorException 500 response * @throws ForbiddenException 403 response * @throws NotFoundException 404 response * @throws MethodNotAllowedException 405 response * @throws TooManyRequestsException 429 response * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public DeleteEndpointResult deleteEndpoint(DeleteEndpointRequest deleteEndpointRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(deleteEndpointRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteEndpointRequestMarshaller().marshall(deleteEndpointRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new DeleteEndpointResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Deletes the event stream for an app. * * @param deleteEventStreamRequest DeleteEventStream Request * @return deleteEventStreamResult The response from the DeleteEventStream * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public DeleteEventStreamResult deleteEventStream( DeleteEventStreamRequest deleteEventStreamRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(deleteEventStreamRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteEventStreamRequestMarshaller() .marshall(deleteEventStreamRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new DeleteEventStreamResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Deletes the GCM channel for an app. * * @param deleteGcmChannelRequest * @return deleteGcmChannelResult The response from the DeleteGcmChannel * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public DeleteGcmChannelResult deleteGcmChannel(DeleteGcmChannelRequest deleteGcmChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(deleteGcmChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteGcmChannelRequestMarshaller().marshall(deleteGcmChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new DeleteGcmChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Deletes a segment. * * @param deleteSegmentRequest * @return deleteSegmentResult The response from the DeleteSegment service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public DeleteSegmentResult deleteSegment(DeleteSegmentRequest deleteSegmentRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(deleteSegmentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteSegmentRequestMarshaller().marshall(deleteSegmentRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new DeleteSegmentResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Delete an SMS channel * * @param deleteSmsChannelRequest * @return deleteSmsChannelResult The response from the DeleteSmsChannel * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public DeleteSmsChannelResult deleteSmsChannel(DeleteSmsChannelRequest deleteSmsChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(deleteSmsChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteSmsChannelRequestMarshaller().marshall(deleteSmsChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new DeleteSmsChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Get an ADM channel * * @param getAdmChannelRequest * @return getAdmChannelResult The response from the GetAdmChannel service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetAdmChannelResult getAdmChannel(GetAdmChannelRequest getAdmChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getAdmChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetAdmChannelRequestMarshaller().marshall(getAdmChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetAdmChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about the APNs channel for an app. * * @param getApnsChannelRequest * @return getApnsChannelResult The response from the GetApnsChannel service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetApnsChannelResult getApnsChannel(GetApnsChannelRequest getApnsChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getApnsChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetApnsChannelRequestMarshaller().marshall(getApnsChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetApnsChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Get an APNS sandbox channel * * @param getApnsSandboxChannelRequest * @return getApnsSandboxChannelResult The response from the * GetApnsSandboxChannel service method, as returned by * AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetApnsSandboxChannelResult getApnsSandboxChannel( GetApnsSandboxChannelRequest getApnsSandboxChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getApnsSandboxChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetApnsSandboxChannelRequestMarshaller() .marshall(getApnsSandboxChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetApnsSandboxChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Get an APNS VoIP channel * * @param getApnsVoipChannelRequest * @return getApnsVoipChannelResult The response from the GetApnsVoipChannel * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetApnsVoipChannelResult getApnsVoipChannel( GetApnsVoipChannelRequest getApnsVoipChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getApnsVoipChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetApnsVoipChannelRequestMarshaller() .marshall(getApnsVoipChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetApnsVoipChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Get an APNS VoIPSandbox channel * * @param getApnsVoipSandboxChannelRequest * @return getApnsVoipSandboxChannelResult The response from the * GetApnsVoipSandboxChannel service method, as returned by * AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetApnsVoipSandboxChannelResult getApnsVoipSandboxChannel( GetApnsVoipSandboxChannelRequest getApnsVoipSandboxChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getApnsVoipSandboxChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetApnsVoipSandboxChannelRequestMarshaller() .marshall(getApnsVoipSandboxChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetApnsVoipSandboxChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about an app. * * @param getAppRequest * @return getAppResult The response from the GetApp service method, as * returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetAppResult getApp(GetAppRequest getAppRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getAppRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetAppRequestMarshaller().marshall(getAppRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetAppResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Used to request the settings for an app. * * @param getApplicationSettingsRequest * @return getApplicationSettingsResult The response from the * GetApplicationSettings service method, as returned by * AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetApplicationSettingsResult getApplicationSettings( GetApplicationSettingsRequest getApplicationSettingsRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getApplicationSettingsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetApplicationSettingsRequestMarshaller() .marshall(getApplicationSettingsRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetApplicationSettingsResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about your apps. * * @param getAppsRequest * @return getAppsResult The response from the GetApps service method, as * returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetAppsResult getApps(GetAppsRequest getAppsRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getAppsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetAppsRequestMarshaller().marshall(getAppsRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetAppsResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Get a BAIDU GCM channel * * @param getBaiduChannelRequest * @return getBaiduChannelResult The response from the GetBaiduChannel * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetBaiduChannelResult getBaiduChannel(GetBaiduChannelRequest getBaiduChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getBaiduChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetBaiduChannelRequestMarshaller().marshall(getBaiduChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetBaiduChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about a campaign. * * @param getCampaignRequest * @return getCampaignResult The response from the GetCampaign service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetCampaignResult getCampaign(GetCampaignRequest getCampaignRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getCampaignRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetCampaignRequestMarshaller().marshall(getCampaignRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetCampaignResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about the activity performed by a campaign. * * @param getCampaignActivitiesRequest * @return getCampaignActivitiesResult The response from the * GetCampaignActivities service method, as returned by * AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetCampaignActivitiesResult getCampaignActivities( GetCampaignActivitiesRequest getCampaignActivitiesRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getCampaignActivitiesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetCampaignActivitiesRequestMarshaller() .marshall(getCampaignActivitiesRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetCampaignActivitiesResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about a specific version of a campaign. * * @param getCampaignVersionRequest * @return getCampaignVersionResult The response from the GetCampaignVersion * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetCampaignVersionResult getCampaignVersion( GetCampaignVersionRequest getCampaignVersionRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getCampaignVersionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetCampaignVersionRequestMarshaller() .marshall(getCampaignVersionRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetCampaignVersionResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about your campaign versions. * * @param getCampaignVersionsRequest * @return getCampaignVersionsResult The response from the * GetCampaignVersions service method, as returned by * AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetCampaignVersionsResult getCampaignVersions( GetCampaignVersionsRequest getCampaignVersionsRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getCampaignVersionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetCampaignVersionsRequestMarshaller() .marshall(getCampaignVersionsRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetCampaignVersionsResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about your campaigns. * * @param getCampaignsRequest * @return getCampaignsResult The response from the GetCampaigns service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetCampaignsResult getCampaigns(GetCampaignsRequest getCampaignsRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getCampaignsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetCampaignsRequestMarshaller().marshall(getCampaignsRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetCampaignsResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Get an email channel * * @param getEmailChannelRequest * @return getEmailChannelResult The response from the GetEmailChannel * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetEmailChannelResult getEmailChannel(GetEmailChannelRequest getEmailChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getEmailChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetEmailChannelRequestMarshaller().marshall(getEmailChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetEmailChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about an endpoint. * * @param getEndpointRequest * @return getEndpointResult The response from the GetEndpoint service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetEndpointResult getEndpoint(GetEndpointRequest getEndpointRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getEndpointRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetEndpointRequestMarshaller().marshall(getEndpointRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetEndpointResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns the event stream for an app. * * @param getEventStreamRequest GetEventStreamRequest * @return getEventStreamResult The response from the GetEventStream service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetEventStreamResult getEventStream(GetEventStreamRequest getEventStreamRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getEventStreamRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetEventStreamRequestMarshaller().marshall(getEventStreamRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetEventStreamResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about an export job. * * @param getExportJobRequest * @return getExportJobResult The response from the GetExportJob service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetExportJobResult getExportJob(GetExportJobRequest getExportJobRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getExportJobRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetExportJobRequestMarshaller().marshall(getExportJobRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetExportJobResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about your export jobs. * * @param getExportJobsRequest * @return getExportJobsResult The response from the GetExportJobs service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetExportJobsResult getExportJobs(GetExportJobsRequest getExportJobsRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getExportJobsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetExportJobsRequestMarshaller().marshall(getExportJobsRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetExportJobsResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about the GCM channel for an app. * * @param getGcmChannelRequest * @return getGcmChannelResult The response from the GetGcmChannel service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetGcmChannelResult getGcmChannel(GetGcmChannelRequest getGcmChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getGcmChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetGcmChannelRequestMarshaller().marshall(getGcmChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetGcmChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about an import job. * * @param getImportJobRequest * @return getImportJobResult The response from the GetImportJob service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetImportJobResult getImportJob(GetImportJobRequest getImportJobRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getImportJobRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetImportJobRequestMarshaller().marshall(getImportJobRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetImportJobResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about your import jobs. * * @param getImportJobsRequest * @return getImportJobsResult The response from the GetImportJobs service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetImportJobsResult getImportJobs(GetImportJobsRequest getImportJobsRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getImportJobsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetImportJobsRequestMarshaller().marshall(getImportJobsRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetImportJobsResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about a segment. * * @param getSegmentRequest * @return getSegmentResult The response from the GetSegment service method, * as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetSegmentResult getSegment(GetSegmentRequest getSegmentRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getSegmentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetSegmentRequestMarshaller().marshall(getSegmentRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetSegmentResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns a list of export jobs for a specific segment. * * @param getSegmentExportJobsRequest * @return getSegmentExportJobsResult The response from the * GetSegmentExportJobs service method, as returned by * AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetSegmentExportJobsResult getSegmentExportJobs( GetSegmentExportJobsRequest getSegmentExportJobsRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getSegmentExportJobsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetSegmentExportJobsRequestMarshaller() .marshall(getSegmentExportJobsRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetSegmentExportJobsResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns a list of import jobs for a specific segment. * * @param getSegmentImportJobsRequest * @return getSegmentImportJobsResult The response from the * GetSegmentImportJobs service method, as returned by * AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetSegmentImportJobsResult getSegmentImportJobs( GetSegmentImportJobsRequest getSegmentImportJobsRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getSegmentImportJobsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetSegmentImportJobsRequestMarshaller() .marshall(getSegmentImportJobsRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetSegmentImportJobsResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about a segment version. * * @param getSegmentVersionRequest * @return getSegmentVersionResult The response from the GetSegmentVersion * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetSegmentVersionResult getSegmentVersion( GetSegmentVersionRequest getSegmentVersionRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getSegmentVersionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetSegmentVersionRequestMarshaller() .marshall(getSegmentVersionRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetSegmentVersionResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns information about your segment versions. * * @param getSegmentVersionsRequest * @return getSegmentVersionsResult The response from the GetSegmentVersions * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetSegmentVersionsResult getSegmentVersions( GetSegmentVersionsRequest getSegmentVersionsRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getSegmentVersionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetSegmentVersionsRequestMarshaller() .marshall(getSegmentVersionsRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetSegmentVersionsResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Used to get information about your segments. * * @param getSegmentsRequest * @return getSegmentsResult The response from the GetSegments service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetSegmentsResult getSegments(GetSegmentsRequest getSegmentsRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getSegmentsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetSegmentsRequestMarshaller().marshall(getSegmentsRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetSegmentsResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Get an SMS channel * * @param getSmsChannelRequest * @return getSmsChannelResult The response from the GetSmsChannel service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public GetSmsChannelResult getSmsChannel(GetSmsChannelRequest getSmsChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(getSmsChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetSmsChannelRequestMarshaller().marshall(getSmsChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new GetSmsChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Use to create or update the event stream for an app. * * @param putEventStreamRequest * @return putEventStreamResult The response from the PutEventStream service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public PutEventStreamResult putEventStream(PutEventStreamRequest putEventStreamRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(putEventStreamRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutEventStreamRequestMarshaller().marshall(putEventStreamRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new PutEventStreamResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Send a batch of messages * * @param sendMessagesRequest * @return sendMessagesResult The response from the SendMessages service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public SendMessagesResult sendMessages(SendMessagesRequest sendMessagesRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(sendMessagesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new SendMessagesRequestMarshaller().marshall(sendMessagesRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new SendMessagesResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Send a batch of messages to users * * @param sendUsersMessagesRequest * @return sendUsersMessagesResult The response from the SendUsersMessages * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public SendUsersMessagesResult sendUsersMessages( SendUsersMessagesRequest sendUsersMessagesRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(sendUsersMessagesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new SendUsersMessagesRequestMarshaller() .marshall(sendUsersMessagesRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new SendUsersMessagesResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Update an ADM channel * * @param updateAdmChannelRequest * @return updateAdmChannelResult The response from the UpdateAdmChannel * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public UpdateAdmChannelResult updateAdmChannel(UpdateAdmChannelRequest updateAdmChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(updateAdmChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateAdmChannelRequestMarshaller().marshall(updateAdmChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new UpdateAdmChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Use to update the APNs channel for an app. * * @param updateApnsChannelRequest * @return updateApnsChannelResult The response from the UpdateApnsChannel * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public UpdateApnsChannelResult updateApnsChannel( UpdateApnsChannelRequest updateApnsChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(updateApnsChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateApnsChannelRequestMarshaller() .marshall(updateApnsChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new UpdateApnsChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Update an APNS sandbox channel * * @param updateApnsSandboxChannelRequest * @return updateApnsSandboxChannelResult The response from the * UpdateApnsSandboxChannel service method, as returned by * AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public UpdateApnsSandboxChannelResult updateApnsSandboxChannel( UpdateApnsSandboxChannelRequest updateApnsSandboxChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(updateApnsSandboxChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateApnsSandboxChannelRequestMarshaller() .marshall(updateApnsSandboxChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new UpdateApnsSandboxChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Update an APNS VoIP channel * * @param updateApnsVoipChannelRequest * @return updateApnsVoipChannelResult The response from the * UpdateApnsVoipChannel service method, as returned by * AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public UpdateApnsVoipChannelResult updateApnsVoipChannel( UpdateApnsVoipChannelRequest updateApnsVoipChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(updateApnsVoipChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateApnsVoipChannelRequestMarshaller() .marshall(updateApnsVoipChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new UpdateApnsVoipChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Update an APNS VoIP sandbox channel * * @param updateApnsVoipSandboxChannelRequest * @return updateApnsVoipSandboxChannelResult The response from the * UpdateApnsVoipSandboxChannel service method, as returned by * AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public UpdateApnsVoipSandboxChannelResult updateApnsVoipSandboxChannel( UpdateApnsVoipSandboxChannelRequest updateApnsVoipSandboxChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(updateApnsVoipSandboxChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateApnsVoipSandboxChannelRequestMarshaller() .marshall(updateApnsVoipSandboxChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new UpdateApnsVoipSandboxChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Used to update the settings for an app. * * @param updateApplicationSettingsRequest * @return updateApplicationSettingsResult The response from the * UpdateApplicationSettings service method, as returned by * AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public UpdateApplicationSettingsResult updateApplicationSettings( UpdateApplicationSettingsRequest updateApplicationSettingsRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(updateApplicationSettingsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateApplicationSettingsRequestMarshaller() .marshall(updateApplicationSettingsRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new UpdateApplicationSettingsResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Update a BAIDU GCM channel * * @param updateBaiduChannelRequest * @return updateBaiduChannelResult The response from the UpdateBaiduChannel * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public UpdateBaiduChannelResult updateBaiduChannel( UpdateBaiduChannelRequest updateBaiduChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(updateBaiduChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateBaiduChannelRequestMarshaller() .marshall(updateBaiduChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new UpdateBaiduChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Use to update a campaign. * * @param updateCampaignRequest * @return updateCampaignResult The response from the UpdateCampaign service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public UpdateCampaignResult updateCampaign(UpdateCampaignRequest updateCampaignRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(updateCampaignRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateCampaignRequestMarshaller().marshall(updateCampaignRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new UpdateCampaignResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Update an email channel * * @param updateEmailChannelRequest * @return updateEmailChannelResult The response from the UpdateEmailChannel * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public UpdateEmailChannelResult updateEmailChannel( UpdateEmailChannelRequest updateEmailChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(updateEmailChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateEmailChannelRequestMarshaller() .marshall(updateEmailChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new UpdateEmailChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Use to update an endpoint. * * @param updateEndpointRequest * @return updateEndpointResult The response from the UpdateEndpoint service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public UpdateEndpointResult updateEndpoint(UpdateEndpointRequest updateEndpointRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(updateEndpointRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateEndpointRequestMarshaller().marshall(updateEndpointRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new UpdateEndpointResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Use to update a batch of endpoints. * * @param updateEndpointsBatchRequest * @return updateEndpointsBatchResult The response from the * UpdateEndpointsBatch service method, as returned by * AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public UpdateEndpointsBatchResult updateEndpointsBatch( UpdateEndpointsBatchRequest updateEndpointsBatchRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(updateEndpointsBatchRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateEndpointsBatchRequestMarshaller() .marshall(updateEndpointsBatchRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new UpdateEndpointsBatchResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Use to update the GCM channel for an app. * * @param updateGcmChannelRequest * @return updateGcmChannelResult The response from the UpdateGcmChannel * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public UpdateGcmChannelResult updateGcmChannel(UpdateGcmChannelRequest updateGcmChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(updateGcmChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateGcmChannelRequestMarshaller().marshall(updateGcmChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new UpdateGcmChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Use to update a segment. * * @param updateSegmentRequest * @return updateSegmentResult The response from the UpdateSegment service * method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public UpdateSegmentResult updateSegment(UpdateSegmentRequest updateSegmentRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(updateSegmentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateSegmentRequestMarshaller().marshall(updateSegmentRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new UpdateSegmentResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Update an SMS channel * * @param updateSmsChannelRequest * @return updateSmsChannelResult The response from the UpdateSmsChannel * service method, as returned by AmazonPinpoint. * @throws BadRequestException * @throws InternalServerErrorException * @throws ForbiddenException * @throws NotFoundException * @throws MethodNotAllowedException * @throws TooManyRequestsException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by * AmazonPinpoint indicating either a problem with the data in * the request, or a server side issue. */ public UpdateSmsChannelResult updateSmsChannel(UpdateSmsChannelRequest updateSmsChannelRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(updateSmsChannelRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateSmsChannelRequestMarshaller().marshall(updateSmsChannelRequest); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } Unmarshaller unmarshaller = new UpdateSmsChannelResultJsonUnmarshaller(); JsonResponseHandler responseHandler = new JsonResponseHandler( unmarshaller); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { awsRequestMetrics.endEvent(Field.ClientExecuteTime); endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); } } /** * Returns additional metadata for a previously executed successful, * request, typically used for debugging issues where a service isn't acting * as expected. This data isn't considered part of the result data returned * by an operation, so it's available through this separate, diagnostic * interface. *

* Response metadata is only cached for a limited period of time, so if you * need to access this extra diagnostic information for an executed request, * you should use this method to retrieve it as soon as possible after * executing the request. * * @param request The originally executed request * @return The response metadata for the specified request, or null if none * is available. * @deprecated ResponseMetadata cache can hold up to 50 requests and * responses in memory and will cause memory issue. This method * now always returns null. */ @Deprecated public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { return client.getResponseMetadataForRequest(request); } private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { request.setEndpoint(endpoint); request.setTimeOffset(timeOffset); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); AWSCredentials credentials; awsRequestMetrics.startEvent(Field.CredentialsRequestTime); try { credentials = awsCredentialsProvider.getCredentials(); } finally { awsRequestMetrics.endEvent(Field.CredentialsRequestTime); } AmazonWebServiceRequest originalRequest = request.getOriginalRequest(); if (originalRequest != null && originalRequest.getRequestCredentials() != null) { credentials = originalRequest.getRequestCredentials(); } executionContext.setCredentials(credentials); JsonErrorResponseHandler errorResponseHandler = new JsonErrorResponseHandler( jsonErrorUnmarshallers); Response result = client.execute(request, responseHandler, errorResponseHandler, executionContext); return result; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy