AttributionReportingTriggerRegistration.fromJson constructor

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

Implementation

factory AttributionReportingTriggerRegistration.fromJson(
    Map<String, dynamic> json) {
  return AttributionReportingTriggerRegistration(
    filters: AttributionReportingFilterPair.fromJson(
        json['filters'] as Map<String, dynamic>),
    debugKey: json.containsKey('debugKey')
        ? UnsignedInt64AsBase10.fromJson(json['debugKey'] as String)
        : null,
    aggregatableDedupKeys: (json['aggregatableDedupKeys'] as List)
        .map((e) => AttributionReportingAggregatableDedupKey.fromJson(
            e as Map<String, dynamic>))
        .toList(),
    eventTriggerData: (json['eventTriggerData'] as List)
        .map((e) => AttributionReportingEventTriggerData.fromJson(
            e as Map<String, dynamic>))
        .toList(),
    aggregatableTriggerData: (json['aggregatableTriggerData'] as List)
        .map((e) => AttributionReportingAggregatableTriggerData.fromJson(
            e as Map<String, dynamic>))
        .toList(),
    aggregatableValues: (json['aggregatableValues'] as List)
        .map((e) => AttributionReportingAggregatableValueEntry.fromJson(
            e as Map<String, dynamic>))
        .toList(),
    aggregatableFilteringIdMaxBytes:
        json['aggregatableFilteringIdMaxBytes'] as int,
    debugReporting: json['debugReporting'] as bool? ?? false,
    aggregationCoordinatorOrigin:
        json.containsKey('aggregationCoordinatorOrigin')
            ? json['aggregationCoordinatorOrigin'] as String
            : null,
    sourceRegistrationTimeConfig:
        AttributionReportingSourceRegistrationTimeConfig.fromJson(
            json['sourceRegistrationTimeConfig'] as String),
    triggerContextId: json.containsKey('triggerContextId')
        ? json['triggerContextId'] as String
        : null,
    aggregatableDebugReportingConfig:
        AttributionReportingAggregatableDebugReportingConfig.fromJson(
            json['aggregatableDebugReportingConfig'] as Map<String, dynamic>),
  );
}