list method
Lists the transfers for a customer by source user, destination user, or status.
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".
newOwnerUserId
- Destination user's profile ID.
oldOwnerUserId
- Source user's profile ID.
pageToken
- Token to specify the next page in the list.
status
- Status of the transfer.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a DataTransfersListResponse.
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<DataTransfersListResponse> list({
core.String? customerId,
core.int? maxResults,
core.String? newOwnerUserId,
core.String? oldOwnerUserId,
core.String? pageToken,
core.String? status,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (customerId != null) 'customerId': [customerId],
if (maxResults != null) 'maxResults': ['${maxResults}'],
if (newOwnerUserId != null) 'newOwnerUserId': [newOwnerUserId],
if (oldOwnerUserId != null) 'oldOwnerUserId': [oldOwnerUserId],
if (pageToken != null) 'pageToken': [pageToken],
if (status != null) 'status': [status],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'admin/datatransfer/v1/transfers';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return DataTransfersListResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}