/*
* Copyright 2018-2023 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.connectcases;
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.connectcases.AmazonConnectCasesClientBuilder;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.connectcases.model.*;
import com.amazonaws.services.connectcases.model.transform.*;
/**
* Client for accessing ConnectCases. All service calls made using this client are blocking, and will not return until
* the service call completes.
*
*
* With Amazon Connect Cases, your agents can track and manage customer issues that require multiple interactions,
* follow-up tasks, and teams in your contact center. A case represents a customer issue. It records the issue, the
* steps and interactions taken to resolve the issue, and the outcome. For more information, see Amazon Connect Cases in the Amazon
* Connect Administrator Guide.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonConnectCasesClient extends AmazonWebServiceClient implements AmazonConnectCases {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AmazonConnectCases.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "cases";
/** 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("ThrottlingException").withExceptionUnmarshaller(
com.amazonaws.services.connectcases.model.transform.ThrottlingExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ServiceQuotaExceededException").withExceptionUnmarshaller(
com.amazonaws.services.connectcases.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller(
com.amazonaws.services.connectcases.model.transform.InternalServerExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller(
com.amazonaws.services.connectcases.model.transform.AccessDeniedExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller(
com.amazonaws.services.connectcases.model.transform.ConflictExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller(
com.amazonaws.services.connectcases.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller(
com.amazonaws.services.connectcases.model.transform.ValidationExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.connectcases.model.AmazonConnectCasesException.class));
public static AmazonConnectCasesClientBuilder builder() {
return AmazonConnectCasesClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on ConnectCases 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.
*/
AmazonConnectCasesClient(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on ConnectCases 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.
*/
AmazonConnectCasesClient(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("cases.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/connectcases/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/connectcases/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
*
* Returns the description for the list of fields in the request parameters.
*
*
* @param batchGetFieldRequest
* @return Result of the BatchGetField operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.BatchGetField
* @see AWS API
* Documentation
*/
@Override
public BatchGetFieldResult batchGetField(BatchGetFieldRequest request) {
request = beforeClientExecution(request);
return executeBatchGetField(request);
}
@SdkInternalApi
final BatchGetFieldResult executeBatchGetField(BatchGetFieldRequest batchGetFieldRequest) {
ExecutionContext executionContext = createExecutionContext(batchGetFieldRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchGetFieldRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchGetFieldRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchGetField");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchGetFieldResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates and updates a set of field options for a single select field in a Cases domain.
*
*
* @param batchPutFieldOptionsRequest
* @return Result of the BatchPutFieldOptions operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ServiceQuotaExceededException
* The service quota has been exceeded. For a list of service quotas, see Amazon
* Connect Service Quotas in the Amazon Connect Administrator Guide.
* @sample AmazonConnectCases.BatchPutFieldOptions
* @see AWS API Documentation
*/
@Override
public BatchPutFieldOptionsResult batchPutFieldOptions(BatchPutFieldOptionsRequest request) {
request = beforeClientExecution(request);
return executeBatchPutFieldOptions(request);
}
@SdkInternalApi
final BatchPutFieldOptionsResult executeBatchPutFieldOptions(BatchPutFieldOptionsRequest batchPutFieldOptionsRequest) {
ExecutionContext executionContext = createExecutionContext(batchPutFieldOptionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchPutFieldOptionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchPutFieldOptionsRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchPutFieldOptions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchPutFieldOptionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a case in the specified Cases domain. Case system and custom fields are taken as an array id/value pairs
* with a declared data types.
*
*
*
* The following fields are required when creating a case:
*
*
*
* <ul> <li> <p> <code>customer_id</code> - You must provide the full customer profile ARN in this format: <code>arn:aws:profile:your AWS Region:your AWS account ID:domains/profiles domain name/profiles/profile ID</code> </p> </li> <li> <p> <code>title</code> </p> </li> </ul> </note>
*
*
* @param createCaseRequest
* @return Result of the CreateCase operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ConflictException
* The requested operation would cause a conflict with the current state of a service resource associated
* with the request. Resolve the conflict before retrying this request. See the accompanying error message
* for details.
* @sample AmazonConnectCases.CreateCase
* @see AWS API
* Documentation
*/
@Override
public CreateCaseResult createCase(CreateCaseRequest request) {
request = beforeClientExecution(request);
return executeCreateCase(request);
}
@SdkInternalApi
final CreateCaseResult executeCreateCase(CreateCaseRequest createCaseRequest) {
ExecutionContext executionContext = createExecutionContext(createCaseRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateCaseRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createCaseRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateCase");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateCaseResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a domain, which is a container for all case data, such as cases, fields, templates and layouts. Each
* Amazon Connect instance can be associated with only one Cases domain.
*
*
*
* This will not associate your connect instance to Cases domain. Instead, use the Amazon Connect CreateIntegrationAssociation API. You need specific IAM permissions to successfully associate the Cases
* domain. For more information, see Onboard to Cases.
*
*
*
* </important>
*
*
* @param createDomainRequest
* @return Result of the CreateDomain operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ConflictException
* The requested operation would cause a conflict with the current state of a service resource associated
* with the request. Resolve the conflict before retrying this request. See the accompanying error message
* for details.
* @throws ServiceQuotaExceededException
* The service quota has been exceeded. For a list of service quotas, see Amazon
* Connect Service Quotas in the Amazon Connect Administrator Guide.
* @sample AmazonConnectCases.CreateDomain
* @see AWS API
* Documentation
*/
@Override
public CreateDomainResult createDomain(CreateDomainRequest request) {
request = beforeClientExecution(request);
return executeCreateDomain(request);
}
@SdkInternalApi
final CreateDomainResult executeCreateDomain(CreateDomainRequest createDomainRequest) {
ExecutionContext executionContext = createExecutionContext(createDomainRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateDomainRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createDomainRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDomain");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDomainResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a field in the Cases domain. This field is used to define the case object model (that is, defines what
* data can be captured on cases) in a Cases domain.
*
*
* @param createFieldRequest
* @return Result of the CreateField operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ConflictException
* The requested operation would cause a conflict with the current state of a service resource associated
* with the request. Resolve the conflict before retrying this request. See the accompanying error message
* for details.
* @throws ServiceQuotaExceededException
* The service quota has been exceeded. For a list of service quotas, see Amazon
* Connect Service Quotas in the Amazon Connect Administrator Guide.
* @sample AmazonConnectCases.CreateField
* @see AWS API
* Documentation
*/
@Override
public CreateFieldResult createField(CreateFieldRequest request) {
request = beforeClientExecution(request);
return executeCreateField(request);
}
@SdkInternalApi
final CreateFieldResult executeCreateField(CreateFieldRequest createFieldRequest) {
ExecutionContext executionContext = createExecutionContext(createFieldRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateFieldRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createFieldRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateField");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateFieldResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a layout in the Cases domain. Layouts define the following configuration in the top section and More Info
* tab of the Cases user interface:
*
*
*
*
* Title and Status fields cannot be part of layouts since they are not configurable.
*
*
*
* @param createLayoutRequest
* @return Result of the CreateLayout operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ConflictException
* The requested operation would cause a conflict with the current state of a service resource associated
* with the request. Resolve the conflict before retrying this request. See the accompanying error message
* for details.
* @throws ServiceQuotaExceededException
* The service quota has been exceeded. For a list of service quotas, see Amazon
* Connect Service Quotas in the Amazon Connect Administrator Guide.
* @sample AmazonConnectCases.CreateLayout
* @see AWS API
* Documentation
*/
@Override
public CreateLayoutResult createLayout(CreateLayoutRequest request) {
request = beforeClientExecution(request);
return executeCreateLayout(request);
}
@SdkInternalApi
final CreateLayoutResult executeCreateLayout(CreateLayoutRequest createLayoutRequest) {
ExecutionContext executionContext = createExecutionContext(createLayoutRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateLayoutRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createLayoutRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateLayout");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateLayoutResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a related item (comments, tasks, and contacts) and associates it with a case.
*
*
*
* A Related Item is a resource that is associated with a case. It may or may not have an external identifier
* linking it to an external resource (for example, a contactArn
). All Related Items have their own
* internal identifier, the relatedItemArn
. Examples of related items include comments
and
* contacts
.
*
*
*
* @param createRelatedItemRequest
* @return Result of the CreateRelatedItem operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ServiceQuotaExceededException
* The service quota has been exceeded. For a list of service quotas, see Amazon
* Connect Service Quotas in the Amazon Connect Administrator Guide.
* @sample AmazonConnectCases.CreateRelatedItem
* @see AWS
* API Documentation
*/
@Override
public CreateRelatedItemResult createRelatedItem(CreateRelatedItemRequest request) {
request = beforeClientExecution(request);
return executeCreateRelatedItem(request);
}
@SdkInternalApi
final CreateRelatedItemResult executeCreateRelatedItem(CreateRelatedItemRequest createRelatedItemRequest) {
ExecutionContext executionContext = createExecutionContext(createRelatedItemRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateRelatedItemRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createRelatedItemRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateRelatedItem");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateRelatedItemResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a template in the Cases domain. This template is used to define the case object model (that is, to define
* what data can be captured on cases) in a Cases domain. A template must have a unique name within a domain, and it
* must reference existing field IDs and layout IDs. Additionally, multiple fields with same IDs are not allowed
* within the same Template. A template can be either Active or Inactive, as indicated by its status. Inactive
* templates cannot be used to create cases.
*
*
* @param createTemplateRequest
* @return Result of the CreateTemplate operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ConflictException
* The requested operation would cause a conflict with the current state of a service resource associated
* with the request. Resolve the conflict before retrying this request. See the accompanying error message
* for details.
* @throws ServiceQuotaExceededException
* The service quota has been exceeded. For a list of service quotas, see Amazon
* Connect Service Quotas in the Amazon Connect Administrator Guide.
* @sample AmazonConnectCases.CreateTemplate
* @see AWS
* API Documentation
*/
@Override
public CreateTemplateResult createTemplate(CreateTemplateRequest request) {
request = beforeClientExecution(request);
return executeCreateTemplate(request);
}
@SdkInternalApi
final CreateTemplateResult executeCreateTemplate(CreateTemplateRequest createTemplateRequest) {
ExecutionContext executionContext = createExecutionContext(createTemplateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateTemplateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createTemplateRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateTemplate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateTemplateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a Cases domain.
*
*
*
* <note> <p>After deleting your domain you must disassociate the deleted domain from your Amazon Connect instance with another API call before being able to use Cases again with this Amazon Connect instance. See <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_DeleteIntegrationAssociation.html">DeleteIntegrationAssociation</a>.</p> </note>
*
*
* @param deleteDomainRequest
* @return Result of the DeleteDomain operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ConflictException
* The requested operation would cause a conflict with the current state of a service resource associated
* with the request. Resolve the conflict before retrying this request. See the accompanying error message
* for details.
* @sample AmazonConnectCases.DeleteDomain
* @see AWS API
* Documentation
*/
@Override
public DeleteDomainResult deleteDomain(DeleteDomainRequest request) {
request = beforeClientExecution(request);
return executeDeleteDomain(request);
}
@SdkInternalApi
final DeleteDomainResult executeDeleteDomain(DeleteDomainRequest deleteDomainRequest) {
ExecutionContext executionContext = createExecutionContext(deleteDomainRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteDomainRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteDomainRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDomain");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteDomainResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns information about a specific case if it exists.
*
*
* @param getCaseRequest
* @return Result of the GetCase operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.GetCase
* @see AWS API
* Documentation
*/
@Override
public GetCaseResult getCase(GetCaseRequest request) {
request = beforeClientExecution(request);
return executeGetCase(request);
}
@SdkInternalApi
final GetCaseResult executeGetCase(GetCaseRequest getCaseRequest) {
ExecutionContext executionContext = createExecutionContext(getCaseRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetCaseRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getCaseRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetCase");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetCaseResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns the case event publishing configuration.
*
*
* @param getCaseEventConfigurationRequest
* @return Result of the GetCaseEventConfiguration operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.GetCaseEventConfiguration
* @see AWS API Documentation
*/
@Override
public GetCaseEventConfigurationResult getCaseEventConfiguration(GetCaseEventConfigurationRequest request) {
request = beforeClientExecution(request);
return executeGetCaseEventConfiguration(request);
}
@SdkInternalApi
final GetCaseEventConfigurationResult executeGetCaseEventConfiguration(GetCaseEventConfigurationRequest getCaseEventConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(getCaseEventConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetCaseEventConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(getCaseEventConfigurationRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetCaseEventConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new GetCaseEventConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns information about a specific domain if it exists.
*
*
* @param getDomainRequest
* @return Result of the GetDomain operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.GetDomain
* @see AWS API
* Documentation
*/
@Override
public GetDomainResult getDomain(GetDomainRequest request) {
request = beforeClientExecution(request);
return executeGetDomain(request);
}
@SdkInternalApi
final GetDomainResult executeGetDomain(GetDomainRequest getDomainRequest) {
ExecutionContext executionContext = createExecutionContext(getDomainRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetDomainRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getDomainRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetDomain");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetDomainResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns the details for the requested layout.
*
*
* @param getLayoutRequest
* @return Result of the GetLayout operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.GetLayout
* @see AWS API
* Documentation
*/
@Override
public GetLayoutResult getLayout(GetLayoutRequest request) {
request = beforeClientExecution(request);
return executeGetLayout(request);
}
@SdkInternalApi
final GetLayoutResult executeGetLayout(GetLayoutRequest getLayoutRequest) {
ExecutionContext executionContext = createExecutionContext(getLayoutRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetLayoutRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getLayoutRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetLayout");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetLayoutResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns the details for the requested template.
*
*
* @param getTemplateRequest
* @return Result of the GetTemplate operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.GetTemplate
* @see AWS API
* Documentation
*/
@Override
public GetTemplateResult getTemplate(GetTemplateRequest request) {
request = beforeClientExecution(request);
return executeGetTemplate(request);
}
@SdkInternalApi
final GetTemplateResult executeGetTemplate(GetTemplateRequest getTemplateRequest) {
ExecutionContext executionContext = createExecutionContext(getTemplateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetTemplateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getTemplateRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetTemplate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetTemplateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists cases for a given contact.
*
*
* @param listCasesForContactRequest
* @return Result of the ListCasesForContact operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.ListCasesForContact
* @see AWS API Documentation
*/
@Override
public ListCasesForContactResult listCasesForContact(ListCasesForContactRequest request) {
request = beforeClientExecution(request);
return executeListCasesForContact(request);
}
@SdkInternalApi
final ListCasesForContactResult executeListCasesForContact(ListCasesForContactRequest listCasesForContactRequest) {
ExecutionContext executionContext = createExecutionContext(listCasesForContactRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListCasesForContactRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listCasesForContactRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListCasesForContact");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListCasesForContactResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists all cases domains in the Amazon Web Services account. Each list item is a condensed summary object of the
* domain.
*
*
* @param listDomainsRequest
* @return Result of the ListDomains operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.ListDomains
* @see AWS API
* Documentation
*/
@Override
public ListDomainsResult listDomains(ListDomainsRequest request) {
request = beforeClientExecution(request);
return executeListDomains(request);
}
@SdkInternalApi
final ListDomainsResult executeListDomains(ListDomainsRequest listDomainsRequest) {
ExecutionContext executionContext = createExecutionContext(listDomainsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListDomainsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listDomainsRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDomains");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListDomainsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists all of the field options for a field identifier in the domain.
*
*
* @param listFieldOptionsRequest
* @return Result of the ListFieldOptions operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.ListFieldOptions
* @see AWS
* API Documentation
*/
@Override
public ListFieldOptionsResult listFieldOptions(ListFieldOptionsRequest request) {
request = beforeClientExecution(request);
return executeListFieldOptions(request);
}
@SdkInternalApi
final ListFieldOptionsResult executeListFieldOptions(ListFieldOptionsRequest listFieldOptionsRequest) {
ExecutionContext executionContext = createExecutionContext(listFieldOptionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListFieldOptionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listFieldOptionsRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListFieldOptions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListFieldOptionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists all fields in a Cases domain.
*
*
* @param listFieldsRequest
* @return Result of the ListFields operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.ListFields
* @see AWS API
* Documentation
*/
@Override
public ListFieldsResult listFields(ListFieldsRequest request) {
request = beforeClientExecution(request);
return executeListFields(request);
}
@SdkInternalApi
final ListFieldsResult executeListFields(ListFieldsRequest listFieldsRequest) {
ExecutionContext executionContext = createExecutionContext(listFieldsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListFieldsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listFieldsRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListFields");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListFieldsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists all layouts in the given cases domain. Each list item is a condensed summary object of the layout.
*
*
* @param listLayoutsRequest
* @return Result of the ListLayouts operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.ListLayouts
* @see AWS API
* Documentation
*/
@Override
public ListLayoutsResult listLayouts(ListLayoutsRequest request) {
request = beforeClientExecution(request);
return executeListLayouts(request);
}
@SdkInternalApi
final ListLayoutsResult executeListLayouts(ListLayoutsRequest listLayoutsRequest) {
ExecutionContext executionContext = createExecutionContext(listLayoutsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListLayoutsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listLayoutsRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListLayouts");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListLayoutsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists tags for a resource.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.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, "ConnectCases");
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);
}
}
/**
*
* Lists all of the templates in a Cases domain. Each list item is a condensed summary object of the template.
*
*
* @param listTemplatesRequest
* @return Result of the ListTemplates operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.ListTemplates
* @see AWS API
* Documentation
*/
@Override
public ListTemplatesResult listTemplates(ListTemplatesRequest request) {
request = beforeClientExecution(request);
return executeListTemplates(request);
}
@SdkInternalApi
final ListTemplatesResult executeListTemplates(ListTemplatesRequest listTemplatesRequest) {
ExecutionContext executionContext = createExecutionContext(listTemplatesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListTemplatesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTemplatesRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTemplates");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTemplatesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* API for adding case event publishing configuration
*
*
* @param putCaseEventConfigurationRequest
* @return Result of the PutCaseEventConfiguration operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.PutCaseEventConfiguration
* @see AWS API Documentation
*/
@Override
public PutCaseEventConfigurationResult putCaseEventConfiguration(PutCaseEventConfigurationRequest request) {
request = beforeClientExecution(request);
return executePutCaseEventConfiguration(request);
}
@SdkInternalApi
final PutCaseEventConfigurationResult executePutCaseEventConfiguration(PutCaseEventConfigurationRequest putCaseEventConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(putCaseEventConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new PutCaseEventConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(putCaseEventConfigurationRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutCaseEventConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new PutCaseEventConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Searches for cases within their associated Cases domain. Search results are returned as a paginated list of
* abridged case documents.
*
*
*
* For customer_id
you must provide the full customer profile ARN in this format:
* arn:aws:profile:your AWS Region:your AWS account ID:domains/profiles domain name/profiles/profile ID
* .
*
*
*
* @param searchCasesRequest
* @return Result of the SearchCases operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.SearchCases
* @see AWS API
* Documentation
*/
@Override
public SearchCasesResult searchCases(SearchCasesRequest request) {
request = beforeClientExecution(request);
return executeSearchCases(request);
}
@SdkInternalApi
final SearchCasesResult executeSearchCases(SearchCasesRequest searchCasesRequest) {
ExecutionContext executionContext = createExecutionContext(searchCasesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new SearchCasesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(searchCasesRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SearchCases");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new SearchCasesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Searches for related items that are associated with a case.
*
*
*
* If no filters are provided, this returns all related items associated with a case.
*
*
*
* @param searchRelatedItemsRequest
* @return Result of the SearchRelatedItems operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.SearchRelatedItems
* @see AWS API Documentation
*/
@Override
public SearchRelatedItemsResult searchRelatedItems(SearchRelatedItemsRequest request) {
request = beforeClientExecution(request);
return executeSearchRelatedItems(request);
}
@SdkInternalApi
final SearchRelatedItemsResult executeSearchRelatedItems(SearchRelatedItemsRequest searchRelatedItemsRequest) {
ExecutionContext executionContext = createExecutionContext(searchRelatedItemsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new SearchRelatedItemsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(searchRelatedItemsRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SearchRelatedItems");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new SearchRelatedItemsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds tags to a resource.
*
*
* @param tagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.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, "ConnectCases");
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);
}
}
/**
*
* Untags a resource.
*
*
* @param untagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.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, "ConnectCases");
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 values of fields on a case. Fields to be updated are received as an array of id/value pairs identical
* to the CreateCase
input .
*
*
* If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
*
*
* @param updateCaseRequest
* @return Result of the UpdateCase operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonConnectCases.UpdateCase
* @see AWS API
* Documentation
*/
@Override
public UpdateCaseResult updateCase(UpdateCaseRequest request) {
request = beforeClientExecution(request);
return executeUpdateCase(request);
}
@SdkInternalApi
final UpdateCaseResult executeUpdateCase(UpdateCaseRequest updateCaseRequest) {
ExecutionContext executionContext = createExecutionContext(updateCaseRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateCaseRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateCaseRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateCase");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateCaseResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the properties of an existing field.
*
*
* @param updateFieldRequest
* @return Result of the UpdateField operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ConflictException
* The requested operation would cause a conflict with the current state of a service resource associated
* with the request. Resolve the conflict before retrying this request. See the accompanying error message
* for details.
* @sample AmazonConnectCases.UpdateField
* @see AWS API
* Documentation
*/
@Override
public UpdateFieldResult updateField(UpdateFieldRequest request) {
request = beforeClientExecution(request);
return executeUpdateField(request);
}
@SdkInternalApi
final UpdateFieldResult executeUpdateField(UpdateFieldRequest updateFieldRequest) {
ExecutionContext executionContext = createExecutionContext(updateFieldRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateFieldRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateFieldRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateField");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateFieldResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the attributes of an existing layout.
*
*
* If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
*
*
* A ValidationException
is returned when you add non-existent fieldIds
to a layout.
*
*
*
* Title and Status fields cannot be part of layouts because they are not configurable.
*
*
*
* @param updateLayoutRequest
* @return Result of the UpdateLayout operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ConflictException
* The requested operation would cause a conflict with the current state of a service resource associated
* with the request. Resolve the conflict before retrying this request. See the accompanying error message
* for details.
* @throws ServiceQuotaExceededException
* The service quota has been exceeded. For a list of service quotas, see Amazon
* Connect Service Quotas in the Amazon Connect Administrator Guide.
* @sample AmazonConnectCases.UpdateLayout
* @see AWS API
* Documentation
*/
@Override
public UpdateLayoutResult updateLayout(UpdateLayoutRequest request) {
request = beforeClientExecution(request);
return executeUpdateLayout(request);
}
@SdkInternalApi
final UpdateLayoutResult executeUpdateLayout(UpdateLayoutRequest updateLayoutRequest) {
ExecutionContext executionContext = createExecutionContext(updateLayoutRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateLayoutRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateLayoutRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateLayout");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateLayoutResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the attributes of an existing template. The template attributes that can be modified include
* name
, description
, layoutConfiguration
, requiredFields
, and
* status
. At least one of these attributes must not be null. If a null value is provided for a given
* attribute, that attribute is ignored and its current value is preserved.
*
*
* @param updateTemplateRequest
* @return Result of the UpdateTemplate operation returned by the service.
* @throws InternalServerException
* We couldn't process your request because of an issue with the server. Try again later.
* @throws ResourceNotFoundException
* We couldn't find the requested resource. Check that your resources exists and were created in the same
* Amazon Web Services Region as your request, and try your request again.
* @throws ValidationException
* The request isn't valid. Check the syntax and try again.
* @throws ThrottlingException
* The rate has been exceeded for this API. Please try again after a few minutes.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ConflictException
* The requested operation would cause a conflict with the current state of a service resource associated
* with the request. Resolve the conflict before retrying this request. See the accompanying error message
* for details.
* @sample AmazonConnectCases.UpdateTemplate
* @see AWS
* API Documentation
*/
@Override
public UpdateTemplateResult updateTemplate(UpdateTemplateRequest request) {
request = beforeClientExecution(request);
return executeUpdateTemplate(request);
}
@SdkInternalApi
final UpdateTemplateResult executeUpdateTemplate(UpdateTemplateRequest updateTemplateRequest) {
ExecutionContext executionContext = createExecutionContext(updateTemplateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateTemplateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateTemplateRequest));
// 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, "ConnectCases");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateTemplate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateTemplateResultJsonUnmarshaller());
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();
}
}