toJson method
Converts a VolumeProjection instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempConfigMap = configMap;
final tempDownwardAPI = downwardAPI;
final tempSecret = secret;
final tempServiceAccountToken = serviceAccountToken;
if (tempConfigMap != null) {
jsonData['configMap'] = tempConfigMap.toJson();
}
if (tempDownwardAPI != null) {
jsonData['downwardAPI'] = tempDownwardAPI.toJson();
}
if (tempSecret != null) {
jsonData['secret'] = tempSecret.toJson();
}
if (tempServiceAccountToken != null) {
jsonData['serviceAccountToken'] = tempServiceAccountToken.toJson();
}
return jsonData;
}