TrafficStats.fromJson constructor

TrafficStats.fromJson(
  1. Map json_
)

Implementation

TrafficStats.fromJson(core.Map json_)
    : this(
        deliveryErrors: json_.containsKey('deliveryErrors')
            ? (json_['deliveryErrors'] as core.List)
                .map((value) => DeliveryError.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        dkimSuccessRatio: json_.containsKey('dkimSuccessRatio')
            ? (json_['dkimSuccessRatio'] as core.num).toDouble()
            : null,
        dmarcSuccessRatio: json_.containsKey('dmarcSuccessRatio')
            ? (json_['dmarcSuccessRatio'] as core.num).toDouble()
            : null,
        domainReputation: json_.containsKey('domainReputation')
            ? json_['domainReputation'] as core.String
            : null,
        inboundEncryptionRatio: json_.containsKey('inboundEncryptionRatio')
            ? (json_['inboundEncryptionRatio'] as core.num).toDouble()
            : null,
        ipReputations: json_.containsKey('ipReputations')
            ? (json_['ipReputations'] as core.List)
                .map((value) => IpReputation.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        outboundEncryptionRatio: json_.containsKey('outboundEncryptionRatio')
            ? (json_['outboundEncryptionRatio'] as core.num).toDouble()
            : null,
        spammyFeedbackLoops: json_.containsKey('spammyFeedbackLoops')
            ? (json_['spammyFeedbackLoops'] as core.List)
                .map((value) => FeedbackLoop.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        spfSuccessRatio: json_.containsKey('spfSuccessRatio')
            ? (json_['spfSuccessRatio'] as core.num).toDouble()
            : null,
        userReportedSpamRatio: json_.containsKey('userReportedSpamRatio')
            ? (json_['userReportedSpamRatio'] as core.num).toDouble()
            : null,
        userReportedSpamRatioLowerBound:
            json_.containsKey('userReportedSpamRatioLowerBound')
                ? (json_['userReportedSpamRatioLowerBound'] as core.num)
                    .toDouble()
                : null,
        userReportedSpamRatioUpperBound:
            json_.containsKey('userReportedSpamRatioUpperBound')
                ? (json_['userReportedSpamRatioUpperBound'] as core.num)
                    .toDouble()
                : null,
      );