TrafficRule.fromJson constructor

TrafficRule.fromJson(
  1. Map _json
)

Implementation

TrafficRule.fromJson(core.Map _json)
    : this(
        bandwidth: _json.containsKey('bandwidth')
            ? (_json['bandwidth'] as core.num).toDouble()
            : null,
        burst: _json.containsKey('burst')
            ? (_json['burst'] as core.num).toDouble()
            : null,
        delay:
            _json.containsKey('delay') ? _json['delay'] as core.String : null,
        packetDuplicationRatio: _json.containsKey('packetDuplicationRatio')
            ? (_json['packetDuplicationRatio'] as core.num).toDouble()
            : null,
        packetLossRatio: _json.containsKey('packetLossRatio')
            ? (_json['packetLossRatio'] as core.num).toDouble()
            : null,
      );