GoogleChromeManagementV1BatteryStatusReport.fromJson constructor

GoogleChromeManagementV1BatteryStatusReport.fromJson(
  1. Map json_
)

Implementation

GoogleChromeManagementV1BatteryStatusReport.fromJson(core.Map json_)
    : this(
        batteryHealth: json_.containsKey('batteryHealth')
            ? json_['batteryHealth'] as core.String
            : null,
        cycleCount: json_.containsKey('cycleCount')
            ? json_['cycleCount'] as core.int
            : null,
        fullChargeCapacity: json_.containsKey('fullChargeCapacity')
            ? json_['fullChargeCapacity'] as core.String
            : null,
        reportTime: json_.containsKey('reportTime')
            ? json_['reportTime'] as core.String
            : null,
        sample: json_.containsKey('sample')
            ? (json_['sample'] as core.List)
                .map((value) =>
                    GoogleChromeManagementV1BatterySampleReport.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        serialNumber: json_.containsKey('serialNumber')
            ? json_['serialNumber'] as core.String
            : null,
      );