toJson method
Converts a OwnerReference instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempApiVersion = apiVersion;
final tempBlockOwnerDeletion = blockOwnerDeletion;
final tempController = controller;
final tempKind = kind;
final tempName = name;
final tempUid = uid;
jsonData['apiVersion'] = tempApiVersion;
if (tempBlockOwnerDeletion != null) {
jsonData['blockOwnerDeletion'] = tempBlockOwnerDeletion;
}
if (tempController != null) {
jsonData['controller'] = tempController;
}
jsonData['kind'] = tempKind;
jsonData['name'] = tempName;
jsonData['uid'] = tempUid;
return jsonData;
}