SecretVolumeSource.fromJson constructor
Creates a SecretVolumeSource from JSON data.
Implementation
factory SecretVolumeSource.fromJson(Map<String, dynamic> json) {
final tempDefaultModeJson = json['defaultMode'];
final tempItemsJson = json['items'];
final tempOptionalJson = json['optional'];
final tempSecretNameJson = json['secretName'];
final int? tempDefaultMode = tempDefaultModeJson;
final List<KeyToPath>? tempItems = tempItemsJson != null
? List<dynamic>.from(tempItemsJson)
.map(
(e) => KeyToPath.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
final bool? tempOptional = tempOptionalJson;
final String? tempSecretName = tempSecretNameJson;
return SecretVolumeSource(
defaultMode: tempDefaultMode,
items: tempItems,
optional: tempOptional,
secretName: tempSecretName,
);
}