listReviewTemplateAnswers method

Future<ListReviewTemplateAnswersOutput> listReviewTemplateAnswers({
  1. required String lensAlias,
  2. required String templateArn,
  3. int? maxResults,
  4. String? nextToken,
  5. String? pillarId,
})

List the answers of a review template.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter templateArn : The ARN of the review template.

Parameter maxResults : The maximum number of results to return for this request.

Implementation

Future<ListReviewTemplateAnswersOutput> listReviewTemplateAnswers({
  required String lensAlias,
  required String templateArn,
  int? maxResults,
  String? nextToken,
  String? pillarId,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'MaxResults': [maxResults.toString()],
    if (nextToken != null) 'NextToken': [nextToken],
    if (pillarId != null) 'PillarId': [pillarId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/reviewTemplates/${Uri.encodeComponent(templateArn)}/lensReviews/${Uri.encodeComponent(lensAlias)}/answers',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListReviewTemplateAnswersOutput.fromJson(response);
}