File.fromJson constructor
File.fromJson(
- Map json_
Implementation
File.fromJson(core.Map json_)
: this(
appProperties: json_.containsKey('appProperties')
? (json_['appProperties'] as core.Map<core.String, core.dynamic>)
.map(
(key, value) => core.MapEntry(
key,
value as core.String?,
),
)
: null,
capabilities: json_.containsKey('capabilities')
? FileCapabilities.fromJson(
json_['capabilities'] as core.Map<core.String, core.dynamic>)
: null,
contentHints: json_.containsKey('contentHints')
? FileContentHints.fromJson(
json_['contentHints'] as core.Map<core.String, core.dynamic>)
: null,
contentRestrictions: json_.containsKey('contentRestrictions')
? (json_['contentRestrictions'] as core.List)
.map((value) => ContentRestriction.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
copyRequiresWriterPermission:
json_.containsKey('copyRequiresWriterPermission')
? json_['copyRequiresWriterPermission'] as core.bool
: null,
createdTime: json_.containsKey('createdTime')
? core.DateTime.parse(json_['createdTime'] as core.String)
: null,
description: json_.containsKey('description')
? json_['description'] as core.String
: null,
driveId: json_.containsKey('driveId')
? json_['driveId'] as core.String
: null,
explicitlyTrashed: json_.containsKey('explicitlyTrashed')
? json_['explicitlyTrashed'] as core.bool
: null,
exportLinks: json_.containsKey('exportLinks')
? (json_['exportLinks'] as core.Map<core.String, core.dynamic>)
.map(
(key, value) => core.MapEntry(
key,
value as core.String,
),
)
: null,
fileExtension: json_.containsKey('fileExtension')
? json_['fileExtension'] as core.String
: null,
folderColorRgb: json_.containsKey('folderColorRgb')
? json_['folderColorRgb'] as core.String
: null,
fullFileExtension: json_.containsKey('fullFileExtension')
? json_['fullFileExtension'] as core.String
: null,
hasAugmentedPermissions: json_.containsKey('hasAugmentedPermissions')
? json_['hasAugmentedPermissions'] as core.bool
: null,
hasThumbnail: json_.containsKey('hasThumbnail')
? json_['hasThumbnail'] as core.bool
: null,
headRevisionId: json_.containsKey('headRevisionId')
? json_['headRevisionId'] as core.String
: null,
iconLink: json_.containsKey('iconLink')
? json_['iconLink'] as core.String
: null,
id: json_.containsKey('id') ? json_['id'] as core.String : null,
imageMediaMetadata: json_.containsKey('imageMediaMetadata')
? FileImageMediaMetadata.fromJson(json_['imageMediaMetadata']
as core.Map<core.String, core.dynamic>)
: null,
isAppAuthorized: json_.containsKey('isAppAuthorized')
? json_['isAppAuthorized'] as core.bool
: null,
kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
labelInfo: json_.containsKey('labelInfo')
? FileLabelInfo.fromJson(
json_['labelInfo'] as core.Map<core.String, core.dynamic>)
: null,
lastModifyingUser: json_.containsKey('lastModifyingUser')
? User.fromJson(json_['lastModifyingUser']
as core.Map<core.String, core.dynamic>)
: null,
linkShareMetadata: json_.containsKey('linkShareMetadata')
? FileLinkShareMetadata.fromJson(json_['linkShareMetadata']
as core.Map<core.String, core.dynamic>)
: null,
md5Checksum: json_.containsKey('md5Checksum')
? json_['md5Checksum'] as core.String
: null,
mimeType: json_.containsKey('mimeType')
? json_['mimeType'] as core.String
: null,
modifiedByMe: json_.containsKey('modifiedByMe')
? json_['modifiedByMe'] as core.bool
: null,
modifiedByMeTime: json_.containsKey('modifiedByMeTime')
? core.DateTime.parse(json_['modifiedByMeTime'] as core.String)
: null,
modifiedTime: json_.containsKey('modifiedTime')
? core.DateTime.parse(json_['modifiedTime'] as core.String)
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
originalFilename: json_.containsKey('originalFilename')
? json_['originalFilename'] as core.String
: null,
ownedByMe: json_.containsKey('ownedByMe')
? json_['ownedByMe'] as core.bool
: null,
owners: json_.containsKey('owners')
? (json_['owners'] as core.List)
.map((value) => User.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
parents: json_.containsKey('parents')
? (json_['parents'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
permissionIds: json_.containsKey('permissionIds')
? (json_['permissionIds'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
permissions: json_.containsKey('permissions')
? (json_['permissions'] as core.List)
.map((value) => Permission.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
properties: json_.containsKey('properties')
? (json_['properties'] as core.Map<core.String, core.dynamic>)
.map(
(key, value) => core.MapEntry(
key,
value as core.String?,
),
)
: null,
quotaBytesUsed: json_.containsKey('quotaBytesUsed')
? json_['quotaBytesUsed'] as core.String
: null,
resourceKey: json_.containsKey('resourceKey')
? json_['resourceKey'] as core.String
: null,
sha1Checksum: json_.containsKey('sha1Checksum')
? json_['sha1Checksum'] as core.String
: null,
sha256Checksum: json_.containsKey('sha256Checksum')
? json_['sha256Checksum'] as core.String
: null,
shared:
json_.containsKey('shared') ? json_['shared'] as core.bool : null,
sharedWithMeTime: json_.containsKey('sharedWithMeTime')
? core.DateTime.parse(json_['sharedWithMeTime'] as core.String)
: null,
sharingUser: json_.containsKey('sharingUser')
? User.fromJson(
json_['sharingUser'] as core.Map<core.String, core.dynamic>)
: null,
shortcutDetails: json_.containsKey('shortcutDetails')
? FileShortcutDetails.fromJson(json_['shortcutDetails']
as core.Map<core.String, core.dynamic>)
: null,
size: json_.containsKey('size') ? json_['size'] as core.String : null,
spaces: json_.containsKey('spaces')
? (json_['spaces'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
starred: json_.containsKey('starred')
? json_['starred'] as core.bool
: null,
teamDriveId: json_.containsKey('teamDriveId')
? json_['teamDriveId'] as core.String
: null,
thumbnailLink: json_.containsKey('thumbnailLink')
? json_['thumbnailLink'] as core.String
: null,
thumbnailVersion: json_.containsKey('thumbnailVersion')
? json_['thumbnailVersion'] as core.String
: null,
trashed: json_.containsKey('trashed')
? json_['trashed'] as core.bool
: null,
trashedTime: json_.containsKey('trashedTime')
? core.DateTime.parse(json_['trashedTime'] as core.String)
: null,
trashingUser: json_.containsKey('trashingUser')
? User.fromJson(
json_['trashingUser'] as core.Map<core.String, core.dynamic>)
: null,
version: json_.containsKey('version')
? json_['version'] as core.String
: null,
videoMediaMetadata: json_.containsKey('videoMediaMetadata')
? FileVideoMediaMetadata.fromJson(json_['videoMediaMetadata']
as core.Map<core.String, core.dynamic>)
: null,
viewedByMe: json_.containsKey('viewedByMe')
? json_['viewedByMe'] as core.bool
: null,
viewedByMeTime: json_.containsKey('viewedByMeTime')
? core.DateTime.parse(json_['viewedByMeTime'] as core.String)
: null,
viewersCanCopyContent: json_.containsKey('viewersCanCopyContent')
? json_['viewersCanCopyContent'] as core.bool
: null,
webContentLink: json_.containsKey('webContentLink')
? json_['webContentLink'] as core.String
: null,
webViewLink: json_.containsKey('webViewLink')
? json_['webViewLink'] as core.String
: null,
writersCanShare: json_.containsKey('writersCanShare')
? json_['writersCanShare'] as core.bool
: null,
);