001// Generated by delombok at Wed Nov 11 21:20:25 CET 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.webhook.messaging;
024
025import java.util.List;
026import com.restfb.Facebook;
027import com.restfb.types.webhook.messaging.airline.*;
028
029public class MessagingPayload {
030  @Facebook
031  private String url;
032  @Facebook("sticker_id")
033  private String stickerId;
034  @Facebook
035  private CoordinatesItem coordinates;
036  @Facebook("template_type")
037  private String templateType;
038  @Facebook
039  private List<ButtonItem> buttons;
040  @Facebook
041  private List<ElementItem> elements;
042  @Facebook("recipient_name")
043  private String recipientName;
044  @Facebook("order_number")
045  private String orderNumber;
046  @Facebook
047  private String currency;
048  @Facebook("payment_method")
049  private String paymentMethod;
050  @Facebook("order_url")
051  private String orderUrl;
052  @Facebook
053  private Long timestamp;
054  @Facebook
055  private AddressItem address;
056  @Facebook
057  private SummaryItem summary;
058  @Facebook
059  private List<AdjustmentItem> adjustmentItems;
060  @Facebook("intro_message")
061  private String introMessage;
062  @Facebook
063  private String locale;
064  @Facebook
065  private String themeColor;
066  @Facebook("update_type")
067  private String updateType;
068  @Facebook("pnr_number")
069  private String pnrNumber;
070  @Facebook("passenger_info")
071  private List<PassengerInfoItem> passengerInfoItems;
072  @Facebook("flight_info")
073  private List<FlightInfoItem> flightInfoItems;
074  @Facebook("passenger_segment_info")
075  private List<PassengerSegmentInfoItem> passengerSegmentInfoItems;
076  @Facebook("price_info")
077  private List<PriceInfoItem> priceInfoItems;
078  @Facebook("base_price")
079  private Double basePrice;
080  @Facebook
081  private Double tax;
082  @Facebook("total_price")
083  private Double totalPrice;
084  @Facebook("update_flight_info")
085  private FlightInfoItem updateFlightInfo;
086  @Facebook("checkin_url")
087  private String checkinUrl;
088  @Facebook("boarding_pass")
089  private List<BoardingPassItem> boardingPassItems;
090  private String fallback;
091
092  /**
093   * The user may send a like and this method can be used to discover the three know versions of the sticker
094   *
095   * @return {@code true} if the user sent a like (thumb up sticker), {@code false} otherwise
096   */
097  public boolean isLike() {
098    return  // small like (thumb up) sticker
099    // medium size sticker
100    "369239263222822".equals(stickerId) || "369239343222814".equals(stickerId) || "369239383222810".equals(stickerId); // large size sticker
101  }
102
103  @java.lang.Override
104  @java.lang.SuppressWarnings("all")
105  public java.lang.String toString() {
106    return "MessagingPayload(url=" + this.getUrl() + ", stickerId=" + this.getStickerId() + ", coordinates=" + this.getCoordinates() + ", templateType=" + this.getTemplateType() + ", buttons=" + this.getButtons() + ", elements=" + this.getElements() + ", recipientName=" + this.getRecipientName() + ", orderNumber=" + this.getOrderNumber() + ", currency=" + this.getCurrency() + ", paymentMethod=" + this.getPaymentMethod() + ", orderUrl=" + this.getOrderUrl() + ", timestamp=" + this.getTimestamp() + ", address=" + this.getAddress() + ", summary=" + this.getSummary() + ", adjustmentItems=" + this.getAdjustmentItems() + ", introMessage=" + this.getIntroMessage() + ", locale=" + this.getLocale() + ", themeColor=" + this.getThemeColor() + ", updateType=" + this.getUpdateType() + ", pnrNumber=" + this.getPnrNumber() + ", passengerInfoItems=" + this.getPassengerInfoItems() + ", flightInfoItems=" + this.getFlightInfoItems() + ", passengerSegmentInfoItems=" + this.getPassengerSegmentInfoItems() + ", priceInfoItems=" + this.getPriceInfoItems() + ", basePrice=" + this.getBasePrice() + ", tax=" + this.getTax() + ", totalPrice=" + this.getTotalPrice() + ", updateFlightInfo=" + this.getUpdateFlightInfo() + ", checkinUrl=" + this.getCheckinUrl() + ", boardingPassItems=" + this.getBoardingPassItems() + ", fallback=" + this.getFallback() + ")";
107  }
108
109  @java.lang.SuppressWarnings("all")
110  public String getUrl() {
111    return this.url;
112  }
113
114  @java.lang.SuppressWarnings("all")
115  public void setUrl(final String url) {
116    this.url = url;
117  }
118
119  @java.lang.SuppressWarnings("all")
120  public String getStickerId() {
121    return this.stickerId;
122  }
123
124  @java.lang.SuppressWarnings("all")
125  public void setStickerId(final String stickerId) {
126    this.stickerId = stickerId;
127  }
128
129  @java.lang.SuppressWarnings("all")
130  public CoordinatesItem getCoordinates() {
131    return this.coordinates;
132  }
133
134  @java.lang.SuppressWarnings("all")
135  public void setCoordinates(final CoordinatesItem coordinates) {
136    this.coordinates = coordinates;
137  }
138
139  @java.lang.SuppressWarnings("all")
140  public String getTemplateType() {
141    return this.templateType;
142  }
143
144  @java.lang.SuppressWarnings("all")
145  public void setTemplateType(final String templateType) {
146    this.templateType = templateType;
147  }
148
149  @java.lang.SuppressWarnings("all")
150  public List<ButtonItem> getButtons() {
151    return this.buttons;
152  }
153
154  @java.lang.SuppressWarnings("all")
155  public void setButtons(final List<ButtonItem> buttons) {
156    this.buttons = buttons;
157  }
158
159  @java.lang.SuppressWarnings("all")
160  public List<ElementItem> getElements() {
161    return this.elements;
162  }
163
164  @java.lang.SuppressWarnings("all")
165  public void setElements(final List<ElementItem> elements) {
166    this.elements = elements;
167  }
168
169  @java.lang.SuppressWarnings("all")
170  public String getRecipientName() {
171    return this.recipientName;
172  }
173
174  @java.lang.SuppressWarnings("all")
175  public void setRecipientName(final String recipientName) {
176    this.recipientName = recipientName;
177  }
178
179  @java.lang.SuppressWarnings("all")
180  public String getOrderNumber() {
181    return this.orderNumber;
182  }
183
184  @java.lang.SuppressWarnings("all")
185  public void setOrderNumber(final String orderNumber) {
186    this.orderNumber = orderNumber;
187  }
188
189  @java.lang.SuppressWarnings("all")
190  public String getCurrency() {
191    return this.currency;
192  }
193
194  @java.lang.SuppressWarnings("all")
195  public void setCurrency(final String currency) {
196    this.currency = currency;
197  }
198
199  @java.lang.SuppressWarnings("all")
200  public String getPaymentMethod() {
201    return this.paymentMethod;
202  }
203
204  @java.lang.SuppressWarnings("all")
205  public void setPaymentMethod(final String paymentMethod) {
206    this.paymentMethod = paymentMethod;
207  }
208
209  @java.lang.SuppressWarnings("all")
210  public String getOrderUrl() {
211    return this.orderUrl;
212  }
213
214  @java.lang.SuppressWarnings("all")
215  public void setOrderUrl(final String orderUrl) {
216    this.orderUrl = orderUrl;
217  }
218
219  @java.lang.SuppressWarnings("all")
220  public Long getTimestamp() {
221    return this.timestamp;
222  }
223
224  @java.lang.SuppressWarnings("all")
225  public void setTimestamp(final Long timestamp) {
226    this.timestamp = timestamp;
227  }
228
229  @java.lang.SuppressWarnings("all")
230  public AddressItem getAddress() {
231    return this.address;
232  }
233
234  @java.lang.SuppressWarnings("all")
235  public void setAddress(final AddressItem address) {
236    this.address = address;
237  }
238
239  @java.lang.SuppressWarnings("all")
240  public SummaryItem getSummary() {
241    return this.summary;
242  }
243
244  @java.lang.SuppressWarnings("all")
245  public void setSummary(final SummaryItem summary) {
246    this.summary = summary;
247  }
248
249  @java.lang.SuppressWarnings("all")
250  public List<AdjustmentItem> getAdjustmentItems() {
251    return this.adjustmentItems;
252  }
253
254  @java.lang.SuppressWarnings("all")
255  public void setAdjustmentItems(final List<AdjustmentItem> adjustmentItems) {
256    this.adjustmentItems = adjustmentItems;
257  }
258
259  @java.lang.SuppressWarnings("all")
260  public String getIntroMessage() {
261    return this.introMessage;
262  }
263
264  @java.lang.SuppressWarnings("all")
265  public void setIntroMessage(final String introMessage) {
266    this.introMessage = introMessage;
267  }
268
269  @java.lang.SuppressWarnings("all")
270  public String getLocale() {
271    return this.locale;
272  }
273
274  @java.lang.SuppressWarnings("all")
275  public void setLocale(final String locale) {
276    this.locale = locale;
277  }
278
279  @java.lang.SuppressWarnings("all")
280  public String getThemeColor() {
281    return this.themeColor;
282  }
283
284  @java.lang.SuppressWarnings("all")
285  public void setThemeColor(final String themeColor) {
286    this.themeColor = themeColor;
287  }
288
289  @java.lang.SuppressWarnings("all")
290  public String getUpdateType() {
291    return this.updateType;
292  }
293
294  @java.lang.SuppressWarnings("all")
295  public void setUpdateType(final String updateType) {
296    this.updateType = updateType;
297  }
298
299  @java.lang.SuppressWarnings("all")
300  public String getPnrNumber() {
301    return this.pnrNumber;
302  }
303
304  @java.lang.SuppressWarnings("all")
305  public void setPnrNumber(final String pnrNumber) {
306    this.pnrNumber = pnrNumber;
307  }
308
309  @java.lang.SuppressWarnings("all")
310  public List<PassengerInfoItem> getPassengerInfoItems() {
311    return this.passengerInfoItems;
312  }
313
314  @java.lang.SuppressWarnings("all")
315  public void setPassengerInfoItems(final List<PassengerInfoItem> passengerInfoItems) {
316    this.passengerInfoItems = passengerInfoItems;
317  }
318
319  @java.lang.SuppressWarnings("all")
320  public List<FlightInfoItem> getFlightInfoItems() {
321    return this.flightInfoItems;
322  }
323
324  @java.lang.SuppressWarnings("all")
325  public void setFlightInfoItems(final List<FlightInfoItem> flightInfoItems) {
326    this.flightInfoItems = flightInfoItems;
327  }
328
329  @java.lang.SuppressWarnings("all")
330  public List<PassengerSegmentInfoItem> getPassengerSegmentInfoItems() {
331    return this.passengerSegmentInfoItems;
332  }
333
334  @java.lang.SuppressWarnings("all")
335  public void setPassengerSegmentInfoItems(final List<PassengerSegmentInfoItem> passengerSegmentInfoItems) {
336    this.passengerSegmentInfoItems = passengerSegmentInfoItems;
337  }
338
339  @java.lang.SuppressWarnings("all")
340  public List<PriceInfoItem> getPriceInfoItems() {
341    return this.priceInfoItems;
342  }
343
344  @java.lang.SuppressWarnings("all")
345  public void setPriceInfoItems(final List<PriceInfoItem> priceInfoItems) {
346    this.priceInfoItems = priceInfoItems;
347  }
348
349  @java.lang.SuppressWarnings("all")
350  public Double getBasePrice() {
351    return this.basePrice;
352  }
353
354  @java.lang.SuppressWarnings("all")
355  public void setBasePrice(final Double basePrice) {
356    this.basePrice = basePrice;
357  }
358
359  @java.lang.SuppressWarnings("all")
360  public Double getTax() {
361    return this.tax;
362  }
363
364  @java.lang.SuppressWarnings("all")
365  public void setTax(final Double tax) {
366    this.tax = tax;
367  }
368
369  @java.lang.SuppressWarnings("all")
370  public Double getTotalPrice() {
371    return this.totalPrice;
372  }
373
374  @java.lang.SuppressWarnings("all")
375  public void setTotalPrice(final Double totalPrice) {
376    this.totalPrice = totalPrice;
377  }
378
379  @java.lang.SuppressWarnings("all")
380  public FlightInfoItem getUpdateFlightInfo() {
381    return this.updateFlightInfo;
382  }
383
384  @java.lang.SuppressWarnings("all")
385  public void setUpdateFlightInfo(final FlightInfoItem updateFlightInfo) {
386    this.updateFlightInfo = updateFlightInfo;
387  }
388
389  @java.lang.SuppressWarnings("all")
390  public String getCheckinUrl() {
391    return this.checkinUrl;
392  }
393
394  @java.lang.SuppressWarnings("all")
395  public void setCheckinUrl(final String checkinUrl) {
396    this.checkinUrl = checkinUrl;
397  }
398
399  @java.lang.SuppressWarnings("all")
400  public List<BoardingPassItem> getBoardingPassItems() {
401    return this.boardingPassItems;
402  }
403
404  @java.lang.SuppressWarnings("all")
405  public void setBoardingPassItems(final List<BoardingPassItem> boardingPassItems) {
406    this.boardingPassItems = boardingPassItems;
407  }
408
409  @java.lang.SuppressWarnings("all")
410  public String getFallback() {
411    return this.fallback;
412  }
413
414  @java.lang.SuppressWarnings("all")
415  public void setFallback(final String fallback) {
416    this.fallback = fallback;
417  }
418}