toJson method
Converts a DeleteOptions instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempApiVersion = apiVersion;
final tempDryRun = dryRun;
final tempGracePeriodSeconds = gracePeriodSeconds;
final tempKind = kind;
final tempOrphanDependents = orphanDependents;
final tempPreconditions = preconditions;
final tempPropagationPolicy = propagationPolicy;
if (tempApiVersion != null) {
jsonData['apiVersion'] = tempApiVersion;
}
if (tempDryRun != null) {
jsonData['dryRun'] = tempDryRun;
}
if (tempGracePeriodSeconds != null) {
jsonData['gracePeriodSeconds'] = tempGracePeriodSeconds;
}
if (tempKind != null) {
jsonData['kind'] = tempKind;
}
if (tempOrphanDependents != null) {
jsonData['orphanDependents'] = tempOrphanDependents;
}
if (tempPreconditions != null) {
jsonData['preconditions'] = tempPreconditions.toJson();
}
if (tempPropagationPolicy != null) {
jsonData['propagationPolicy'] = tempPropagationPolicy;
}
return jsonData;
}