TraceSummary.fromJson constructor

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

Implementation

factory TraceSummary.fromJson(Map<String, dynamic> json) {
  return TraceSummary(
    annotations: (json['Annotations'] as Map<String, dynamic>?)?.map((k, e) =>
        MapEntry(
            k,
            (e as List)
                .whereNotNull()
                .map((e) =>
                    ValueWithServiceIds.fromJson(e as Map<String, dynamic>))
                .toList())),
    availabilityZones: (json['AvailabilityZones'] as List?)
        ?.whereNotNull()
        .map(
            (e) => AvailabilityZoneDetail.fromJson(e as Map<String, dynamic>))
        .toList(),
    duration: json['Duration'] as double?,
    entryPoint: json['EntryPoint'] != null
        ? ServiceId.fromJson(json['EntryPoint'] as Map<String, dynamic>)
        : null,
    errorRootCauses: (json['ErrorRootCauses'] as List?)
        ?.whereNotNull()
        .map((e) => ErrorRootCause.fromJson(e as Map<String, dynamic>))
        .toList(),
    faultRootCauses: (json['FaultRootCauses'] as List?)
        ?.whereNotNull()
        .map((e) => FaultRootCause.fromJson(e as Map<String, dynamic>))
        .toList(),
    hasError: json['HasError'] as bool?,
    hasFault: json['HasFault'] as bool?,
    hasThrottle: json['HasThrottle'] as bool?,
    http: json['Http'] != null
        ? Http.fromJson(json['Http'] as Map<String, dynamic>)
        : null,
    id: json['Id'] as String?,
    instanceIds: (json['InstanceIds'] as List?)
        ?.whereNotNull()
        .map((e) => InstanceIdDetail.fromJson(e as Map<String, dynamic>))
        .toList(),
    isPartial: json['IsPartial'] as bool?,
    matchedEventTime: timeStampFromJson(json['MatchedEventTime']),
    resourceARNs: (json['ResourceARNs'] as List?)
        ?.whereNotNull()
        .map((e) => ResourceARNDetail.fromJson(e as Map<String, dynamic>))
        .toList(),
    responseTime: json['ResponseTime'] as double?,
    responseTimeRootCauses: (json['ResponseTimeRootCauses'] as List?)
        ?.whereNotNull()
        .map((e) => ResponseTimeRootCause.fromJson(e as Map<String, dynamic>))
        .toList(),
    revision: json['Revision'] as int?,
    serviceIds: (json['ServiceIds'] as List?)
        ?.whereNotNull()
        .map((e) => ServiceId.fromJson(e as Map<String, dynamic>))
        .toList(),
    users: (json['Users'] as List?)
        ?.whereNotNull()
        .map((e) => TraceUser.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}