AgentInfo.fromJson constructor
AgentInfo.fromJson(
- Map<String, dynamic> json
)
Implementation
factory AgentInfo.fromJson(Map<String, dynamic> json) {
return AgentInfo(
agentId: json['agentId'] as String?,
agentNetworkInfoList: (json['agentNetworkInfoList'] as List?)
?.whereNotNull()
.map((e) => AgentNetworkInfo.fromJson(e as Map<String, dynamic>))
.toList(),
agentType: json['agentType'] as String?,
collectionStatus: json['collectionStatus'] as String?,
connectorId: json['connectorId'] as String?,
health: (json['health'] as String?)?.toAgentStatus(),
hostName: json['hostName'] as String?,
lastHealthPingTime: json['lastHealthPingTime'] as String?,
registeredTime: json['registeredTime'] as String?,
version: json['version'] as String?,
);
}