DescribeSecurityProfileResponse.fromJson constructor
DescribeSecurityProfileResponse.fromJson(
- Map<String, dynamic> json
)
Implementation
factory DescribeSecurityProfileResponse.fromJson(Map<String, dynamic> json) {
return DescribeSecurityProfileResponse(
additionalMetricsToRetain: (json['additionalMetricsToRetain'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
additionalMetricsToRetainV2:
(json['additionalMetricsToRetainV2'] as List?)
?.whereNotNull()
.map((e) => MetricToRetain.fromJson(e as Map<String, dynamic>))
.toList(),
alertTargets: (json['alertTargets'] as Map<String, dynamic>?)?.map(
(k, e) => MapEntry(k.toAlertTargetType(),
AlertTarget.fromJson(e as Map<String, dynamic>))),
behaviors: (json['behaviors'] as List?)
?.whereNotNull()
.map((e) => Behavior.fromJson(e as Map<String, dynamic>))
.toList(),
creationDate: timeStampFromJson(json['creationDate']),
lastModifiedDate: timeStampFromJson(json['lastModifiedDate']),
securityProfileArn: json['securityProfileArn'] as String?,
securityProfileDescription: json['securityProfileDescription'] as String?,
securityProfileName: json['securityProfileName'] as String?,
version: json['version'] as int?,
);
}