toJson method
Converts a EnvVarSource instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempConfigMapKeyRef = configMapKeyRef;
final tempFieldRef = fieldRef;
final tempResourceFieldRef = resourceFieldRef;
final tempSecretKeyRef = secretKeyRef;
if (tempConfigMapKeyRef != null) {
jsonData['configMapKeyRef'] = tempConfigMapKeyRef.toJson();
}
if (tempFieldRef != null) {
jsonData['fieldRef'] = tempFieldRef.toJson();
}
if (tempResourceFieldRef != null) {
jsonData['resourceFieldRef'] = tempResourceFieldRef.toJson();
}
if (tempSecretKeyRef != null) {
jsonData['secretKeyRef'] = tempSecretKeyRef.toJson();
}
return jsonData;
}