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, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
      );