BfdStatus.fromJson constructor

BfdStatus.fromJson(
  1. Map json_
)

Implementation

BfdStatus.fromJson(core.Map json_)
    : this(
        bfdSessionInitializationMode:
            json_.containsKey('bfdSessionInitializationMode')
                ? json_['bfdSessionInitializationMode'] as core.String
                : null,
        configUpdateTimestampMicros:
            json_.containsKey('configUpdateTimestampMicros')
                ? json_['configUpdateTimestampMicros'] as core.String
                : null,
        controlPacketCounts: json_.containsKey('controlPacketCounts')
            ? BfdStatusPacketCounts.fromJson(json_['controlPacketCounts']
                as core.Map<core.String, core.dynamic>)
            : null,
        controlPacketIntervals: json_.containsKey('controlPacketIntervals')
            ? (json_['controlPacketIntervals'] as core.List)
                .map((value) => PacketIntervals.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        localDiagnostic: json_.containsKey('localDiagnostic')
            ? json_['localDiagnostic'] as core.String
            : null,
        localState: json_.containsKey('localState')
            ? json_['localState'] as core.String
            : null,
        negotiatedLocalControlTxIntervalMs:
            json_.containsKey('negotiatedLocalControlTxIntervalMs')
                ? json_['negotiatedLocalControlTxIntervalMs'] as core.int
                : null,
        rxPacket: json_.containsKey('rxPacket')
            ? BfdPacket.fromJson(
                json_['rxPacket'] as core.Map<core.String, core.dynamic>)
            : null,
        txPacket: json_.containsKey('txPacket')
            ? BfdPacket.fromJson(
                json_['txPacket'] as core.Map<core.String, core.dynamic>)
            : null,
        uptimeMs: json_.containsKey('uptimeMs')
            ? json_['uptimeMs'] as core.String
            : null,
      );