toJson method

  1. @override
Object toJson()

Implementation

@override
Object toJson() => {
  'canIpForward': ?canIpForward,
  'deletionProtection': ?deletionProtection,
  'description': ?description,
  if (disks.isNotDefault) 'disks': [for (final i in disks) i.toJson()],
  if (guestAccelerators.isNotDefault)
    'guestAccelerators': [for (final i in guestAccelerators) i.toJson()],
  'keyRevocationActionType': ?keyRevocationActionType,
  if (labels.isNotDefault) 'labels': labels,
  'machineType': ?machineType,
  'metadata': ?metadata?.toJson(),
  'minCpuPlatform': ?minCpuPlatform,
  if (networkInterfaces.isNotDefault)
    'networkInterfaces': [for (final i in networkInterfaces) i.toJson()],
  'postKeyRevocationActionType': ?postKeyRevocationActionType,
  'scheduling': ?scheduling?.toJson(),
  if (serviceAccounts.isNotDefault)
    'serviceAccounts': [for (final i in serviceAccounts) i.toJson()],
  'tags': ?tags?.toJson(),
};