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.send.airline;
024
025import java.util.ArrayList;
026import java.util.List;
027import com.restfb.Facebook;
028import com.restfb.types.send.TemplatePayload;
029
030/**
031 * Represents the <a href=
032 * "https://developers.facebook.com/docs/messenger-platform/send-api-reference/airline-itinerary-template">Airline
033 * Itinerary Template Payload</a> type
034 */
035public class AirlineItineraryTemplatePayload extends TemplatePayload {
036  @Facebook("intro_message")
037  private String introMessage;
038  @Facebook
039  private String locale;
040  @Facebook("theme_color")
041  private String themeColor;
042  @Facebook("pnr_number")
043  private String pnrNumber;
044  @Facebook("passenger_info")
045  private List<PassengerInfo> passengerInfoList;
046  @Facebook("flight_info")
047  private List<FlightInfo> flightInfoList;
048  @Facebook("passenger_segment_info")
049  private List<PassengerSegmentInfo> passengerSegmentInfoList;
050  @Facebook("price_info")
051  private List<PriceInfo> priceInfoList;
052  @Facebook("base_price")
053  private double basePrice;
054  @Facebook
055  private double tax;
056  @Facebook("total_price")
057  private double totalPrice;
058  @Facebook
059  private String currency;
060
061  public AirlineItineraryTemplatePayload(String introMessage, String locale, String pnrNumber, double totalPrice) {
062    setTemplateType("airline_itinerary");
063    this.introMessage = introMessage;
064    this.locale = locale;
065    this.pnrNumber = pnrNumber;
066    this.totalPrice = totalPrice;
067  }
068
069  public boolean addPassengerInfo(PassengerInfo passengerInfo) {
070    if (passengerInfoList == null) {
071      passengerInfoList = new ArrayList<>();
072    }
073    return passengerInfoList.add(passengerInfo);
074  }
075
076  public boolean addFlightInfo(FlightInfo flightInfo) {
077    if (flightInfoList == null) {
078      flightInfoList = new ArrayList<>();
079    }
080    return flightInfoList.add(flightInfo);
081  }
082
083  public boolean addPassengerSegmentInfo(PassengerSegmentInfo passengerSegmentInfo) {
084    if (passengerSegmentInfoList == null) {
085      passengerSegmentInfoList = new ArrayList<>();
086    }
087    return passengerSegmentInfoList.add(passengerSegmentInfo);
088  }
089
090  public boolean addPriceInfo(PriceInfo priceInfo) {
091    if (priceInfoList == null) {
092      priceInfoList = new ArrayList<>();
093    }
094    return priceInfoList.add(priceInfo);
095  }
096
097  @java.lang.SuppressWarnings("all")
098  public String getIntroMessage() {
099    return this.introMessage;
100  }
101
102  @java.lang.SuppressWarnings("all")
103  public String getLocale() {
104    return this.locale;
105  }
106
107  @java.lang.SuppressWarnings("all")
108  public String getThemeColor() {
109    return this.themeColor;
110  }
111
112  @java.lang.SuppressWarnings("all")
113  public void setThemeColor(final String themeColor) {
114    this.themeColor = themeColor;
115  }
116
117  @java.lang.SuppressWarnings("all")
118  public String getPnrNumber() {
119    return this.pnrNumber;
120  }
121
122  @java.lang.SuppressWarnings("all")
123  public List<PassengerInfo> getPassengerInfoList() {
124    return this.passengerInfoList;
125  }
126
127  @java.lang.SuppressWarnings("all")
128  public List<FlightInfo> getFlightInfoList() {
129    return this.flightInfoList;
130  }
131
132  @java.lang.SuppressWarnings("all")
133  public List<PassengerSegmentInfo> getPassengerSegmentInfoList() {
134    return this.passengerSegmentInfoList;
135  }
136
137  @java.lang.SuppressWarnings("all")
138  public List<PriceInfo> getPriceInfoList() {
139    return this.priceInfoList;
140  }
141
142  @java.lang.SuppressWarnings("all")
143  public double getBasePrice() {
144    return this.basePrice;
145  }
146
147  @java.lang.SuppressWarnings("all")
148  public void setBasePrice(final double basePrice) {
149    this.basePrice = basePrice;
150  }
151
152  @java.lang.SuppressWarnings("all")
153  public double getTax() {
154    return this.tax;
155  }
156
157  @java.lang.SuppressWarnings("all")
158  public void setTax(final double tax) {
159    this.tax = tax;
160  }
161
162  @java.lang.SuppressWarnings("all")
163  public double getTotalPrice() {
164    return this.totalPrice;
165  }
166
167  @java.lang.SuppressWarnings("all")
168  public String getCurrency() {
169    return this.currency;
170  }
171}