GdataMedia.fromJson constructor

GdataMedia.fromJson(
  1. Map _json
)

Implementation

GdataMedia.fromJson(core.Map _json)
    : this(
        algorithm: _json.containsKey('algorithm')
            ? _json['algorithm'] as core.String
            : null,
        bigstoreObjectRef: _json.containsKey('bigstoreObjectRef')
            ? _json['bigstoreObjectRef'] as core.String
            : null,
        blobRef: _json.containsKey('blobRef')
            ? _json['blobRef'] as core.String
            : null,
        blobstore2Info: _json.containsKey('blobstore2Info')
            ? GdataBlobstore2Info.fromJson(_json['blobstore2Info']
                as core.Map<core.String, core.dynamic>)
            : null,
        compositeMedia: _json.containsKey('compositeMedia')
            ? (_json['compositeMedia'] as core.List)
                .map((value) => GdataCompositeMedia.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        contentType: _json.containsKey('contentType')
            ? _json['contentType'] as core.String
            : null,
        contentTypeInfo: _json.containsKey('contentTypeInfo')
            ? GdataContentTypeInfo.fromJson(_json['contentTypeInfo']
                as core.Map<core.String, core.dynamic>)
            : null,
        cosmoBinaryReference: _json.containsKey('cosmoBinaryReference')
            ? _json['cosmoBinaryReference'] as core.String
            : null,
        crc32cHash: _json.containsKey('crc32cHash')
            ? _json['crc32cHash'] as core.int
            : null,
        diffChecksumsResponse: _json.containsKey('diffChecksumsResponse')
            ? GdataDiffChecksumsResponse.fromJson(
                _json['diffChecksumsResponse']
                    as core.Map<core.String, core.dynamic>)
            : null,
        diffDownloadResponse: _json.containsKey('diffDownloadResponse')
            ? GdataDiffDownloadResponse.fromJson(_json['diffDownloadResponse']
                as core.Map<core.String, core.dynamic>)
            : null,
        diffUploadRequest: _json.containsKey('diffUploadRequest')
            ? GdataDiffUploadRequest.fromJson(_json['diffUploadRequest']
                as core.Map<core.String, core.dynamic>)
            : null,
        diffUploadResponse: _json.containsKey('diffUploadResponse')
            ? GdataDiffUploadResponse.fromJson(_json['diffUploadResponse']
                as core.Map<core.String, core.dynamic>)
            : null,
        diffVersionResponse: _json.containsKey('diffVersionResponse')
            ? GdataDiffVersionResponse.fromJson(_json['diffVersionResponse']
                as core.Map<core.String, core.dynamic>)
            : null,
        downloadParameters: _json.containsKey('downloadParameters')
            ? GdataDownloadParameters.fromJson(_json['downloadParameters']
                as core.Map<core.String, core.dynamic>)
            : null,
        filename: _json.containsKey('filename')
            ? _json['filename'] as core.String
            : null,
        hash: _json.containsKey('hash') ? _json['hash'] as core.String : null,
        hashVerified: _json.containsKey('hashVerified')
            ? _json['hashVerified'] as core.bool
            : null,
        inline: _json.containsKey('inline')
            ? _json['inline'] as core.String
            : null,
        isPotentialRetry: _json.containsKey('isPotentialRetry')
            ? _json['isPotentialRetry'] as core.bool
            : null,
        length: _json.containsKey('length')
            ? _json['length'] as core.String
            : null,
        md5Hash: _json.containsKey('md5Hash')
            ? _json['md5Hash'] as core.String
            : null,
        mediaId: _json.containsKey('mediaId')
            ? _json['mediaId'] as core.String
            : null,
        objectId: _json.containsKey('objectId')
            ? GdataObjectId.fromJson(
                _json['objectId'] as core.Map<core.String, core.dynamic>)
            : null,
        path: _json.containsKey('path') ? _json['path'] as core.String : null,
        referenceType: _json.containsKey('referenceType')
            ? _json['referenceType'] as core.String
            : null,
        sha1Hash: _json.containsKey('sha1Hash')
            ? _json['sha1Hash'] as core.String
            : null,
        sha256Hash: _json.containsKey('sha256Hash')
            ? _json['sha256Hash'] as core.String
            : null,
        timestamp: _json.containsKey('timestamp')
            ? _json['timestamp'] as core.String
            : null,
        token:
            _json.containsKey('token') ? _json['token'] as core.String : null,
      );