toJson method

Map<String, dynamic> toJson()

Implementation

core.Map<core.String, core.dynamic> toJson() => {
      if (accelerators != null)
        'accelerators': accelerators!.map((value) => value.toJson()).toList(),
      if (bootDiskSizeGb != null) 'bootDiskSizeGb': bootDiskSizeGb!,
      if (bootImage != null) 'bootImage': bootImage!,
      if (cpuPlatform != null) 'cpuPlatform': cpuPlatform!,
      if (disks != null)
        'disks': disks!.map((value) => value.toJson()).toList(),
      if (dockerCacheImages != null) 'dockerCacheImages': dockerCacheImages!,
      if (enableStackdriverMonitoring != null)
        'enableStackdriverMonitoring': enableStackdriverMonitoring!,
      if (labels != null) 'labels': labels!,
      if (machineType != null) 'machineType': machineType!,
      if (network != null) 'network': network!.toJson(),
      if (nvidiaDriverVersion != null)
        'nvidiaDriverVersion': nvidiaDriverVersion!,
      if (preemptible != null) 'preemptible': preemptible!,
      if (reservation != null) 'reservation': reservation!,
      if (serviceAccount != null) 'serviceAccount': serviceAccount!.toJson(),
      if (volumes != null)
        'volumes': volumes!.map((value) => value.toJson()).toList(),
    };