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, item) => core.MapEntry(
                  key,
                  item 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,
      );