Resource.fromJson constructor
Resource.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Resource.fromJson(Map<String, dynamic> json) {
return Resource(
id: json['Id'] as String,
type: json['Type'] as String,
details: json['Details'] != null
? ResourceDetails.fromJson(json['Details'] as Map<String, dynamic>)
: null,
partition: (json['Partition'] as String?)?.toPartition(),
region: json['Region'] as String?,
resourceRole: json['ResourceRole'] as String?,
tags: (json['Tags'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
);
}