Site.fromJson constructor
Implementation
factory Site.fromJson(Map<String, dynamic> json) {
return Site(
createdAt: timeStampFromJson(json['CreatedAt']),
description: json['Description'] as String?,
globalNetworkId: json['GlobalNetworkId'] as String?,
location: json['Location'] != null
? Location.fromJson(json['Location'] as Map<String, dynamic>)
: null,
siteArn: json['SiteArn'] as String?,
siteId: json['SiteId'] as String?,
state: (json['State'] as String?)?.toSiteState(),
tags: (json['Tags'] as List?)
?.whereNotNull()
.map((e) => Tag.fromJson(e as Map<String, dynamic>))
.toList(),
);
}