AcceleratorType.fromJson constructor

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

Implementation

factory AcceleratorType.fromJson(Map<String, dynamic> json) {
  return AcceleratorType(
    acceleratorTypeName: json['acceleratorTypeName'] as String?,
    memoryInfo: json['memoryInfo'] != null
        ? MemoryInfo.fromJson(json['memoryInfo'] as Map<String, dynamic>)
        : null,
    throughputInfo: (json['throughputInfo'] as List?)
        ?.whereNotNull()
        .map((e) => KeyValuePair.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}