toJson method
Converts a CinderVolumeSource instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempFsType = fsType;
final tempReadOnly = readOnly;
final tempSecretRef = secretRef;
final tempVolumeID = volumeID;
if (tempFsType != null) {
jsonData['fsType'] = tempFsType;
}
if (tempReadOnly != null) {
jsonData['readOnly'] = tempReadOnly;
}
if (tempSecretRef != null) {
jsonData['secretRef'] = tempSecretRef.toJson();
}
jsonData['volumeID'] = tempVolumeID;
return jsonData;
}