DevicePolicy.fromJson constructor

DevicePolicy.fromJson(
  1. Map json_
)

Implementation

DevicePolicy.fromJson(core.Map json_)
    : this(
        allowedDeviceManagementLevels:
            json_.containsKey('allowedDeviceManagementLevels')
                ? (json_['allowedDeviceManagementLevels'] as core.List)
                    .map((value) => value as core.String)
                    .toList()
                : null,
        allowedEncryptionStatuses:
            json_.containsKey('allowedEncryptionStatuses')
                ? (json_['allowedEncryptionStatuses'] as core.List)
                    .map((value) => value as core.String)
                    .toList()
                : null,
        osConstraints: json_.containsKey('osConstraints')
            ? (json_['osConstraints'] as core.List)
                .map((value) => OsConstraint.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        requireAdminApproval: json_.containsKey('requireAdminApproval')
            ? json_['requireAdminApproval'] as core.bool
            : null,
        requireCorpOwned: json_.containsKey('requireCorpOwned')
            ? json_['requireCorpOwned'] as core.bool
            : null,
        requireScreenlock: json_.containsKey('requireScreenlock')
            ? json_['requireScreenlock'] as core.bool
            : null,
      );