RuleViolationInfo.fromJson constructor

RuleViolationInfo.fromJson(
  1. Map _json
)

Implementation

RuleViolationInfo.fromJson(core.Map _json)
    : this(
        dataSource: _json.containsKey('dataSource')
            ? _json['dataSource'] as core.String
            : null,
        matchInfo: _json.containsKey('matchInfo')
            ? (_json['matchInfo'] as core.List)
                .map<MatchInfo>((value) => MatchInfo.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        recipients: _json.containsKey('recipients')
            ? (_json['recipients'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        resourceInfo: _json.containsKey('resourceInfo')
            ? ResourceInfo.fromJson(
                _json['resourceInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        ruleInfo: _json.containsKey('ruleInfo')
            ? RuleInfo.fromJson(
                _json['ruleInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        suppressedActionTypes: _json.containsKey('suppressedActionTypes')
            ? (_json['suppressedActionTypes'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        trigger: _json.containsKey('trigger')
            ? _json['trigger'] as core.String
            : null,
        triggeredActionInfo: _json.containsKey('triggeredActionInfo')
            ? (_json['triggeredActionInfo'] as core.List)
                .map<ActionInfo>((value) => ActionInfo.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        triggeredActionTypes: _json.containsKey('triggeredActionTypes')
            ? (_json['triggeredActionTypes'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        triggeringUserEmail: _json.containsKey('triggeringUserEmail')
            ? _json['triggeringUserEmail'] as core.String
            : null,
      );