toJson method
Converts a QuobyteVolumeSource instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempGroup = group;
final tempReadOnly = readOnly;
final tempRegistry = registry;
final tempTenant = tenant;
final tempUser = user;
final tempVolume = volume;
if (tempGroup != null) {
jsonData['group'] = tempGroup;
}
if (tempReadOnly != null) {
jsonData['readOnly'] = tempReadOnly;
}
jsonData['registry'] = tempRegistry;
if (tempTenant != null) {
jsonData['tenant'] = tempTenant;
}
if (tempUser != null) {
jsonData['user'] = tempUser;
}
jsonData['volume'] = tempVolume;
return jsonData;
}