CSIVolumeSource.fromJson constructor
Creates a CSIVolumeSource from JSON data.
Implementation
factory CSIVolumeSource.fromJson(Map<String, dynamic> json) {
final tempDriverJson = json['driver'];
final tempFsTypeJson = json['fsType'];
final tempNodePublishSecretRefJson = json['nodePublishSecretRef'];
final tempReadOnlyJson = json['readOnly'];
final tempVolumeAttributesJson = json['volumeAttributes'];
final String tempDriver = tempDriverJson;
final String? tempFsType = tempFsTypeJson;
final LocalObjectReference? tempNodePublishSecretRef =
tempNodePublishSecretRefJson != null
? LocalObjectReference.fromJson(tempNodePublishSecretRefJson)
: null;
final bool? tempReadOnly = tempReadOnlyJson;
final Map<String, String>? tempVolumeAttributes =
tempVolumeAttributesJson != null
? Map<String, String>.from(tempVolumeAttributesJson)
: null;
return CSIVolumeSource(
driver: tempDriver,
fsType: tempFsType,
nodePublishSecretRef: tempNodePublishSecretRef,
readOnly: tempReadOnly,
volumeAttributes: tempVolumeAttributes,
);
}