Device.fromJson constructor

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

Implementation

Device.fromJson(Map<String, dynamic> json)
    : tenantId = TenantId.fromJson(json['tenantId']),
      customerId = json['customerId'] != null
          ? CustomerId.fromJson(json['customerId'])
          : null,
      name = json['name'],
      type = json['type'],
      label = json['label'],
      deviceProfileId = DeviceProfileId.fromJson(json['deviceProfileId']),
      firmwareId = json['firmwareId'] != null
          ? OtaPackageId.fromJson(json['firmwareId'])
          : null,
      softwareId = json['softwareId'] != null
          ? OtaPackageId.fromJson(json['softwareId'])
          : null,
      deviceData = DeviceData.fromJson(json['deviceData']),
      externalId = json['externalId'] != null
          ? DeviceId.fromJson(json['externalId'])
          : null,
      super.fromJson(json);