list method

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

Lists CustomClasses.

Request parameters:

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

pageSize - Number of results per requests. A valid page_size ranges from 0 to 100 inclusive. If the page_size is zero or unspecified, a page size of 5 will be chosen. If the page size exceeds 100, it will be coerced down to 100. Note that a call might return fewer results than the requested page size.

pageToken - A page token, received from a previous ListCustomClasses call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListCustomClasses 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 ListCustomClassesResponse.

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<ListCustomClassesResponse> 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') + '/customClasses';

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