AttributionReportingSourceRegistration.fromJson constructor

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

Implementation

factory AttributionReportingSourceRegistration.fromJson(
    Map<String, dynamic> json) {
  return AttributionReportingSourceRegistration(
    time: network.TimeSinceEpoch.fromJson(json['time'] as num),
    expiry: json['expiry'] as int,
    triggerSpecs: (json['triggerSpecs'] as List)
        .map((e) => AttributionReportingTriggerSpec.fromJson(
            e as Map<String, dynamic>))
        .toList(),
    aggregatableReportWindow: json['aggregatableReportWindow'] as int,
    type: AttributionReportingSourceType.fromJson(json['type'] as String),
    sourceOrigin: json['sourceOrigin'] as String,
    reportingOrigin: json['reportingOrigin'] as String,
    destinationSites:
        (json['destinationSites'] as List).map((e) => e as String).toList(),
    eventId: UnsignedInt64AsBase10.fromJson(json['eventId'] as String),
    priority: SignedInt64AsBase10.fromJson(json['priority'] as String),
    filterData: (json['filterData'] as List)
        .map((e) => AttributionReportingFilterDataEntry.fromJson(
            e as Map<String, dynamic>))
        .toList(),
    aggregationKeys: (json['aggregationKeys'] as List)
        .map((e) => AttributionReportingAggregationKeysEntry.fromJson(
            e as Map<String, dynamic>))
        .toList(),
    debugKey: json.containsKey('debugKey')
        ? UnsignedInt64AsBase10.fromJson(json['debugKey'] as String)
        : null,
    triggerDataMatching: AttributionReportingTriggerDataMatching.fromJson(
        json['triggerDataMatching'] as String),
    destinationLimitPriority: SignedInt64AsBase10.fromJson(
        json['destinationLimitPriority'] as String),
    aggregatableDebugReportingConfig:
        AttributionReportingAggregatableDebugReportingConfig.fromJson(
            json['aggregatableDebugReportingConfig'] as Map<String, dynamic>),
  );
}