Notification.fromJson constructor

Notification.fromJson(
  1. Map _json
)

Implementation

Notification.fromJson(core.Map _json)
    : this(
        customAttributes: _json.containsKey('custom_attributes')
            ? (_json['custom_attributes']
                    as core.Map<core.String, core.dynamic>)
                .map(
                (key, item) => core.MapEntry(
                  key,
                  item as core.String,
                ),
              )
            : null,
        etag: _json.containsKey('etag') ? _json['etag'] as core.String : null,
        eventTypes: _json.containsKey('event_types')
            ? (_json['event_types'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        id: _json.containsKey('id') ? _json['id'] as core.String : null,
        kind: _json.containsKey('kind') ? _json['kind'] as core.String : null,
        objectNamePrefix: _json.containsKey('object_name_prefix')
            ? _json['object_name_prefix'] as core.String
            : null,
        payloadFormat: _json.containsKey('payload_format')
            ? _json['payload_format'] as core.String
            : null,
        selfLink: _json.containsKey('selfLink')
            ? _json['selfLink'] as core.String
            : null,
        topic:
            _json.containsKey('topic') ? _json['topic'] as core.String : null,
      );