VolumeAttachmentSource.fromJson constructor

VolumeAttachmentSource.fromJson(
  1. Map<String, dynamic> json
)

Creates a VolumeAttachmentSource from JSON data.

Implementation

factory VolumeAttachmentSource.fromJson(Map<String, dynamic> json) {
  final tempInlineVolumeSpecJson = json['inlineVolumeSpec'];
  final tempPersistentVolumeNameJson = json['persistentVolumeName'];

  final PersistentVolumeSpec? tempInlineVolumeSpec =
      tempInlineVolumeSpecJson != null
          ? PersistentVolumeSpec.fromJson(tempInlineVolumeSpecJson)
          : null;
  final String? tempPersistentVolumeName = tempPersistentVolumeNameJson;

  return VolumeAttachmentSource(
    inlineVolumeSpec: tempInlineVolumeSpec,
    persistentVolumeName: tempPersistentVolumeName,
  );
}