InstancePolicy.fromJson constructor

InstancePolicy.fromJson(
  1. Map json_
)

Implementation

InstancePolicy.fromJson(core.Map json_)
    : this(
        accelerators: json_.containsKey('accelerators')
            ? (json_['accelerators'] as core.List)
                .map((value) => Accelerator.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        bootDisk: json_.containsKey('bootDisk')
            ? Disk.fromJson(
                json_['bootDisk'] as core.Map<core.String, core.dynamic>)
            : null,
        disks: json_.containsKey('disks')
            ? (json_['disks'] as core.List)
                .map((value) => AttachedDisk.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        machineType: json_.containsKey('machineType')
            ? json_['machineType'] as core.String
            : null,
        minCpuPlatform: json_.containsKey('minCpuPlatform')
            ? json_['minCpuPlatform'] as core.String
            : null,
        provisioningModel: json_.containsKey('provisioningModel')
            ? json_['provisioningModel'] as core.String
            : null,
        reservation: json_.containsKey('reservation')
            ? json_['reservation'] as core.String
            : null,
      );