001// Generated by delombok at Wed Jan 31 21:27:42 UTC 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.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  @Facebook
091  private ProductTemplateItem product;
092  private String fallback;
093  /**
094   * Title of the attachment. Applicable to attachment type: fallback
095   */
096  @Facebook
097  private String title;
098
099  /**
100   * The user may send a like and this method can be used to discover the three know versions of the sticker
101   *
102   * @return {@code true} if the user sent a like (thumb up sticker), {@code false} otherwise
103   */
104  public boolean isLike() {
105    return  // small like (thumb up) sticker
106    // medium size sticker
107    "369239263222822".equals(stickerId) || "369239343222814".equals(stickerId) || "369239383222810".equals(stickerId); // large size sticker
108  }
109
110  @java.lang.Override
111  @java.lang.SuppressWarnings("all")
112  public java.lang.String toString() {
113    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() + ", product=" + this.getProduct() + ", fallback=" + this.getFallback() + ", title=" + this.getTitle() + ")";
114  }
115
116  @java.lang.SuppressWarnings("all")
117  public String getUrl() {
118    return this.url;
119  }
120
121  @java.lang.SuppressWarnings("all")
122  public void setUrl(final String url) {
123    this.url = url;
124  }
125
126  @java.lang.SuppressWarnings("all")
127  public String getStickerId() {
128    return this.stickerId;
129  }
130
131  @java.lang.SuppressWarnings("all")
132  public void setStickerId(final String stickerId) {
133    this.stickerId = stickerId;
134  }
135
136  @java.lang.SuppressWarnings("all")
137  public CoordinatesItem getCoordinates() {
138    return this.coordinates;
139  }
140
141  @java.lang.SuppressWarnings("all")
142  public void setCoordinates(final CoordinatesItem coordinates) {
143    this.coordinates = coordinates;
144  }
145
146  @java.lang.SuppressWarnings("all")
147  public String getTemplateType() {
148    return this.templateType;
149  }
150
151  @java.lang.SuppressWarnings("all")
152  public void setTemplateType(final String templateType) {
153    this.templateType = templateType;
154  }
155
156  @java.lang.SuppressWarnings("all")
157  public List<ButtonItem> getButtons() {
158    return this.buttons;
159  }
160
161  @java.lang.SuppressWarnings("all")
162  public void setButtons(final List<ButtonItem> buttons) {
163    this.buttons = buttons;
164  }
165
166  @java.lang.SuppressWarnings("all")
167  public List<ElementItem> getElements() {
168    return this.elements;
169  }
170
171  @java.lang.SuppressWarnings("all")
172  public void setElements(final List<ElementItem> elements) {
173    this.elements = elements;
174  }
175
176  @java.lang.SuppressWarnings("all")
177  public String getRecipientName() {
178    return this.recipientName;
179  }
180
181  @java.lang.SuppressWarnings("all")
182  public void setRecipientName(final String recipientName) {
183    this.recipientName = recipientName;
184  }
185
186  @java.lang.SuppressWarnings("all")
187  public String getOrderNumber() {
188    return this.orderNumber;
189  }
190
191  @java.lang.SuppressWarnings("all")
192  public void setOrderNumber(final String orderNumber) {
193    this.orderNumber = orderNumber;
194  }
195
196  @java.lang.SuppressWarnings("all")
197  public String getCurrency() {
198    return this.currency;
199  }
200
201  @java.lang.SuppressWarnings("all")
202  public void setCurrency(final String currency) {
203    this.currency = currency;
204  }
205
206  @java.lang.SuppressWarnings("all")
207  public String getPaymentMethod() {
208    return this.paymentMethod;
209  }
210
211  @java.lang.SuppressWarnings("all")
212  public void setPaymentMethod(final String paymentMethod) {
213    this.paymentMethod = paymentMethod;
214  }
215
216  @java.lang.SuppressWarnings("all")
217  public String getOrderUrl() {
218    return this.orderUrl;
219  }
220
221  @java.lang.SuppressWarnings("all")
222  public void setOrderUrl(final String orderUrl) {
223    this.orderUrl = orderUrl;
224  }
225
226  @java.lang.SuppressWarnings("all")
227  public Long getTimestamp() {
228    return this.timestamp;
229  }
230
231  @java.lang.SuppressWarnings("all")
232  public void setTimestamp(final Long timestamp) {
233    this.timestamp = timestamp;
234  }
235
236  @java.lang.SuppressWarnings("all")
237  public AddressItem getAddress() {
238    return this.address;
239  }
240
241  @java.lang.SuppressWarnings("all")
242  public void setAddress(final AddressItem address) {
243    this.address = address;
244  }
245
246  @java.lang.SuppressWarnings("all")
247  public SummaryItem getSummary() {
248    return this.summary;
249  }
250
251  @java.lang.SuppressWarnings("all")
252  public void setSummary(final SummaryItem summary) {
253    this.summary = summary;
254  }
255
256  @java.lang.SuppressWarnings("all")
257  public List<AdjustmentItem> getAdjustmentItems() {
258    return this.adjustmentItems;
259  }
260
261  @java.lang.SuppressWarnings("all")
262  public void setAdjustmentItems(final List<AdjustmentItem> adjustmentItems) {
263    this.adjustmentItems = adjustmentItems;
264  }
265
266  @java.lang.SuppressWarnings("all")
267  public String getIntroMessage() {
268    return this.introMessage;
269  }
270
271  @java.lang.SuppressWarnings("all")
272  public void setIntroMessage(final String introMessage) {
273    this.introMessage = introMessage;
274  }
275
276  @java.lang.SuppressWarnings("all")
277  public String getLocale() {
278    return this.locale;
279  }
280
281  @java.lang.SuppressWarnings("all")
282  public void setLocale(final String locale) {
283    this.locale = locale;
284  }
285
286  @java.lang.SuppressWarnings("all")
287  public String getThemeColor() {
288    return this.themeColor;
289  }
290
291  @java.lang.SuppressWarnings("all")
292  public void setThemeColor(final String themeColor) {
293    this.themeColor = themeColor;
294  }
295
296  @java.lang.SuppressWarnings("all")
297  public String getUpdateType() {
298    return this.updateType;
299  }
300
301  @java.lang.SuppressWarnings("all")
302  public void setUpdateType(final String updateType) {
303    this.updateType = updateType;
304  }
305
306  @java.lang.SuppressWarnings("all")
307  public String getPnrNumber() {
308    return this.pnrNumber;
309  }
310
311  @java.lang.SuppressWarnings("all")
312  public void setPnrNumber(final String pnrNumber) {
313    this.pnrNumber = pnrNumber;
314  }
315
316  @java.lang.SuppressWarnings("all")
317  public List<PassengerInfoItem> getPassengerInfoItems() {
318    return this.passengerInfoItems;
319  }
320
321  @java.lang.SuppressWarnings("all")
322  public void setPassengerInfoItems(final List<PassengerInfoItem> passengerInfoItems) {
323    this.passengerInfoItems = passengerInfoItems;
324  }
325
326  @java.lang.SuppressWarnings("all")
327  public List<FlightInfoItem> getFlightInfoItems() {
328    return this.flightInfoItems;
329  }
330
331  @java.lang.SuppressWarnings("all")
332  public void setFlightInfoItems(final List<FlightInfoItem> flightInfoItems) {
333    this.flightInfoItems = flightInfoItems;
334  }
335
336  @java.lang.SuppressWarnings("all")
337  public List<PassengerSegmentInfoItem> getPassengerSegmentInfoItems() {
338    return this.passengerSegmentInfoItems;
339  }
340
341  @java.lang.SuppressWarnings("all")
342  public void setPassengerSegmentInfoItems(final List<PassengerSegmentInfoItem> passengerSegmentInfoItems) {
343    this.passengerSegmentInfoItems = passengerSegmentInfoItems;
344  }
345
346  @java.lang.SuppressWarnings("all")
347  public List<PriceInfoItem> getPriceInfoItems() {
348    return this.priceInfoItems;
349  }
350
351  @java.lang.SuppressWarnings("all")
352  public void setPriceInfoItems(final List<PriceInfoItem> priceInfoItems) {
353    this.priceInfoItems = priceInfoItems;
354  }
355
356  @java.lang.SuppressWarnings("all")
357  public Double getBasePrice() {
358    return this.basePrice;
359  }
360
361  @java.lang.SuppressWarnings("all")
362  public void setBasePrice(final Double basePrice) {
363    this.basePrice = basePrice;
364  }
365
366  @java.lang.SuppressWarnings("all")
367  public Double getTax() {
368    return this.tax;
369  }
370
371  @java.lang.SuppressWarnings("all")
372  public void setTax(final Double tax) {
373    this.tax = tax;
374  }
375
376  @java.lang.SuppressWarnings("all")
377  public Double getTotalPrice() {
378    return this.totalPrice;
379  }
380
381  @java.lang.SuppressWarnings("all")
382  public void setTotalPrice(final Double totalPrice) {
383    this.totalPrice = totalPrice;
384  }
385
386  @java.lang.SuppressWarnings("all")
387  public FlightInfoItem getUpdateFlightInfo() {
388    return this.updateFlightInfo;
389  }
390
391  @java.lang.SuppressWarnings("all")
392  public void setUpdateFlightInfo(final FlightInfoItem updateFlightInfo) {
393    this.updateFlightInfo = updateFlightInfo;
394  }
395
396  @java.lang.SuppressWarnings("all")
397  public String getCheckinUrl() {
398    return this.checkinUrl;
399  }
400
401  @java.lang.SuppressWarnings("all")
402  public void setCheckinUrl(final String checkinUrl) {
403    this.checkinUrl = checkinUrl;
404  }
405
406  @java.lang.SuppressWarnings("all")
407  public List<BoardingPassItem> getBoardingPassItems() {
408    return this.boardingPassItems;
409  }
410
411  @java.lang.SuppressWarnings("all")
412  public void setBoardingPassItems(final List<BoardingPassItem> boardingPassItems) {
413    this.boardingPassItems = boardingPassItems;
414  }
415
416  @java.lang.SuppressWarnings("all")
417  public ProductTemplateItem getProduct() {
418    return this.product;
419  }
420
421  @java.lang.SuppressWarnings("all")
422  public void setProduct(final ProductTemplateItem product) {
423    this.product = product;
424  }
425
426  @java.lang.SuppressWarnings("all")
427  public String getFallback() {
428    return this.fallback;
429  }
430
431  @java.lang.SuppressWarnings("all")
432  public void setFallback(final String fallback) {
433    this.fallback = fallback;
434  }
435
436  /**
437   * Title of the attachment. Applicable to attachment type: fallback
438   */
439  @java.lang.SuppressWarnings("all")
440  public String getTitle() {
441    return this.title;
442  }
443
444  /**
445   * Title of the attachment. Applicable to attachment type: fallback
446   */
447  @java.lang.SuppressWarnings("all")
448  public void setTitle(final String title) {
449    this.title = title;
450  }
451}