putComplianceInquiryFeedback method
Submits feedback on a compliance inquiry response.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter complianceInquiryId :
The unique identifier for the compliance inquiry.
Parameter rating :
The rating for the feedback. Valid values are THUMBS_UP and THUMBS_DOWN.
Parameter clientToken :
A unique, case-sensitive identifier to ensure that the operation completes
no more than one time. If this token matches a previous request, the
service ignores the request, but does not return an error.
Parameter comment :
An optional comment for the feedback.
Parameter queryIdentifier :
The sequential identifier of the query to provide feedback on.
Parameter reasonCodes :
The reason codes that describe why you rated the response. Valid values
are OTHER, PARTIAL_RESPONSE, and IRRELEVANT_RESPONSE.
Parameter responseRevisionId :
The response revision ID. Use this value to prevent submitting feedback on
a stale response.
Implementation
Future<PutComplianceInquiryFeedbackResponse> putComplianceInquiryFeedback({
required String complianceInquiryId,
required FeedbackRating rating,
String? clientToken,
String? comment,
int? queryIdentifier,
List<FeedbackReasonCode>? reasonCodes,
int? responseRevisionId,
}) async {
final $payload = <String, dynamic>{
'complianceInquiryId': complianceInquiryId,
'rating': rating.value,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (comment != null) 'comment': comment,
if (queryIdentifier != null) 'queryIdentifier': queryIdentifier,
if (reasonCodes != null)
'reasonCodes': reasonCodes.map((e) => e.value).toList(),
if (responseRevisionId != null) 'responseRevisionId': responseRevisionId,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/v1/compliance-inquiry/putFeedback',
exceptionFnMap: _exceptionFns,
);
return PutComplianceInquiryFeedbackResponse.fromJson(response);
}