/* * 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.lexmodelsv2; 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.lexmodelsv2.AmazonLexModelsV2ClientBuilder; import com.amazonaws.services.lexmodelsv2.waiters.AmazonLexModelsV2Waiters; import com.amazonaws.AmazonServiceException; import com.amazonaws.services.lexmodelsv2.model.*; import com.amazonaws.services.lexmodelsv2.model.transform.*; /** * Client for accessing Lex Models V2. All service calls made using this client are blocking, and will not return until * the service call completes. *

*

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonLexModelsV2Client extends AmazonWebServiceClient implements AmazonLexModelsV2 { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AmazonLexModelsV2.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "lex"; private volatile AmazonLexModelsV2Waiters waiters; /** 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("ServiceQuotaExceededException").withExceptionUnmarshaller( com.amazonaws.services.lexmodelsv2.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller( com.amazonaws.services.lexmodelsv2.model.transform.InternalServerExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller( com.amazonaws.services.lexmodelsv2.model.transform.ValidationExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller( com.amazonaws.services.lexmodelsv2.model.transform.ThrottlingExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller( com.amazonaws.services.lexmodelsv2.model.transform.ConflictExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.lexmodelsv2.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("PreconditionFailedException").withExceptionUnmarshaller( com.amazonaws.services.lexmodelsv2.model.transform.PreconditionFailedExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.lexmodelsv2.model.AmazonLexModelsV2Exception.class)); public static AmazonLexModelsV2ClientBuilder builder() { return AmazonLexModelsV2ClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on Lex Models V2 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. */ AmazonLexModelsV2Client(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on Lex Models V2 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. */ AmazonLexModelsV2Client(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("models-v2-lex.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/lexmodelsv2/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/lexmodelsv2/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *

* Create a batch of custom vocabulary items for a given bot locale's custom vocabulary. *

* * @param batchCreateCustomVocabularyItemRequest * @return Result of the BatchCreateCustomVocabularyItem operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.BatchCreateCustomVocabularyItem * @see AWS API Documentation */ @Override public BatchCreateCustomVocabularyItemResult batchCreateCustomVocabularyItem(BatchCreateCustomVocabularyItemRequest request) { request = beforeClientExecution(request); return executeBatchCreateCustomVocabularyItem(request); } @SdkInternalApi final BatchCreateCustomVocabularyItemResult executeBatchCreateCustomVocabularyItem( BatchCreateCustomVocabularyItemRequest batchCreateCustomVocabularyItemRequest) { ExecutionContext executionContext = createExecutionContext(batchCreateCustomVocabularyItemRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new BatchCreateCustomVocabularyItemRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(batchCreateCustomVocabularyItemRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchCreateCustomVocabularyItem"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchCreateCustomVocabularyItemResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Delete a batch of custom vocabulary items for a given bot locale's custom vocabulary. *

* * @param batchDeleteCustomVocabularyItemRequest * @return Result of the BatchDeleteCustomVocabularyItem operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.BatchDeleteCustomVocabularyItem * @see AWS API Documentation */ @Override public BatchDeleteCustomVocabularyItemResult batchDeleteCustomVocabularyItem(BatchDeleteCustomVocabularyItemRequest request) { request = beforeClientExecution(request); return executeBatchDeleteCustomVocabularyItem(request); } @SdkInternalApi final BatchDeleteCustomVocabularyItemResult executeBatchDeleteCustomVocabularyItem( BatchDeleteCustomVocabularyItemRequest batchDeleteCustomVocabularyItemRequest) { ExecutionContext executionContext = createExecutionContext(batchDeleteCustomVocabularyItemRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new BatchDeleteCustomVocabularyItemRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(batchDeleteCustomVocabularyItemRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchDeleteCustomVocabularyItem"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchDeleteCustomVocabularyItemResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Update a batch of custom vocabulary items for a given bot locale's custom vocabulary. *

* * @param batchUpdateCustomVocabularyItemRequest * @return Result of the BatchUpdateCustomVocabularyItem operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.BatchUpdateCustomVocabularyItem * @see AWS API Documentation */ @Override public BatchUpdateCustomVocabularyItemResult batchUpdateCustomVocabularyItem(BatchUpdateCustomVocabularyItemRequest request) { request = beforeClientExecution(request); return executeBatchUpdateCustomVocabularyItem(request); } @SdkInternalApi final BatchUpdateCustomVocabularyItemResult executeBatchUpdateCustomVocabularyItem( BatchUpdateCustomVocabularyItemRequest batchUpdateCustomVocabularyItemRequest) { ExecutionContext executionContext = createExecutionContext(batchUpdateCustomVocabularyItemRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new BatchUpdateCustomVocabularyItemRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(batchUpdateCustomVocabularyItemRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchUpdateCustomVocabularyItem"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchUpdateCustomVocabularyItemResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Builds a bot, its intents, and its slot types into a specific locale. A bot can be built into multiple locales. * At runtime the locale is used to choose a specific build of the bot. *

* * @param buildBotLocaleRequest * @return Result of the BuildBotLocale operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.BuildBotLocale * @see AWS * API Documentation */ @Override public BuildBotLocaleResult buildBotLocale(BuildBotLocaleRequest request) { request = beforeClientExecution(request); return executeBuildBotLocale(request); } @SdkInternalApi final BuildBotLocaleResult executeBuildBotLocale(BuildBotLocaleRequest buildBotLocaleRequest) { ExecutionContext executionContext = createExecutionContext(buildBotLocaleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new BuildBotLocaleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(buildBotLocaleRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BuildBotLocale"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BuildBotLocaleResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates an Amazon Lex conversational bot. *

* * @param createBotRequest * @return Result of the CreateBot operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.CreateBot * @see AWS API * Documentation */ @Override public CreateBotResult createBot(CreateBotRequest request) { request = beforeClientExecution(request); return executeCreateBot(request); } @SdkInternalApi final CreateBotResult executeCreateBot(CreateBotRequest createBotRequest) { ExecutionContext executionContext = createExecutionContext(createBotRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateBotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createBotRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateBot"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateBotResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates an alias for the specified version of a bot. Use an alias to enable you to change the version of a bot * without updating applications that use the bot. *

*

* For example, you can create an alias called "PROD" that your applications use to call the Amazon Lex bot. *

* * @param createBotAliasRequest * @return Result of the CreateBotAlias operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.CreateBotAlias * @see AWS * API Documentation */ @Override public CreateBotAliasResult createBotAlias(CreateBotAliasRequest request) { request = beforeClientExecution(request); return executeCreateBotAlias(request); } @SdkInternalApi final CreateBotAliasResult executeCreateBotAlias(CreateBotAliasRequest createBotAliasRequest) { ExecutionContext executionContext = createExecutionContext(createBotAliasRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateBotAliasRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createBotAliasRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateBotAlias"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateBotAliasResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a locale in the bot. The locale contains the intents and slot types that the bot uses in conversations * with users in the specified language and locale. You must add a locale to a bot before you can add intents and * slot types to the bot. *

* * @param createBotLocaleRequest * @return Result of the CreateBotLocale operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.CreateBotLocale * @see AWS * API Documentation */ @Override public CreateBotLocaleResult createBotLocale(CreateBotLocaleRequest request) { request = beforeClientExecution(request); return executeCreateBotLocale(request); } @SdkInternalApi final CreateBotLocaleResult executeCreateBotLocale(CreateBotLocaleRequest createBotLocaleRequest) { ExecutionContext executionContext = createExecutionContext(createBotLocaleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateBotLocaleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createBotLocaleRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateBotLocale"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateBotLocaleResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new version of the bot based on the DRAFT version. If the DRAFT version of * this resource hasn't changed since you created the last version, Amazon Lex doesn't create a new version, it * returns the last created version. *

*

* When you create the first version of a bot, Amazon Lex sets the version to 1. Subsequent versions increment by 1. *

* * @param createBotVersionRequest * @return Result of the CreateBotVersion operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.CreateBotVersion * @see AWS * API Documentation */ @Override public CreateBotVersionResult createBotVersion(CreateBotVersionRequest request) { request = beforeClientExecution(request); return executeCreateBotVersion(request); } @SdkInternalApi final CreateBotVersionResult executeCreateBotVersion(CreateBotVersionRequest createBotVersionRequest) { ExecutionContext executionContext = createExecutionContext(createBotVersionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateBotVersionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createBotVersionRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateBotVersion"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateBotVersionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a zip archive containing the contents of a bot or a bot locale. The archive contains a directory * structure that contains JSON files that define the bot. *

*

* You can create an archive that contains the complete definition of a bot, or you can specify that the archive * contain only the definition of a single bot locale. *

*

* For more information about exporting bots, and about the structure of the export archive, see Importing and exporting bots *

* * @param createExportRequest * @return Result of the CreateExport operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.CreateExport * @see AWS API * Documentation */ @Override public CreateExportResult createExport(CreateExportRequest request) { request = beforeClientExecution(request); return executeCreateExport(request); } @SdkInternalApi final CreateExportResult executeCreateExport(CreateExportRequest createExportRequest) { ExecutionContext executionContext = createExecutionContext(createExportRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateExportRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createExportRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateExport"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateExportResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates an intent. *

*

* To define the interaction between the user and your bot, you define one or more intents. For example, for a pizza * ordering bot you would create an OrderPizza intent. *

*

* When you create an intent, you must provide a name. You can optionally provide the following: *

*
    *
  • *

    * Sample utterances. For example, "I want to order a pizza" and "Can I order a pizza." You can't provide utterances * for built-in intents. *

    *
  • *
  • *

    * Information to be gathered. You specify slots for the information that you bot requests from the user. You can * specify standard slot types, such as date and time, or custom slot types for your application. *

    *
  • *
  • *

    * How the intent is fulfilled. You can provide a Lambda function or configure the intent to return the intent * information to your client application. If you use a Lambda function, Amazon Lex invokes the function when all of * the intent information is available. *

    *
  • *
  • *

    * A confirmation prompt to send to the user to confirm an intent. For example, "Shall I order your pizza?" *

    *
  • *
  • *

    * A conclusion statement to send to the user after the intent is fulfilled. For example, "I ordered your pizza." *

    *
  • *
  • *

    * A follow-up prompt that asks the user for additional activity. For example, * "Do you want a drink with your pizza?" *

    *
  • *
* * @param createIntentRequest * @return Result of the CreateIntent operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.CreateIntent * @see AWS API * Documentation */ @Override public CreateIntentResult createIntent(CreateIntentRequest request) { request = beforeClientExecution(request); return executeCreateIntent(request); } @SdkInternalApi final CreateIntentResult executeCreateIntent(CreateIntentRequest createIntentRequest) { ExecutionContext executionContext = createExecutionContext(createIntentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateIntentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createIntentRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateIntent"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateIntentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new resource policy with the specified policy statements. *

* * @param createResourcePolicyRequest * @return Result of the CreateResourcePolicy operation returned by the service. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @sample AmazonLexModelsV2.CreateResourcePolicy * @see AWS API Documentation */ @Override public CreateResourcePolicyResult createResourcePolicy(CreateResourcePolicyRequest request) { request = beforeClientExecution(request); return executeCreateResourcePolicy(request); } @SdkInternalApi final CreateResourcePolicyResult executeCreateResourcePolicy(CreateResourcePolicyRequest createResourcePolicyRequest) { ExecutionContext executionContext = createExecutionContext(createResourcePolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateResourcePolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createResourcePolicyRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateResourcePolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateResourcePolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Adds a new resource policy statement to a bot or bot alias. If a resource policy exists, the statement is added * to the current resource policy. If a policy doesn't exist, a new policy is created. *

*

* You can't create a resource policy statement that allows cross-account access. *

* * @param createResourcePolicyStatementRequest * @return Result of the CreateResourcePolicyStatement operation returned by the service. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @sample AmazonLexModelsV2.CreateResourcePolicyStatement * @see AWS API Documentation */ @Override public CreateResourcePolicyStatementResult createResourcePolicyStatement(CreateResourcePolicyStatementRequest request) { request = beforeClientExecution(request); return executeCreateResourcePolicyStatement(request); } @SdkInternalApi final CreateResourcePolicyStatementResult executeCreateResourcePolicyStatement(CreateResourcePolicyStatementRequest createResourcePolicyStatementRequest) { ExecutionContext executionContext = createExecutionContext(createResourcePolicyStatementRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateResourcePolicyStatementRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(createResourcePolicyStatementRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateResourcePolicyStatement"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateResourcePolicyStatementResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a slot in an intent. A slot is a variable needed to fulfill an intent. For example, an * OrderPizza intent might need slots for size, crust, and number of pizzas. For each slot, you define * one or more utterances that Amazon Lex uses to elicit a response from the user. *

* * @param createSlotRequest * @return Result of the CreateSlot operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.CreateSlot * @see AWS API * Documentation */ @Override public CreateSlotResult createSlot(CreateSlotRequest request) { request = beforeClientExecution(request); return executeCreateSlot(request); } @SdkInternalApi final CreateSlotResult executeCreateSlot(CreateSlotRequest createSlotRequest) { ExecutionContext executionContext = createExecutionContext(createSlotRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateSlotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createSlotRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateSlot"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateSlotResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a custom slot type *

*

* To create a custom slot type, specify a name for the slot type and a set of enumeration values, the values that a * slot of this type can assume. *

* * @param createSlotTypeRequest * @return Result of the CreateSlotType operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.CreateSlotType * @see AWS * API Documentation */ @Override public CreateSlotTypeResult createSlotType(CreateSlotTypeRequest request) { request = beforeClientExecution(request); return executeCreateSlotType(request); } @SdkInternalApi final CreateSlotTypeResult executeCreateSlotType(CreateSlotTypeRequest createSlotTypeRequest) { ExecutionContext executionContext = createExecutionContext(createSlotTypeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateSlotTypeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createSlotTypeRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateSlotType"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateSlotTypeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Create a report that describes the differences between the bot and the test set. *

* * @param createTestSetDiscrepancyReportRequest * @return Result of the CreateTestSetDiscrepancyReport operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @sample AmazonLexModelsV2.CreateTestSetDiscrepancyReport * @see AWS API Documentation */ @Override public CreateTestSetDiscrepancyReportResult createTestSetDiscrepancyReport(CreateTestSetDiscrepancyReportRequest request) { request = beforeClientExecution(request); return executeCreateTestSetDiscrepancyReport(request); } @SdkInternalApi final CreateTestSetDiscrepancyReportResult executeCreateTestSetDiscrepancyReport(CreateTestSetDiscrepancyReportRequest createTestSetDiscrepancyReportRequest) { ExecutionContext executionContext = createExecutionContext(createTestSetDiscrepancyReportRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateTestSetDiscrepancyReportRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(createTestSetDiscrepancyReportRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateTestSetDiscrepancyReport"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateTestSetDiscrepancyReportResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a pre-signed S3 write URL that you use to upload the zip archive when importing a bot or a bot locale. *

* * @param createUploadUrlRequest * @return Result of the CreateUploadUrl operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.CreateUploadUrl * @see AWS * API Documentation */ @Override public CreateUploadUrlResult createUploadUrl(CreateUploadUrlRequest request) { request = beforeClientExecution(request); return executeCreateUploadUrl(request); } @SdkInternalApi final CreateUploadUrlResult executeCreateUploadUrl(CreateUploadUrlRequest createUploadUrlRequest) { ExecutionContext executionContext = createExecutionContext(createUploadUrlRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateUploadUrlRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createUploadUrlRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateUploadUrl"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateUploadUrlResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes all versions of a bot, including the Draft version. To delete a specific version, use the * DeleteBotVersion operation. *

*

* When you delete a bot, all of the resources contained in the bot are also deleted. Deleting a bot removes all * locales, intents, slot, and slot types defined for the bot. *

*

* If a bot has an alias, the DeleteBot operation returns a ResourceInUseException * exception. If you want to delete the bot and the alias, set the skipResourceInUseCheck parameter to * true. *

* * @param deleteBotRequest * @return Result of the DeleteBot operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DeleteBot * @see AWS API * Documentation */ @Override public DeleteBotResult deleteBot(DeleteBotRequest request) { request = beforeClientExecution(request); return executeDeleteBot(request); } @SdkInternalApi final DeleteBotResult executeDeleteBot(DeleteBotRequest deleteBotRequest) { ExecutionContext executionContext = createExecutionContext(deleteBotRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteBotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteBotRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBot"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteBotResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes the specified bot alias. *

* * @param deleteBotAliasRequest * @return Result of the DeleteBotAlias operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DeleteBotAlias * @see AWS * API Documentation */ @Override public DeleteBotAliasResult deleteBotAlias(DeleteBotAliasRequest request) { request = beforeClientExecution(request); return executeDeleteBotAlias(request); } @SdkInternalApi final DeleteBotAliasResult executeDeleteBotAlias(DeleteBotAliasRequest deleteBotAliasRequest) { ExecutionContext executionContext = createExecutionContext(deleteBotAliasRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteBotAliasRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteBotAliasRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBotAlias"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteBotAliasResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes a locale from a bot. *

*

* When you delete a locale, all intents, slots, and slot types defined for the locale are also deleted. *

* * @param deleteBotLocaleRequest * @return Result of the DeleteBotLocale operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DeleteBotLocale * @see AWS * API Documentation */ @Override public DeleteBotLocaleResult deleteBotLocale(DeleteBotLocaleRequest request) { request = beforeClientExecution(request); return executeDeleteBotLocale(request); } @SdkInternalApi final DeleteBotLocaleResult executeDeleteBotLocale(DeleteBotLocaleRequest deleteBotLocaleRequest) { ExecutionContext executionContext = createExecutionContext(deleteBotLocaleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteBotLocaleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteBotLocaleRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBotLocale"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteBotLocaleResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a specific version of a bot. To delete all versions of a bot, use the DeleteBot operation. *

* * @param deleteBotVersionRequest * @return Result of the DeleteBotVersion operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DeleteBotVersion * @see AWS * API Documentation */ @Override public DeleteBotVersionResult deleteBotVersion(DeleteBotVersionRequest request) { request = beforeClientExecution(request); return executeDeleteBotVersion(request); } @SdkInternalApi final DeleteBotVersionResult executeDeleteBotVersion(DeleteBotVersionRequest deleteBotVersionRequest) { ExecutionContext executionContext = createExecutionContext(deleteBotVersionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteBotVersionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteBotVersionRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBotVersion"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteBotVersionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes a custom vocabulary from the specified locale in the specified bot. *

* * @param deleteCustomVocabularyRequest * @return Result of the DeleteCustomVocabulary operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DeleteCustomVocabulary * @see AWS API Documentation */ @Override public DeleteCustomVocabularyResult deleteCustomVocabulary(DeleteCustomVocabularyRequest request) { request = beforeClientExecution(request); return executeDeleteCustomVocabulary(request); } @SdkInternalApi final DeleteCustomVocabularyResult executeDeleteCustomVocabulary(DeleteCustomVocabularyRequest deleteCustomVocabularyRequest) { ExecutionContext executionContext = createExecutionContext(deleteCustomVocabularyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteCustomVocabularyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteCustomVocabularyRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteCustomVocabulary"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteCustomVocabularyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes a previous export and the associated files stored in an S3 bucket. *

* * @param deleteExportRequest * @return Result of the DeleteExport operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DeleteExport * @see AWS API * Documentation */ @Override public DeleteExportResult deleteExport(DeleteExportRequest request) { request = beforeClientExecution(request); return executeDeleteExport(request); } @SdkInternalApi final DeleteExportResult executeDeleteExport(DeleteExportRequest deleteExportRequest) { ExecutionContext executionContext = createExecutionContext(deleteExportRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteExportRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteExportRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteExport"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteExportResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes a previous import and the associated file stored in an S3 bucket. *

* * @param deleteImportRequest * @return Result of the DeleteImport operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DeleteImport * @see AWS API * Documentation */ @Override public DeleteImportResult deleteImport(DeleteImportRequest request) { request = beforeClientExecution(request); return executeDeleteImport(request); } @SdkInternalApi final DeleteImportResult executeDeleteImport(DeleteImportRequest deleteImportRequest) { ExecutionContext executionContext = createExecutionContext(deleteImportRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteImportRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteImportRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteImport"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteImportResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes the specified intent. *

*

* Deleting an intent also deletes the slots associated with the intent. *

* * @param deleteIntentRequest * @return Result of the DeleteIntent operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DeleteIntent * @see AWS API * Documentation */ @Override public DeleteIntentResult deleteIntent(DeleteIntentRequest request) { request = beforeClientExecution(request); return executeDeleteIntent(request); } @SdkInternalApi final DeleteIntentResult executeDeleteIntent(DeleteIntentRequest deleteIntentRequest) { ExecutionContext executionContext = createExecutionContext(deleteIntentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteIntentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteIntentRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteIntent"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteIntentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes an existing policy from a bot or bot alias. If the resource doesn't have a policy attached, Amazon Lex * returns an exception. *

* * @param deleteResourcePolicyRequest * @return Result of the DeleteResourcePolicy operation returned by the service. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @sample AmazonLexModelsV2.DeleteResourcePolicy * @see AWS API Documentation */ @Override public DeleteResourcePolicyResult deleteResourcePolicy(DeleteResourcePolicyRequest request) { request = beforeClientExecution(request); return executeDeleteResourcePolicy(request); } @SdkInternalApi final DeleteResourcePolicyResult executeDeleteResourcePolicy(DeleteResourcePolicyRequest deleteResourcePolicyRequest) { ExecutionContext executionContext = createExecutionContext(deleteResourcePolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteResourcePolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteResourcePolicyRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteResourcePolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteResourcePolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a policy statement from a resource policy. If you delete the last statement from a policy, the policy is * deleted. If you specify a statement ID that doesn't exist in the policy, or if the bot or bot alias doesn't have * a policy attached, Amazon Lex returns an exception. *

* * @param deleteResourcePolicyStatementRequest * @return Result of the DeleteResourcePolicyStatement operation returned by the service. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @sample AmazonLexModelsV2.DeleteResourcePolicyStatement * @see AWS API Documentation */ @Override public DeleteResourcePolicyStatementResult deleteResourcePolicyStatement(DeleteResourcePolicyStatementRequest request) { request = beforeClientExecution(request); return executeDeleteResourcePolicyStatement(request); } @SdkInternalApi final DeleteResourcePolicyStatementResult executeDeleteResourcePolicyStatement(DeleteResourcePolicyStatementRequest deleteResourcePolicyStatementRequest) { ExecutionContext executionContext = createExecutionContext(deleteResourcePolicyStatementRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteResourcePolicyStatementRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteResourcePolicyStatementRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteResourcePolicyStatement"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteResourcePolicyStatementResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes the specified slot from an intent. *

* * @param deleteSlotRequest * @return Result of the DeleteSlot operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DeleteSlot * @see AWS API * Documentation */ @Override public DeleteSlotResult deleteSlot(DeleteSlotRequest request) { request = beforeClientExecution(request); return executeDeleteSlot(request); } @SdkInternalApi final DeleteSlotResult executeDeleteSlot(DeleteSlotRequest deleteSlotRequest) { ExecutionContext executionContext = createExecutionContext(deleteSlotRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteSlotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteSlotRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteSlot"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteSlotResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a slot type from a bot locale. *

*

* If a slot is using the slot type, Amazon Lex throws a ResourceInUseException exception. To avoid the * exception, set the skipResourceInUseCheck parameter to true. *

* * @param deleteSlotTypeRequest * @return Result of the DeleteSlotType operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DeleteSlotType * @see AWS * API Documentation */ @Override public DeleteSlotTypeResult deleteSlotType(DeleteSlotTypeRequest request) { request = beforeClientExecution(request); return executeDeleteSlotType(request); } @SdkInternalApi final DeleteSlotTypeResult executeDeleteSlotType(DeleteSlotTypeRequest deleteSlotTypeRequest) { ExecutionContext executionContext = createExecutionContext(deleteSlotTypeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteSlotTypeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteSlotTypeRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteSlotType"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteSlotTypeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* The action to delete the selected test set. *

* * @param deleteTestSetRequest * @return Result of the DeleteTestSet operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DeleteTestSet * @see AWS * API Documentation */ @Override public DeleteTestSetResult deleteTestSet(DeleteTestSetRequest request) { request = beforeClientExecution(request); return executeDeleteTestSet(request); } @SdkInternalApi final DeleteTestSetResult executeDeleteTestSet(DeleteTestSetRequest deleteTestSetRequest) { ExecutionContext executionContext = createExecutionContext(deleteTestSetRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteTestSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteTestSetRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteTestSet"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteTestSetResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes stored utterances. *

*

* Amazon Lex stores the utterances that users send to your bot. Utterances are stored for 15 days for use with the * * ListAggregatedUtterances operation, and then stored indefinitely for use in improving the ability of your bot * to respond to user input.. *

*

* Use the DeleteUtterances operation to manually delete utterances for a specific session. When you * use the DeleteUtterances operation, utterances stored for improving your bot's ability to respond to * user input are deleted immediately. Utterances stored for use with the ListAggregatedUtterances * operation are deleted after 15 days. *

* * @param deleteUtterancesRequest * @return Result of the DeleteUtterances operation returned by the service. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DeleteUtterances * @see AWS * API Documentation */ @Override public DeleteUtterancesResult deleteUtterances(DeleteUtterancesRequest request) { request = beforeClientExecution(request); return executeDeleteUtterances(request); } @SdkInternalApi final DeleteUtterancesResult executeDeleteUtterances(DeleteUtterancesRequest deleteUtterancesRequest) { ExecutionContext executionContext = createExecutionContext(deleteUtterancesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteUtterancesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteUtterancesRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteUtterances"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteUtterancesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Provides metadata information about a bot. *

* * @param describeBotRequest * @return Result of the DescribeBot operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DescribeBot * @see AWS API * Documentation */ @Override public DescribeBotResult describeBot(DescribeBotRequest request) { request = beforeClientExecution(request); return executeDescribeBot(request); } @SdkInternalApi final DescribeBotResult executeDescribeBot(DescribeBotRequest describeBotRequest) { ExecutionContext executionContext = createExecutionContext(describeBotRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeBotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeBotRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeBot"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeBotResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get information about a specific bot alias. *

* * @param describeBotAliasRequest * @return Result of the DescribeBotAlias operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DescribeBotAlias * @see AWS * API Documentation */ @Override public DescribeBotAliasResult describeBotAlias(DescribeBotAliasRequest request) { request = beforeClientExecution(request); return executeDescribeBotAlias(request); } @SdkInternalApi final DescribeBotAliasResult executeDescribeBotAlias(DescribeBotAliasRequest describeBotAliasRequest) { ExecutionContext executionContext = createExecutionContext(describeBotAliasRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeBotAliasRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeBotAliasRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeBotAlias"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeBotAliasResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes the settings that a bot has for a specific locale. *

* * @param describeBotLocaleRequest * @return Result of the DescribeBotLocale operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DescribeBotLocale * @see AWS API Documentation */ @Override public DescribeBotLocaleResult describeBotLocale(DescribeBotLocaleRequest request) { request = beforeClientExecution(request); return executeDescribeBotLocale(request); } @SdkInternalApi final DescribeBotLocaleResult executeDescribeBotLocale(DescribeBotLocaleRequest describeBotLocaleRequest) { ExecutionContext executionContext = createExecutionContext(describeBotLocaleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeBotLocaleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeBotLocaleRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeBotLocale"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeBotLocaleResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Provides metadata information about a bot recommendation. This information will enable you to get a description * on the request inputs, to download associated transcripts after processing is complete, and to download intents * and slot-types generated by the bot recommendation. *

* * @param describeBotRecommendationRequest * @return Result of the DescribeBotRecommendation operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DescribeBotRecommendation * @see AWS API Documentation */ @Override public DescribeBotRecommendationResult describeBotRecommendation(DescribeBotRecommendationRequest request) { request = beforeClientExecution(request); return executeDescribeBotRecommendation(request); } @SdkInternalApi final DescribeBotRecommendationResult executeDescribeBotRecommendation(DescribeBotRecommendationRequest describeBotRecommendationRequest) { ExecutionContext executionContext = createExecutionContext(describeBotRecommendationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeBotRecommendationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeBotRecommendationRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeBotRecommendation"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeBotRecommendationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Provides metadata about a version of a bot. *

* * @param describeBotVersionRequest * @return Result of the DescribeBotVersion operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DescribeBotVersion * @see AWS API Documentation */ @Override public DescribeBotVersionResult describeBotVersion(DescribeBotVersionRequest request) { request = beforeClientExecution(request); return executeDescribeBotVersion(request); } @SdkInternalApi final DescribeBotVersionResult executeDescribeBotVersion(DescribeBotVersionRequest describeBotVersionRequest) { ExecutionContext executionContext = createExecutionContext(describeBotVersionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeBotVersionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeBotVersionRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeBotVersion"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeBotVersionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Provides metadata information about a custom vocabulary. *

* * @param describeCustomVocabularyMetadataRequest * @return Result of the DescribeCustomVocabularyMetadata operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DescribeCustomVocabularyMetadata * @see AWS API Documentation */ @Override public DescribeCustomVocabularyMetadataResult describeCustomVocabularyMetadata(DescribeCustomVocabularyMetadataRequest request) { request = beforeClientExecution(request); return executeDescribeCustomVocabularyMetadata(request); } @SdkInternalApi final DescribeCustomVocabularyMetadataResult executeDescribeCustomVocabularyMetadata( DescribeCustomVocabularyMetadataRequest describeCustomVocabularyMetadataRequest) { ExecutionContext executionContext = createExecutionContext(describeCustomVocabularyMetadataRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeCustomVocabularyMetadataRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeCustomVocabularyMetadataRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeCustomVocabularyMetadata"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeCustomVocabularyMetadataResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets information about a specific export. *

* * @param describeExportRequest * @return Result of the DescribeExport operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DescribeExport * @see AWS * API Documentation */ @Override public DescribeExportResult describeExport(DescribeExportRequest request) { request = beforeClientExecution(request); return executeDescribeExport(request); } @SdkInternalApi final DescribeExportResult executeDescribeExport(DescribeExportRequest describeExportRequest) { ExecutionContext executionContext = createExecutionContext(describeExportRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeExportRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeExportRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeExport"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeExportResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets information about a specific import. *

* * @param describeImportRequest * @return Result of the DescribeImport operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DescribeImport * @see AWS * API Documentation */ @Override public DescribeImportResult describeImport(DescribeImportRequest request) { request = beforeClientExecution(request); return executeDescribeImport(request); } @SdkInternalApi final DescribeImportResult executeDescribeImport(DescribeImportRequest describeImportRequest) { ExecutionContext executionContext = createExecutionContext(describeImportRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeImportRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeImportRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeImport"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeImportResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns metadata about an intent. *

* * @param describeIntentRequest * @return Result of the DescribeIntent operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DescribeIntent * @see AWS * API Documentation */ @Override public DescribeIntentResult describeIntent(DescribeIntentRequest request) { request = beforeClientExecution(request); return executeDescribeIntent(request); } @SdkInternalApi final DescribeIntentResult executeDescribeIntent(DescribeIntentRequest describeIntentRequest) { ExecutionContext executionContext = createExecutionContext(describeIntentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeIntentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeIntentRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeIntent"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeIntentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets the resource policy and policy revision for a bot or bot alias. *

* * @param describeResourcePolicyRequest * @return Result of the DescribeResourcePolicy operation returned by the service. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @sample AmazonLexModelsV2.DescribeResourcePolicy * @see AWS API Documentation */ @Override public DescribeResourcePolicyResult describeResourcePolicy(DescribeResourcePolicyRequest request) { request = beforeClientExecution(request); return executeDescribeResourcePolicy(request); } @SdkInternalApi final DescribeResourcePolicyResult executeDescribeResourcePolicy(DescribeResourcePolicyRequest describeResourcePolicyRequest) { ExecutionContext executionContext = createExecutionContext(describeResourcePolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeResourcePolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeResourcePolicyRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeResourcePolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeResourcePolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets metadata information about a slot. *

* * @param describeSlotRequest * @return Result of the DescribeSlot operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DescribeSlot * @see AWS API * Documentation */ @Override public DescribeSlotResult describeSlot(DescribeSlotRequest request) { request = beforeClientExecution(request); return executeDescribeSlot(request); } @SdkInternalApi final DescribeSlotResult executeDescribeSlot(DescribeSlotRequest describeSlotRequest) { ExecutionContext executionContext = createExecutionContext(describeSlotRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeSlotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeSlotRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeSlot"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeSlotResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets metadata information about a slot type. *

* * @param describeSlotTypeRequest * @return Result of the DescribeSlotType operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DescribeSlotType * @see AWS * API Documentation */ @Override public DescribeSlotTypeResult describeSlotType(DescribeSlotTypeRequest request) { request = beforeClientExecution(request); return executeDescribeSlotType(request); } @SdkInternalApi final DescribeSlotTypeResult executeDescribeSlotType(DescribeSlotTypeRequest describeSlotTypeRequest) { ExecutionContext executionContext = createExecutionContext(describeSlotTypeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeSlotTypeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeSlotTypeRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeSlotType"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeSlotTypeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets metadata information about the test execution. *

* * @param describeTestExecutionRequest * @return Result of the DescribeTestExecution operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DescribeTestExecution * @see AWS API Documentation */ @Override public DescribeTestExecutionResult describeTestExecution(DescribeTestExecutionRequest request) { request = beforeClientExecution(request); return executeDescribeTestExecution(request); } @SdkInternalApi final DescribeTestExecutionResult executeDescribeTestExecution(DescribeTestExecutionRequest describeTestExecutionRequest) { ExecutionContext executionContext = createExecutionContext(describeTestExecutionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeTestExecutionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeTestExecutionRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeTestExecution"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeTestExecutionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets metadata information about the test set. *

* * @param describeTestSetRequest * @return Result of the DescribeTestSet operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DescribeTestSet * @see AWS * API Documentation */ @Override public DescribeTestSetResult describeTestSet(DescribeTestSetRequest request) { request = beforeClientExecution(request); return executeDescribeTestSet(request); } @SdkInternalApi final DescribeTestSetResult executeDescribeTestSet(DescribeTestSetRequest describeTestSetRequest) { ExecutionContext executionContext = createExecutionContext(describeTestSetRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeTestSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeTestSetRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeTestSet"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeTestSetResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets metadata information about the test set discrepancy report. *

* * @param describeTestSetDiscrepancyReportRequest * @return Result of the DescribeTestSetDiscrepancyReport operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DescribeTestSetDiscrepancyReport * @see AWS API Documentation */ @Override public DescribeTestSetDiscrepancyReportResult describeTestSetDiscrepancyReport(DescribeTestSetDiscrepancyReportRequest request) { request = beforeClientExecution(request); return executeDescribeTestSetDiscrepancyReport(request); } @SdkInternalApi final DescribeTestSetDiscrepancyReportResult executeDescribeTestSetDiscrepancyReport( DescribeTestSetDiscrepancyReportRequest describeTestSetDiscrepancyReportRequest) { ExecutionContext executionContext = createExecutionContext(describeTestSetDiscrepancyReportRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeTestSetDiscrepancyReportRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeTestSetDiscrepancyReportRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeTestSetDiscrepancyReport"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeTestSetDiscrepancyReportResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets metadata information about the test set generation. *

* * @param describeTestSetGenerationRequest * @return Result of the DescribeTestSetGeneration operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.DescribeTestSetGeneration * @see AWS API Documentation */ @Override public DescribeTestSetGenerationResult describeTestSetGeneration(DescribeTestSetGenerationRequest request) { request = beforeClientExecution(request); return executeDescribeTestSetGeneration(request); } @SdkInternalApi final DescribeTestSetGenerationResult executeDescribeTestSetGeneration(DescribeTestSetGenerationRequest describeTestSetGenerationRequest) { ExecutionContext executionContext = createExecutionContext(describeTestSetGenerationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeTestSetGenerationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeTestSetGenerationRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeTestSetGeneration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeTestSetGenerationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* The pre-signed Amazon S3 URL to download the test execution result artifacts. *

* * @param getTestExecutionArtifactsUrlRequest * @return Result of the GetTestExecutionArtifactsUrl operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.GetTestExecutionArtifactsUrl * @see AWS API Documentation */ @Override public GetTestExecutionArtifactsUrlResult getTestExecutionArtifactsUrl(GetTestExecutionArtifactsUrlRequest request) { request = beforeClientExecution(request); return executeGetTestExecutionArtifactsUrl(request); } @SdkInternalApi final GetTestExecutionArtifactsUrlResult executeGetTestExecutionArtifactsUrl(GetTestExecutionArtifactsUrlRequest getTestExecutionArtifactsUrlRequest) { ExecutionContext executionContext = createExecutionContext(getTestExecutionArtifactsUrlRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetTestExecutionArtifactsUrlRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getTestExecutionArtifactsUrlRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetTestExecutionArtifactsUrl"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetTestExecutionArtifactsUrlResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Provides a list of utterances that users have sent to the bot. *

*

* Utterances are aggregated by the text of the utterance. For example, all instances where customers used the * phrase "I want to order pizza" are aggregated into the same line in the response. *

*

* You can see both detected utterances and missed utterances. A detected utterance is where the bot properly * recognized the utterance and activated the associated intent. A missed utterance was not recognized by the bot * and didn't activate an intent. *

*

* Utterances can be aggregated for a bot alias or for a bot version, but not both at the same time. *

*

* Utterances statistics are not generated under the following conditions: *

*
    *
  • *

    * The childDirected field was set to true when the bot was created. *

    *
  • *
  • *

    * You are using slot obfuscation with one or more slots. *

    *
  • *
  • *

    * You opted out of participating in improving Amazon Lex. *

    *
  • *
* * @param listAggregatedUtterancesRequest * @return Result of the ListAggregatedUtterances operation returned by the service. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListAggregatedUtterances * @see AWS API Documentation */ @Override public ListAggregatedUtterancesResult listAggregatedUtterances(ListAggregatedUtterancesRequest request) { request = beforeClientExecution(request); return executeListAggregatedUtterances(request); } @SdkInternalApi final ListAggregatedUtterancesResult executeListAggregatedUtterances(ListAggregatedUtterancesRequest listAggregatedUtterancesRequest) { ExecutionContext executionContext = createExecutionContext(listAggregatedUtterancesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListAggregatedUtterancesRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listAggregatedUtterancesRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAggregatedUtterances"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAggregatedUtterancesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a list of aliases for the specified bot. *

* * @param listBotAliasesRequest * @return Result of the ListBotAliases operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListBotAliases * @see AWS * API Documentation */ @Override public ListBotAliasesResult listBotAliases(ListBotAliasesRequest request) { request = beforeClientExecution(request); return executeListBotAliases(request); } @SdkInternalApi final ListBotAliasesResult executeListBotAliases(ListBotAliasesRequest listBotAliasesRequest) { ExecutionContext executionContext = createExecutionContext(listBotAliasesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListBotAliasesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listBotAliasesRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListBotAliases"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListBotAliasesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a list of locales for the specified bot. *

* * @param listBotLocalesRequest * @return Result of the ListBotLocales operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListBotLocales * @see AWS * API Documentation */ @Override public ListBotLocalesResult listBotLocales(ListBotLocalesRequest request) { request = beforeClientExecution(request); return executeListBotLocales(request); } @SdkInternalApi final ListBotLocalesResult executeListBotLocales(ListBotLocalesRequest listBotLocalesRequest) { ExecutionContext executionContext = createExecutionContext(listBotLocalesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListBotLocalesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listBotLocalesRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListBotLocales"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListBotLocalesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get a list of bot recommendations that meet the specified criteria. *

* * @param listBotRecommendationsRequest * @return Result of the ListBotRecommendations operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @sample AmazonLexModelsV2.ListBotRecommendations * @see AWS API Documentation */ @Override public ListBotRecommendationsResult listBotRecommendations(ListBotRecommendationsRequest request) { request = beforeClientExecution(request); return executeListBotRecommendations(request); } @SdkInternalApi final ListBotRecommendationsResult executeListBotRecommendations(ListBotRecommendationsRequest listBotRecommendationsRequest) { ExecutionContext executionContext = createExecutionContext(listBotRecommendationsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListBotRecommendationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listBotRecommendationsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListBotRecommendations"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListBotRecommendationsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets information about all of the versions of a bot. *

*

* The ListBotVersions operation returns a summary of each version of a bot. For example, if a bot has * three numbered versions, the ListBotVersions operation returns for summaries, one for each numbered * version and one for the DRAFT version. *

*

* The ListBotVersions operation always returns at least one version, the DRAFT version. *

* * @param listBotVersionsRequest * @return Result of the ListBotVersions operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListBotVersions * @see AWS * API Documentation */ @Override public ListBotVersionsResult listBotVersions(ListBotVersionsRequest request) { request = beforeClientExecution(request); return executeListBotVersions(request); } @SdkInternalApi final ListBotVersionsResult executeListBotVersions(ListBotVersionsRequest listBotVersionsRequest) { ExecutionContext executionContext = createExecutionContext(listBotVersionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListBotVersionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listBotVersionsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListBotVersions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListBotVersionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a list of available bots. *

* * @param listBotsRequest * @return Result of the ListBots operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListBots * @see AWS API * Documentation */ @Override public ListBotsResult listBots(ListBotsRequest request) { request = beforeClientExecution(request); return executeListBots(request); } @SdkInternalApi final ListBotsResult executeListBots(ListBotsRequest listBotsRequest) { ExecutionContext executionContext = createExecutionContext(listBotsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListBotsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listBotsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListBots"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListBotsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a list of built-in intents provided by Amazon Lex that you can use in your bot. *

*

* To use a built-in intent as a the base for your own intent, include the built-in intent signature in the * parentIntentSignature parameter when you call the CreateIntent operation. For more * information, see CreateIntent. *

* * @param listBuiltInIntentsRequest * @return Result of the ListBuiltInIntents operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListBuiltInIntents * @see AWS API Documentation */ @Override public ListBuiltInIntentsResult listBuiltInIntents(ListBuiltInIntentsRequest request) { request = beforeClientExecution(request); return executeListBuiltInIntents(request); } @SdkInternalApi final ListBuiltInIntentsResult executeListBuiltInIntents(ListBuiltInIntentsRequest listBuiltInIntentsRequest) { ExecutionContext executionContext = createExecutionContext(listBuiltInIntentsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListBuiltInIntentsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listBuiltInIntentsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListBuiltInIntents"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListBuiltInIntentsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a list of built-in slot types that meet the specified criteria. *

* * @param listBuiltInSlotTypesRequest * @return Result of the ListBuiltInSlotTypes operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListBuiltInSlotTypes * @see AWS API Documentation */ @Override public ListBuiltInSlotTypesResult listBuiltInSlotTypes(ListBuiltInSlotTypesRequest request) { request = beforeClientExecution(request); return executeListBuiltInSlotTypes(request); } @SdkInternalApi final ListBuiltInSlotTypesResult executeListBuiltInSlotTypes(ListBuiltInSlotTypesRequest listBuiltInSlotTypesRequest) { ExecutionContext executionContext = createExecutionContext(listBuiltInSlotTypesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListBuiltInSlotTypesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listBuiltInSlotTypesRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListBuiltInSlotTypes"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListBuiltInSlotTypesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Paginated list of custom vocabulary items for a given bot locale's custom vocabulary. *

* * @param listCustomVocabularyItemsRequest * @return Result of the ListCustomVocabularyItems operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListCustomVocabularyItems * @see AWS API Documentation */ @Override public ListCustomVocabularyItemsResult listCustomVocabularyItems(ListCustomVocabularyItemsRequest request) { request = beforeClientExecution(request); return executeListCustomVocabularyItems(request); } @SdkInternalApi final ListCustomVocabularyItemsResult executeListCustomVocabularyItems(ListCustomVocabularyItemsRequest listCustomVocabularyItemsRequest) { ExecutionContext executionContext = createExecutionContext(listCustomVocabularyItemsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListCustomVocabularyItemsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listCustomVocabularyItemsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListCustomVocabularyItems"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListCustomVocabularyItemsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists the exports for a bot, bot locale, or custom vocabulary. Exports are kept in the list for 7 days. *

* * @param listExportsRequest * @return Result of the ListExports operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListExports * @see AWS API * Documentation */ @Override public ListExportsResult listExports(ListExportsRequest request) { request = beforeClientExecution(request); return executeListExports(request); } @SdkInternalApi final ListExportsResult executeListExports(ListExportsRequest listExportsRequest) { ExecutionContext executionContext = createExecutionContext(listExportsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListExportsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listExportsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListExports"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListExportsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists the imports for a bot, bot locale, or custom vocabulary. Imports are kept in the list for 7 days. *

* * @param listImportsRequest * @return Result of the ListImports operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListImports * @see AWS API * Documentation */ @Override public ListImportsResult listImports(ListImportsRequest request) { request = beforeClientExecution(request); return executeListImports(request); } @SdkInternalApi final ListImportsResult executeListImports(ListImportsRequest listImportsRequest) { ExecutionContext executionContext = createExecutionContext(listImportsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListImportsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listImportsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListImports"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListImportsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves summary metrics for the intents in your bot. The following fields are required: *

*
    *
  • *

    * metrics – A list of AnalyticsIntentMetric objects. In each object, use the name field to specify the metric to * calculate, the statistic field to specify whether to calculate the Sum, * Average, or Max number, and the order field to specify whether to sort the * results in Ascending or Descending order. *

    *
  • *
  • *

    * startDateTime and endDateTime – Define a time range for which you want to retrieve * results. *

    *
  • *
*

* Of the optional fields, you can organize the results in the following ways: *

*
    *
  • *

    * Use the filters field to filter the results, the groupBy field to specify categories by * which to group the results, and the binBy field to specify time intervals by which to group the * results. *

    *
  • *
  • *

    * Use the maxResults field to limit the number of results to return in a single response and the * nextToken field to return the next batch of results if the response does not return the full set of * results. *

    *
  • *
*

* Note that an order field exists in both binBy and metrics. You can specify * only one order in a given request. *

* * @param listIntentMetricsRequest * @return Result of the ListIntentMetrics operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListIntentMetrics * @see AWS API Documentation */ @Override public ListIntentMetricsResult listIntentMetrics(ListIntentMetricsRequest request) { request = beforeClientExecution(request); return executeListIntentMetrics(request); } @SdkInternalApi final ListIntentMetricsResult executeListIntentMetrics(ListIntentMetricsRequest listIntentMetricsRequest) { ExecutionContext executionContext = createExecutionContext(listIntentMetricsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListIntentMetricsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listIntentMetricsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListIntentMetrics"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListIntentMetricsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves summary statistics for a path of intents that users take over sessions with your bot. The following * fields are required: *

*
    *
  • *

    * startDateTime and endDateTime – Define a time range for which you want to retrieve * results. *

    *
  • *
  • *

    * intentPath – Define an order of intents for which you want to retrieve metrics. Separate intents in * the path with a forward slash. For example, populate the intentPath field with * /BookCar/BookHotel to see details about how many times users invoked the BookCar and * BookHotel intents in that order. *

    *
  • *
*

* Use the optional filters field to filter the results. *

* * @param listIntentPathsRequest * @return Result of the ListIntentPaths operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListIntentPaths * @see AWS * API Documentation */ @Override public ListIntentPathsResult listIntentPaths(ListIntentPathsRequest request) { request = beforeClientExecution(request); return executeListIntentPaths(request); } @SdkInternalApi final ListIntentPathsResult executeListIntentPaths(ListIntentPathsRequest listIntentPathsRequest) { ExecutionContext executionContext = createExecutionContext(listIntentPathsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListIntentPathsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listIntentPathsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListIntentPaths"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListIntentPathsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves summary metrics for the stages within intents in your bot. The following fields are required: *

*
    *
  • *

    * metrics – A list of AnalyticsIntentStageMetric objects. In each object, use the name field to specify the metric to * calculate, the statistic field to specify whether to calculate the Sum, * Average, or Max number, and the order field to specify whether to sort the * results in Ascending or Descending order. *

    *
  • *
  • *

    * startDateTime and endDateTime – Define a time range for which you want to retrieve * results. *

    *
  • *
*

* Of the optional fields, you can organize the results in the following ways: *

*
    *
  • *

    * Use the filters field to filter the results, the groupBy field to specify categories by * which to group the results, and the binBy field to specify time intervals by which to group the * results. *

    *
  • *
  • *

    * Use the maxResults field to limit the number of results to return in a single response and the * nextToken field to return the next batch of results if the response does not return the full set of * results. *

    *
  • *
*

* Note that an order field exists in both binBy and metrics. You can only * specify one order in a given request. *

* * @param listIntentStageMetricsRequest * @return Result of the ListIntentStageMetrics operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListIntentStageMetrics * @see AWS API Documentation */ @Override public ListIntentStageMetricsResult listIntentStageMetrics(ListIntentStageMetricsRequest request) { request = beforeClientExecution(request); return executeListIntentStageMetrics(request); } @SdkInternalApi final ListIntentStageMetricsResult executeListIntentStageMetrics(ListIntentStageMetricsRequest listIntentStageMetricsRequest) { ExecutionContext executionContext = createExecutionContext(listIntentStageMetricsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListIntentStageMetricsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listIntentStageMetricsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListIntentStageMetrics"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListIntentStageMetricsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get a list of intents that meet the specified criteria. *

* * @param listIntentsRequest * @return Result of the ListIntents operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListIntents * @see AWS API * Documentation */ @Override public ListIntentsResult listIntents(ListIntentsRequest request) { request = beforeClientExecution(request); return executeListIntents(request); } @SdkInternalApi final ListIntentsResult executeListIntents(ListIntentsRequest listIntentsRequest) { ExecutionContext executionContext = createExecutionContext(listIntentsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListIntentsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listIntentsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListIntents"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListIntentsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a list of recommended intents provided by the bot recommendation that you can use in your bot. Intents in * the response are ordered by relevance. *

* * @param listRecommendedIntentsRequest * @return Result of the ListRecommendedIntents operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @sample AmazonLexModelsV2.ListRecommendedIntents * @see AWS API Documentation */ @Override public ListRecommendedIntentsResult listRecommendedIntents(ListRecommendedIntentsRequest request) { request = beforeClientExecution(request); return executeListRecommendedIntents(request); } @SdkInternalApi final ListRecommendedIntentsResult executeListRecommendedIntents(ListRecommendedIntentsRequest listRecommendedIntentsRequest) { ExecutionContext executionContext = createExecutionContext(listRecommendedIntentsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListRecommendedIntentsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listRecommendedIntentsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListRecommendedIntents"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListRecommendedIntentsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves a list of metadata for individual user sessions with your bot. The startDateTime and * endDateTime fields are required. These fields define a time range for which you want to retrieve * results. Of the optional fields, you can organize the results in the following ways: *

*
    *
  • *

    * Use the filters field to filter the results and the sortBy field to specify the values * by which to sort the results. *

    *
  • *
  • *

    * Use the maxResults field to limit the number of results to return in a single response and the * nextToken field to return the next batch of results if the response does not return the full set of * results. *

    *
  • *
* * @param listSessionAnalyticsDataRequest * @return Result of the ListSessionAnalyticsData operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListSessionAnalyticsData * @see AWS API Documentation */ @Override public ListSessionAnalyticsDataResult listSessionAnalyticsData(ListSessionAnalyticsDataRequest request) { request = beforeClientExecution(request); return executeListSessionAnalyticsData(request); } @SdkInternalApi final ListSessionAnalyticsDataResult executeListSessionAnalyticsData(ListSessionAnalyticsDataRequest listSessionAnalyticsDataRequest) { ExecutionContext executionContext = createExecutionContext(listSessionAnalyticsDataRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListSessionAnalyticsDataRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listSessionAnalyticsDataRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListSessionAnalyticsData"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListSessionAnalyticsDataResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves summary metrics for the user sessions with your bot. The following fields are required: *

*
    *
  • *

    * metrics – A list of AnalyticsSessionMetric objects. In each object, use the name field to specify the metric to * calculate, the statistic field to specify whether to calculate the Sum, * Average, or Max number, and the order field to specify whether to sort the * results in Ascending or Descending order. *

    *
  • *
  • *

    * startDateTime and endDateTime – Define a time range for which you want to retrieve * results. *

    *
  • *
*

* Of the optional fields, you can organize the results in the following ways: *

*
    *
  • *

    * Use the filters field to filter the results, the groupBy field to specify categories by * which to group the results, and the binBy field to specify time intervals by which to group the * results. *

    *
  • *
  • *

    * Use the maxResults field to limit the number of results to return in a single response and the * nextToken field to return the next batch of results if the response does not return the full set of * results. *

    *
  • *
*

* Note that an order field exists in both binBy and metrics. Currently, you * can specify it in either field, but not in both. *

* * @param listSessionMetricsRequest * @return Result of the ListSessionMetrics operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListSessionMetrics * @see AWS API Documentation */ @Override public ListSessionMetricsResult listSessionMetrics(ListSessionMetricsRequest request) { request = beforeClientExecution(request); return executeListSessionMetrics(request); } @SdkInternalApi final ListSessionMetricsResult executeListSessionMetrics(ListSessionMetricsRequest listSessionMetricsRequest) { ExecutionContext executionContext = createExecutionContext(listSessionMetricsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListSessionMetricsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listSessionMetricsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListSessionMetrics"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListSessionMetricsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a list of slot types that match the specified criteria. *

* * @param listSlotTypesRequest * @return Result of the ListSlotTypes operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListSlotTypes * @see AWS * API Documentation */ @Override public ListSlotTypesResult listSlotTypes(ListSlotTypesRequest request) { request = beforeClientExecution(request); return executeListSlotTypes(request); } @SdkInternalApi final ListSlotTypesResult executeListSlotTypes(ListSlotTypesRequest listSlotTypesRequest) { ExecutionContext executionContext = createExecutionContext(listSlotTypesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListSlotTypesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listSlotTypesRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListSlotTypes"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListSlotTypesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a list of slots that match the specified criteria. *

* * @param listSlotsRequest * @return Result of the ListSlots operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListSlots * @see AWS API * Documentation */ @Override public ListSlotsResult listSlots(ListSlotsRequest request) { request = beforeClientExecution(request); return executeListSlots(request); } @SdkInternalApi final ListSlotsResult executeListSlots(ListSlotsRequest listSlotsRequest) { ExecutionContext executionContext = createExecutionContext(listSlotsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListSlotsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listSlotsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListSlots"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListSlotsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a list of tags associated with a resource. Only bots, bot aliases, and bot channels can have tags associated * with them. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @sample AmazonLexModelsV2.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, "Lex Models V2"); 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); } } /** *

* Gets a list of test execution result items. *

* * @param listTestExecutionResultItemsRequest * @return Result of the ListTestExecutionResultItems operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListTestExecutionResultItems * @see AWS API Documentation */ @Override public ListTestExecutionResultItemsResult listTestExecutionResultItems(ListTestExecutionResultItemsRequest request) { request = beforeClientExecution(request); return executeListTestExecutionResultItems(request); } @SdkInternalApi final ListTestExecutionResultItemsResult executeListTestExecutionResultItems(ListTestExecutionResultItemsRequest listTestExecutionResultItemsRequest) { ExecutionContext executionContext = createExecutionContext(listTestExecutionResultItemsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListTestExecutionResultItemsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listTestExecutionResultItemsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTestExecutionResultItems"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTestExecutionResultItemsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* The list of test set executions. *

* * @param listTestExecutionsRequest * @return Result of the ListTestExecutions operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListTestExecutions * @see AWS API Documentation */ @Override public ListTestExecutionsResult listTestExecutions(ListTestExecutionsRequest request) { request = beforeClientExecution(request); return executeListTestExecutions(request); } @SdkInternalApi final ListTestExecutionsResult executeListTestExecutions(ListTestExecutionsRequest listTestExecutionsRequest) { ExecutionContext executionContext = createExecutionContext(listTestExecutionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListTestExecutionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTestExecutionsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTestExecutions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTestExecutionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* The list of test set records. *

* * @param listTestSetRecordsRequest * @return Result of the ListTestSetRecords operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListTestSetRecords * @see AWS API Documentation */ @Override public ListTestSetRecordsResult listTestSetRecords(ListTestSetRecordsRequest request) { request = beforeClientExecution(request); return executeListTestSetRecords(request); } @SdkInternalApi final ListTestSetRecordsResult executeListTestSetRecords(ListTestSetRecordsRequest listTestSetRecordsRequest) { ExecutionContext executionContext = createExecutionContext(listTestSetRecordsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListTestSetRecordsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTestSetRecordsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTestSetRecords"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTestSetRecordsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* The list of the test sets *

* * @param listTestSetsRequest * @return Result of the ListTestSets operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListTestSets * @see AWS API * Documentation */ @Override public ListTestSetsResult listTestSets(ListTestSetsRequest request) { request = beforeClientExecution(request); return executeListTestSets(request); } @SdkInternalApi final ListTestSetsResult executeListTestSets(ListTestSetsRequest listTestSetsRequest) { ExecutionContext executionContext = createExecutionContext(listTestSetsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListTestSetsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTestSetsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTestSets"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTestSetsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * *

* To use this API operation, your IAM role must have permissions to perform the ListAggregatedUtterances operation, which provides access to utterance-related analytics. See Viewing utterance statistics * for the IAM policy to apply to the IAM role. *

*
*

* Retrieves a list of metadata for individual user utterances to your bot. The following fields are required: *

*
    *
  • *

    * startDateTime and endDateTime – Define a time range for which you want to retrieve * results. *

    *
  • *
*

* Of the optional fields, you can organize the results in the following ways: *

*
    *
  • *

    * Use the filters field to filter the results and the sortBy field to specify the values * by which to sort the results. *

    *
  • *
  • *

    * Use the maxResults field to limit the number of results to return in a single response and the * nextToken field to return the next batch of results if the response does not return the full set of * results. *

    *
  • *
* * @param listUtteranceAnalyticsDataRequest * @return Result of the ListUtteranceAnalyticsData operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListUtteranceAnalyticsData * @see AWS API Documentation */ @Override public ListUtteranceAnalyticsDataResult listUtteranceAnalyticsData(ListUtteranceAnalyticsDataRequest request) { request = beforeClientExecution(request); return executeListUtteranceAnalyticsData(request); } @SdkInternalApi final ListUtteranceAnalyticsDataResult executeListUtteranceAnalyticsData(ListUtteranceAnalyticsDataRequest listUtteranceAnalyticsDataRequest) { ExecutionContext executionContext = createExecutionContext(listUtteranceAnalyticsDataRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListUtteranceAnalyticsDataRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listUtteranceAnalyticsDataRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListUtteranceAnalyticsData"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListUtteranceAnalyticsDataResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * *

* To use this API operation, your IAM role must have permissions to perform the ListAggregatedUtterances operation, which provides access to utterance-related analytics. See Viewing utterance statistics * for the IAM policy to apply to the IAM role. *

*
*

* Retrieves summary metrics for the utterances in your bot. The following fields are required: *

*
    *
  • *

    * metrics – A list of AnalyticsUtteranceMetric objects. In each object, use the name field to specify the metric to * calculate, the statistic field to specify whether to calculate the Sum, * Average, or Max number, and the order field to specify whether to sort the * results in Ascending or Descending order. *

    *
  • *
  • *

    * startDateTime and endDateTime – Define a time range for which you want to retrieve * results. *

    *
  • *
*

* Of the optional fields, you can organize the results in the following ways: *

*
    *
  • *

    * Use the filters field to filter the results, the groupBy field to specify categories by * which to group the results, and the binBy field to specify time intervals by which to group the * results. *

    *
  • *
  • *

    * Use the maxResults field to limit the number of results to return in a single response and the * nextToken field to return the next batch of results if the response does not return the full set of * results. *

    *
  • *
*

* Note that an order field exists in both binBy and metrics. Currently, you * can specify it in either field, but not in both. *

* * @param listUtteranceMetricsRequest * @return Result of the ListUtteranceMetrics operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.ListUtteranceMetrics * @see AWS API Documentation */ @Override public ListUtteranceMetricsResult listUtteranceMetrics(ListUtteranceMetricsRequest request) { request = beforeClientExecution(request); return executeListUtteranceMetrics(request); } @SdkInternalApi final ListUtteranceMetricsResult executeListUtteranceMetrics(ListUtteranceMetricsRequest listUtteranceMetricsRequest) { ExecutionContext executionContext = createExecutionContext(listUtteranceMetricsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListUtteranceMetricsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listUtteranceMetricsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListUtteranceMetrics"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListUtteranceMetricsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Search for associated transcripts that meet the specified criteria. *

* * @param searchAssociatedTranscriptsRequest * @return Result of the SearchAssociatedTranscripts operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @sample AmazonLexModelsV2.SearchAssociatedTranscripts * @see AWS API Documentation */ @Override public SearchAssociatedTranscriptsResult searchAssociatedTranscripts(SearchAssociatedTranscriptsRequest request) { request = beforeClientExecution(request); return executeSearchAssociatedTranscripts(request); } @SdkInternalApi final SearchAssociatedTranscriptsResult executeSearchAssociatedTranscripts(SearchAssociatedTranscriptsRequest searchAssociatedTranscriptsRequest) { ExecutionContext executionContext = createExecutionContext(searchAssociatedTranscriptsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new SearchAssociatedTranscriptsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(searchAssociatedTranscriptsRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SearchAssociatedTranscripts"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new SearchAssociatedTranscriptsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Use this to provide your transcript data, and to start the bot recommendation process. *

* * @param startBotRecommendationRequest * @return Result of the StartBotRecommendation operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.StartBotRecommendation * @see AWS API Documentation */ @Override public StartBotRecommendationResult startBotRecommendation(StartBotRecommendationRequest request) { request = beforeClientExecution(request); return executeStartBotRecommendation(request); } @SdkInternalApi final StartBotRecommendationResult executeStartBotRecommendation(StartBotRecommendationRequest startBotRecommendationRequest) { ExecutionContext executionContext = createExecutionContext(startBotRecommendationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartBotRecommendationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startBotRecommendationRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartBotRecommendation"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartBotRecommendationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Starts importing a bot, bot locale, or custom vocabulary from a zip archive that you uploaded to an S3 bucket. *

* * @param startImportRequest * @return Result of the StartImport operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.StartImport * @see AWS API * Documentation */ @Override public StartImportResult startImport(StartImportRequest request) { request = beforeClientExecution(request); return executeStartImport(request); } @SdkInternalApi final StartImportResult executeStartImport(StartImportRequest startImportRequest) { ExecutionContext executionContext = createExecutionContext(startImportRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartImportRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startImportRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartImport"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartImportResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* The action to start test set execution. *

* * @param startTestExecutionRequest * @return Result of the StartTestExecution operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.StartTestExecution * @see AWS API Documentation */ @Override public StartTestExecutionResult startTestExecution(StartTestExecutionRequest request) { request = beforeClientExecution(request); return executeStartTestExecution(request); } @SdkInternalApi final StartTestExecutionResult executeStartTestExecution(StartTestExecutionRequest startTestExecutionRequest) { ExecutionContext executionContext = createExecutionContext(startTestExecutionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartTestExecutionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startTestExecutionRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartTestExecution"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartTestExecutionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* The action to start the generation of test set. *

* * @param startTestSetGenerationRequest * @return Result of the StartTestSetGeneration operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.StartTestSetGeneration * @see AWS API Documentation */ @Override public StartTestSetGenerationResult startTestSetGeneration(StartTestSetGenerationRequest request) { request = beforeClientExecution(request); return executeStartTestSetGeneration(request); } @SdkInternalApi final StartTestSetGenerationResult executeStartTestSetGeneration(StartTestSetGenerationRequest startTestSetGenerationRequest) { ExecutionContext executionContext = createExecutionContext(startTestSetGenerationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartTestSetGenerationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startTestSetGenerationRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartTestSetGeneration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartTestSetGenerationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Stop an already running Bot Recommendation request. *

* * @param stopBotRecommendationRequest * @return Result of the StopBotRecommendation operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.StopBotRecommendation * @see AWS API Documentation */ @Override public StopBotRecommendationResult stopBotRecommendation(StopBotRecommendationRequest request) { request = beforeClientExecution(request); return executeStopBotRecommendation(request); } @SdkInternalApi final StopBotRecommendationResult executeStopBotRecommendation(StopBotRecommendationRequest stopBotRecommendationRequest) { ExecutionContext executionContext = createExecutionContext(stopBotRecommendationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StopBotRecommendationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopBotRecommendationRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopBotRecommendation"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopBotRecommendationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Adds the specified tags to the specified resource. If a tag key already exists, the existing value is replaced * with the new value. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @sample AmazonLexModelsV2.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, "Lex Models V2"); 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); } } /** *

* Removes tags from a bot, bot alias, or bot channel. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @sample AmazonLexModelsV2.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, "Lex Models V2"); 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 configuration of an existing bot. *

* * @param updateBotRequest * @return Result of the UpdateBot operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.UpdateBot * @see AWS API * Documentation */ @Override public UpdateBotResult updateBot(UpdateBotRequest request) { request = beforeClientExecution(request); return executeUpdateBot(request); } @SdkInternalApi final UpdateBotResult executeUpdateBot(UpdateBotRequest updateBotRequest) { ExecutionContext executionContext = createExecutionContext(updateBotRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateBotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateBotRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateBot"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateBotResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the configuration of an existing bot alias. *

* * @param updateBotAliasRequest * @return Result of the UpdateBotAlias operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.UpdateBotAlias * @see AWS * API Documentation */ @Override public UpdateBotAliasResult updateBotAlias(UpdateBotAliasRequest request) { request = beforeClientExecution(request); return executeUpdateBotAlias(request); } @SdkInternalApi final UpdateBotAliasResult executeUpdateBotAlias(UpdateBotAliasRequest updateBotAliasRequest) { ExecutionContext executionContext = createExecutionContext(updateBotAliasRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateBotAliasRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateBotAliasRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateBotAlias"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateBotAliasResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the settings that a bot has for a specific locale. *

* * @param updateBotLocaleRequest * @return Result of the UpdateBotLocale operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.UpdateBotLocale * @see AWS * API Documentation */ @Override public UpdateBotLocaleResult updateBotLocale(UpdateBotLocaleRequest request) { request = beforeClientExecution(request); return executeUpdateBotLocale(request); } @SdkInternalApi final UpdateBotLocaleResult executeUpdateBotLocale(UpdateBotLocaleRequest updateBotLocaleRequest) { ExecutionContext executionContext = createExecutionContext(updateBotLocaleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateBotLocaleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateBotLocaleRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateBotLocale"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateBotLocaleResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates an existing bot recommendation request. *

* * @param updateBotRecommendationRequest * @return Result of the UpdateBotRecommendation operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.UpdateBotRecommendation * @see AWS API Documentation */ @Override public UpdateBotRecommendationResult updateBotRecommendation(UpdateBotRecommendationRequest request) { request = beforeClientExecution(request); return executeUpdateBotRecommendation(request); } @SdkInternalApi final UpdateBotRecommendationResult executeUpdateBotRecommendation(UpdateBotRecommendationRequest updateBotRecommendationRequest) { ExecutionContext executionContext = createExecutionContext(updateBotRecommendationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateBotRecommendationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(updateBotRecommendationRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateBotRecommendation"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateBotRecommendationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the password used to protect an export zip archive. *

*

* The password is not required. If you don't supply a password, Amazon Lex generates a zip file that is not * protected by a password. This is the archive that is available at the pre-signed S3 URL provided by the DescribeExport * operation. *

* * @param updateExportRequest * @return Result of the UpdateExport operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.UpdateExport * @see AWS API * Documentation */ @Override public UpdateExportResult updateExport(UpdateExportRequest request) { request = beforeClientExecution(request); return executeUpdateExport(request); } @SdkInternalApi final UpdateExportResult executeUpdateExport(UpdateExportRequest updateExportRequest) { ExecutionContext executionContext = createExecutionContext(updateExportRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateExportRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateExportRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateExport"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateExportResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the settings for an intent. *

* * @param updateIntentRequest * @return Result of the UpdateIntent operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.UpdateIntent * @see AWS API * Documentation */ @Override public UpdateIntentResult updateIntent(UpdateIntentRequest request) { request = beforeClientExecution(request); return executeUpdateIntent(request); } @SdkInternalApi final UpdateIntentResult executeUpdateIntent(UpdateIntentRequest updateIntentRequest) { ExecutionContext executionContext = createExecutionContext(updateIntentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateIntentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateIntentRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateIntent"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateIntentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Replaces the existing resource policy for a bot or bot alias with a new one. If the policy doesn't exist, Amazon * Lex returns an exception. *

* * @param updateResourcePolicyRequest * @return Result of the UpdateResourcePolicy operation returned by the service. * @throws ResourceNotFoundException * You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try * again. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @sample AmazonLexModelsV2.UpdateResourcePolicy * @see AWS API Documentation */ @Override public UpdateResourcePolicyResult updateResourcePolicy(UpdateResourcePolicyRequest request) { request = beforeClientExecution(request); return executeUpdateResourcePolicy(request); } @SdkInternalApi final UpdateResourcePolicyResult executeUpdateResourcePolicy(UpdateResourcePolicyRequest updateResourcePolicyRequest) { ExecutionContext executionContext = createExecutionContext(updateResourcePolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateResourcePolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateResourcePolicyRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateResourcePolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateResourcePolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the settings for a slot. *

* * @param updateSlotRequest * @return Result of the UpdateSlot operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.UpdateSlot * @see AWS API * Documentation */ @Override public UpdateSlotResult updateSlot(UpdateSlotRequest request) { request = beforeClientExecution(request); return executeUpdateSlot(request); } @SdkInternalApi final UpdateSlotResult executeUpdateSlot(UpdateSlotRequest updateSlotRequest) { ExecutionContext executionContext = createExecutionContext(updateSlotRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateSlotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateSlotRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateSlot"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateSlotResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the configuration of an existing slot type. *

* * @param updateSlotTypeRequest * @return Result of the UpdateSlotType operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.UpdateSlotType * @see AWS * API Documentation */ @Override public UpdateSlotTypeResult updateSlotType(UpdateSlotTypeRequest request) { request = beforeClientExecution(request); return executeUpdateSlotType(request); } @SdkInternalApi final UpdateSlotTypeResult executeUpdateSlotType(UpdateSlotTypeRequest updateSlotTypeRequest) { ExecutionContext executionContext = createExecutionContext(updateSlotTypeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateSlotTypeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateSlotTypeRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateSlotType"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateSlotTypeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* The action to update the test set. *

* * @param updateTestSetRequest * @return Result of the UpdateTestSet operation returned by the service. * @throws ThrottlingException * Your request rate is too high. Reduce the frequency of requests. * @throws ServiceQuotaExceededException * You have reached a quota for your bot. * @throws ValidationException * One of the input parameters in your request isn't valid. Check the parameters and try your request again. * @throws PreconditionFailedException * Your request couldn't be completed because one or more request fields aren't valid. Check the fields in * your request and try again. * @throws ConflictException * The action that you tried to perform couldn't be completed because the resource is in a conflicting * state. For example, deleting a bot that is in the CREATING state. Try your request again. * @throws InternalServerException * The service encountered an unexpected condition. Try your request again. * @sample AmazonLexModelsV2.UpdateTestSet * @see AWS * API Documentation */ @Override public UpdateTestSetResult updateTestSet(UpdateTestSetRequest request) { request = beforeClientExecution(request); return executeUpdateTestSet(request); } @SdkInternalApi final UpdateTestSetResult executeUpdateTestSet(UpdateTestSetRequest updateTestSetRequest) { ExecutionContext executionContext = createExecutionContext(updateTestSetRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateTestSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateTestSetRequest)); // 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, "Lex Models V2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateTestSet"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateTestSetResultJsonUnmarshaller()); 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 AmazonLexModelsV2Waiters waiters() { if (waiters == null) { synchronized (this) { if (waiters == null) { waiters = new AmazonLexModelsV2Waiters(this); } } } return waiters; } @Override public void shutdown() { super.shutdown(); if (waiters != null) { waiters.shutdown(); } } }