JobStatus.fromJson constructor

JobStatus.fromJson(
  1. Map json_
)

Implementation

JobStatus.fromJson(core.Map json_)
    : this(
        runDuration: json_.containsKey('runDuration')
            ? json_['runDuration'] as core.String
            : null,
        state:
            json_.containsKey('state') ? json_['state'] as core.String : null,
        statusEvents: json_.containsKey('statusEvents')
            ? (json_['statusEvents'] as core.List)
                .map((value) => StatusEvent.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        taskGroups: json_.containsKey('taskGroups')
            ? (json_['taskGroups'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  TaskGroupStatus.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
      );