package xyz.stream.download.db;

import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
import xyz.stream.download.config.InnerConstant;
import xyz.stream.download.info.FileInfo;

/* JADX INFO: loaded from: classes3.dex */
@Entity(tableName = InnerConstant.Db.NAME_TABALE)
public class DownloadInfoEntity {

    @ColumnInfo(name = InnerConstant.Db.downloadLocation)
    private long downloadLocation;

    @ColumnInfo(name = InnerConstant.Db.downloadStatus)
    private int downloadStatus;

    @ColumnInfo(name = InnerConstant.Db.downloadUrl)
    private String downloadUrl;

    @ColumnInfo(name = InnerConstant.Db.filePath)
    private String filePath;

    /* JADX INFO: renamed from: id, reason: collision with root package name */
    @NonNull
    @PrimaryKey
    @ColumnInfo(name = InnerConstant.Db.f36069id)
    private String f36074id = "";

    @ColumnInfo(name = InnerConstant.Db.size)
    private long size;

    public static DownloadInfoEntity fromFileInfo(FileInfo fileInfo) {
        DownloadInfoEntity downloadInfoEntity = new DownloadInfoEntity();
        downloadInfoEntity.setId(fileInfo.getId());
        downloadInfoEntity.setDownloadUrl(fileInfo.getDownloadUrl());
        downloadInfoEntity.setFilePath(fileInfo.getFilePath());
        downloadInfoEntity.setSize(fileInfo.getSize());
        downloadInfoEntity.setDownloadLocation(fileInfo.getDownloadLocation());
        downloadInfoEntity.setDownloadStatus(fileInfo.getDownloadStatus());
        return downloadInfoEntity;
    }

    public long getDownloadLocation() {
        return this.downloadLocation;
    }

    public int getDownloadStatus() {
        return this.downloadStatus;
    }

    public String getDownloadUrl() {
        return this.downloadUrl;
    }

    public String getFilePath() {
        return this.filePath;
    }

    @NonNull
    public String getId() {
        return this.f36074id;
    }

    public long getSize() {
        return this.size;
    }

    public void setDownloadLocation(long j10) {
        this.downloadLocation = j10;
    }

    public void setDownloadStatus(int i10) {
        this.downloadStatus = i10;
    }

    public void setDownloadUrl(String str) {
        this.downloadUrl = str;
    }

    public void setFilePath(String str) {
        this.filePath = str;
    }

    public void setId(@NonNull String str) {
        this.f36074id = str;
    }

    public void setSize(long j10) {
        this.size = j10;
    }

    public FileInfo toFileInfo() {
        FileInfo fileInfo = new FileInfo();
        fileInfo.setId(this.f36074id);
        fileInfo.setDownloadUrl(this.downloadUrl);
        fileInfo.setFilePath(this.filePath);
        fileInfo.setSize(this.size);
        fileInfo.setDownloadLocation(this.downloadLocation);
        fileInfo.setDownloadStatus(this.downloadStatus);
        return fileInfo;
    }
}
