OrganizationConfigRule.fromJson constructor

OrganizationConfigRule.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory OrganizationConfigRule.fromJson(Map<String, dynamic> json) {
  return OrganizationConfigRule(
    organizationConfigRuleArn: json['OrganizationConfigRuleArn'] as String,
    organizationConfigRuleName: json['OrganizationConfigRuleName'] as String,
    excludedAccounts: (json['ExcludedAccounts'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    lastUpdateTime: timeStampFromJson(json['LastUpdateTime']),
    organizationCustomRuleMetadata: json['OrganizationCustomRuleMetadata'] !=
            null
        ? OrganizationCustomRuleMetadata.fromJson(
            json['OrganizationCustomRuleMetadata'] as Map<String, dynamic>)
        : null,
    organizationManagedRuleMetadata:
        json['OrganizationManagedRuleMetadata'] != null
            ? OrganizationManagedRuleMetadata.fromJson(
                json['OrganizationManagedRuleMetadata']
                    as Map<String, dynamic>)
            : null,
  );
}