Device.fromJson constructor

Device.fromJson(
  1. Map json_
)

Implementation

Device.fromJson(core.Map json_)
    : this(
        claims: json_.containsKey('claims')
            ? (json_['claims'] as core.List)
                .map((value) => DeviceClaim.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        configuration: json_.containsKey('configuration')
            ? json_['configuration'] as core.String
            : null,
        deviceId: json_.containsKey('deviceId')
            ? json_['deviceId'] as core.String
            : null,
        deviceIdentifier: json_.containsKey('deviceIdentifier')
            ? DeviceIdentifier.fromJson(json_['deviceIdentifier']
                as core.Map<core.String, core.dynamic>)
            : null,
        deviceMetadata: json_.containsKey('deviceMetadata')
            ? DeviceMetadata.fromJson(json_['deviceMetadata']
                as core.Map<core.String, core.dynamic>)
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
      );