list method

Future<GoogleCloudAiplatformV1ListFilesResponse> list(
  1. String parent,
  2. String publishersId, {
  3. List<String>? ids,
  4. int? limit,
  5. String? page,
  6. String? $fields,
})

Lists the files owned by the requesting project and location.

Supports two mutually exclusive modes: paginated listing via an opaque page cursor, or batch fetch by ids. See ListFilesRequest.

Request parameters:

parent - Required. The location to list files under. Format: projects/{project}/locations/{location} Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+$.

publishersId - null

ids - Optional. Batch fetch: return only these files, up to 100 IDs after de-duplication. Mutually exclusive with both page and limit. Serialised as a repeated ids query parameter, one occurrence per ID.

limit - Optional. The number of files to return per page. Defaults to 20 if unset, maximum 1000. Mutually exclusive with ids.

page - Optional. Opaque pagination cursor. Pass the previous response's next_page to fetch the next page. Mutually exclusive with ids.

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

Completes with a GoogleCloudAiplatformV1ListFilesResponse.

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<GoogleCloudAiplatformV1ListFilesResponse> list(
  core.String parent,
  core.String publishersId, {
  core.List<core.String>? ids,
  core.int? limit,
  core.String? page,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'ids': ?ids,
    'limit': ?limit == null ? null : ['${limit}'],
    'page': ?page == null ? null : [page],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ =
      'v1/' +
      core.Uri.encodeFull('$parent') +
      '/publishers/' +
      commons.escapeVariable('$publishersId') +
      '/files';

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