generateBotElement method

Future<GenerateBotElementResponse> generateBotElement({
  1. required String botId,
  2. required String botVersion,
  3. required String intentId,
  4. required String localeId,
})

Generates sample utterances for an intent.

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

Parameter botId : The bot unique Id for the bot request to generate utterances.

Parameter botVersion : The bot version for the bot request to generate utterances.

Parameter intentId : The intent unique Id for the bot request to generate utterances.

Parameter localeId : The unique locale Id for the bot request to generate utterances.

Implementation

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