2019-05-18 11:10:30 +02:00
|
|
|
package app.fedilab.android.client;
|
2017-06-11 14:28:29 +02:00
|
|
|
/* Copyright 2017 Thomas Schneider
|
|
|
|
*
|
2019-05-18 11:10:30 +02:00
|
|
|
* This file is a part of Fedilab
|
2017-06-11 14:28:29 +02:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
2019-05-18 11:10:30 +02:00
|
|
|
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
2017-06-11 14:28:29 +02:00
|
|
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
|
|
* Public License for more details.
|
|
|
|
*
|
2019-05-18 11:10:30 +02:00
|
|
|
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
2017-06-11 14:28:29 +02:00
|
|
|
* see <http://www.gnu.org/licenses>. */
|
2019-01-19 19:41:55 +01:00
|
|
|
|
2019-09-28 18:08:07 +02:00
|
|
|
|
2017-06-03 18:18:27 +02:00
|
|
|
import java.util.List;
|
2019-01-19 19:41:55 +01:00
|
|
|
|
2019-05-18 11:10:30 +02:00
|
|
|
import app.fedilab.android.client.Entities.Account;
|
2019-06-18 16:22:53 +02:00
|
|
|
import app.fedilab.android.client.Entities.AccountAdmin;
|
2020-03-08 19:01:27 +01:00
|
|
|
import app.fedilab.android.client.Entities.Announcement;
|
2019-09-28 18:08:07 +02:00
|
|
|
import app.fedilab.android.client.Entities.Context;
|
2019-05-18 11:10:30 +02:00
|
|
|
import app.fedilab.android.client.Entities.Conversation;
|
|
|
|
import app.fedilab.android.client.Entities.Emojis;
|
|
|
|
import app.fedilab.android.client.Entities.Error;
|
|
|
|
import app.fedilab.android.client.Entities.Filters;
|
|
|
|
import app.fedilab.android.client.Entities.HowToVideo;
|
2019-12-17 19:10:49 +01:00
|
|
|
import app.fedilab.android.client.Entities.IdentityProof;
|
2019-05-18 11:10:30 +02:00
|
|
|
import app.fedilab.android.client.Entities.Instance;
|
2019-06-14 14:36:13 +02:00
|
|
|
import app.fedilab.android.client.Entities.InstanceReg;
|
2019-05-18 11:10:30 +02:00
|
|
|
import app.fedilab.android.client.Entities.Notification;
|
|
|
|
import app.fedilab.android.client.Entities.Peertube;
|
|
|
|
import app.fedilab.android.client.Entities.PeertubeNotification;
|
2019-11-01 17:29:44 +01:00
|
|
|
import app.fedilab.android.client.Entities.PixelFedStory;
|
2019-11-02 10:24:11 +01:00
|
|
|
import app.fedilab.android.client.Entities.PixelFedStoryItem;
|
2019-05-26 15:56:02 +02:00
|
|
|
import app.fedilab.android.client.Entities.Playlist;
|
2021-02-21 17:18:37 +01:00
|
|
|
import app.fedilab.android.client.Entities.PushSubscription;
|
2019-05-18 11:10:30 +02:00
|
|
|
import app.fedilab.android.client.Entities.Relationship;
|
2019-06-18 16:22:53 +02:00
|
|
|
import app.fedilab.android.client.Entities.Report;
|
2019-05-18 11:10:30 +02:00
|
|
|
import app.fedilab.android.client.Entities.Results;
|
|
|
|
import app.fedilab.android.client.Entities.Status;
|
|
|
|
import app.fedilab.android.client.Entities.StoredStatus;
|
2019-11-30 15:47:21 +01:00
|
|
|
import app.fedilab.android.client.Entities.Trends;
|
2017-06-03 18:18:27 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by Thomas on 03/06/2017.
|
|
|
|
* Hydrate response from the API
|
|
|
|
*/
|
|
|
|
|
2020-03-08 11:28:51 +01:00
|
|
|
@SuppressWarnings("WeakerAccess")
|
2017-06-03 18:18:27 +02:00
|
|
|
public class APIResponse {
|
|
|
|
|
|
|
|
private List<Account> accounts = null;
|
|
|
|
private List<Status> statuses = null;
|
2018-10-29 15:49:13 +01:00
|
|
|
private List<Conversation> conversations = null;
|
2017-06-03 18:18:27 +02:00
|
|
|
private List<Notification> notifications = null;
|
2017-09-17 11:50:00 +02:00
|
|
|
private List<Relationship> relationships = null;
|
2020-03-08 19:01:27 +01:00
|
|
|
private List<Announcement> announcements = null;
|
2021-02-21 17:18:37 +01:00
|
|
|
private PushSubscription pushSubscription;
|
2019-09-27 18:52:42 +02:00
|
|
|
private String targetedId = null;
|
2019-03-31 12:40:51 +02:00
|
|
|
private Results results = null;
|
2018-09-29 09:58:46 +02:00
|
|
|
private List<HowToVideo> howToVideos = null;
|
2018-10-07 10:45:34 +02:00
|
|
|
private List<Peertube> peertubes = null;
|
2019-01-24 16:24:25 +01:00
|
|
|
private List<PeertubeNotification> peertubeNotifications = null;
|
2018-09-05 17:52:13 +02:00
|
|
|
private List<Filters> filters = null;
|
2019-05-26 15:56:02 +02:00
|
|
|
private List<Playlist> playlists = null;
|
2018-09-26 18:30:08 +02:00
|
|
|
private List<String> domains = null;
|
2019-05-18 11:10:30 +02:00
|
|
|
private List<app.fedilab.android.client.Entities.List> lists = null;
|
2017-11-24 07:13:30 +01:00
|
|
|
private List<Emojis> emojis = null;
|
2019-05-18 11:10:30 +02:00
|
|
|
private Error error = null;
|
2017-06-03 18:18:27 +02:00
|
|
|
private String since_id, max_id;
|
2017-06-05 11:57:02 +02:00
|
|
|
private Instance instance;
|
2019-01-19 19:41:55 +01:00
|
|
|
private List<StoredStatus> storedStatuses;
|
2019-05-25 19:12:04 +02:00
|
|
|
private boolean fetchmore = false;
|
2019-05-27 19:22:54 +02:00
|
|
|
private List<String> playlistForVideos;
|
2019-06-14 14:36:13 +02:00
|
|
|
private List<InstanceReg> instanceRegs = null;
|
2019-06-18 16:22:53 +02:00
|
|
|
private List<AccountAdmin> accountAdmins = null;
|
|
|
|
private List<Report> reports = null;
|
2019-09-28 18:08:07 +02:00
|
|
|
private Context context = null;
|
2019-11-02 10:24:11 +01:00
|
|
|
private List<PixelFedStory> pixelFedStories = null;
|
|
|
|
private List<PixelFedStoryItem> pixelFedStoryItems = null;
|
2019-11-30 15:47:21 +01:00
|
|
|
private List<Trends> trends = null;
|
2019-12-17 19:10:49 +01:00
|
|
|
private List<IdentityProof> identityProofs = null;
|
2019-05-25 19:12:04 +02:00
|
|
|
|
2017-06-03 18:18:27 +02:00
|
|
|
public List<Account> getAccounts() {
|
|
|
|
return accounts;
|
|
|
|
}
|
|
|
|
|
2021-02-21 17:18:37 +01:00
|
|
|
public PushSubscription getPushSubscription() {
|
|
|
|
return pushSubscription;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setPushSubscription(PushSubscription pushSubscription) {
|
|
|
|
this.pushSubscription = pushSubscription;
|
|
|
|
}
|
|
|
|
|
2017-06-03 18:18:27 +02:00
|
|
|
public void setAccounts(List<Account> accounts) {
|
|
|
|
this.accounts = accounts;
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<Status> getStatuses() {
|
|
|
|
return statuses;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setStatuses(List<Status> statuses) {
|
|
|
|
this.statuses = statuses;
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<Notification> getNotifications() {
|
|
|
|
return notifications;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setNotifications(List<Notification> notifications) {
|
|
|
|
this.notifications = notifications;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Error getError() {
|
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setError(Error error) {
|
|
|
|
this.error = error;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getMax_id() {
|
|
|
|
return max_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setMax_id(String max_id) {
|
|
|
|
this.max_id = max_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getSince_id() {
|
|
|
|
return since_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setSince_id(String since_id) {
|
|
|
|
this.since_id = since_id;
|
|
|
|
}
|
2017-06-05 11:57:02 +02:00
|
|
|
|
|
|
|
public Instance getInstance() {
|
|
|
|
return instance;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setInstance(Instance instance) {
|
|
|
|
this.instance = instance;
|
|
|
|
}
|
2017-09-17 11:50:00 +02:00
|
|
|
|
|
|
|
public List<Relationship> getRelationships() {
|
|
|
|
return relationships;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setRelationships(List<Relationship> relationships) {
|
|
|
|
this.relationships = relationships;
|
|
|
|
}
|
2017-11-24 07:13:30 +01:00
|
|
|
|
|
|
|
public List<Emojis> getEmojis() {
|
|
|
|
return emojis;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setEmojis(List<Emojis> emojis) {
|
|
|
|
this.emojis = emojis;
|
|
|
|
}
|
2017-12-13 15:55:50 +01:00
|
|
|
|
2019-05-18 11:10:30 +02:00
|
|
|
public List<app.fedilab.android.client.Entities.List> getLists() {
|
2017-12-13 15:55:50 +01:00
|
|
|
return lists;
|
|
|
|
}
|
|
|
|
|
2019-05-18 11:10:30 +02:00
|
|
|
public void setLists(List<app.fedilab.android.client.Entities.List> lists) {
|
2017-12-13 15:55:50 +01:00
|
|
|
this.lists = lists;
|
|
|
|
}
|
2018-09-05 17:52:13 +02:00
|
|
|
|
|
|
|
public List<Filters> getFilters() {
|
|
|
|
return filters;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setFilters(List<Filters> filters) {
|
|
|
|
this.filters = filters;
|
|
|
|
}
|
2018-09-26 18:30:08 +02:00
|
|
|
|
|
|
|
public List<String> getDomains() {
|
|
|
|
return domains;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setDomains(List<String> domains) {
|
|
|
|
this.domains = domains;
|
|
|
|
}
|
2018-09-29 09:58:46 +02:00
|
|
|
|
|
|
|
public List<HowToVideo> getHowToVideos() {
|
|
|
|
return howToVideos;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setHowToVideos(List<HowToVideo> howToVideos) {
|
|
|
|
this.howToVideos = howToVideos;
|
|
|
|
}
|
2018-10-07 10:45:34 +02:00
|
|
|
|
|
|
|
public List<Peertube> getPeertubes() {
|
|
|
|
return peertubes;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setPeertubes(List<Peertube> peertubes) {
|
|
|
|
this.peertubes = peertubes;
|
|
|
|
}
|
2018-10-29 15:49:13 +01:00
|
|
|
|
|
|
|
public List<Conversation> getConversations() {
|
|
|
|
return conversations;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setConversations(List<Conversation> conversations) {
|
|
|
|
this.conversations = conversations;
|
|
|
|
}
|
2019-01-19 19:41:55 +01:00
|
|
|
|
|
|
|
public List<StoredStatus> getStoredStatuses() {
|
|
|
|
return storedStatuses;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setStoredStatuses(List<StoredStatus> storedStatuses) {
|
|
|
|
this.storedStatuses = storedStatuses;
|
|
|
|
}
|
2019-01-24 16:24:25 +01:00
|
|
|
|
|
|
|
public List<PeertubeNotification> getPeertubeNotifications() {
|
|
|
|
return peertubeNotifications;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setPeertubeNotifications(List<PeertubeNotification> peertubeNotifications) {
|
|
|
|
this.peertubeNotifications = peertubeNotifications;
|
|
|
|
}
|
2019-03-31 12:40:51 +02:00
|
|
|
|
|
|
|
public Results getResults() {
|
|
|
|
return results;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setResults(Results results) {
|
|
|
|
this.results = results;
|
|
|
|
}
|
2019-05-25 19:12:04 +02:00
|
|
|
|
|
|
|
public boolean isFetchmore() {
|
|
|
|
return fetchmore;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setFetchmore(boolean fetchmore) {
|
|
|
|
this.fetchmore = fetchmore;
|
|
|
|
}
|
2019-05-26 15:56:02 +02:00
|
|
|
|
|
|
|
public List<Playlist> getPlaylists() {
|
|
|
|
return playlists;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setPlaylists(List<Playlist> playlists) {
|
|
|
|
this.playlists = playlists;
|
|
|
|
}
|
2019-05-27 19:22:54 +02:00
|
|
|
|
|
|
|
public List<String> getPlaylistForVideos() {
|
|
|
|
return playlistForVideos;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setPlaylistForVideos(List<String> playlistForVideos) {
|
|
|
|
this.playlistForVideos = playlistForVideos;
|
|
|
|
}
|
2019-06-14 14:36:13 +02:00
|
|
|
|
|
|
|
public List<InstanceReg> getInstanceRegs() {
|
|
|
|
return instanceRegs;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setInstanceRegs(List<InstanceReg> instanceRegs) {
|
|
|
|
this.instanceRegs = instanceRegs;
|
|
|
|
}
|
2019-06-18 16:22:53 +02:00
|
|
|
|
|
|
|
public List<AccountAdmin> getAccountAdmins() {
|
|
|
|
return accountAdmins;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setAccountAdmins(List<AccountAdmin> accountAdmins) {
|
|
|
|
this.accountAdmins = accountAdmins;
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<Report> getReports() {
|
|
|
|
return reports;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setReports(List<Report> reports) {
|
|
|
|
this.reports = reports;
|
|
|
|
}
|
2019-09-27 18:52:42 +02:00
|
|
|
|
|
|
|
public String getTargetedId() {
|
|
|
|
return targetedId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setTargetedId(String targetedId) {
|
|
|
|
this.targetedId = targetedId;
|
|
|
|
}
|
2019-09-28 18:08:07 +02:00
|
|
|
|
|
|
|
public Context getContext() {
|
|
|
|
return context;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setContext(Context context) {
|
|
|
|
this.context = context;
|
|
|
|
}
|
2019-11-01 17:29:44 +01:00
|
|
|
|
2019-11-02 10:24:11 +01:00
|
|
|
|
|
|
|
public List<PixelFedStory> getPixelFedStories() {
|
|
|
|
return pixelFedStories;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setPixelFedStories(List<PixelFedStory> pixelFedStories) {
|
|
|
|
this.pixelFedStories = pixelFedStories;
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<PixelFedStoryItem> getPixelFedStoryItems() {
|
|
|
|
return pixelFedStoryItems;
|
2019-11-01 17:29:44 +01:00
|
|
|
}
|
|
|
|
|
2019-11-02 10:24:11 +01:00
|
|
|
public void setPixelFedStoryItems(List<PixelFedStoryItem> pixelFedStoryItems) {
|
|
|
|
this.pixelFedStoryItems = pixelFedStoryItems;
|
2019-11-01 17:29:44 +01:00
|
|
|
}
|
2019-11-30 15:47:21 +01:00
|
|
|
|
|
|
|
public List<Trends> getTrends() {
|
|
|
|
return trends;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setTrends(List<Trends> trends) {
|
|
|
|
this.trends = trends;
|
|
|
|
}
|
2019-12-17 19:10:49 +01:00
|
|
|
|
|
|
|
public List<IdentityProof> getIdentityProofs() {
|
|
|
|
return identityProofs;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setIdentityProofs(List<IdentityProof> identityProofs) {
|
|
|
|
this.identityProofs = identityProofs;
|
|
|
|
}
|
2020-03-08 19:01:27 +01:00
|
|
|
|
|
|
|
public List<Announcement> getAnnouncements() {
|
|
|
|
return announcements;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setAnnouncements(List<Announcement> announcements) {
|
|
|
|
this.announcements = announcements;
|
|
|
|
}
|
2017-06-03 18:18:27 +02:00
|
|
|
}
|