001// Generated by delombok at Thu Aug 13 13:56:44 UTC 2026
002/*
003 * Copyright (c) 2010-2026 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  @lombok.Generated
092  public NamedFacebookType getFrom() {
093    return this.from;
094  }
095
096  /**
097   * The entity (user, page, app, etc.) that 'sent', or is the source of the notification.
098   */
099  @java.lang.SuppressWarnings("all")
100  @lombok.Generated
101  public void setFrom(final NamedFacebookType from) {
102    this.from = from;
103  }
104
105  /**
106   * The entity that received the notification.
107   *
108   * @return The entity that received the notification.
109   */
110  @java.lang.SuppressWarnings("all")
111  @lombok.Generated
112  public NamedFacebookType getTo() {
113    return this.to;
114  }
115
116  /**
117   * The entity that received the notification.
118   */
119  @java.lang.SuppressWarnings("all")
120  @lombok.Generated
121  public void setTo(final NamedFacebookType to) {
122    this.to = to;
123  }
124
125  /**
126   * The URL that clicking on the notification would take someone.
127   *
128   * @return The URL that clicking on the notification would take someone.
129   */
130  @java.lang.SuppressWarnings("all")
131  @lombok.Generated
132  public String getLink() {
133    return this.link;
134  }
135
136  /**
137   * The URL that clicking on the notification would take someone.
138   */
139  @java.lang.SuppressWarnings("all")
140  @lombok.Generated
141  public void setLink(final String link) {
142    this.link = link;
143  }
144
145  /**
146   * The message text in the notification.
147   *
148   * @return The message text in the notification.
149   */
150  @java.lang.SuppressWarnings("all")
151  @lombok.Generated
152  public String getTitle() {
153    return this.title;
154  }
155
156  /**
157   * The message text in the notification.
158   */
159  @java.lang.SuppressWarnings("all")
160  @lombok.Generated
161  public void setTitle(final String title) {
162    this.title = title;
163  }
164
165  /**
166   * The app responsible for generating the notification. Some of the core Facebook features have their own app that
167   * shows up here, such as likes when someone likes another person's content.
168   *
169   * @return The app responsible for generating the notification.
170   */
171  @java.lang.SuppressWarnings("all")
172  @lombok.Generated
173  public Application getApplication() {
174    return this.application;
175  }
176
177  /**
178   * The app responsible for generating the notification. Some of the core Facebook features have their own app that
179   * shows up here, such as likes when someone likes another person's content.
180   */
181  @java.lang.SuppressWarnings("all")
182  @lombok.Generated
183  public void setApplication(final Application application) {
184    this.application = application;
185  }
186
187  /**
188   * Indicates that the notification is unread.
189   * <p>
190   * Note that 'read' notifications will not be accessible.
191   *
192   * @return Indicates that the notification is unread.
193   */
194  @java.lang.SuppressWarnings("all")
195  @lombok.Generated
196  public Integer getUnread() {
197    return this.unread;
198  }
199
200  /**
201   * Indicates that the notification is unread.
202   * <p>
203   * Note that 'read' notifications will not be accessible.
204   */
205  @java.lang.SuppressWarnings("all")
206  @lombok.Generated
207  public void setUnread(final Integer unread) {
208    this.unread = unread;
209  }
210
211  /**
212   * The object (this can be a post, a photo, a comment, etc.) that was the subject of the notification.
213   *
214   * @return the object that was the subject of the notification.
215   */
216  @java.lang.SuppressWarnings("all")
217  @lombok.Generated
218  public NamedFacebookType getObject() {
219    return this.object;
220  }
221
222  /**
223   * The object (this can be a post, a photo, a comment, etc.) that was the subject of the notification.
224   */
225  @java.lang.SuppressWarnings("all")
226  @lombok.Generated
227  public void setObject(final NamedFacebookType object) {
228    this.object = object;
229  }
230
231  /**
232   * When the notification was last updated. When the notification was created.
233   *
234   * @return When the notification was last updated.
235   */
236  @java.lang.SuppressWarnings("all")
237  @lombok.Generated
238  public Date getUpdatedTime() {
239    return this.updatedTime;
240  }
241
242  /**
243   * When the notification was last updated. When the notification was created.
244   */
245  @java.lang.SuppressWarnings("all")
246  @lombok.Generated
247  public void setUpdatedTime(final Date updatedTime) {
248    this.updatedTime = updatedTime;
249  }
250
251  /**
252   * When the notification was created.
253   *
254   * @return When the notification was created.
255   */
256  @Override
257  @java.lang.SuppressWarnings("all")
258  @lombok.Generated
259  public Date getCreatedTime() {
260    return this.createdTime;
261  }
262
263  /**
264   * When the notification was created.
265   */
266  @java.lang.SuppressWarnings("all")
267  @lombok.Generated
268  public void setCreatedTime(final Date createdTime) {
269    this.createdTime = createdTime;
270  }
271}