Class Leg


  • public class Leg
    extends Object
    Leg
    • Constructor Detail

      • Leg

        public Leg()
    • Method Detail

      • arrivalAirportCode

        public Leg arrivalAirportCode​(String arrivalAirportCode)
        The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details.
        Parameters:
        arrivalAirportCode - The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details.
        Returns:
        the current Leg instance, allowing for method chaining
      • getArrivalAirportCode

        public String getArrivalAirportCode()
        The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details.
        Returns:
        arrivalAirportCode The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details.
      • setArrivalAirportCode

        public void setArrivalAirportCode​(String arrivalAirportCode)
        The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details.
        Parameters:
        arrivalAirportCode - The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details.
      • basicFareCode

        public Leg basicFareCode​(String basicFareCode)
        The basic fare code for this leg.
        Parameters:
        basicFareCode - The basic fare code for this leg.
        Returns:
        the current Leg instance, allowing for method chaining
      • getBasicFareCode

        public String getBasicFareCode()
        The basic fare code for this leg.
        Returns:
        basicFareCode The basic fare code for this leg.
      • setBasicFareCode

        public void setBasicFareCode​(String basicFareCode)
        The basic fare code for this leg.
        Parameters:
        basicFareCode - The basic fare code for this leg.
      • carrierCode

        public Leg carrierCode​(String carrierCode)
        IATA code of the carrier operating the flight.
        Parameters:
        carrierCode - IATA code of the carrier operating the flight.
        Returns:
        the current Leg instance, allowing for method chaining
      • getCarrierCode

        public String getCarrierCode()
        IATA code of the carrier operating the flight.
        Returns:
        carrierCode IATA code of the carrier operating the flight.
      • setCarrierCode

        public void setCarrierCode​(String carrierCode)
        IATA code of the carrier operating the flight.
        Parameters:
        carrierCode - IATA code of the carrier operating the flight.
      • departureAirportCode

        public Leg departureAirportCode​(String departureAirportCode)
        The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details
        Parameters:
        departureAirportCode - The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details
        Returns:
        the current Leg instance, allowing for method chaining
      • getDepartureAirportCode

        public String getDepartureAirportCode()
        The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details
        Returns:
        departureAirportCode The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details
      • setDepartureAirportCode

        public void setDepartureAirportCode​(String departureAirportCode)
        The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details
        Parameters:
        departureAirportCode - The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details
      • departureDate

        public Leg departureDate​(String departureDate)
        The flight departure date.
        Parameters:
        departureDate - The flight departure date.
        Returns:
        the current Leg instance, allowing for method chaining
      • getDepartureDate

        public String getDepartureDate()
        The flight departure date.
        Returns:
        departureDate The flight departure date.
      • setDepartureDate

        public void setDepartureDate​(String departureDate)
        The flight departure date.
        Parameters:
        departureDate - The flight departure date.
      • flightNumber

        public Leg flightNumber​(String flightNumber)
        The flight identifier.
        Parameters:
        flightNumber - The flight identifier.
        Returns:
        the current Leg instance, allowing for method chaining
      • getFlightNumber

        public String getFlightNumber()
        The flight identifier.
        Returns:
        flightNumber The flight identifier.
      • setFlightNumber

        public void setFlightNumber​(String flightNumber)
        The flight identifier.
        Parameters:
        flightNumber - The flight identifier.
      • includeNullValues

        public Leg includeNullValues​(boolean includeNullValues)
        Configures whether null values are explicitly serialized in the JSON payload. Default is false.
      • isIncludeNullValues

        public boolean isIncludeNullValues()
        Returns whether null values are explicitly serialized in the JSON payload.
      • setIncludeNullValues

        public void setIncludeNullValues​(boolean includeNullValues)
        Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
      • equals

        public boolean equals​(Object o)
        Return true if this Leg object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getExplicitNulls

        public Map<String,​Object> getExplicitNulls()
        Returns a map of properties to be merged into the JSON payload as explicit null values.
      • fromJson

        public static Leg fromJson​(String jsonString)
                            throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of Leg given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of Leg
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to Leg
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of Leg to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException