toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() => {
  if (name.isNotDefault) 'name': name,
  'displayName': displayName,
  if (description.isNotDefault) 'description': description,
  if (isDefault.isNotDefault) 'isDefault': isDefault,
  if (machineSpec case final machineSpec?)
    'machineSpec': machineSpec.toJson(),
  if (dataPersistentDiskSpec case final dataPersistentDiskSpec?)
    'dataPersistentDiskSpec': dataPersistentDiskSpec.toJson(),
  if (networkSpec case final networkSpec?)
    'networkSpec': networkSpec.toJson(),
  if (serviceAccount.isNotDefault) 'serviceAccount': serviceAccount,
  if (etag.isNotDefault) 'etag': etag,
  if (labels.isNotDefault) 'labels': labels,
  if (idleShutdownConfig case final idleShutdownConfig?)
    'idleShutdownConfig': idleShutdownConfig.toJson(),
  if (eucConfig case final eucConfig?) 'eucConfig': eucConfig.toJson(),
  if (createTime case final createTime?) 'createTime': createTime.toJson(),
  if (updateTime case final updateTime?) 'updateTime': updateTime.toJson(),
  if (notebookRuntimeType.isNotDefault)
    'notebookRuntimeType': notebookRuntimeType.toJson(),
  if (shieldedVmConfig case final shieldedVmConfig?)
    'shieldedVmConfig': shieldedVmConfig.toJson(),
  if (networkTags.isNotDefault) 'networkTags': networkTags,
  if (encryptionSpec case final encryptionSpec?)
    'encryptionSpec': encryptionSpec.toJson(),
  if (softwareConfig case final softwareConfig?)
    'softwareConfig': softwareConfig.toJson(),
};