list method

Future<ListVersionFilesResponse> list(
  1. String parent, {
  2. int? pageSize,
  3. String? pageToken,
  4. String? status,
  5. String? $fields,
})

Lists the remaining files to be uploaded for the specified version.

Request parameters:

parent - Required. The version for which to list files, in the format: sites/SITE_ID /versions/VERSION_ID Value must have pattern ^sites/\[^/\]+/versions/\[^/\]+$.

pageSize - The maximum number of version files to return. The service may return a lower number if fewer version files exist than this maximum number. If unspecified, defaults to 1000.

pageToken - A token from a previous call to ListVersionFiles that tells the server where to resume listing.

status - The type of files that should be listed for the specified version. Possible string values are:

  • "STATUS_UNSPECIFIED" : The default status; should not be intentionally used.
  • "EXPECTED" : The file has been included in the version and is expected to be uploaded in the near future.
  • "ACTIVE" : The file has already been uploaded to Firebase Hosting.

$fields - Selector specifying which fields to include in a partial response.

Completes with a ListVersionFilesResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<ListVersionFilesResponse> list(
  core.String parent, {
  core.int? pageSize,
  core.String? pageToken,
  core.String? status,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (status != null) 'status': [status],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1beta1/' + core.Uri.encodeFull('$parent') + '/files';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return ListVersionFilesResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}