001// Generated by delombok at Fri Oct 11 21:56:29 CEST 2019
002/**
003 * Copyright (c) 2010-2019 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;
027
028/**
029 * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/notification">Notification Graph API
030 * type</a>.
031 */
032public class Notification extends FacebookType {
033  /**
034   * The entity (user, page, app, etc.) that 'sent', or is the source of the notification.
035   */
036  @Facebook
037  private NamedFacebookType from;
038  /**
039   * The entity that received the notification.
040   */
041  @Facebook
042  private NamedFacebookType to;
043  /**
044   * The URL that clicking on the notification would take someone.
045   */
046  @Facebook
047  private String link;
048  /**
049   * The message text in the notification.
050   */
051  @Facebook
052  private String title;
053  /**
054   * The app responsible for generating the notification. Some of the core Facebook features have their own app that
055   * shows up here, such as likes when someone likes another person's content.
056   */
057  @Facebook
058  private Application application;
059  /**
060   * Indicates that the notification is unread.
061   *
062   * Note that 'read' notifications will not be accessible.
063   */
064  @Facebook
065  private Integer unread;
066  /**
067   * The object (this can be a post, a photo, a comment, etc.) that was the subject of the notification.
068   */
069  @Facebook
070  private NamedFacebookType object;
071  /**
072   * When the notification was last updated. When the notification was created.
073   */
074  @Facebook("updated_time")
075  private Date updatedTime;
076  /**
077   * When the notification was created.
078   */
079  @Facebook("created_time")
080  private Date createdTime;
081
082  /**
083   * The entity (user, page, app, etc.) that 'sent', or is the source of the notification.
084   *
085   * @return The entity that 'sent', or is the source of the notification.
086   */
087  @java.lang.SuppressWarnings("all")
088  public NamedFacebookType getFrom() {
089    return this.from;
090  }
091
092  /**
093   * The entity (user, page, app, etc.) that 'sent', or is the source of the notification.
094   */
095  @java.lang.SuppressWarnings("all")
096  public void setFrom(final NamedFacebookType from) {
097    this.from = from;
098  }
099
100  /**
101   * The entity that received the notification.
102   *
103   * @return The entity that received the notification.
104   */
105  @java.lang.SuppressWarnings("all")
106  public NamedFacebookType getTo() {
107    return this.to;
108  }
109
110  /**
111   * The entity that received the notification.
112   */
113  @java.lang.SuppressWarnings("all")
114  public void setTo(final NamedFacebookType to) {
115    this.to = to;
116  }
117
118  /**
119   * The URL that clicking on the notification would take someone.
120   *
121   * @return The URL that clicking on the notification would take someone.
122   */
123  @java.lang.SuppressWarnings("all")
124  public String getLink() {
125    return this.link;
126  }
127
128  /**
129   * The URL that clicking on the notification would take someone.
130   */
131  @java.lang.SuppressWarnings("all")
132  public void setLink(final String link) {
133    this.link = link;
134  }
135
136  /**
137   * The message text in the notification.
138   *
139   * @return The message text in the notification.
140   */
141  @java.lang.SuppressWarnings("all")
142  public String getTitle() {
143    return this.title;
144  }
145
146  /**
147   * The message text in the notification.
148   */
149  @java.lang.SuppressWarnings("all")
150  public void setTitle(final String title) {
151    this.title = title;
152  }
153
154  /**
155   * The app responsible for generating the notification. Some of the core Facebook features have their own app that
156   * shows up here, such as likes when someone likes another person's content.
157   *
158   * @return The app responsible for generating the notification.
159   */
160  @java.lang.SuppressWarnings("all")
161  public Application getApplication() {
162    return this.application;
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  @java.lang.SuppressWarnings("all")
170  public void setApplication(final Application application) {
171    this.application = application;
172  }
173
174  /**
175   * Indicates that the notification is unread.
176   *
177   * Note that 'read' notifications will not be accessible.
178   *
179   * @return Indicates that the notification is unread.
180   */
181  @java.lang.SuppressWarnings("all")
182  public Integer getUnread() {
183    return this.unread;
184  }
185
186  /**
187   * Indicates that the notification is unread.
188   *
189   * Note that 'read' notifications will not be accessible.
190   */
191  @java.lang.SuppressWarnings("all")
192  public void setUnread(final Integer unread) {
193    this.unread = unread;
194  }
195
196  /**
197   * The object (this can be a post, a photo, a comment, etc.) that was the subject of the notification.
198   *
199   * @return the object that was the subject of the notification.
200   */
201  @java.lang.SuppressWarnings("all")
202  public NamedFacebookType getObject() {
203    return this.object;
204  }
205
206  /**
207   * The object (this can be a post, a photo, a comment, etc.) that was the subject of the notification.
208   */
209  @java.lang.SuppressWarnings("all")
210  public void setObject(final NamedFacebookType object) {
211    this.object = object;
212  }
213
214  /**
215   * When the notification was last updated. When the notification was created.
216   *
217   * @return When the notification was last updated.
218   */
219  @java.lang.SuppressWarnings("all")
220  public Date getUpdatedTime() {
221    return this.updatedTime;
222  }
223
224  /**
225   * When the notification was last updated. When the notification was created.
226   */
227  @java.lang.SuppressWarnings("all")
228  public void setUpdatedTime(final Date updatedTime) {
229    this.updatedTime = updatedTime;
230  }
231
232  /**
233   * When the notification was created.
234   *
235   * @return When the notification was created.
236   */
237  @java.lang.SuppressWarnings("all")
238  public Date getCreatedTime() {
239    return this.createdTime;
240  }
241
242  /**
243   * When the notification was created.
244   */
245  @java.lang.SuppressWarnings("all")
246  public void setCreatedTime(final Date createdTime) {
247    this.createdTime = createdTime;
248  }
249}