122 lines
2.9 KiB
Java
122 lines
2.9 KiB
Java
/* Copyright 2017 Thomas Schneider
|
|
*
|
|
* This file is a part of Mastalab
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* Mastalab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
* Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along with Mastalab; if not,
|
|
* see <http://www.gnu.org/licenses>. */
|
|
package fr.gouv.etalab.mastodon.client.Entities;
|
|
|
|
import android.os.Parcel;
|
|
import android.os.Parcelable;
|
|
|
|
/**
|
|
* Created by Thomas on 23/04/2017.
|
|
* Manages Media
|
|
*/
|
|
|
|
public class Attachment implements Parcelable {
|
|
|
|
private String id;
|
|
private String type;
|
|
private String url;
|
|
private String remote_url;
|
|
private String preview_url;
|
|
private String text_url;
|
|
|
|
public Attachment(Parcel in) {
|
|
id = in.readString();
|
|
type = in.readString();
|
|
url = in.readString();
|
|
remote_url = in.readString();
|
|
preview_url = in.readString();
|
|
text_url = in.readString();
|
|
}
|
|
|
|
public static final Creator<Attachment> CREATOR = new Creator<Attachment>() {
|
|
@Override
|
|
public Attachment createFromParcel(Parcel in) {
|
|
return new Attachment(in);
|
|
}
|
|
|
|
@Override
|
|
public Attachment[] newArray(int size) {
|
|
return new Attachment[size];
|
|
}
|
|
};
|
|
|
|
public Attachment() {
|
|
|
|
}
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getType() {
|
|
return type;
|
|
}
|
|
|
|
public void setType(String type) {
|
|
this.type = type;
|
|
}
|
|
|
|
public String getUrl() {
|
|
return url;
|
|
}
|
|
|
|
public void setUrl(String url) {
|
|
this.url = url;
|
|
}
|
|
|
|
public String getRemote_url() {
|
|
return remote_url;
|
|
}
|
|
|
|
public void setRemote_url(String remote_url) {
|
|
this.remote_url = remote_url;
|
|
}
|
|
|
|
public String getPreview_url() {
|
|
return preview_url;
|
|
}
|
|
|
|
public void setPreview_url(String preview_url) {
|
|
this.preview_url = preview_url;
|
|
}
|
|
|
|
public String getText_url() {
|
|
return text_url;
|
|
}
|
|
|
|
public void setText_url(String text_url) {
|
|
this.text_url = text_url;
|
|
}
|
|
|
|
@Override
|
|
public int describeContents() {
|
|
return 0;
|
|
}
|
|
|
|
@Override
|
|
public void writeToParcel(Parcel dest, int flags) {
|
|
dest.writeString(id);
|
|
dest.writeString(type);
|
|
dest.writeString(url);
|
|
dest.writeString(remote_url);
|
|
dest.writeString(preview_url);
|
|
dest.writeString(text_url);
|
|
}
|
|
}
|