DnsConfig.fromJson constructor

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

Implementation

factory DnsConfig.fromJson(Map<String, dynamic> json) {
  return DnsConfig(
    dnsRecords: (json['DnsRecords'] as List)
        .whereNotNull()
        .map((e) => DnsRecord.fromJson(e as Map<String, dynamic>))
        .toList(),
    namespaceId: json['NamespaceId'] as String?,
    routingPolicy: (json['RoutingPolicy'] as String?)?.toRoutingPolicy(),
  );
}