TopologyConfig.fromJson constructor

TopologyConfig.fromJson(
  1. Map _json
)

Implementation

TopologyConfig.fromJson(core.Map _json)
    : this(
        computations: _json.containsKey('computations')
            ? (_json['computations'] as core.List)
                .map((value) => ComputationTopology.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        dataDiskAssignments: _json.containsKey('dataDiskAssignments')
            ? (_json['dataDiskAssignments'] as core.List)
                .map((value) => DataDiskAssignment.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        forwardingKeyBits: _json.containsKey('forwardingKeyBits')
            ? _json['forwardingKeyBits'] as core.int
            : null,
        persistentStateVersion: _json.containsKey('persistentStateVersion')
            ? _json['persistentStateVersion'] as core.int
            : null,
        userStageToComputationNameMap:
            _json.containsKey('userStageToComputationNameMap')
                ? (_json['userStageToComputationNameMap']
                        as core.Map<core.String, core.dynamic>)
                    .map(
                    (key, item) => core.MapEntry(
                      key,
                      item as core.String,
                    ),
                  )
                : null,
      );