batchDeleteCustomVocabularyItem method

Future<BatchDeleteCustomVocabularyItemResponse> batchDeleteCustomVocabularyItem({
  1. required String botId,
  2. required String botVersion,
  3. required List<CustomVocabularyEntryId> customVocabularyItemList,
  4. required String localeId,
})

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

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

Parameter botId : The identifier of the bot associated with this custom vocabulary.

Parameter botVersion : The identifier of the version of the bot associated with this custom vocabulary.

Parameter customVocabularyItemList : A list of custom vocabulary items requested to be deleted. Each entry must contain the unique custom vocabulary entry identifier.

Parameter localeId : The identifier of the language and locale where this custom vocabulary is used. The string must match one of the supported locales. For more information, see Supported Languages .

Implementation

Future<BatchDeleteCustomVocabularyItemResponse>
    batchDeleteCustomVocabularyItem({
  required String botId,
  required String botVersion,
  required List<CustomVocabularyEntryId> customVocabularyItemList,
  required String localeId,
}) async {
  final $payload = <String, dynamic>{
    'customVocabularyItemList': customVocabularyItemList,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/bots/${Uri.encodeComponent(botId)}/botversions/${Uri.encodeComponent(botVersion)}/botlocales/${Uri.encodeComponent(localeId)}/customvocabulary/DEFAULT/batchdelete',
    exceptionFnMap: _exceptionFns,
  );
  return BatchDeleteCustomVocabularyItemResponse.fromJson(response);
}