getFolderPath method

Future<GetFolderPathResponse> getFolderPath({
  1. required String folderId,
  2. String? authenticationToken,
  3. String? fields,
  4. int? limit,
  5. String? marker,
})

Retrieves the path information (the hierarchy from the root folder) for the specified folder.

By default, Amazon WorkDocs returns a maximum of 100 levels upwards from the requested folder and only includes the IDs of the parent folders in the path. You can limit the maximum number of levels. You can also request the parent folder names.

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

Parameter folderId : The ID of the folder.

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

Parameter fields : A comma-separated list of values. Specify "NAME" to include the names of the parent folders.

Parameter limit : The maximum number of levels in the hierarchy to return.

Parameter marker : This value is not supported.

Implementation

Future<GetFolderPathResponse> getFolderPath({
  required String folderId,
  String? authenticationToken,
  String? fields,
  int? limit,
  String? marker,
}) async {
  ArgumentError.checkNotNull(folderId, 'folderId');
  _s.validateStringLength(
    'folderId',
    folderId,
    1,
    256,
    isRequired: true,
  );
  _s.validateStringLength(
    'authenticationToken',
    authenticationToken,
    1,
    8199,
  );
  _s.validateStringLength(
    'fields',
    fields,
    1,
    256,
  );
  _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 (fields != null) 'fields': [fields],
    if (limit != null) 'limit': [limit.toString()],
    if (marker != null) 'marker': [marker],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/api/v1/folders/${Uri.encodeComponent(folderId)}/path',
    queryParams: $query,
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return GetFolderPathResponse.fromJson(response);
}