Metadata.fromJson constructor

Metadata.fromJson(
  1. Map _json
)

Implementation

Metadata.fromJson(core.Map _json)
    : this(
        createTime: _json.containsKey('createTime')
            ? _json['createTime'] as core.String
            : null,
        endTime: _json.containsKey('endTime')
            ? _json['endTime'] as core.String
            : null,
        events: _json.containsKey('events')
            ? (_json['events'] as core.List)
                .map<Event>((value) => Event.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        labels: _json.containsKey('labels')
            ? (_json['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, item) => core.MapEntry(
                  key,
                  item as core.String,
                ),
              )
            : null,
        pipeline: _json.containsKey('pipeline')
            ? Pipeline.fromJson(
                _json['pipeline'] as core.Map<core.String, core.dynamic>)
            : null,
        pubSubTopic: _json.containsKey('pubSubTopic')
            ? _json['pubSubTopic'] as core.String
            : null,
        startTime: _json.containsKey('startTime')
            ? _json['startTime'] as core.String
            : null,
      );