ComputeScheduling.fromJson constructor

ComputeScheduling.fromJson(
  1. Map json_
)

Implementation

ComputeScheduling.fromJson(core.Map json_)
    : this(
        minNodeCpus: json_.containsKey('minNodeCpus')
            ? json_['minNodeCpus'] as core.int
            : null,
        nodeAffinities: json_.containsKey('nodeAffinities')
            ? (json_['nodeAffinities'] as core.List)
                .map((value) => SchedulingNodeAffinity.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        onHostMaintenance: json_.containsKey('onHostMaintenance')
            ? json_['onHostMaintenance'] as core.String
            : null,
        restartType: json_.containsKey('restartType')
            ? json_['restartType'] as core.String
            : null,
      );