Device.fromJson constructor
Device.fromJson(
- Map json_
Implementation
Device.fromJson(core.Map json_)
: this(
apiLevel: json_.containsKey('apiLevel')
? json_['apiLevel'] as core.int
: null,
applicationReports: json_.containsKey('applicationReports')
? (json_['applicationReports'] as core.List)
.map((value) => ApplicationReport.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
appliedPasswordPolicies: json_.containsKey('appliedPasswordPolicies')
? (json_['appliedPasswordPolicies'] as core.List)
.map((value) => PasswordRequirements.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
appliedPolicyName: json_.containsKey('appliedPolicyName')
? json_['appliedPolicyName'] as core.String
: null,
appliedPolicyVersion: json_.containsKey('appliedPolicyVersion')
? json_['appliedPolicyVersion'] as core.String
: null,
appliedState: json_.containsKey('appliedState')
? json_['appliedState'] as core.String
: null,
commonCriteriaModeInfo: json_.containsKey('commonCriteriaModeInfo')
? CommonCriteriaModeInfo.fromJson(json_['commonCriteriaModeInfo']
as core.Map<core.String, core.dynamic>)
: null,
deviceSettings: json_.containsKey('deviceSettings')
? DeviceSettings.fromJson(json_['deviceSettings']
as core.Map<core.String, core.dynamic>)
: null,
disabledReason: json_.containsKey('disabledReason')
? UserFacingMessage.fromJson(json_['disabledReason']
as core.Map<core.String, core.dynamic>)
: null,
displays: json_.containsKey('displays')
? (json_['displays'] as core.List)
.map((value) => Display.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
dpcMigrationInfo: json_.containsKey('dpcMigrationInfo')
? DpcMigrationInfo.fromJson(json_['dpcMigrationInfo']
as core.Map<core.String, core.dynamic>)
: null,
enrollmentTime: json_.containsKey('enrollmentTime')
? json_['enrollmentTime'] as core.String
: null,
enrollmentTokenData: json_.containsKey('enrollmentTokenData')
? json_['enrollmentTokenData'] as core.String
: null,
enrollmentTokenName: json_.containsKey('enrollmentTokenName')
? json_['enrollmentTokenName'] as core.String
: null,
hardwareInfo: json_.containsKey('hardwareInfo')
? HardwareInfo.fromJson(
json_['hardwareInfo'] as core.Map<core.String, core.dynamic>)
: null,
hardwareStatusSamples: json_.containsKey('hardwareStatusSamples')
? (json_['hardwareStatusSamples'] as core.List)
.map((value) => HardwareStatus.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
lastPolicyComplianceReportTime:
json_.containsKey('lastPolicyComplianceReportTime')
? json_['lastPolicyComplianceReportTime'] as core.String
: null,
lastPolicySyncTime: json_.containsKey('lastPolicySyncTime')
? json_['lastPolicySyncTime'] as core.String
: null,
lastStatusReportTime: json_.containsKey('lastStatusReportTime')
? json_['lastStatusReportTime'] as core.String
: null,
managementMode: json_.containsKey('managementMode')
? json_['managementMode'] as core.String
: null,
memoryEvents: json_.containsKey('memoryEvents')
? (json_['memoryEvents'] as core.List)
.map((value) => MemoryEvent.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
memoryInfo: json_.containsKey('memoryInfo')
? MemoryInfo.fromJson(
json_['memoryInfo'] as core.Map<core.String, core.dynamic>)
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
networkInfo: json_.containsKey('networkInfo')
? NetworkInfo.fromJson(
json_['networkInfo'] as core.Map<core.String, core.dynamic>)
: null,
nonComplianceDetails: json_.containsKey('nonComplianceDetails')
? (json_['nonComplianceDetails'] as core.List)
.map((value) => NonComplianceDetail.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
ownership: json_.containsKey('ownership')
? json_['ownership'] as core.String
: null,
policyCompliant: json_.containsKey('policyCompliant')
? json_['policyCompliant'] as core.bool
: null,
policyName: json_.containsKey('policyName')
? json_['policyName'] as core.String
: null,
powerManagementEvents: json_.containsKey('powerManagementEvents')
? (json_['powerManagementEvents'] as core.List)
.map((value) => PowerManagementEvent.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
previousDeviceNames: json_.containsKey('previousDeviceNames')
? (json_['previousDeviceNames'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
securityPosture: json_.containsKey('securityPosture')
? SecurityPosture.fromJson(json_['securityPosture']
as core.Map<core.String, core.dynamic>)
: null,
softwareInfo: json_.containsKey('softwareInfo')
? SoftwareInfo.fromJson(
json_['softwareInfo'] as core.Map<core.String, core.dynamic>)
: null,
state:
json_.containsKey('state') ? json_['state'] as core.String : null,
systemProperties: json_.containsKey('systemProperties')
? (json_['systemProperties']
as core.Map<core.String, core.dynamic>)
.map(
(key, value) => core.MapEntry(
key,
value as core.String,
),
)
: null,
user: json_.containsKey('user')
? User.fromJson(
json_['user'] as core.Map<core.String, core.dynamic>)
: null,
userName: json_.containsKey('userName')
? json_['userName'] as core.String
: null,
);