toJson method
Implementation
@override
Object toJson() => {
if (videoMetadata != null) 'videoMetadata': videoMetadata!.toJson(),
if (name.isNotDefault) 'name': name,
if (displayName.isNotDefault) 'displayName': displayName,
if (mimeType.isNotDefault) 'mimeType': mimeType,
if (sizeBytes.isNotDefault) 'sizeBytes': encodeInt64(sizeBytes),
if (createTime != null) 'createTime': createTime!.toJson(),
if (updateTime != null) 'updateTime': updateTime!.toJson(),
if (expirationTime != null) 'expirationTime': expirationTime!.toJson(),
if (sha256Hash.isNotDefault) 'sha256Hash': encodeBytes(sha256Hash),
if (uri.isNotDefault) 'uri': uri,
if (downloadUri.isNotDefault) 'downloadUri': downloadUri,
if (state.isNotDefault) 'state': state.toJson(),
if (source.isNotDefault) 'source': source.toJson(),
if (error != null) 'error': error!.toJson(),
};