startBotRecommendation method
Use this to provide your transcript data, and to start the bot recommendation process.
May throw ConflictException.
May throw InternalServerException.
May throw PreconditionFailedException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter botId :
The unique identifier of the bot containing the bot recommendation.
Parameter botVersion :
The version of the bot containing the bot recommendation.
Parameter localeId :
The identifier of the language and locale of the bot recommendation to
start. The string must match one of the supported locales. For more
information, see Supported
languages
Parameter transcriptSourceSetting :
The object representing the Amazon S3 bucket containing the transcript, as
well as the associated metadata.
Parameter encryptionSetting :
The object representing the passwords that will be used to encrypt the
data related to the bot recommendation results, as well as the KMS key ARN
used to encrypt the associated metadata.
Implementation
Future<StartBotRecommendationResponse> startBotRecommendation({
required String botId,
required String botVersion,
required String localeId,
required TranscriptSourceSetting transcriptSourceSetting,
EncryptionSetting? encryptionSetting,
}) async {
final $payload = <String, dynamic>{
'transcriptSourceSetting': transcriptSourceSetting,
if (encryptionSetting != null) 'encryptionSetting': encryptionSetting,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/bots/${Uri.encodeComponent(botId)}/botversions/${Uri.encodeComponent(botVersion)}/botlocales/${Uri.encodeComponent(localeId)}/botrecommendations',
exceptionFnMap: _exceptionFns,
);
return StartBotRecommendationResponse.fromJson(response);
}