111 lines
2.7 KiB
Java
111 lines
2.7 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 card in toots, only used during a call to the context
|
|
* See: https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md#card
|
|
* All values are not implemented
|
|
*/
|
|
|
|
public class Card implements Parcelable {
|
|
|
|
private String url;
|
|
private String title;
|
|
private String description;
|
|
private String image;
|
|
private String type;
|
|
|
|
public Card(){}
|
|
|
|
public Card(Parcel in) {
|
|
url = in.readString();
|
|
title = in.readString();
|
|
description = in.readString();
|
|
image = in.readString();
|
|
type = in.readString();
|
|
}
|
|
|
|
public static final Creator<Card> CREATOR = new Creator<Card>() {
|
|
@Override
|
|
public Card createFromParcel(Parcel in) {
|
|
return new Card(in);
|
|
}
|
|
|
|
@Override
|
|
public Card[] newArray(int size) {
|
|
return new Card[size];
|
|
}
|
|
};
|
|
|
|
public String getUrl() {
|
|
return url;
|
|
}
|
|
|
|
public void setUrl(String url) {
|
|
this.url = url;
|
|
}
|
|
|
|
public String getTitle() {
|
|
return title;
|
|
}
|
|
|
|
public void setTitle(String title) {
|
|
this.title = title;
|
|
}
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
public String getImage() {
|
|
return image;
|
|
}
|
|
|
|
public void setImage(String image) {
|
|
this.image = image;
|
|
}
|
|
|
|
public String getType() {
|
|
return type;
|
|
}
|
|
|
|
public void setType(String type) {
|
|
this.type = type;
|
|
}
|
|
|
|
@Override
|
|
public int describeContents() {
|
|
return 0;
|
|
}
|
|
|
|
@Override
|
|
public void writeToParcel(Parcel parcel, int i) {
|
|
parcel.writeString(url);
|
|
parcel.writeString(title);
|
|
parcel.writeString(description);
|
|
parcel.writeString(image);
|
|
parcel.writeString(type);
|
|
}
|
|
}
|