pub struct Device {
pub attributes: Option<HashMap<String, Value>>,
pub custom_data: Option<HashMap<String, Value>>,
pub device_info: Option<DeviceInfo>,
pub id: Option<String>,
pub name: Option<DeviceNames>,
pub notification_supported_by_agent: Option<bool>,
pub other_device_ids: Option<Vec<AgentOtherDeviceId>>,
pub room_hint: Option<String>,
pub structure_hint: Option<String>,
pub traits: Option<Vec<String>>,
pub type_: Option<String>,
pub will_report_state: Option<bool>,
}Expand description
Third-party device definition.
§Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
- query devices (none)
- report state and notification devices (none)
- request sync devices (none)
- sync devices (none)
Fields§
§attributes: Option<HashMap<String, Value>>Attributes for the traits supported by the device.
custom_data: Option<HashMap<String, Value>>Custom device attributes stored in Home Graph and provided to your smart home Action in each QUERY and EXECUTE intent. Data in this object has a few constraints: No sensitive information, including but not limited to Personally Identifiable Information.
device_info: Option<DeviceInfo>Device manufacturer, model, hardware version, and software version.
id: Option<String>Third-party device ID.
name: Option<DeviceNames>Names given to this device by your smart home Action.
notification_supported_by_agent: Option<bool>Indicates whether your smart home Action will report notifications to Google for this device via ReportStateAndNotification. If your smart home Action enables users to control device notifications, you should update this field and call RequestSyncDevices.
other_device_ids: Option<Vec<AgentOtherDeviceId>>Alternate IDs associated with this device. This is used to identify cloud synced devices enabled for local fulfillment.
room_hint: Option<String>Suggested name for the room where this device is installed. Google attempts to use this value during user setup.
structure_hint: Option<String>Suggested name for the structure where this device is installed. Google attempts to use this value during user setup.
traits: Option<Vec<String>>Traits supported by the device. See device traits.
type_: Option<String>Hardware type of the device. See device types.
will_report_state: Option<bool>Indicates whether your smart home Action will report state of this device to Google via ReportStateAndNotification.