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, value) => core.MapEntry(
key,
value 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,
);