FanetAgentEnrollment class final

An agent enrolled via POST /api/networks/{id}/agents/enroll.

The clientSecret is returned exactly once, at enrollment time, and is never stored or returned again by the server — persist it immediately. To rotate (which also revokes the old secret), simply enroll the same name again: re-enrollment returns the same 201 shape with a fresh secret; there is no 409 and no delete endpoint.

Constructors

FanetAgentEnrollment({required String name, required String hubUrl, required String clientSecret, required String enrolledAt, String? note})
Creates an agent enrollment value.
const
FanetAgentEnrollment.fromJson(Map<String, Object?> json)
Parses the enroll response, ignoring extra fields.
factory

Properties

clientSecret → String
The secret proving ownership of name when connecting. Returned once; store it now.
final
enrolledAt → String
Enrollment timestamp, RFC3339 UTC (always Z, no microseconds). Kept as a raw string.
final
hashCode → int
The hash code for this object.
no setterinherited
hubUrl → String
WebSocket URL of the DAP hub to connect to.
final
name → String
The enrolled agent name (identity on the hub).
final
note → String?
Server-side advisory note (e.g. the store-the-secret warning), if any.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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