Class DevicesResource.ReportStateAndNotificationRequest
Reports device state and optionally sends device notifications. Called by your smart home Action when the
state of a third-party device changes or you need to send a notification about the device. See Implement
Report State for more
information. This method updates the device state according to its declared
traits. Publishing a new
state value outside of these traits will result in an INVALID_ARGUMENT
error response. The third-party
user's identity is passed in via the agent_user_id
(see ReportStateAndNotificationRequest). This request
must be authorized using service account credentials from your Actions console project.
Inheritance
Inherited Members
Namespace: Google.Apis.HomeGraphService.v1
Assembly: Google.Apis.HomeGraphService.v1.dll
Syntax
public class DevicesResource.ReportStateAndNotificationRequest : HomeGraphServiceBaseServiceRequest<ReportStateAndNotificationResponse>, IClientServiceRequest<ReportStateAndNotificationResponse>, IClientServiceRequest
Constructors
ReportStateAndNotificationRequest(IClientService, ReportStateAndNotificationRequest)
Constructs a new ReportStateAndNotification request.
Declaration
public ReportStateAndNotificationRequest(IClientService service, ReportStateAndNotificationRequest body)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service | |
ReportStateAndNotificationRequest | body |
Properties
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
Type | Description |
---|---|
object |
Overrides
InitParameters()
Initializes ReportStateAndNotification parameter list.
Declaration
protected override void InitParameters()