toJson method
Converts a VsphereVirtualDiskVolumeSource instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempFsType = fsType;
final tempStoragePolicyID = storagePolicyID;
final tempStoragePolicyName = storagePolicyName;
final tempVolumePath = volumePath;
if (tempFsType != null) {
jsonData['fsType'] = tempFsType;
}
if (tempStoragePolicyID != null) {
jsonData['storagePolicyID'] = tempStoragePolicyID;
}
if (tempStoragePolicyName != null) {
jsonData['storagePolicyName'] = tempStoragePolicyName;
}
jsonData['volumePath'] = tempVolumePath;
return jsonData;
}