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