toJson method

Map<String, Object> toJson()

Converts a GCEPersistentDiskVolumeSource instance to JSON data.

Implementation

Map<String, Object> toJson() {
  final jsonData = <String, Object>{};

  final tempFsType = fsType;
  final tempPartition = partition;
  final tempPdName = pdName;
  final tempReadOnly = readOnly;

  if (tempFsType != null) {
    jsonData['fsType'] = tempFsType;
  }

  if (tempPartition != null) {
    jsonData['partition'] = tempPartition;
  }

  jsonData['pdName'] = tempPdName;

  if (tempReadOnly != null) {
    jsonData['readOnly'] = tempReadOnly;
  }

  return jsonData;
}