toJson method
Converts a Scheduling instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempNodeSelector = nodeSelector;
final tempTolerations = tolerations;
if (tempNodeSelector != null) {
jsonData['nodeSelector'] = tempNodeSelector;
}
if (tempTolerations != null) {
jsonData['tolerations'] =
tempTolerations.map((e) => e.toJson()).toList(growable: false);
}
return jsonData;
}