SourceContext.fromJson constructor

SourceContext.fromJson(
  1. Map _json
)

Implementation

SourceContext.fromJson(core.Map _json)
    : this(
        cloudRepo: _json.containsKey('cloudRepo')
            ? CloudRepoSourceContext.fromJson(
                _json['cloudRepo'] as core.Map<core.String, core.dynamic>)
            : null,
        gerrit: _json.containsKey('gerrit')
            ? GerritSourceContext.fromJson(
                _json['gerrit'] as core.Map<core.String, core.dynamic>)
            : null,
        git: _json.containsKey('git')
            ? GitSourceContext.fromJson(
                _json['git'] as core.Map<core.String, core.dynamic>)
            : 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,
      );