list method

Future<ListConnectivityTestsResponse> list(
  1. String parent, {
  2. String? filter,
  3. String? orderBy,
  4. int? pageSize,
  5. String? pageToken,
  6. String? $fields,
})

Lists all Connectivity Tests owned by a project.

Request parameters:

parent - Required. The parent resource of the Connectivity Tests: projects/{project_id}/locations/global Value must have pattern ^projects/\[^/\]+/locations/global$.

filter - Lists the ConnectivityTests that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form where operators: <, >, <=, >=, !=, =, : are supported (colon : represents a HAS operator which is roughly synonymous with equality). can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = "projects/proj-1/locations/global/connectivityTests/test-1 - Filter by labels: - Resources that have a key called foo labels.foo:* - Resources that have a key called foo whose value is bar labels.foo = bar

orderBy - Field to use to sort the list.

pageSize - Number of ConnectivityTests to return.

pageToken - Page token from an earlier query, as returned in next_page_token.

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

Completes with a ListConnectivityTestsResponse.

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

  final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/connectivityTests';

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