ErrorGroupStats.fromJson constructor

ErrorGroupStats.fromJson(
  1. Map _json
)

Implementation

ErrorGroupStats.fromJson(core.Map _json)
    : this(
        affectedServices: _json.containsKey('affectedServices')
            ? (_json['affectedServices'] as core.List)
                .map<ServiceContext>((value) => ServiceContext.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        affectedUsersCount: _json.containsKey('affectedUsersCount')
            ? _json['affectedUsersCount'] as core.String
            : null,
        count:
            _json.containsKey('count') ? _json['count'] as core.String : null,
        firstSeenTime: _json.containsKey('firstSeenTime')
            ? _json['firstSeenTime'] as core.String
            : null,
        group: _json.containsKey('group')
            ? ErrorGroup.fromJson(
                _json['group'] as core.Map<core.String, core.dynamic>)
            : null,
        lastSeenTime: _json.containsKey('lastSeenTime')
            ? _json['lastSeenTime'] as core.String
            : null,
        numAffectedServices: _json.containsKey('numAffectedServices')
            ? _json['numAffectedServices'] as core.int
            : null,
        representative: _json.containsKey('representative')
            ? ErrorEvent.fromJson(_json['representative']
                as core.Map<core.String, core.dynamic>)
            : null,
        timedCounts: _json.containsKey('timedCounts')
            ? (_json['timedCounts'] as core.List)
                .map<TimedCount>((value) => TimedCount.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );