DecryptedPushMessage.java 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*
  2. * Nextcloud application
  3. *
  4. * @author Mario Danic
  5. * Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
  6. *
  7. * This program is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation, either version 3 of the License, or
  10. * at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. package com.owncloud.android.datamodel;
  21. import com.google.gson.annotations.SerializedName;
  22. import org.parceler.Parcel;
  23. /*
  24. * Push data from server, https://github.com/nextcloud/notifications/blob/master/docs/push-v2.md#encrypted-subject-data
  25. */
  26. @Parcel
  27. public class DecryptedPushMessage {
  28. public String app;
  29. public String type;
  30. public String subject;
  31. public String id;
  32. public int nid;
  33. public boolean delete;
  34. @SerializedName("delete-all")
  35. public boolean deleteAll;
  36. public DecryptedPushMessage(String app, String type, String subject, String id, int nid, boolean delete, boolean deleteAll) {
  37. this.app = app;
  38. this.type = type;
  39. this.subject = subject;
  40. this.id = id;
  41. this.nid = nid;
  42. this.delete = delete;
  43. this.deleteAll = deleteAll;
  44. }
  45. public DecryptedPushMessage() {
  46. // empty constructor
  47. }
  48. public String getApp() {
  49. return this.app;
  50. }
  51. public String getType() {
  52. return this.type;
  53. }
  54. public String getSubject() {
  55. return this.subject;
  56. }
  57. public String getId() {
  58. return this.id;
  59. }
  60. public int getNid() {
  61. return this.nid;
  62. }
  63. public boolean isDelete() {
  64. return this.delete;
  65. }
  66. public boolean isDeleteAll() {
  67. return this.deleteAll;
  68. }
  69. public void setApp(String app) {
  70. this.app = app;
  71. }
  72. public void setType(String type) {
  73. this.type = type;
  74. }
  75. public void setSubject(String subject) {
  76. this.subject = subject;
  77. }
  78. public void setId(String id) {
  79. this.id = id;
  80. }
  81. public void setNid(int nid) {
  82. this.nid = nid;
  83. }
  84. public void setDelete(boolean delete) {
  85. this.delete = delete;
  86. }
  87. public void setDeleteAll(boolean deleteAll) {
  88. this.deleteAll = deleteAll;
  89. }
  90. }