ResolverRule.fromJson constructor

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

Implementation

factory ResolverRule.fromJson(Map<String, dynamic> json) {
  return ResolverRule(
    arn: json['Arn'] as String?,
    creationTime: json['CreationTime'] as String?,
    creatorRequestId: json['CreatorRequestId'] as String?,
    domainName: json['DomainName'] as String?,
    id: json['Id'] as String?,
    modificationTime: json['ModificationTime'] as String?,
    name: json['Name'] as String?,
    ownerId: json['OwnerId'] as String?,
    resolverEndpointId: json['ResolverEndpointId'] as String?,
    ruleType: (json['RuleType'] as String?)?.toRuleTypeOption(),
    shareStatus: (json['ShareStatus'] as String?)?.toShareStatus(),
    status: (json['Status'] as String?)?.toResolverRuleStatus(),
    statusMessage: json['StatusMessage'] as String?,
    targetIps: (json['TargetIps'] as List?)
        ?.whereNotNull()
        .map((e) => TargetAddress.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}