KeyPair.fromJson constructor
KeyPair.fromJson(
- Map<String, dynamic> json
)
Implementation
factory KeyPair.fromJson(Map<String, dynamic> json) {
return KeyPair(
arn: json['arn'] as String?,
createdAt: timeStampFromJson(json['createdAt']),
fingerprint: json['fingerprint'] as String?,
location: json['location'] != null
? ResourceLocation.fromJson(json['location'] as Map<String, dynamic>)
: null,
name: json['name'] as String?,
resourceType: (json['resourceType'] as String?)?.toResourceType(),
supportCode: json['supportCode'] as String?,
tags: (json['tags'] as List?)
?.whereNotNull()
.map((e) => Tag.fromJson(e as Map<String, dynamic>))
.toList(),
);
}