getFolder method
Retrieves the metadata of the specified folder.
May throw EntityNotExistsException.
May throw FailedDependencyException.
May throw InvalidArgumentException.
May throw ProhibitedStateException.
May throw ServiceUnavailableException.
May throw UnauthorizedOperationException.
May throw UnauthorizedResourceAccessException.
Parameter folderId :
The ID of the folder.
Parameter authenticationToken :
Amazon WorkDocs authentication token. Not required when using Amazon Web
Services administrator credentials to access the API.
Parameter includeCustomMetadata :
Set to TRUE to include custom metadata in the response.
Implementation
Future<GetFolderResponse> getFolder({
required String folderId,
String? authenticationToken,
bool? includeCustomMetadata,
}) async {
final headers = <String, String>{
if (authenticationToken != null)
'Authentication': authenticationToken.toString(),
};
final $query = <String, List<String>>{
if (includeCustomMetadata != null)
'includeCustomMetadata': [includeCustomMetadata.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/api/v1/folders/${Uri.encodeComponent(folderId)}',
queryParams: $query,
headers: headers,
exceptionFnMap: _exceptionFns,
);
return GetFolderResponse.fromJson(response);
}