import 'dart:convert'; ClientsAllowedBlocked allowedBlockedFromJson(String str) => ClientsAllowedBlocked.fromJson(json.decode(str)); String allowedBlockedToJson(ClientsAllowedBlocked data) => json.encode(data.toJson()); class ClientsAllowedBlocked { List allowedClients; List disallowedClients; List blockedHosts; ClientsAllowedBlocked({ required this.allowedClients, required this.disallowedClients, required this.blockedHosts, }); factory ClientsAllowedBlocked.fromJson(Map json) => ClientsAllowedBlocked( allowedClients: json["allowed_clients"] != null ? List.from(json["allowed_clients"].map((x) => x)) : [], disallowedClients: json["disallowed_clients"] != null ? List.from(json["disallowed_clients"].map((x) => x)) : [], blockedHosts: json["blocked_hosts"] != null ? List.from(json["blocked_hosts"].map((x) => x)) : [], ); Map toJson() => { "allowed_clients": List.from(allowedClients.map((x) => x)), "disallowed_clients": List.from(disallowedClients.map((x) => x)), "blocked_hosts": List.from(blockedHosts.map((x) => x)), }; }