describeComments method

Future<DescribeCommentsResponse> describeComments({
  1. required String documentId,
  2. required String versionId,
  3. String? authenticationToken,
  4. int? limit,
  5. String? marker,
})

List all the comments for the specified document version.

May throw EntityNotExistsException. May throw FailedDependencyException. May throw ProhibitedStateException. May throw ServiceUnavailableException. May throw UnauthorizedOperationException. May throw UnauthorizedResourceAccessException.

Parameter documentId : The ID of the document.

Parameter versionId : The ID of the document version.

Parameter authenticationToken : Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

Parameter limit : The maximum number of items to return.

Parameter marker : The marker for the next set of results. This marker was received from a previous call.

Implementation

Future<DescribeCommentsResponse> describeComments({
  required String documentId,
  required String versionId,
  String? authenticationToken,
  int? limit,
  String? marker,
}) async {
  _s.validateNumRange(
    'limit',
    limit,
    1,
    999,
  );
  final headers = <String, String>{
    if (authenticationToken != null)
      'Authentication': authenticationToken.toString(),
  };
  final $query = <String, List<String>>{
    if (limit != null) 'limit': [limit.toString()],
    if (marker != null) 'marker': [marker],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/api/v1/documents/${Uri.encodeComponent(documentId)}/versions/${Uri.encodeComponent(versionId)}/comments',
    queryParams: $query,
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeCommentsResponse.fromJson(response);
}