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 -
        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
      • 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 -
      • basicFareCode

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

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

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

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

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

        public void setCarrierCode​(String carrierCode)
        IATA code of the carrier operating the flight.
        Parameters:
        carrierCode -
      • 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 -
        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
      • 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 -
      • departureDate

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

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

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

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

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

        public void setFlightNumber​(String flightNumber)
        The flight identifier.
        Parameters:
        flightNumber -
      • 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
      • 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