delete method

Future<Empty> delete(
  1. String agentUserId, {
  2. String? requestId,
  3. String? $fields,
})

Unlinks the given third-party user from your smart home Action.

All data related to this user will be deleted. For more details on how users link their accounts, see fulfillment and authentication. The third-party user's identity is passed in via the agent_user_id (see DeleteAgentUserRequest). This request must be authorized using service account credentials from your Actions console project.

Request parameters:

agentUserId - Required. Third-party user ID. Value must have pattern ^agentUsers/.*$.

requestId - Request ID used for debugging.

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

Completes with a Empty.

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_1.Future<Empty> delete(
  core.String agentUserId, {
  core.String? requestId,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (requestId != null) 'requestId': [requestId],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$agentUserId');

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