get method
GET /v1/projects/{project_id}/deviceSessions/{device_session_id} Return a DeviceSession, which documents the allocation status and whether the device is allocated.
Clients making requests from this API must poll GetDeviceSession.
Request parameters:
name
- Required. Name of the DeviceSession, e.g.
"projects/{project_id}/deviceSessions/{session_id}"
Value must have pattern ^projects/\[^/\]+/deviceSessions/\[^/\]+$
.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a DeviceSession.
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<DeviceSession> get(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return DeviceSession.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}