toJson method
Converts a ConfigMapNodeConfigSource instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempKubeletConfigKey = kubeletConfigKey;
final tempName = name;
final tempNamespace = namespace;
final tempResourceVersion = resourceVersion;
final tempUid = uid;
jsonData['kubeletConfigKey'] = tempKubeletConfigKey;
jsonData['name'] = tempName;
jsonData['namespace'] = tempNamespace;
if (tempResourceVersion != null) {
jsonData['resourceVersion'] = tempResourceVersion;
}
if (tempUid != null) {
jsonData['uid'] = tempUid;
}
return jsonData;
}