list method

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

Lists PhraseSets.

Request parameters:

parent - Required. The project and location of PhraseSet resources to list. The expected format is projects/{project}/locations/{location}. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+$.

pageSize - The maximum number of PhraseSets to return. The service may return fewer than this value. If unspecified, at most 5 PhraseSets will be returned. The maximum value is 100; values above 100 will be coerced to 100.

pageToken - A page token, received from a previous ListPhraseSets call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListPhraseSets must match the call that provided the page token.

showDeleted - Whether, or not, to show resources that have been deleted.

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

Completes with a ListPhraseSetsResponse.

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<ListPhraseSetsResponse> list(
  core.String parent, {
  core.int? pageSize,
  core.String? pageToken,
  core.bool? showDeleted,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (showDeleted != null) 'showDeleted': ['${showDeleted}'],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v2/' + core.Uri.encodeFull('$parent') + '/phraseSets';

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