deleteComment method

Future<void> deleteComment({
  1. required String commentId,
  2. required String documentId,
  3. required String versionId,
  4. String? authenticationToken,
})

Deletes the specified comment from the document version.

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

Parameter commentId : The ID of the comment.

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.

Implementation

Future<void> deleteComment({
  required String commentId,
  required String documentId,
  required String versionId,
  String? authenticationToken,
}) async {
  ArgumentError.checkNotNull(commentId, 'commentId');
  _s.validateStringLength(
    'commentId',
    commentId,
    1,
    128,
    isRequired: true,
  );
  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,
  );
  final headers = <String, String>{
    if (authenticationToken != null)
      'Authentication': authenticationToken.toString(),
  };
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/api/v1/documents/${Uri.encodeComponent(documentId)}/versions/${Uri.encodeComponent(versionId)}/comment/${Uri.encodeComponent(commentId)}',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}