list method

Future<ApplicationsListResponse> list({
  1. String? customerId,
  2. int? maxResults,
  3. String? pageToken,
  4. String? $fields,
})

Lists the applications available for data transfer for a customer.

Request parameters:

customerId - Immutable ID of the Google Workspace account.

maxResults - Maximum number of results to return. Default is 100. Value must be between "1" and "500".

pageToken - Token to specify next page in the list.

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

Completes with a ApplicationsListResponse.

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

  const url_ = 'admin/datatransfer/v1/applications';

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