SDK reference / Models / Iot

Device

Kind: class

Namespace: Egulu.Sdk.Models.Iot

A device: its identity, its desired and reported configuration (each under its own ETag), its operational certificate and itscounters (W60; ADR-0810 section 3). Telemetry arrives on dev/{deviceId}/up/...; commands leave on dev/{deviceId}/down/....

Properties

NameTypeJSON nameDescription
AnnotationsModels.Iot.Device_annotations?annotationsAt most 256 KiB in all; never policy input.
CertificateNotAfterDateTimeOffset?certificateNotAfterWhen the operational certificate expires (UTC).
CertificatePemstring?certificatePemThe operational certificate, a PEM certificate (public).
CertificateSerialstring?certificateSerialSerial of the device's current operational certificate (hex), when it holds one.
Connectedbool?connectedTrue while the device holds an MQTT session.
CreateTimeDateTimeOffset?createTimeThe createTime property
DeleteTimeDateTimeOffset?deleteTimeThe deleteTime property
Descriptionstring?descriptionHuman-readable description.
DesiredConfigModels.Iot.Device_desiredConfig?desiredConfigThe configuration the platform wants the device to run: string keys and values, at most 8 KiB in all. Change it with `:setDesiredConfig`.
DesiredEtagstring?desiredEtag"{version}" of the desired configuration; send it back in If-Match to `:setDesiredConfig`.
DisplayNamestring?displayNameUp to 63 characters.
EnrollmentGroupstring?enrollmentGroupThe enrolment group the device was enrolled through, if any (`projects/{p}/locations/{l}/deviceRegistries/{r}/enrollmentGroups/{g}`).
Etagstring?etag"{generation}"; send it back in If-Match.
LabelsModels.Iot.Device_labels?labelsAt most 64.
LastSeenTimeDateTimeOffset?lastSeenTimeWhen the platform last accepted a message from the device (UTC).
MessageCountlong?messageCountMessages accepted from the device.
MeteredUnitslong?meteredUnits4 KB metering units billed for the device.
MqttUsernamestring?mqttUsernameThe MQTT username: the certificate CN `{registryUid}:{deviceId}`.
Namestring?nameThe resource name, for example projects/p/locations/l/instances/i.
PendingCommandsint?pendingCommandsCommands queued for the device and not yet delivered.
PurgeTimeDateTimeOffset?purgeTimeThe purgeTime property
Reconcilingbool?reconcilingTrue while the platform works toward the spec.
Registrystring?registryThe registry's resource name.
ReportedConfigModels.Iot.Device_reportedConfig?reportedConfigThe configuration the device last reported (`:reportConfig`).
ReportedEtagstring?reportedEtag"{version}" of the reported configuration; send it back in If-Match to `:reportConfig`.
StateModels.Iot.DeviceState?stateDevice lifecycle states.
Uidstring?uidUUIDv7, never reused.
UpdateTimeDateTimeOffset?updateTimeThe updateTime property