toJson method

  1. @override
Object toJson()
override

Implementation

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