Object.fromJson constructor

Object.fromJson(
  1. Map json_
)

Implementation

Object.fromJson(core.Map json_)
    : this(
        acl: json_.containsKey('acl')
            ? (json_['acl'] as core.List)
                .map((value) => ObjectAccessControl.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        bucket: json_.containsKey('bucket')
            ? json_['bucket'] as core.String
            : null,
        cacheControl: json_.containsKey('cacheControl')
            ? json_['cacheControl'] as core.String
            : null,
        componentCount: json_.containsKey('componentCount')
            ? json_['componentCount'] as core.int
            : null,
        contentDisposition: json_.containsKey('contentDisposition')
            ? json_['contentDisposition'] as core.String
            : null,
        contentEncoding: json_.containsKey('contentEncoding')
            ? json_['contentEncoding'] as core.String
            : null,
        contentLanguage: json_.containsKey('contentLanguage')
            ? json_['contentLanguage'] as core.String
            : null,
        contentType: json_.containsKey('contentType')
            ? json_['contentType'] as core.String
            : null,
        crc32c: json_.containsKey('crc32c')
            ? json_['crc32c'] as core.String
            : null,
        customTime: json_.containsKey('customTime')
            ? core.DateTime.parse(json_['customTime'] as core.String)
            : null,
        customerEncryption: json_.containsKey('customerEncryption')
            ? ObjectCustomerEncryption.fromJson(json_['customerEncryption']
                as core.Map<core.String, core.dynamic>)
            : null,
        etag: json_.containsKey('etag') ? json_['etag'] as core.String : null,
        eventBasedHold: json_.containsKey('eventBasedHold')
            ? json_['eventBasedHold'] as core.bool
            : null,
        generation: json_.containsKey('generation')
            ? json_['generation'] as core.String
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        kmsKeyName: json_.containsKey('kmsKeyName')
            ? json_['kmsKeyName'] as core.String
            : null,
        md5Hash: json_.containsKey('md5Hash')
            ? json_['md5Hash'] as core.String
            : null,
        mediaLink: json_.containsKey('mediaLink')
            ? json_['mediaLink'] as core.String
            : null,
        metadata: json_.containsKey('metadata')
            ? (json_['metadata'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        metageneration: json_.containsKey('metageneration')
            ? json_['metageneration'] as core.String
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        owner: json_.containsKey('owner')
            ? ObjectOwner.fromJson(
                json_['owner'] as core.Map<core.String, core.dynamic>)
            : null,
        retentionExpirationTime: json_.containsKey('retentionExpirationTime')
            ? core.DateTime.parse(
                json_['retentionExpirationTime'] as core.String)
            : null,
        selfLink: json_.containsKey('selfLink')
            ? json_['selfLink'] as core.String
            : null,
        size: json_.containsKey('size') ? json_['size'] as core.String : null,
        storageClass: json_.containsKey('storageClass')
            ? json_['storageClass'] as core.String
            : null,
        temporaryHold: json_.containsKey('temporaryHold')
            ? json_['temporaryHold'] as core.bool
            : null,
        timeCreated: json_.containsKey('timeCreated')
            ? core.DateTime.parse(json_['timeCreated'] as core.String)
            : null,
        timeDeleted: json_.containsKey('timeDeleted')
            ? core.DateTime.parse(json_['timeDeleted'] as core.String)
            : null,
        timeStorageClassUpdated: json_.containsKey('timeStorageClassUpdated')
            ? core.DateTime.parse(
                json_['timeStorageClassUpdated'] as core.String)
            : null,
        updated: json_.containsKey('updated')
            ? core.DateTime.parse(json_['updated'] as core.String)
            : null,
      );