listRecommendations method

Future<ListRecommendationsResponse> listRecommendations({
  1. required String codeReviewArn,
  2. int? maxResults,
  3. String? nextToken,
})

Returns the list of all recommendations for a completed code review.

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

Parameter codeReviewArn : The Amazon Resource Name (ARN) of the CodeReview object.

Parameter maxResults : The maximum number of results that are returned per call. The default is 100.

Parameter nextToken : Pagination token.

Implementation

Future<ListRecommendationsResponse> listRecommendations({
  required String codeReviewArn,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(codeReviewArn, 'codeReviewArn');
  _s.validateStringLength(
    'codeReviewArn',
    codeReviewArn,
    1,
    1600,
    isRequired: true,
  );
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    2048,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'MaxResults': [maxResults.toString()],
    if (nextToken != null) 'NextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/codereviews/${Uri.encodeComponent(codeReviewArn)}/Recommendations',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListRecommendationsResponse.fromJson(response);
}