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

com.amazonaws.services.connectcampaign.AmazonConnectCampaignClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AmazonConnectCampaign module holds the client classes that are used for communicating with AmazonConnectCampaign Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2019-2024 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.connectcampaign;

import org.w3c.dom.*;

import java.net.*;
import java.util.*;

import javax.annotation.Generated;

import org.apache.commons.logging.*;

import com.amazonaws.*;
import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.auth.*;

import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.internal.auth.*;
import com.amazonaws.metrics.*;
import com.amazonaws.regions.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.protocol.json.*;
import com.amazonaws.util.AWSRequestMetrics.Field;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.client.builder.AdvancedConfig;

import com.amazonaws.services.connectcampaign.AmazonConnectCampaignClientBuilder;

import com.amazonaws.AmazonServiceException;

import com.amazonaws.services.connectcampaign.model.*;

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

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

*

* Provide APIs to create and manage Amazon Connect Campaigns. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonConnectCampaignClient extends AmazonWebServiceClient implements AmazonConnectCampaign { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AmazonConnectCampaign.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "connect-campaigns"; /** Client configuration factory providing ClientConfigurations tailored to this client */ protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory(); private final AdvancedConfig advancedConfig; private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory( new JsonClientMetadata() .withProtocolVersion("1.1") .withSupportsCbor(false) .withSupportsIon(false) .withContentTypeOverride("application/json") .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller( com.amazonaws.services.connectcampaign.model.transform.AccessDeniedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller( com.amazonaws.services.connectcampaign.model.transform.ConflictExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.connectcampaign.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller( com.amazonaws.services.connectcampaign.model.transform.ThrottlingExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller( com.amazonaws.services.connectcampaign.model.transform.ValidationExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServiceQuotaExceededException").withExceptionUnmarshaller( com.amazonaws.services.connectcampaign.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidCampaignStateException").withExceptionUnmarshaller( com.amazonaws.services.connectcampaign.model.transform.InvalidCampaignStateExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller( com.amazonaws.services.connectcampaign.model.transform.InternalServerExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidStateException").withExceptionUnmarshaller( com.amazonaws.services.connectcampaign.model.transform.InvalidStateExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.connectcampaign.model.AmazonConnectCampaignException.class)); public static AmazonConnectCampaignClientBuilder builder() { return AmazonConnectCampaignClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on AmazonConnectCampaignService using the specified parameters. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AmazonConnectCampaignClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on AmazonConnectCampaignService using the specified parameters. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AmazonConnectCampaignClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) { super(clientParams); this.awsCredentialsProvider = clientParams.getCredentialsProvider(); this.advancedConfig = clientParams.getAdvancedConfig(); init(); } private void init() { setServiceNameIntern(DEFAULT_SIGNING_NAME); setEndpointPrefix(ENDPOINT_PREFIX); // calling this.setEndPoint(...) will also modify the signer accordingly setEndpoint("connect-campaigns.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/connectcampaign/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/connectcampaign/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *

* Creates a campaign for the specified Amazon Connect account. This API is idempotent. *

* * @param createCampaignRequest * The request for Create Campaign API. * @return Result of the CreateCampaign operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ConflictException * The request could not be processed because of conflict in the current state of the resource. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ServiceQuotaExceededException * Request would cause a service quota to be exceeded. * @throws ThrottlingException * The request was denied due to request throttling. * @sample AmazonConnectCampaign.CreateCampaign * @see AWS API Documentation */ @Override public CreateCampaignResult createCampaign(CreateCampaignRequest request) { request = beforeClientExecution(request); return executeCreateCampaign(request); } @SdkInternalApi final CreateCampaignResult executeCreateCampaign(CreateCampaignRequest createCampaignRequest) { 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 CreateCampaignRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createCampaignRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateCampaign"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateCampaignResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a campaign from the specified Amazon Connect account. *

* * @param deleteCampaignRequest * DeleteCampaignRequest * @return Result of the DeleteCampaign operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AmazonConnectCampaign.DeleteCampaign * @see AWS API Documentation */ @Override public DeleteCampaignResult deleteCampaign(DeleteCampaignRequest request) { request = beforeClientExecution(request); return executeDeleteCampaign(request); } @SdkInternalApi final DeleteCampaignResult executeDeleteCampaign(DeleteCampaignRequest deleteCampaignRequest) { 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 DeleteCampaignRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteCampaignRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteCampaign"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteCampaignResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a connect instance config from the specified AWS account. *

* * @param deleteConnectInstanceConfigRequest * DeleteCampaignRequest * @return Result of the DeleteConnectInstanceConfig operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws InvalidStateException * The request could not be processed because of conflict in the current state. * @throws ThrottlingException * The request was denied due to request throttling. * @sample AmazonConnectCampaign.DeleteConnectInstanceConfig * @see AWS API Documentation */ @Override public DeleteConnectInstanceConfigResult deleteConnectInstanceConfig(DeleteConnectInstanceConfigRequest request) { request = beforeClientExecution(request); return executeDeleteConnectInstanceConfig(request); } @SdkInternalApi final DeleteConnectInstanceConfigResult executeDeleteConnectInstanceConfig(DeleteConnectInstanceConfigRequest deleteConnectInstanceConfigRequest) { ExecutionContext executionContext = createExecutionContext(deleteConnectInstanceConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteConnectInstanceConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteConnectInstanceConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteConnectInstanceConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteConnectInstanceConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Delete the Connect Campaigns onboarding job for the specified Amazon Connect instance. *

* * @param deleteInstanceOnboardingJobRequest * The request for DeleteInstanceOnboardingJob API. * @return Result of the DeleteInstanceOnboardingJob operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws InvalidStateException * The request could not be processed because of conflict in the current state. * @sample AmazonConnectCampaign.DeleteInstanceOnboardingJob * @see AWS API Documentation */ @Override public DeleteInstanceOnboardingJobResult deleteInstanceOnboardingJob(DeleteInstanceOnboardingJobRequest request) { request = beforeClientExecution(request); return executeDeleteInstanceOnboardingJob(request); } @SdkInternalApi final DeleteInstanceOnboardingJobResult executeDeleteInstanceOnboardingJob(DeleteInstanceOnboardingJobRequest deleteInstanceOnboardingJobRequest) { ExecutionContext executionContext = createExecutionContext(deleteInstanceOnboardingJobRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteInstanceOnboardingJobRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteInstanceOnboardingJobRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteInstanceOnboardingJob"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteInstanceOnboardingJobResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes the specific campaign. *

* * @param describeCampaignRequest * DescribeCampaignRequests * @return Result of the DescribeCampaign operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AmazonConnectCampaign.DescribeCampaign * @see AWS API Documentation */ @Override public DescribeCampaignResult describeCampaign(DescribeCampaignRequest request) { request = beforeClientExecution(request); return executeDescribeCampaign(request); } @SdkInternalApi final DescribeCampaignResult executeDescribeCampaign(DescribeCampaignRequest describeCampaignRequest) { ExecutionContext executionContext = createExecutionContext(describeCampaignRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeCampaignRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeCampaignRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeCampaign"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeCampaignResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get state of a campaign for the specified Amazon Connect account. *

* * @param getCampaignStateRequest * GetCampaignStateRequest * @return Result of the GetCampaignState operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @sample AmazonConnectCampaign.GetCampaignState * @see AWS API Documentation */ @Override public GetCampaignStateResult getCampaignState(GetCampaignStateRequest request) { request = beforeClientExecution(request); return executeGetCampaignState(request); } @SdkInternalApi final GetCampaignStateResult executeGetCampaignState(GetCampaignStateRequest getCampaignStateRequest) { ExecutionContext executionContext = createExecutionContext(getCampaignStateRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetCampaignStateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getCampaignStateRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetCampaignState"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetCampaignStateResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get state of campaigns for the specified Amazon Connect account. *

* * @param getCampaignStateBatchRequest * GetCampaignStateBatchRequest * @return Result of the GetCampaignStateBatch operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @sample AmazonConnectCampaign.GetCampaignStateBatch * @see AWS API Documentation */ @Override public GetCampaignStateBatchResult getCampaignStateBatch(GetCampaignStateBatchRequest request) { request = beforeClientExecution(request); return executeGetCampaignStateBatch(request); } @SdkInternalApi final GetCampaignStateBatchResult executeGetCampaignStateBatch(GetCampaignStateBatchRequest getCampaignStateBatchRequest) { ExecutionContext executionContext = createExecutionContext(getCampaignStateBatchRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetCampaignStateBatchRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getCampaignStateBatchRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetCampaignStateBatch"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetCampaignStateBatchResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get the specific Connect instance config. *

* * @param getConnectInstanceConfigRequest * GetConnectInstanceConfigRequest * @return Result of the GetConnectInstanceConfig operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AmazonConnectCampaign.GetConnectInstanceConfig * @see AWS API Documentation */ @Override public GetConnectInstanceConfigResult getConnectInstanceConfig(GetConnectInstanceConfigRequest request) { request = beforeClientExecution(request); return executeGetConnectInstanceConfig(request); } @SdkInternalApi final GetConnectInstanceConfigResult executeGetConnectInstanceConfig(GetConnectInstanceConfigRequest getConnectInstanceConfigRequest) { ExecutionContext executionContext = createExecutionContext(getConnectInstanceConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetConnectInstanceConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getConnectInstanceConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetConnectInstanceConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetConnectInstanceConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get the specific instance onboarding job status. *

* * @param getInstanceOnboardingJobStatusRequest * GetInstanceOnboardingJobStatusRequest * @return Result of the GetInstanceOnboardingJobStatus operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AmazonConnectCampaign.GetInstanceOnboardingJobStatus * @see AWS API Documentation */ @Override public GetInstanceOnboardingJobStatusResult getInstanceOnboardingJobStatus(GetInstanceOnboardingJobStatusRequest request) { request = beforeClientExecution(request); return executeGetInstanceOnboardingJobStatus(request); } @SdkInternalApi final GetInstanceOnboardingJobStatusResult executeGetInstanceOnboardingJobStatus(GetInstanceOnboardingJobStatusRequest getInstanceOnboardingJobStatusRequest) { ExecutionContext executionContext = createExecutionContext(getInstanceOnboardingJobStatusRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetInstanceOnboardingJobStatusRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getInstanceOnboardingJobStatusRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetInstanceOnboardingJobStatus"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetInstanceOnboardingJobStatusResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Provides summary information about the campaigns under the specified Amazon Connect account. *

* * @param listCampaignsRequest * ListCampaignsRequest * @return Result of the ListCampaigns operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AmazonConnectCampaign.ListCampaigns * @see AWS * API Documentation */ @Override public ListCampaignsResult listCampaigns(ListCampaignsRequest request) { request = beforeClientExecution(request); return executeListCampaigns(request); } @SdkInternalApi final ListCampaignsResult executeListCampaigns(ListCampaignsRequest listCampaignsRequest) { ExecutionContext executionContext = createExecutionContext(listCampaignsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListCampaignsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listCampaignsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListCampaigns"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListCampaignsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* List tags for a resource. *

* * @param listTagsForResourceRequest * ListTagsForResource * @return Result of the ListTagsForResource operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @sample AmazonConnectCampaign.ListTagsForResource * @see AWS API Documentation */ @Override public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request) { request = beforeClientExecution(request); return executeListTagsForResource(request); } @SdkInternalApi final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) { ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListTagsForResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsForResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsForResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Pauses a campaign for the specified Amazon Connect account. *

* * @param pauseCampaignRequest * PauseCampaignRequest * @return Result of the PauseCampaign operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ConflictException * The request could not be processed because of conflict in the current state of the resource. * @throws InvalidCampaignStateException * The request could not be processed because of conflict in the current state of the campaign. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @sample AmazonConnectCampaign.PauseCampaign * @see AWS * API Documentation */ @Override public PauseCampaignResult pauseCampaign(PauseCampaignRequest request) { request = beforeClientExecution(request); return executePauseCampaign(request); } @SdkInternalApi final PauseCampaignResult executePauseCampaign(PauseCampaignRequest pauseCampaignRequest) { ExecutionContext executionContext = createExecutionContext(pauseCampaignRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PauseCampaignRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(pauseCampaignRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PauseCampaign"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PauseCampaignResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates dials requests for the specified campaign Amazon Connect account. This API is idempotent. *

* * @param putDialRequestBatchRequest * PutDialRequestBatchRequest * @return Result of the PutDialRequestBatch operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ConflictException * The request could not be processed because of conflict in the current state of the resource. * @throws InvalidCampaignStateException * The request could not be processed because of conflict in the current state of the campaign. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @sample AmazonConnectCampaign.PutDialRequestBatch * @see AWS API Documentation */ @Override public PutDialRequestBatchResult putDialRequestBatch(PutDialRequestBatchRequest request) { request = beforeClientExecution(request); return executePutDialRequestBatch(request); } @SdkInternalApi final PutDialRequestBatchResult executePutDialRequestBatch(PutDialRequestBatchRequest putDialRequestBatchRequest) { ExecutionContext executionContext = createExecutionContext(putDialRequestBatchRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutDialRequestBatchRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putDialRequestBatchRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutDialRequestBatch"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutDialRequestBatchResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Stops a campaign for the specified Amazon Connect account. *

* * @param resumeCampaignRequest * ResumeCampaignRequest * @return Result of the ResumeCampaign operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ConflictException * The request could not be processed because of conflict in the current state of the resource. * @throws InvalidCampaignStateException * The request could not be processed because of conflict in the current state of the campaign. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @sample AmazonConnectCampaign.ResumeCampaign * @see AWS API Documentation */ @Override public ResumeCampaignResult resumeCampaign(ResumeCampaignRequest request) { request = beforeClientExecution(request); return executeResumeCampaign(request); } @SdkInternalApi final ResumeCampaignResult executeResumeCampaign(ResumeCampaignRequest resumeCampaignRequest) { ExecutionContext executionContext = createExecutionContext(resumeCampaignRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ResumeCampaignRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(resumeCampaignRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ResumeCampaign"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ResumeCampaignResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Starts a campaign for the specified Amazon Connect account. *

* * @param startCampaignRequest * StartCampaignRequest * @return Result of the StartCampaign operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ConflictException * The request could not be processed because of conflict in the current state of the resource. * @throws InvalidCampaignStateException * The request could not be processed because of conflict in the current state of the campaign. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @sample AmazonConnectCampaign.StartCampaign * @see AWS * API Documentation */ @Override public StartCampaignResult startCampaign(StartCampaignRequest request) { request = beforeClientExecution(request); return executeStartCampaign(request); } @SdkInternalApi final StartCampaignResult executeStartCampaign(StartCampaignRequest startCampaignRequest) { ExecutionContext executionContext = createExecutionContext(startCampaignRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartCampaignRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startCampaignRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartCampaign"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartCampaignResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Onboard the specific Amazon Connect instance to Connect Campaigns. *

* * @param startInstanceOnboardingJobRequest * The request for StartInstanceOnboardingJob API. * @return Result of the StartInstanceOnboardingJob operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ConflictException * The request could not be processed because of conflict in the current state of the resource. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @sample AmazonConnectCampaign.StartInstanceOnboardingJob * @see AWS API Documentation */ @Override public StartInstanceOnboardingJobResult startInstanceOnboardingJob(StartInstanceOnboardingJobRequest request) { request = beforeClientExecution(request); return executeStartInstanceOnboardingJob(request); } @SdkInternalApi final StartInstanceOnboardingJobResult executeStartInstanceOnboardingJob(StartInstanceOnboardingJobRequest startInstanceOnboardingJobRequest) { ExecutionContext executionContext = createExecutionContext(startInstanceOnboardingJobRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartInstanceOnboardingJobRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(startInstanceOnboardingJobRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartInstanceOnboardingJob"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartInstanceOnboardingJobResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Stops a campaign for the specified Amazon Connect account. *

* * @param stopCampaignRequest * StopCampaignRequest * @return Result of the StopCampaign operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ConflictException * The request could not be processed because of conflict in the current state of the resource. * @throws InvalidCampaignStateException * The request could not be processed because of conflict in the current state of the campaign. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @sample AmazonConnectCampaign.StopCampaign * @see AWS * API Documentation */ @Override public StopCampaignResult stopCampaign(StopCampaignRequest request) { request = beforeClientExecution(request); return executeStopCampaign(request); } @SdkInternalApi final StopCampaignResult executeStopCampaign(StopCampaignRequest stopCampaignRequest) { ExecutionContext executionContext = createExecutionContext(stopCampaignRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StopCampaignRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopCampaignRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopCampaign"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopCampaignResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Tag a resource. *

* * @param tagResourceRequest * TagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @sample AmazonConnectCampaign.TagResource * @see AWS * API Documentation */ @Override public TagResourceResult tagResource(TagResourceRequest request) { request = beforeClientExecution(request); return executeTagResource(request); } @SdkInternalApi final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) { ExecutionContext executionContext = createExecutionContext(tagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Untag a resource. *

* * @param untagResourceRequest * UntagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @sample AmazonConnectCampaign.UntagResource * @see AWS * API Documentation */ @Override public UntagResourceResult untagResource(UntagResourceRequest request) { request = beforeClientExecution(request); return executeUntagResource(request); } @SdkInternalApi final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) { ExecutionContext executionContext = createExecutionContext(untagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the dialer config of a campaign. This API is idempotent. *

* * @param updateCampaignDialerConfigRequest * UpdateCampaignDialerConfigRequest * @return Result of the UpdateCampaignDialerConfig operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ConflictException * The request could not be processed because of conflict in the current state of the resource. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AmazonConnectCampaign.UpdateCampaignDialerConfig * @see AWS API Documentation */ @Override public UpdateCampaignDialerConfigResult updateCampaignDialerConfig(UpdateCampaignDialerConfigRequest request) { request = beforeClientExecution(request); return executeUpdateCampaignDialerConfig(request); } @SdkInternalApi final UpdateCampaignDialerConfigResult executeUpdateCampaignDialerConfig(UpdateCampaignDialerConfigRequest updateCampaignDialerConfigRequest) { ExecutionContext executionContext = createExecutionContext(updateCampaignDialerConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateCampaignDialerConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(updateCampaignDialerConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateCampaignDialerConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateCampaignDialerConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the name of a campaign. This API is idempotent. *

* * @param updateCampaignNameRequest * UpdateCampaignNameRequest * @return Result of the UpdateCampaignName operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ConflictException * The request could not be processed because of conflict in the current state of the resource. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AmazonConnectCampaign.UpdateCampaignName * @see AWS API Documentation */ @Override public UpdateCampaignNameResult updateCampaignName(UpdateCampaignNameRequest request) { request = beforeClientExecution(request); return executeUpdateCampaignName(request); } @SdkInternalApi final UpdateCampaignNameResult executeUpdateCampaignName(UpdateCampaignNameRequest updateCampaignNameRequest) { ExecutionContext executionContext = createExecutionContext(updateCampaignNameRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateCampaignNameRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateCampaignNameRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateCampaignName"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateCampaignNameResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the outbound call config of a campaign. This API is idempotent. *

* * @param updateCampaignOutboundCallConfigRequest * UpdateCampaignOutboundCallConfigRequest * @return Result of the UpdateCampaignOutboundCallConfig operation returned by the service. * @throws InternalServerException * Request processing failed because of an error or failure with the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ConflictException * The request could not be processed because of conflict in the current state of the resource. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @sample AmazonConnectCampaign.UpdateCampaignOutboundCallConfig * @see AWS API Documentation */ @Override public UpdateCampaignOutboundCallConfigResult updateCampaignOutboundCallConfig(UpdateCampaignOutboundCallConfigRequest request) { request = beforeClientExecution(request); return executeUpdateCampaignOutboundCallConfig(request); } @SdkInternalApi final UpdateCampaignOutboundCallConfigResult executeUpdateCampaignOutboundCallConfig( UpdateCampaignOutboundCallConfigRequest updateCampaignOutboundCallConfigRequest) { ExecutionContext executionContext = createExecutionContext(updateCampaignOutboundCallConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateCampaignOutboundCallConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(updateCampaignOutboundCallConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ConnectCampaigns"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateCampaignOutboundCallConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateCampaignOutboundCallConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * 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. */ public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { return client.getResponseMetadataForRequest(request); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return invoke(request, responseHandler, executionContext, null, null); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext, URI cachedEndpoint, URI uriFromEndpointTrait) { executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider)); return doInvoke(request, responseHandler, executionContext, cachedEndpoint, uriFromEndpointTrait); } /** * Invoke with no authentication. Credentials are not required and any credentials set on the client or request will * be ignored for this operation. **/ private Response anonymousInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return doInvoke(request, responseHandler, executionContext, null, null); } /** * Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the * ExecutionContext beforehand. **/ private Response doInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) { if (discoveredEndpoint != null) { request.setEndpoint(discoveredEndpoint); request.getOriginalRequest().getRequestClientOptions().appendUserAgent("endpoint-discovery"); } else if (uriFromEndpointTrait != null) { request.setEndpoint(uriFromEndpointTrait); } else { request.setEndpoint(endpoint); } request.setTimeOffset(timeOffset); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata()); return client.execute(request, responseHandler, errorResponseHandler, executionContext); } @com.amazonaws.annotation.SdkInternalApi static com.amazonaws.protocol.json.SdkJsonProtocolFactory getProtocolFactory() { return protocolFactory; } @Override public void shutdown() { super.shutdown(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy