VolumeAttachmentSpec.fromJson constructor

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

Creates a VolumeAttachmentSpec from JSON data.

Implementation

factory VolumeAttachmentSpec.fromJson(Map<String, dynamic> json) {
  final tempAttacherJson = json['attacher'];
  final tempNodeNameJson = json['nodeName'];
  final tempSourceJson = json['source'];

  final String tempAttacher = tempAttacherJson;
  final String tempNodeName = tempNodeNameJson;
  final VolumeAttachmentSource tempSource =
      VolumeAttachmentSource.fromJson(tempSourceJson);

  return VolumeAttachmentSpec(
    attacher: tempAttacher,
    nodeName: tempNodeName,
    source: tempSource,
  );
}