mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-20 11:15:02 +01:00
Remove Parceler from model notifications
Resolves: #1548 Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
parent
d9587e9d18
commit
45085b7e0b
@ -1,314 +0,0 @@
|
|||||||
/*
|
|
||||||
* Nextcloud Talk application
|
|
||||||
*
|
|
||||||
* @author Mario Danic
|
|
||||||
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.nextcloud.talk.models.json.notifications;
|
|
||||||
|
|
||||||
import com.bluelinelabs.logansquare.annotation.JsonField;
|
|
||||||
import com.bluelinelabs.logansquare.annotation.JsonObject;
|
|
||||||
import com.nextcloud.talk.models.json.converters.LoganSquareJodaTimeConverter;
|
|
||||||
|
|
||||||
import org.joda.time.DateTime;
|
|
||||||
import org.parceler.Parcel;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Parcel
|
|
||||||
@JsonObject
|
|
||||||
public class Notification {
|
|
||||||
@JsonField(name = "icon")
|
|
||||||
public String icon;
|
|
||||||
@JsonField(name = "notification_id")
|
|
||||||
int notificationId;
|
|
||||||
@JsonField(name = "app")
|
|
||||||
String app;
|
|
||||||
@JsonField(name = "user")
|
|
||||||
String user;
|
|
||||||
@JsonField(name = "datetime", typeConverter = LoganSquareJodaTimeConverter.class)
|
|
||||||
DateTime datetime;
|
|
||||||
@JsonField(name = "object_type")
|
|
||||||
String objectType;
|
|
||||||
@JsonField(name = "object_id")
|
|
||||||
String objectId;
|
|
||||||
@JsonField(name = "subject")
|
|
||||||
String subject;
|
|
||||||
@JsonField(name = "subjectRich")
|
|
||||||
String subjectRich;
|
|
||||||
@JsonField(name = "subjectRichParameters")
|
|
||||||
HashMap<String, HashMap<String, String>> subjectRichParameters;
|
|
||||||
@JsonField(name = "message")
|
|
||||||
String message;
|
|
||||||
@JsonField(name = "messageRich")
|
|
||||||
String messageRich;
|
|
||||||
@JsonField(name = "messageRichParameters")
|
|
||||||
HashMap<String, HashMap<String, String>> messageRichParameters;
|
|
||||||
@JsonField(name = "link")
|
|
||||||
String link;
|
|
||||||
@JsonField(name = "actions")
|
|
||||||
List<NotificationAction> actions;
|
|
||||||
|
|
||||||
public String getIcon() {
|
|
||||||
return this.icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getNotificationId() {
|
|
||||||
return this.notificationId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getApp() {
|
|
||||||
return this.app;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUser() {
|
|
||||||
return this.user;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DateTime getDatetime() {
|
|
||||||
return this.datetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getObjectType() {
|
|
||||||
return this.objectType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getObjectId() {
|
|
||||||
return this.objectId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSubject() {
|
|
||||||
return this.subject;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSubjectRich() {
|
|
||||||
return this.subjectRich;
|
|
||||||
}
|
|
||||||
|
|
||||||
public HashMap<String, HashMap<String, String>> getSubjectRichParameters() {
|
|
||||||
return this.subjectRichParameters;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMessage() {
|
|
||||||
return this.message;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMessageRich() {
|
|
||||||
return this.messageRich;
|
|
||||||
}
|
|
||||||
|
|
||||||
public HashMap<String, HashMap<String, String>> getMessageRichParameters() {
|
|
||||||
return this.messageRichParameters;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLink() {
|
|
||||||
return this.link;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<NotificationAction> getActions() {
|
|
||||||
return this.actions;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIcon(String icon) {
|
|
||||||
this.icon = icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNotificationId(int notificationId) {
|
|
||||||
this.notificationId = notificationId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApp(String app) {
|
|
||||||
this.app = app;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUser(String user) {
|
|
||||||
this.user = user;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDatetime(DateTime datetime) {
|
|
||||||
this.datetime = datetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setObjectType(String objectType) {
|
|
||||||
this.objectType = objectType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setObjectId(String objectId) {
|
|
||||||
this.objectId = objectId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSubject(String subject) {
|
|
||||||
this.subject = subject;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSubjectRich(String subjectRich) {
|
|
||||||
this.subjectRich = subjectRich;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSubjectRichParameters(HashMap<String, HashMap<String, String>> subjectRichParameters) {
|
|
||||||
this.subjectRichParameters = subjectRichParameters;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMessage(String message) {
|
|
||||||
this.message = message;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMessageRich(String messageRich) {
|
|
||||||
this.messageRich = messageRich;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMessageRichParameters(HashMap<String, HashMap<String, String>> messageRichParameters) {
|
|
||||||
this.messageRichParameters = messageRichParameters;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLink(String link) {
|
|
||||||
this.link = link;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setActions(List<NotificationAction> actions) {
|
|
||||||
this.actions = actions;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean equals(final Object o) {
|
|
||||||
if (o == this) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (!(o instanceof Notification)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Notification other = (Notification) o;
|
|
||||||
if (!other.canEqual((Object) this)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$icon = this.getIcon();
|
|
||||||
final Object other$icon = other.getIcon();
|
|
||||||
if (this$icon == null ? other$icon != null : !this$icon.equals(other$icon)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.getNotificationId() != other.getNotificationId()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$app = this.getApp();
|
|
||||||
final Object other$app = other.getApp();
|
|
||||||
if (this$app == null ? other$app != null : !this$app.equals(other$app)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$user = this.getUser();
|
|
||||||
final Object other$user = other.getUser();
|
|
||||||
if (this$user == null ? other$user != null : !this$user.equals(other$user)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$datetime = this.getDatetime();
|
|
||||||
final Object other$datetime = other.getDatetime();
|
|
||||||
if (this$datetime == null ? other$datetime != null : !this$datetime.equals(other$datetime)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$objectType = this.getObjectType();
|
|
||||||
final Object other$objectType = other.getObjectType();
|
|
||||||
if (this$objectType == null ? other$objectType != null : !this$objectType.equals(other$objectType)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$objectId = this.getObjectId();
|
|
||||||
final Object other$objectId = other.getObjectId();
|
|
||||||
if (this$objectId == null ? other$objectId != null : !this$objectId.equals(other$objectId)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$subject = this.getSubject();
|
|
||||||
final Object other$subject = other.getSubject();
|
|
||||||
if (this$subject == null ? other$subject != null : !this$subject.equals(other$subject)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$subjectRich = this.getSubjectRich();
|
|
||||||
final Object other$subjectRich = other.getSubjectRich();
|
|
||||||
if (this$subjectRich == null ? other$subjectRich != null : !this$subjectRich.equals(other$subjectRich)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$subjectRichParameters = this.getSubjectRichParameters();
|
|
||||||
final Object other$subjectRichParameters = other.getSubjectRichParameters();
|
|
||||||
if (this$subjectRichParameters == null ? other$subjectRichParameters != null : !this$subjectRichParameters.equals(other$subjectRichParameters)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$message = this.getMessage();
|
|
||||||
final Object other$message = other.getMessage();
|
|
||||||
if (this$message == null ? other$message != null : !this$message.equals(other$message)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$messageRich = this.getMessageRich();
|
|
||||||
final Object other$messageRich = other.getMessageRich();
|
|
||||||
if (this$messageRich == null ? other$messageRich != null : !this$messageRich.equals(other$messageRich)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$messageRichParameters = this.getMessageRichParameters();
|
|
||||||
final Object other$messageRichParameters = other.getMessageRichParameters();
|
|
||||||
if (this$messageRichParameters == null ? other$messageRichParameters != null : !this$messageRichParameters.equals(other$messageRichParameters)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$link = this.getLink();
|
|
||||||
final Object other$link = other.getLink();
|
|
||||||
if (this$link == null ? other$link != null : !this$link.equals(other$link)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$actions = this.getActions();
|
|
||||||
final Object other$actions = other.getActions();
|
|
||||||
|
|
||||||
return this$actions == null ? other$actions == null : this$actions.equals(other$actions);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean canEqual(final Object other) {
|
|
||||||
return other instanceof Notification;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int hashCode() {
|
|
||||||
final int PRIME = 59;
|
|
||||||
int result = 1;
|
|
||||||
final Object $icon = this.getIcon();
|
|
||||||
result = result * PRIME + ($icon == null ? 43 : $icon.hashCode());
|
|
||||||
result = result * PRIME + this.getNotificationId();
|
|
||||||
final Object $app = this.getApp();
|
|
||||||
result = result * PRIME + ($app == null ? 43 : $app.hashCode());
|
|
||||||
final Object $user = this.getUser();
|
|
||||||
result = result * PRIME + ($user == null ? 43 : $user.hashCode());
|
|
||||||
final Object $datetime = this.getDatetime();
|
|
||||||
result = result * PRIME + ($datetime == null ? 43 : $datetime.hashCode());
|
|
||||||
final Object $objectType = this.getObjectType();
|
|
||||||
result = result * PRIME + ($objectType == null ? 43 : $objectType.hashCode());
|
|
||||||
final Object $objectId = this.getObjectId();
|
|
||||||
result = result * PRIME + ($objectId == null ? 43 : $objectId.hashCode());
|
|
||||||
final Object $subject = this.getSubject();
|
|
||||||
result = result * PRIME + ($subject == null ? 43 : $subject.hashCode());
|
|
||||||
final Object $subjectRich = this.getSubjectRich();
|
|
||||||
result = result * PRIME + ($subjectRich == null ? 43 : $subjectRich.hashCode());
|
|
||||||
final Object $subjectRichParameters = this.getSubjectRichParameters();
|
|
||||||
result = result * PRIME + ($subjectRichParameters == null ? 43 : $subjectRichParameters.hashCode());
|
|
||||||
final Object $message = this.getMessage();
|
|
||||||
result = result * PRIME + ($message == null ? 43 : $message.hashCode());
|
|
||||||
final Object $messageRich = this.getMessageRich();
|
|
||||||
result = result * PRIME + ($messageRich == null ? 43 : $messageRich.hashCode());
|
|
||||||
final Object $messageRichParameters = this.getMessageRichParameters();
|
|
||||||
result = result * PRIME + ($messageRichParameters == null ? 43 : $messageRichParameters.hashCode());
|
|
||||||
final Object $link = this.getLink();
|
|
||||||
result = result * PRIME + ($link == null ? 43 : $link.hashCode());
|
|
||||||
final Object $actions = this.getActions();
|
|
||||||
result = result * PRIME + ($actions == null ? 43 : $actions.hashCode());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString() {
|
|
||||||
return "Notification(icon=" + this.getIcon() + ", notificationId=" + this.getNotificationId() + ", app=" + this.getApp() + ", user=" + this.getUser() + ", datetime=" + this.getDatetime() + ", objectType=" + this.getObjectType() + ", objectId=" + this.getObjectId() + ", subject=" + this.getSubject() + ", subjectRich=" + this.getSubjectRich() + ", subjectRichParameters=" + this.getSubjectRichParameters() + ", message=" + this.getMessage() + ", messageRich=" + this.getMessageRich() + ", messageRichParameters=" + this.getMessageRichParameters() + ", link=" + this.getLink() + ", actions=" + this.getActions() + ")";
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
* Nextcloud Talk application
|
||||||
|
*
|
||||||
|
* @author Mario Danic
|
||||||
|
* @author Tim Krüger
|
||||||
|
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
|
||||||
|
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.nextcloud.talk.models.json.notifications
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonField
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonObject
|
||||||
|
import com.nextcloud.talk.models.json.converters.LoganSquareJodaTimeConverter
|
||||||
|
import kotlinx.android.parcel.Parcelize
|
||||||
|
import org.joda.time.DateTime
|
||||||
|
|
||||||
|
@Parcelize
|
||||||
|
@JsonObject
|
||||||
|
data class Notification(
|
||||||
|
@JsonField(name = ["icon"])
|
||||||
|
var icon: String?,
|
||||||
|
@JsonField(name = ["notification_id"])
|
||||||
|
var notificationId: Int?,
|
||||||
|
@JsonField(name = ["app"])
|
||||||
|
var app: String?,
|
||||||
|
@JsonField(name = ["user"])
|
||||||
|
var user: String?,
|
||||||
|
@JsonField(name = ["datetime"], typeConverter = LoganSquareJodaTimeConverter::class)
|
||||||
|
var datetime: DateTime?,
|
||||||
|
@JsonField(name = ["object_type"])
|
||||||
|
var objectType: String?,
|
||||||
|
@JsonField(name = ["object_id"])
|
||||||
|
var objectId: String?,
|
||||||
|
@JsonField(name = ["subject"])
|
||||||
|
var subject: String?,
|
||||||
|
@JsonField(name = ["subjectRich"])
|
||||||
|
var subjectRich: String?,
|
||||||
|
@JsonField(name = ["subjectRichParameters"])
|
||||||
|
var subjectRichParameters: HashMap<String, HashMap<String, String>>?,
|
||||||
|
@JsonField(name = ["message"])
|
||||||
|
var message: String?,
|
||||||
|
@JsonField(name = ["messageRich"])
|
||||||
|
var messageRich: String?,
|
||||||
|
@JsonField(name = ["messageRichParameters"])
|
||||||
|
var messageRichParameters: HashMap<String, HashMap<String, String>>?,
|
||||||
|
@JsonField(name = ["link"])
|
||||||
|
var link: String?,
|
||||||
|
@JsonField(name = ["actions"])
|
||||||
|
var actions: List<NotificationAction>?
|
||||||
|
) : Parcelable {
|
||||||
|
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
|
||||||
|
constructor() : this(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)
|
||||||
|
}
|
@ -1,125 +0,0 @@
|
|||||||
/*
|
|
||||||
* Nextcloud Talk application
|
|
||||||
*
|
|
||||||
* @author Mario Danic
|
|
||||||
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.nextcloud.talk.models.json.notifications;
|
|
||||||
|
|
||||||
import com.bluelinelabs.logansquare.annotation.JsonField;
|
|
||||||
import com.bluelinelabs.logansquare.annotation.JsonObject;
|
|
||||||
|
|
||||||
import org.parceler.Parcel;
|
|
||||||
|
|
||||||
@Parcel
|
|
||||||
@JsonObject
|
|
||||||
public class NotificationAction {
|
|
||||||
@JsonField(name = "label")
|
|
||||||
String label;
|
|
||||||
|
|
||||||
@JsonField(name = "link")
|
|
||||||
String link;
|
|
||||||
|
|
||||||
@JsonField(name = "type")
|
|
||||||
String type;
|
|
||||||
|
|
||||||
@JsonField(name = "primary")
|
|
||||||
boolean primary;
|
|
||||||
|
|
||||||
public String getLabel() {
|
|
||||||
return this.label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLink() {
|
|
||||||
return this.link;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getType() {
|
|
||||||
return this.type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isPrimary() {
|
|
||||||
return this.primary;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLabel(String label) {
|
|
||||||
this.label = label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLink(String link) {
|
|
||||||
this.link = link;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(String type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrimary(boolean primary) {
|
|
||||||
this.primary = primary;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean equals(final Object o) {
|
|
||||||
if (o == this) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (!(o instanceof NotificationAction)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final NotificationAction other = (NotificationAction) o;
|
|
||||||
if (!other.canEqual((Object) this)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$label = this.getLabel();
|
|
||||||
final Object other$label = other.getLabel();
|
|
||||||
if (this$label == null ? other$label != null : !this$label.equals(other$label)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$link = this.getLink();
|
|
||||||
final Object other$link = other.getLink();
|
|
||||||
if (this$link == null ? other$link != null : !this$link.equals(other$link)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$type = this.getType();
|
|
||||||
final Object other$type = other.getType();
|
|
||||||
if (this$type == null ? other$type != null : !this$type.equals(other$type)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.isPrimary() == other.isPrimary();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean canEqual(final Object other) {
|
|
||||||
return other instanceof NotificationAction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int hashCode() {
|
|
||||||
final int PRIME = 59;
|
|
||||||
int result = 1;
|
|
||||||
final Object $label = this.getLabel();
|
|
||||||
result = result * PRIME + ($label == null ? 43 : $label.hashCode());
|
|
||||||
final Object $link = this.getLink();
|
|
||||||
result = result * PRIME + ($link == null ? 43 : $link.hashCode());
|
|
||||||
final Object $type = this.getType();
|
|
||||||
result = result * PRIME + ($type == null ? 43 : $type.hashCode());
|
|
||||||
result = result * PRIME + (this.isPrimary() ? 79 : 97);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString() {
|
|
||||||
return "NotificationAction(label=" + this.getLabel() + ", link=" + this.getLink() + ", type=" + this.getType() + ", primary=" + this.isPrimary() + ")";
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* Nextcloud Talk application
|
||||||
|
*
|
||||||
|
* @author Mario Danic
|
||||||
|
* @author Tim Krüger
|
||||||
|
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
|
||||||
|
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.nextcloud.talk.models.json.notifications
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonField
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonObject
|
||||||
|
import kotlinx.android.parcel.Parcelize
|
||||||
|
|
||||||
|
@Parcelize
|
||||||
|
@JsonObject
|
||||||
|
data class NotificationAction(
|
||||||
|
@JsonField(name = ["label"])
|
||||||
|
var label: String?,
|
||||||
|
@JsonField(name = ["link"])
|
||||||
|
var link: String?,
|
||||||
|
@JsonField(name = ["type"])
|
||||||
|
var type: String?,
|
||||||
|
@JsonField(name = ["primary"])
|
||||||
|
var primary: Boolean
|
||||||
|
) : Parcelable {
|
||||||
|
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
|
||||||
|
constructor() : this(null, null, null, false)
|
||||||
|
}
|
@ -1,75 +0,0 @@
|
|||||||
/*
|
|
||||||
* Nextcloud Talk application
|
|
||||||
*
|
|
||||||
* @author Mario Danic
|
|
||||||
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.nextcloud.talk.models.json.notifications;
|
|
||||||
|
|
||||||
import com.bluelinelabs.logansquare.annotation.JsonField;
|
|
||||||
import com.bluelinelabs.logansquare.annotation.JsonObject;
|
|
||||||
import com.nextcloud.talk.models.json.generic.GenericOCS;
|
|
||||||
|
|
||||||
import org.parceler.Parcel;
|
|
||||||
|
|
||||||
@Parcel
|
|
||||||
@JsonObject
|
|
||||||
public class NotificationOCS extends GenericOCS {
|
|
||||||
@JsonField(name = "data")
|
|
||||||
Notification notification;
|
|
||||||
|
|
||||||
public Notification getNotification() {
|
|
||||||
return this.notification;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNotification(Notification notification) {
|
|
||||||
this.notification = notification;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean equals(final Object o) {
|
|
||||||
if (o == this) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (!(o instanceof NotificationOCS)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final NotificationOCS other = (NotificationOCS) o;
|
|
||||||
if (!other.canEqual((Object) this)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$notification = this.getNotification();
|
|
||||||
final Object other$notification = other.getNotification();
|
|
||||||
|
|
||||||
return this$notification == null ? other$notification == null : this$notification.equals(other$notification);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean canEqual(final Object other) {
|
|
||||||
return other instanceof NotificationOCS;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int hashCode() {
|
|
||||||
final int PRIME = 59;
|
|
||||||
int result = 1;
|
|
||||||
final Object $notification = this.getNotification();
|
|
||||||
result = result * PRIME + ($notification == null ? 43 : $notification.hashCode());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString() {
|
|
||||||
return "NotificationOCS(notification=" + this.getNotification() + ")";
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Nextcloud Talk application
|
||||||
|
*
|
||||||
|
* @author Mario Danic
|
||||||
|
* @author Tim Krüger
|
||||||
|
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
|
||||||
|
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.nextcloud.talk.models.json.notifications
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonField
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonObject
|
||||||
|
import com.nextcloud.talk.models.json.generic.GenericOCS
|
||||||
|
import kotlinx.android.parcel.Parcelize
|
||||||
|
|
||||||
|
@Parcelize
|
||||||
|
@JsonObject
|
||||||
|
data class NotificationOCS(
|
||||||
|
@JsonField(name = ["data"])
|
||||||
|
var notification: Notification?
|
||||||
|
) : GenericOCS(), Parcelable {
|
||||||
|
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
|
||||||
|
constructor() : this(null)
|
||||||
|
}
|
@ -1,70 +0,0 @@
|
|||||||
/*
|
|
||||||
* Nextcloud Talk application
|
|
||||||
*
|
|
||||||
* @author Mario Danic
|
|
||||||
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.nextcloud.talk.models.json.notifications;
|
|
||||||
|
|
||||||
import com.bluelinelabs.logansquare.annotation.JsonField;
|
|
||||||
import com.bluelinelabs.logansquare.annotation.JsonObject;
|
|
||||||
|
|
||||||
@JsonObject
|
|
||||||
public class NotificationOverall {
|
|
||||||
@JsonField(name = "ocs")
|
|
||||||
NotificationOCS ocs;
|
|
||||||
|
|
||||||
public NotificationOCS getOcs() {
|
|
||||||
return this.ocs;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOcs(NotificationOCS ocs) {
|
|
||||||
this.ocs = ocs;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean equals(final Object o) {
|
|
||||||
if (o == this) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (!(o instanceof NotificationOverall)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final NotificationOverall other = (NotificationOverall) o;
|
|
||||||
if (!other.canEqual((Object) this)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$ocs = this.getOcs();
|
|
||||||
final Object other$ocs = other.getOcs();
|
|
||||||
|
|
||||||
return this$ocs == null ? other$ocs == null : this$ocs.equals(other$ocs);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean canEqual(final Object other) {
|
|
||||||
return other instanceof NotificationOverall;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int hashCode() {
|
|
||||||
final int PRIME = 59;
|
|
||||||
int result = 1;
|
|
||||||
final Object $ocs = this.getOcs();
|
|
||||||
result = result * PRIME + ($ocs == null ? 43 : $ocs.hashCode());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString() {
|
|
||||||
return "NotificationOverall(ocs=" + this.getOcs() + ")";
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Nextcloud Talk application
|
||||||
|
*
|
||||||
|
* @author Mario Danic
|
||||||
|
* @author Tim Krüger
|
||||||
|
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
|
||||||
|
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.nextcloud.talk.models.json.notifications
|
||||||
|
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonField
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonObject
|
||||||
|
|
||||||
|
@JsonObject
|
||||||
|
data class NotificationOverall(
|
||||||
|
@JsonField(name = ["ocs"])
|
||||||
|
var ocs: NotificationOCS?
|
||||||
|
) {
|
||||||
|
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
|
||||||
|
constructor() : this(null)
|
||||||
|
}
|
@ -1,109 +0,0 @@
|
|||||||
/*
|
|
||||||
* Nextcloud Talk application
|
|
||||||
*
|
|
||||||
* @author Mario Danic
|
|
||||||
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.nextcloud.talk.models.json.notifications;
|
|
||||||
|
|
||||||
import com.bluelinelabs.logansquare.annotation.JsonField;
|
|
||||||
import com.bluelinelabs.logansquare.annotation.JsonObject;
|
|
||||||
|
|
||||||
import org.parceler.Parcel;
|
|
||||||
|
|
||||||
@Parcel
|
|
||||||
@JsonObject
|
|
||||||
public class NotificationRichObject {
|
|
||||||
@JsonField(name = "id")
|
|
||||||
String label;
|
|
||||||
|
|
||||||
@JsonField(name = "type")
|
|
||||||
String type;
|
|
||||||
|
|
||||||
@JsonField(name = "name")
|
|
||||||
String name;
|
|
||||||
|
|
||||||
public String getLabel() {
|
|
||||||
return this.label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getType() {
|
|
||||||
return this.type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return this.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLabel(String label) {
|
|
||||||
this.label = label;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(String type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean equals(final Object o) {
|
|
||||||
if (o == this) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (!(o instanceof NotificationRichObject)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final NotificationRichObject other = (NotificationRichObject) o;
|
|
||||||
if (!other.canEqual((Object) this)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$label = this.getLabel();
|
|
||||||
final Object other$label = other.getLabel();
|
|
||||||
if (this$label == null ? other$label != null : !this$label.equals(other$label)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$type = this.getType();
|
|
||||||
final Object other$type = other.getType();
|
|
||||||
if (this$type == null ? other$type != null : !this$type.equals(other$type)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$name = this.getName();
|
|
||||||
final Object other$name = other.getName();
|
|
||||||
|
|
||||||
return this$name == null ? other$name == null : this$name.equals(other$name);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean canEqual(final Object other) {
|
|
||||||
return other instanceof NotificationRichObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int hashCode() {
|
|
||||||
final int PRIME = 59;
|
|
||||||
int result = 1;
|
|
||||||
final Object $label = this.getLabel();
|
|
||||||
result = result * PRIME + ($label == null ? 43 : $label.hashCode());
|
|
||||||
final Object $type = this.getType();
|
|
||||||
result = result * PRIME + ($type == null ? 43 : $type.hashCode());
|
|
||||||
final Object $name = this.getName();
|
|
||||||
return result * PRIME + ($name == null ? 43 : $name.hashCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString() {
|
|
||||||
return "NotificationRichObject(label=" + this.getLabel() + ", type=" + this.getType() + ", name=" + this.getName() + ")";
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
* Nextcloud Talk application
|
||||||
|
*
|
||||||
|
* @author Mario Danic
|
||||||
|
* @author Tim Krüger
|
||||||
|
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
|
||||||
|
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.nextcloud.talk.models.json.notifications
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonField
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonObject
|
||||||
|
import kotlinx.android.parcel.Parcelize
|
||||||
|
|
||||||
|
@Parcelize
|
||||||
|
@JsonObject
|
||||||
|
class NotificationRichObject(
|
||||||
|
@JsonField(name = ["id"])
|
||||||
|
var label: String?,
|
||||||
|
@JsonField(name = ["type"])
|
||||||
|
var type: String?,
|
||||||
|
@JsonField(name = ["name"])
|
||||||
|
var name: String?
|
||||||
|
) : Parcelable {
|
||||||
|
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
|
||||||
|
constructor() : this(null, null, null)
|
||||||
|
}
|
@ -1,77 +0,0 @@
|
|||||||
/*
|
|
||||||
* Nextcloud Talk application
|
|
||||||
*
|
|
||||||
* @author Mario Danic
|
|
||||||
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.nextcloud.talk.models.json.notifications;
|
|
||||||
|
|
||||||
import com.bluelinelabs.logansquare.annotation.JsonField;
|
|
||||||
import com.bluelinelabs.logansquare.annotation.JsonObject;
|
|
||||||
import com.nextcloud.talk.models.json.generic.GenericOCS;
|
|
||||||
|
|
||||||
import org.parceler.Parcel;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Parcel
|
|
||||||
@JsonObject
|
|
||||||
public class NotificationsOCS extends GenericOCS {
|
|
||||||
@JsonField(name = "data")
|
|
||||||
List<Notification> notificationsList;
|
|
||||||
|
|
||||||
public List<Notification> getNotificationsList() {
|
|
||||||
return this.notificationsList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNotificationsList(List<Notification> notificationsList) {
|
|
||||||
this.notificationsList = notificationsList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean equals(final Object o) {
|
|
||||||
if (o == this) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (!(o instanceof NotificationsOCS)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final NotificationsOCS other = (NotificationsOCS) o;
|
|
||||||
if (!other.canEqual((Object) this)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$notificationsList = this.getNotificationsList();
|
|
||||||
final Object other$notificationsList = other.getNotificationsList();
|
|
||||||
|
|
||||||
return this$notificationsList == null ? other$notificationsList == null : this$notificationsList.equals(other$notificationsList);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean canEqual(final Object other) {
|
|
||||||
return other instanceof NotificationsOCS;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int hashCode() {
|
|
||||||
final int PRIME = 59;
|
|
||||||
int result = 1;
|
|
||||||
final Object $notificationsList = this.getNotificationsList();
|
|
||||||
result = result * PRIME + ($notificationsList == null ? 43 : $notificationsList.hashCode());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString() {
|
|
||||||
return "NotificationsOCS(notificationsList=" + this.getNotificationsList() + ")";
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Nextcloud Talk application
|
||||||
|
*
|
||||||
|
* @author Mario Danic
|
||||||
|
* @author Tim Krüger
|
||||||
|
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
|
||||||
|
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.nextcloud.talk.models.json.notifications
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonField
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonObject
|
||||||
|
import com.nextcloud.talk.models.json.generic.GenericOCS
|
||||||
|
import kotlinx.android.parcel.Parcelize
|
||||||
|
|
||||||
|
@Parcelize
|
||||||
|
@JsonObject
|
||||||
|
class NotificationsOCS(
|
||||||
|
@JsonField(name = ["data"])
|
||||||
|
var notificationsList: List<Notification>?
|
||||||
|
) : GenericOCS(), Parcelable {
|
||||||
|
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
|
||||||
|
constructor() : this(null)
|
||||||
|
}
|
@ -1,70 +0,0 @@
|
|||||||
/*
|
|
||||||
* Nextcloud Talk application
|
|
||||||
*
|
|
||||||
* @author Mario Danic
|
|
||||||
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.nextcloud.talk.models.json.notifications;
|
|
||||||
|
|
||||||
import com.bluelinelabs.logansquare.annotation.JsonField;
|
|
||||||
import com.bluelinelabs.logansquare.annotation.JsonObject;
|
|
||||||
|
|
||||||
@JsonObject
|
|
||||||
public class NotificationsOverall {
|
|
||||||
@JsonField(name = "ocs")
|
|
||||||
NotificationsOCS ocs;
|
|
||||||
|
|
||||||
public NotificationsOCS getOcs() {
|
|
||||||
return this.ocs;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOcs(NotificationsOCS ocs) {
|
|
||||||
this.ocs = ocs;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean equals(final Object o) {
|
|
||||||
if (o == this) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (!(o instanceof NotificationsOverall)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final NotificationsOverall other = (NotificationsOverall) o;
|
|
||||||
if (!other.canEqual((Object) this)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final Object this$ocs = this.getOcs();
|
|
||||||
final Object other$ocs = other.getOcs();
|
|
||||||
|
|
||||||
return this$ocs == null ? other$ocs == null : this$ocs.equals(other$ocs);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean canEqual(final Object other) {
|
|
||||||
return other instanceof NotificationsOverall;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int hashCode() {
|
|
||||||
final int PRIME = 59;
|
|
||||||
int result = 1;
|
|
||||||
final Object $ocs = this.getOcs();
|
|
||||||
result = result * PRIME + ($ocs == null ? 43 : $ocs.hashCode());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString() {
|
|
||||||
return "NotificationsOverall(ocs=" + this.getOcs() + ")";
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Nextcloud Talk application
|
||||||
|
*
|
||||||
|
* @author Mario Danic
|
||||||
|
* @author Tim Krüger
|
||||||
|
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
|
||||||
|
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.nextcloud.talk.models.json.notifications
|
||||||
|
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonField
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonObject
|
||||||
|
|
||||||
|
@JsonObject
|
||||||
|
class NotificationsOverall(
|
||||||
|
@JsonField(name = ["ocs"])
|
||||||
|
var ocs: NotificationsOCS?
|
||||||
|
) {
|
||||||
|
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
|
||||||
|
constructor() : this(null)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user