Query$GetMyDevices$pairedDevices$plusDevice.fromJson constructor

Query$GetMyDevices$pairedDevices$plusDevice.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Query$GetMyDevices$pairedDevices$plusDevice.fromJson(
  Map<String, dynamic> json,
) {
  final l$allTimesHighConsumption = json['allTimesHighConsumption'];
  final l$allTimesHighProduction = json['allTimesHighProduction'];
  final l$hasProduction = json['hasProduction'];
  final l$blinksPerKwh = json['blinksPerKwh'];
  final l$errorCode = json['errorCode'];
  final l$rmsCurrentMaxPerPhaseAmpere = json['rmsCurrentMaxPerPhaseAmpere'];
  final l$consumptionAlarmMaxWh = json['consumptionAlarmMaxWh'];
  final l$deviceType = json['deviceType'];
  final l$remoteDevices = json['remoteDevices'];
  final l$baseDevice = json['baseDevice'];
  final l$$__typename = json['__typename'];
  return Query$GetMyDevices$pairedDevices$plusDevice(
    allTimesHighConsumption: (l$allTimesHighConsumption as num?)?.toDouble(),
    allTimesHighProduction: (l$allTimesHighProduction as num?)?.toDouble(),
    hasProduction: (l$hasProduction as bool?),
    blinksPerKwh: (l$blinksPerKwh as int?),
    errorCode: (l$errorCode as String?),
    rmsCurrentMaxPerPhaseAmpere: (l$rmsCurrentMaxPerPhaseAmpere as num?)
        ?.toDouble(),
    consumptionAlarmMaxWh: (l$consumptionAlarmMaxWh as int?),
    deviceType: l$deviceType == null
        ? null
        : Query$GetMyDevices$pairedDevices$plusDevice$deviceType.fromJson(
            (l$deviceType as Map<String, dynamic>),
          ),
    remoteDevices: (l$remoteDevices as List<dynamic>?)
        ?.map(
          (e) =>
              Query$GetMyDevices$pairedDevices$plusDevice$remoteDevices.fromJson(
                (e as Map<String, dynamic>),
              ),
        )
        .toList(),
    baseDevice: l$baseDevice == null
        ? null
        : Query$GetMyDevices$pairedDevices$plusDevice$baseDevice.fromJson(
            (l$baseDevice as Map<String, dynamic>),
          ),
    $__typename: (l$$__typename as String),
  );
}