updateDictionary method
Updates the specified dictionary.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerErrorException.
May throw ResourceNotFoundException.
May throw TooManyRequestException.
May throw ValidationException.
Parameter id :
The ID of the dictionary to update.
Parameter entries :
New dictionary entries. If not specified, the entries are not changed.
Parameter language :
A new language for the dictionary. If not specified, the language is not
changed.
Parameter name :
A new name for the dictionary. If not specified, the name is not changed.
Implementation
Future<UpdateDictionaryResponse> updateDictionary({
required String id,
String? entries,
DictionaryLanguage? language,
String? name,
}) async {
final $payload = <String, dynamic>{
if (entries != null) 'entries': entries,
if (language != null) 'language': language.value,
if (name != null) 'name': name,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri: '/v1/dictionary/${Uri.encodeComponent(id)}',
exceptionFnMap: _exceptionFns,
);
return UpdateDictionaryResponse.fromJson(response);
}