ClientDevice class final

Model ClientDevice (schemas/api/1.0/client.schema.json#/$defs/client).

Annotations
  • @immutable

Constructors

ClientDevice({required String id, required String app, String? appVersion, required String deviceName, String? platform, required List<ClientCapability> capabilities, String? principal, String? commandsTopic, required String registeredAt, String? lastSeen, Map<String, Object?> extra = const {}})
Creates a ClientDevice.
const
ClientDevice.fromJson(Map<String, Object?> json, [String path = ''])
Decodes json; throws FormatException (with the JSON path) on a missing required member or a type mismatch. Unknown members and explicit nulls go to extra.
factory

Properties

app → String
app member.
final
appVersion → String?
appVersion member.
final
capabilities → List<ClientCapability>
capabilities member.
final
commandsTopic → String?
clients/{clientId}/commands
final
deviceName → String
deviceName member.
final
extra → Map<String, Object?>
Members this version does not model (incl. x-* extensions and explicit nulls); written back by toJson.
final
hashCode → int
The hash code for this object.
no setteroverride
id → String
Server-owned resource id: UUIDv7, lowercase, sortable by creation time.
final
lastSeen → String?
RFC 3339 UTC with milliseconds, e.g. 2026-10-19T12:00:00.000Z.
final
platform → String?
platform member.
final
principal → String?
principal member.
final
registeredAt → String
RFC 3339 UTC with milliseconds, e.g. 2026-10-19T12:00:00.000Z.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({String? id, String? app, String? appVersion, String? deviceName, String? platform, List<ClientCapability>? capabilities, String? principal, String? commandsTopic, String? registeredAt, String? lastSeen, Map<String, Object?>? extra}) → ClientDevice
A copy with the given members replaced (a member cannot be reset to null this way).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
Encodes to JSON (absent members omitted, extra merged back).
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override