pub struct Device {
pub device_metadata: Option<Value>,
pub external_id: Option<String>,
pub id: String,
pub integration_id: String,
pub metadata: Option<HashMap>,
pub name: LocalizedString,
pub org_id: String,
}Expand description
A physical or virtual device belonging to an org and integration.
JSON schema
{
"description": "A physical or virtual device belonging to an org and integration.",
"type": "object",
"required": [
"id",
"integration_id",
"name",
"org_id"
],
"properties": {
"device_metadata": {
"description": "Device-specific JSON metadata (stored in Postgres `devices.metadata` JSONB column)."
},
"external_id": {
"description": "External ID from the integration provider.",
"type": [
"string",
"null"
]
},
"id": {
"description": "Unique identifier (ULID).",
"type": "string"
},
"integration_id": {
"description": "Owning integration (e.g. Shelly Cloud account/connection).",
"type": "string"
},
"metadata": {
"oneOf": [
{
"type": "null"
},
{
"oneOf": [
{
"$ref": "#/components/schemas/HashMap"
}
]
}
]
},
"name": {
"$ref": "#/components/schemas/LocalizedString"
},
"org_id": {
"description": "Organization that owns this device.",
"type": "string"
}
}
}Fields§
§device_metadata: Option<Value>Device-specific JSON metadata (stored in Postgres devices.metadata JSONB column).
external_id: Option<String>External ID from the integration provider.
id: StringUnique identifier (ULID).
integration_id: StringOwning integration (e.g. Shelly Cloud account/connection).
metadata: Option<HashMap>§name: LocalizedString§org_id: StringOrganization that owns this device.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Device
impl<'de> Deserialize<'de> for Device
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl UnwindSafe for Device
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more