001// Generated by delombok at Tue Dec 10 13:42:03 UTC 2024 002/* 003 * Copyright (c) 2010-2024 Mark Allen, Norbert Bartels. 004 * 005 * Permission is hereby granted, free of charge, to any person obtaining a copy 006 * of this software and associated documentation files (the "Software"), to deal 007 * in the Software without restriction, including without limitation the rights 008 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 009 * copies of the Software, and to permit persons to whom the Software is 010 * furnished to do so, subject to the following conditions: 011 * 012 * The above copyright notice and this permission notice shall be included in 013 * all copies or substantial portions of the Software. 014 * 015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 016 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 017 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 018 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 019 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 020 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 021 * THE SOFTWARE. 022 */ 023package com.restfb.types; 024 025import java.util.Date; 026import com.restfb.Facebook; 027import com.restfb.types.features.HasCreatedTime; 028import com.restfb.types.features.HasFrom; 029 030/** 031 * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/notification">Notification Graph API 032 * type</a>. 033 */ 034public class Notification extends FacebookType implements HasCreatedTime, HasFrom { 035 /** 036 * The entity (user, page, app, etc.) that 'sent', or is the source of the notification. 037 */ 038 @Facebook 039 private NamedFacebookType from; 040 /** 041 * The entity that received the notification. 042 */ 043 @Facebook 044 private NamedFacebookType to; 045 /** 046 * The URL that clicking on the notification would take someone. 047 */ 048 @Facebook 049 private String link; 050 /** 051 * The message text in the notification. 052 */ 053 @Facebook 054 private String title; 055 /** 056 * The app responsible for generating the notification. Some of the core Facebook features have their own app that 057 * shows up here, such as likes when someone likes another person's content. 058 */ 059 @Facebook 060 private Application application; 061 /** 062 * Indicates that the notification is unread. 063 * <p> 064 * Note that 'read' notifications will not be accessible. 065 */ 066 @Facebook 067 private Integer unread; 068 /** 069 * The object (this can be a post, a photo, a comment, etc.) that was the subject of the notification. 070 */ 071 @Facebook 072 private NamedFacebookType object; 073 /** 074 * When the notification was last updated. When the notification was created. 075 */ 076 @Facebook("updated_time") 077 private Date updatedTime; 078 /** 079 * When the notification was created. 080 */ 081 @Facebook("created_time") 082 private Date createdTime; 083 084 /** 085 * The entity (user, page, app, etc.) that 'sent', or is the source of the notification. 086 * 087 * @return The entity that 'sent', or is the source of the notification. 088 */ 089 @Override 090 @java.lang.SuppressWarnings("all") 091 public NamedFacebookType getFrom() { 092 return this.from; 093 } 094 095 /** 096 * The entity (user, page, app, etc.) that 'sent', or is the source of the notification. 097 */ 098 @java.lang.SuppressWarnings("all") 099 public void setFrom(final NamedFacebookType from) { 100 this.from = from; 101 } 102 103 /** 104 * The entity that received the notification. 105 * 106 * @return The entity that received the notification. 107 */ 108 @java.lang.SuppressWarnings("all") 109 public NamedFacebookType getTo() { 110 return this.to; 111 } 112 113 /** 114 * The entity that received the notification. 115 */ 116 @java.lang.SuppressWarnings("all") 117 public void setTo(final NamedFacebookType to) { 118 this.to = to; 119 } 120 121 /** 122 * The URL that clicking on the notification would take someone. 123 * 124 * @return The URL that clicking on the notification would take someone. 125 */ 126 @java.lang.SuppressWarnings("all") 127 public String getLink() { 128 return this.link; 129 } 130 131 /** 132 * The URL that clicking on the notification would take someone. 133 */ 134 @java.lang.SuppressWarnings("all") 135 public void setLink(final String link) { 136 this.link = link; 137 } 138 139 /** 140 * The message text in the notification. 141 * 142 * @return The message text in the notification. 143 */ 144 @java.lang.SuppressWarnings("all") 145 public String getTitle() { 146 return this.title; 147 } 148 149 /** 150 * The message text in the notification. 151 */ 152 @java.lang.SuppressWarnings("all") 153 public void setTitle(final String title) { 154 this.title = title; 155 } 156 157 /** 158 * The app responsible for generating the notification. Some of the core Facebook features have their own app that 159 * shows up here, such as likes when someone likes another person's content. 160 * 161 * @return The app responsible for generating the notification. 162 */ 163 @java.lang.SuppressWarnings("all") 164 public Application getApplication() { 165 return this.application; 166 } 167 168 /** 169 * The app responsible for generating the notification. Some of the core Facebook features have their own app that 170 * shows up here, such as likes when someone likes another person's content. 171 */ 172 @java.lang.SuppressWarnings("all") 173 public void setApplication(final Application application) { 174 this.application = application; 175 } 176 177 /** 178 * Indicates that the notification is unread. 179 * <p> 180 * Note that 'read' notifications will not be accessible. 181 * 182 * @return Indicates that the notification is unread. 183 */ 184 @java.lang.SuppressWarnings("all") 185 public Integer getUnread() { 186 return this.unread; 187 } 188 189 /** 190 * Indicates that the notification is unread. 191 * <p> 192 * Note that 'read' notifications will not be accessible. 193 */ 194 @java.lang.SuppressWarnings("all") 195 public void setUnread(final Integer unread) { 196 this.unread = unread; 197 } 198 199 /** 200 * The object (this can be a post, a photo, a comment, etc.) that was the subject of the notification. 201 * 202 * @return the object that was the subject of the notification. 203 */ 204 @java.lang.SuppressWarnings("all") 205 public NamedFacebookType getObject() { 206 return this.object; 207 } 208 209 /** 210 * The object (this can be a post, a photo, a comment, etc.) that was the subject of the notification. 211 */ 212 @java.lang.SuppressWarnings("all") 213 public void setObject(final NamedFacebookType object) { 214 this.object = object; 215 } 216 217 /** 218 * When the notification was last updated. When the notification was created. 219 * 220 * @return When the notification was last updated. 221 */ 222 @java.lang.SuppressWarnings("all") 223 public Date getUpdatedTime() { 224 return this.updatedTime; 225 } 226 227 /** 228 * When the notification was last updated. When the notification was created. 229 */ 230 @java.lang.SuppressWarnings("all") 231 public void setUpdatedTime(final Date updatedTime) { 232 this.updatedTime = updatedTime; 233 } 234 235 /** 236 * When the notification was created. 237 * 238 * @return When the notification was created. 239 */ 240 @Override 241 @java.lang.SuppressWarnings("all") 242 public Date getCreatedTime() { 243 return this.createdTime; 244 } 245 246 /** 247 * When the notification was created. 248 */ 249 @java.lang.SuppressWarnings("all") 250 public void setCreatedTime(final Date createdTime) { 251 this.createdTime = createdTime; 252 } 253}