Policy.fromJson constructor

Policy.fromJson(
  1. Map _json
)

Implementation

Policy.fromJson(core.Map _json) {
  if (_json.containsKey("alternativeNameServerConfig")) {
    alternativeNameServerConfig =
        new PolicyAlternativeNameServerConfig.fromJson(
            _json["alternativeNameServerConfig"]);
  }
  if (_json.containsKey("description")) {
    description = _json["description"];
  }
  if (_json.containsKey("enableInboundForwarding")) {
    enableInboundForwarding = _json["enableInboundForwarding"];
  }
  if (_json.containsKey("enableLogging")) {
    enableLogging = _json["enableLogging"];
  }
  if (_json.containsKey("id")) {
    id = _json["id"];
  }
  if (_json.containsKey("kind")) {
    kind = _json["kind"];
  }
  if (_json.containsKey("name")) {
    name = _json["name"];
  }
  if (_json.containsKey("networks")) {
    networks = (_json["networks"] as core.List)
        .map<PolicyNetwork>((value) => new PolicyNetwork.fromJson(value))
        .toList();
  }
}