buildBotLocale method

Future<BuildBotLocaleResponse> buildBotLocale({
  1. required String botId,
  2. required String botVersion,
  3. required String localeId,
})

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.

May throw ConflictException. May throw InternalServerException. May throw PreconditionFailedException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter botId : The identifier of the bot to build. The identifier is returned in the response from the CreateBot operation.

Parameter botVersion : The version of the bot to build. This can only be the draft version of the bot.

Parameter localeId : The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages.

Implementation

Future<BuildBotLocaleResponse> buildBotLocale({
  required String botId,
  required String botVersion,
  required String localeId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'POST',
    requestUri:
        '/bots/${Uri.encodeComponent(botId)}/botversions/${Uri.encodeComponent(botVersion)}/botlocales/${Uri.encodeComponent(localeId)}',
    exceptionFnMap: _exceptionFns,
  );
  return BuildBotLocaleResponse.fromJson(response);
}