CSINodeDriver.fromJson constructor
Creates a CSINodeDriver from JSON data.
Implementation
factory CSINodeDriver.fromJson(Map<String, dynamic> json) {
final tempAllocatableJson = json['allocatable'];
final tempNameJson = json['name'];
final tempNodeIDJson = json['nodeID'];
final tempTopologyKeysJson = json['topologyKeys'];
final VolumeNodeResources? tempAllocatable = tempAllocatableJson != null
? VolumeNodeResources.fromJson(tempAllocatableJson)
: null;
final String tempName = tempNameJson;
final String tempNodeID = tempNodeIDJson;
final List<String>? tempTopologyKeys = tempTopologyKeysJson != null
? List<String>.from(tempTopologyKeysJson)
: null;
return CSINodeDriver(
allocatable: tempAllocatable,
name: tempName,
nodeID: tempNodeID,
topologyKeys: tempTopologyKeys,
);
}