package core.repositories.releases;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.gson.annotations.SerializedName;
import core.User;
import java.util.Date;
public class Asset implements Parcelable {
@SerializedName("url")
private String url;
@SerializedName("browser_download_url")
private String browserDownloadUrl;
@SerializedName("id")
private Integer id;
@SerializedName("name")
private String name;
@SerializedName("label")
private String label;
@SerializedName("state")
private String state;
@SerializedName("content_type")
private String contentType;
@SerializedName("size")
private Integer size;
@SerializedName("download_count")
private Integer downloadCount;
@SerializedName("created_at")
private Date createdAt;
@SerializedName("updated_at")
private Date updatedAt;
@SerializedName("uploader")
private User user;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getBrowserDownloadUrl() {
return browserDownloadUrl;
}
public void setBrowserDownloadUrl(String browserDownloadUrl) {
this.browserDownloadUrl = browserDownloadUrl;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getContentType() {
return contentType;
}
public void setContentType(String contentType) {
this.contentType = contentType;
}
public Integer getSize() {
return size;
}
public void setSize(Integer size) {
this.size = size;
}
public Integer getDownloadCount() {
return downloadCount;
}
public void setDownloadCount(Integer downloadCount) {
this.downloadCount = downloadCount;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.url);
dest.writeString(this.browserDownloadUrl);
dest.writeValue(this.id);
dest.writeString(this.name);
dest.writeString(this.label);
dest.writeString(this.state);
dest.writeString(this.contentType);
dest.writeValue(this.size);
dest.writeValue(this.downloadCount);
dest.writeLong(this.createdAt != null ? this.createdAt.getTime() : -1);
dest.writeLong(this.updatedAt != null ? this.updatedAt.getTime() : -1);
dest.writeParcelable(this.user, flags);
}
public Asset() {
}
protected Asset(Parcel in) {
this.url = in.readString();
this.browserDownloadUrl = in.readString();
this.id = (Integer) in.readValue(Integer.class.getClassLoader());
this.name = in.readString();
this.label = in.readString();
this.state = in.readString();
this.contentType = in.readString();
this.size = (Integer) in.readValue(Integer.class.getClassLoader());
this.downloadCount = (Integer) in.readValue(Integer.class.getClassLoader());
long tmpCreatedAt = in.readLong();
this.createdAt = tmpCreatedAt == -1 ? null : new Date(tmpCreatedAt);
long tmpUpdatedAt = in.readLong();
this.updatedAt = tmpUpdatedAt == -1 ? null : new Date(tmpUpdatedAt);
this.user = in.readParcelable(User.class.getClassLoader());
}
public static final Parcelable.Creator<Asset> CREATOR = new Parcelable.Creator<Asset>() {
@Override
public Asset createFromParcel(Parcel source) {
return new Asset(source);
}
@Override
public Asset[] newArray(int size) {
return new Asset[size];
}
};
}