Policy.fromJson constructor
Implementation
factory Policy.fromJson(Map<String, dynamic> json) {
return Policy(
excludeResourceTags: json['ExcludeResourceTags'] as bool,
policyName: json['PolicyName'] as String,
remediationEnabled: json['RemediationEnabled'] as bool,
resourceType: json['ResourceType'] as String,
securityServicePolicyData: SecurityServicePolicyData.fromJson(
json['SecurityServicePolicyData'] as Map<String, dynamic>),
excludeMap: (json['ExcludeMap'] as Map<String, dynamic>?)?.map((k, e) =>
MapEntry(k.toCustomerPolicyScopeIdType(),
(e as List).whereNotNull().map((e) => e as String).toList())),
includeMap: (json['IncludeMap'] as Map<String, dynamic>?)?.map((k, e) =>
MapEntry(k.toCustomerPolicyScopeIdType(),
(e as List).whereNotNull().map((e) => e as String).toList())),
policyId: json['PolicyId'] as String?,
policyUpdateToken: json['PolicyUpdateToken'] as String?,
resourceTags: (json['ResourceTags'] as List?)
?.whereNotNull()
.map((e) => ResourceTag.fromJson(e as Map<String, dynamic>))
.toList(),
resourceTypeList: (json['ResourceTypeList'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
);
}