VirtualMachine.fromJson constructor
VirtualMachine.fromJson(
- Map _json
Implementation
VirtualMachine.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,
bootDiskSizeGb: _json.containsKey('bootDiskSizeGb')
? _json['bootDiskSizeGb'] as core.int
: null,
bootImage: _json.containsKey('bootImage')
? _json['bootImage'] as core.String
: null,
cpuPlatform: _json.containsKey('cpuPlatform')
? _json['cpuPlatform'] as core.String
: null,
disks: _json.containsKey('disks')
? (_json['disks'] as core.List)
.map((value) => Disk.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
dockerCacheImages: _json.containsKey('dockerCacheImages')
? (_json['dockerCacheImages'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
enableStackdriverMonitoring:
_json.containsKey('enableStackdriverMonitoring')
? _json['enableStackdriverMonitoring'] as core.bool
: null,
labels: _json.containsKey('labels')
? (_json['labels'] as core.Map<core.String, core.dynamic>).map(
(key, item) => core.MapEntry(
key,
item as core.String,
),
)
: null,
machineType: _json.containsKey('machineType')
? _json['machineType'] as core.String
: null,
network: _json.containsKey('network')
? Network.fromJson(
_json['network'] as core.Map<core.String, core.dynamic>)
: null,
nvidiaDriverVersion: _json.containsKey('nvidiaDriverVersion')
? _json['nvidiaDriverVersion'] as core.String
: null,
preemptible: _json.containsKey('preemptible')
? _json['preemptible'] as core.bool
: null,
reservation: _json.containsKey('reservation')
? _json['reservation'] as core.String
: null,
serviceAccount: _json.containsKey('serviceAccount')
? ServiceAccount.fromJson(_json['serviceAccount']
as core.Map<core.String, core.dynamic>)
: null,
volumes: _json.containsKey('volumes')
? (_json['volumes'] as core.List)
.map((value) => Volume.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);