InterestGroupDetails.fromJson constructor

InterestGroupDetails.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory InterestGroupDetails.fromJson(Map<String, dynamic> json) {
  return InterestGroupDetails(
    ownerOrigin: json['ownerOrigin'] as String,
    name: json['name'] as String,
    expirationTime:
        network.TimeSinceEpoch.fromJson(json['expirationTime'] as num),
    joiningOrigin: json['joiningOrigin'] as String,
    biddingUrl:
        json.containsKey('biddingUrl') ? json['biddingUrl'] as String : null,
    biddingWasmHelperUrl: json.containsKey('biddingWasmHelperUrl')
        ? json['biddingWasmHelperUrl'] as String
        : null,
    updateUrl:
        json.containsKey('updateUrl') ? json['updateUrl'] as String : null,
    trustedBiddingSignalsUrl: json.containsKey('trustedBiddingSignalsUrl')
        ? json['trustedBiddingSignalsUrl'] as String
        : null,
    trustedBiddingSignalsKeys: (json['trustedBiddingSignalsKeys'] as List)
        .map((e) => e as String)
        .toList(),
    userBiddingSignals: json.containsKey('userBiddingSignals')
        ? json['userBiddingSignals'] as String
        : null,
    ads: (json['ads'] as List)
        .map((e) => InterestGroupAd.fromJson(e as Map<String, dynamic>))
        .toList(),
    adComponents: (json['adComponents'] as List)
        .map((e) => InterestGroupAd.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}