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 ProhibitedStateException. May throw UnauthorizedOperationException. May throw UnauthorizedResourceAccessException. May throw FailedDependencyException. May throw ServiceUnavailableException.

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 AWS 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 {
  ArgumentError.checkNotNull(documentId, 'documentId');
  _s.validateStringLength(
    'documentId',
    documentId,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(versionId, 'versionId');
  _s.validateStringLength(
    'versionId',
    versionId,
    1,
    128,
    isRequired: true,
  );
  _s.validateStringLength(
    'authenticationToken',
    authenticationToken,
    1,
    8199,
  );
  _s.validateNumRange(
    'limit',
    limit,
    1,
    999,
  );
  _s.validateStringLength(
    'marker',
    marker,
    1,
    2048,
  );
  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);
}