updateReviewTemplateAnswer method
Update a review template answer.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter templateArn :
The review template ARN.
Parameter choiceUpdates :
A list of choices to be updated.
Parameter reason :
The update reason.
Implementation
Future<UpdateReviewTemplateAnswerOutput> updateReviewTemplateAnswer({
required String lensAlias,
required String questionId,
required String templateArn,
Map<String, ChoiceUpdate>? choiceUpdates,
bool? isApplicable,
String? notes,
AnswerReason? reason,
List<String>? selectedChoices,
}) async {
final $payload = <String, dynamic>{
if (choiceUpdates != null) 'ChoiceUpdates': choiceUpdates,
if (isApplicable != null) 'IsApplicable': isApplicable,
if (notes != null) 'Notes': notes,
if (reason != null) 'Reason': reason.value,
if (selectedChoices != null) 'SelectedChoices': selectedChoices,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/reviewTemplates/${Uri.encodeComponent(templateArn)}/lensReviews/${Uri.encodeComponent(lensAlias)}/answers/${Uri.encodeComponent(questionId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateReviewTemplateAnswerOutput.fromJson(response);
}