RouterStatus.fromJson constructor

RouterStatus.fromJson(
  1. Map json_
)

Implementation

RouterStatus.fromJson(core.Map json_)
    : this(
        bestRoutes: json_.containsKey('bestRoutes')
            ? (json_['bestRoutes'] as core.List)
                .map((value) => Route.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        bestRoutesForRouter: json_.containsKey('bestRoutesForRouter')
            ? (json_['bestRoutesForRouter'] as core.List)
                .map((value) => Route.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        bgpPeerStatus: json_.containsKey('bgpPeerStatus')
            ? (json_['bgpPeerStatus'] as core.List)
                .map((value) => RouterStatusBgpPeerStatus.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        natStatus: json_.containsKey('natStatus')
            ? (json_['natStatus'] as core.List)
                .map((value) => RouterStatusNatStatus.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        network: json_.containsKey('network')
            ? json_['network'] as core.String
            : null,
      );