list method
Lists/Searches DeviceUsers.
Request parameters:
parent
- Required. To list all DeviceUsers, set this to "devices/-". To
list all DeviceUsers owned by a device, set this to the resource name of
the device. Format: devices/{device}
Value must have pattern ^devices/\[^/\]+$
.
customer
- Optional.
Resource name of
the customer. If you're using this API for your own organization, use
customers/my_customer
If you're using this API to manage another
organization, use customers/{customer}
, where customer is the customer
to whom the device belongs.
filter
- Optional. Additional restrictions when fetching list of
devices. For a list of search fields, refer to
Mobile device search fields.
Multiple search fields are separated by the space character.
orderBy
- Optional. Order specification for devices in the response.
pageSize
- Optional. The maximum number of DeviceUsers to return. If
unspecified, at most 5 DeviceUsers will be returned. The maximum value is
20; values above 20 will be coerced to 20.
pageToken
- Optional. A page token, received from a previous
ListDeviceUsers
call. Provide this to retrieve the subsequent page. When
paginating, all other parameters provided to ListBooks
must match the
call that provided the page token.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse.
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<GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse> list(
core.String parent, {
core.String? customer,
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 (customer != null) 'customer': [customer],
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') + '/deviceUsers';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}