list method Null safety

Future<ListActiveBreakpointsResponse> list(
  1. String debuggeeId,
  2. {String? agentId,
  3. bool? successOnTimeout,
  4. String? waitToken,
  5. String? $fields}
)

Returns the list of all active breakpoints for the debuggee.

The breakpoint specification (location, condition, and expressions fields) is semantically immutable, although the field values may change. For example, an agent may update the location line number to reflect the actual line where the breakpoint was set, but this doesn't change the breakpoint semantics. This means that an agent does not need to check if a breakpoint has changed when it encounters the same breakpoint on a successive call. Moreover, an agent should remember the breakpoints that are completed until the controller removes them from the active list to avoid setting those breakpoints again.

Request parameters:

debuggeeId - Required. Identifies the debuggee.

agentId - Identifies the agent. This is the ID returned in the RegisterDebuggee response.

successOnTimeout - If set to true (recommended), returns google.rpc.Code.OK status and sets the wait_expired response field to true when the server-selected timeout has expired. If set to false (deprecated), returns google.rpc.Code.ABORTED status when the server-selected timeout has expired.

waitToken - A token that, if specified, blocks the method call until the list of active breakpoints has changed, or a server-selected timeout has expired. The value should be set from the next_wait_token field in the last response. The initial value should be set to "init".

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

Completes with a ListActiveBreakpointsResponse.

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<ListActiveBreakpointsResponse> list(
  core.String debuggeeId, {
  core.String? agentId,
  core.bool? successOnTimeout,
  core.String? waitToken,
  core.String? $fields,
}) async {
  final _queryParams = <core.String, core.List<core.String>>{
    if (agentId != null) 'agentId': [agentId],
    if (successOnTimeout != null) 'successOnTimeout': ['${successOnTimeout}'],
    if (waitToken != null) 'waitToken': [waitToken],
    if ($fields != null) 'fields': [$fields],
  };

  final _url = 'v2/controller/debuggees/' +
      commons.escapeVariable('$debuggeeId') +
      '/breakpoints';

  final _response = await _requester.request(
    _url,
    'GET',
    queryParams: _queryParams,
  );
  return ListActiveBreakpointsResponse.fromJson(
      _response as core.Map<core.String, core.dynamic>);
}