001// Generated by delombok at Fri Oct 09 16:27:16 CEST 2020
002/*
003 * Copyright (c) 2010-2020 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;
029import com.restfb.types.features.HasMessage;
030
031/**
032 * Represents the <a href="https://developers.facebook.com/docs/reference/api/user/#apprequests" >App Request Graph API
033 * type</a>.
034 * 
035 * @author <a href="http://restfb.com">Mark Allen</a>
036 * @since 1.6.10
037 */
038public class AppRequest extends FacebookType implements HasCreatedTime, HasFrom, HasMessage {
039  /**
040   * Request action type for structured request
041   */
042  @Facebook("action_type")
043  private String actionType;
044  /**
045   * App associated with the request.
046   */
047  @Facebook
048  private Application application;
049  /**
050   * Optional data passed with the request for tracking purposes
051   */
052  @Facebook
053  private String data;
054  /**
055   * The recipient user associated with the request.
056   */
057  @Facebook
058  private NamedFacebookType to;
059  /**
060   * The sender user associated with the request.
061   */
062  @Facebook
063  private NamedFacebookType from;
064  /**
065   * A string describing the request.
066   */
067  @Facebook
068  private String message;
069  /**
070   * Timestamp when the request was created.
071   */
072  @Facebook("created_time")
073  private Date createdTime;
074  private static final long serialVersionUID = 1L;
075
076
077  /**
078   * Represents the <a href="http://developers.facebook.com/docs/reference/api/page">Cover Graph API type</a>.
079   * 
080   * @author <a href="http://restfb.com">Mark Allen</a>
081   * @since 1.6.10
082   */
083  public static class Application extends NamedFacebookType {
084    /**
085     * The application's canvas name.
086     * 
087     * @return The application's canvas name.
088     */
089    @Facebook("canvas_name")
090    private String canvasName;
091    /**
092     * The application's namespace.
093     * 
094     * @return The application's namespace.
095     */
096    @Facebook
097    private String namespace;
098    private static final long serialVersionUID = 1L;
099
100    @java.lang.SuppressWarnings("all")
101    public String getCanvasName() {
102      return this.canvasName;
103    }
104
105    @java.lang.SuppressWarnings("all")
106    public void setCanvasName(final String canvasName) {
107      this.canvasName = canvasName;
108    }
109
110    @java.lang.SuppressWarnings("all")
111    public String getNamespace() {
112      return this.namespace;
113    }
114
115    @java.lang.SuppressWarnings("all")
116    public void setNamespace(final String namespace) {
117      this.namespace = namespace;
118    }
119  }
120
121  /**
122   * Request action type for structured request
123   *
124   * @return Request action type for structured request
125   */
126  @java.lang.SuppressWarnings("all")
127  public String getActionType() {
128    return this.actionType;
129  }
130
131  /**
132   * Request action type for structured request
133   */
134  @java.lang.SuppressWarnings("all")
135  public void setActionType(final String actionType) {
136    this.actionType = actionType;
137  }
138
139  /**
140   * App associated with the request.
141   * 
142   * @return App associated with the request.
143   */
144  @java.lang.SuppressWarnings("all")
145  public Application getApplication() {
146    return this.application;
147  }
148
149  /**
150   * App associated with the request.
151   */
152  @java.lang.SuppressWarnings("all")
153  public void setApplication(final Application application) {
154    this.application = application;
155  }
156
157  /**
158   * Optional data passed with the request for tracking purposes
159   *
160   * @return Optional data passed with the request for tracking purposes
161   */
162  @java.lang.SuppressWarnings("all")
163  public String getData() {
164    return this.data;
165  }
166
167  /**
168   * Optional data passed with the request for tracking purposes
169   */
170  @java.lang.SuppressWarnings("all")
171  public void setData(final String data) {
172    this.data = data;
173  }
174
175  /**
176   * The recipient user associated with the request.
177   * 
178   * @return The recipient user associated with the request.
179   */
180  @java.lang.SuppressWarnings("all")
181  public NamedFacebookType getTo() {
182    return this.to;
183  }
184
185  /**
186   * The recipient user associated with the request.
187   */
188  @java.lang.SuppressWarnings("all")
189  public void setTo(final NamedFacebookType to) {
190    this.to = to;
191  }
192
193  /**
194   * The sender user associated with the request.
195   * 
196   * @return The sender user associated with the request.
197   */
198  @Override
199  @java.lang.SuppressWarnings("all")
200  public NamedFacebookType getFrom() {
201    return this.from;
202  }
203
204  /**
205   * The sender user associated with the request.
206   */
207  @java.lang.SuppressWarnings("all")
208  public void setFrom(final NamedFacebookType from) {
209    this.from = from;
210  }
211
212  /**
213   * A string describing the request.
214   * 
215   * @return A string describing the request.
216   */
217  @Override
218  @java.lang.SuppressWarnings("all")
219  public String getMessage() {
220    return this.message;
221  }
222
223  /**
224   * A string describing the request.
225   */
226  @java.lang.SuppressWarnings("all")
227  public void setMessage(final String message) {
228    this.message = message;
229  }
230
231  /**
232   * Timestamp when the request was created.
233   * 
234   * @return Timestamp when the request was created.
235   */
236  @Override
237  @java.lang.SuppressWarnings("all")
238  public Date getCreatedTime() {
239    return this.createdTime;
240  }
241
242  /**
243   * Timestamp when the request was created.
244   */
245  @java.lang.SuppressWarnings("all")
246  public void setCreatedTime(final Date createdTime) {
247    this.createdTime = createdTime;
248  }
249}