Class TravelAgency


  • public class TravelAgency
    extends Object
    TravelAgency
    • Constructor Summary

      Constructors 
      Constructor Description
      TravelAgency()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      TravelAgency code​(String code)
      The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not start with a space or be all spaces. * Must not be all zeros.
      boolean equals​(Object o)
      Return true if this TravelAgency object is equal to o.
      static TravelAgency fromJson​(String jsonString)
      Create an instance of TravelAgency given an JSON string
      String getCode()
      The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not start with a space or be all spaces. * Must not be all zeros.
      String getName()
      The name of the travel agency
      int hashCode()  
      TravelAgency name​(String name)
      The name of the travel agency
      void setCode​(String code)
      The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not start with a space or be all spaces. * Must not be all zeros.
      void setName​(String name)
      The name of the travel agency
      String toJson()
      Convert an instance of TravelAgency to an JSON string
      String toString()  
    • Constructor Detail

      • TravelAgency

        public TravelAgency()
    • Method Detail

      • code

        public TravelAgency code​(String code)
        The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not start with a space or be all spaces. * Must not be all zeros.
        Parameters:
        code - The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not start with a space or be all spaces. * Must not be all zeros.
        Returns:
        the current TravelAgency instance, allowing for method chaining
      • getCode

        public String getCode()
        The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not start with a space or be all spaces. * Must not be all zeros.
        Returns:
        code The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not start with a space or be all spaces. * Must not be all zeros.
      • setCode

        public void setCode​(String code)
        The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not start with a space or be all spaces. * Must not be all zeros.
        Parameters:
        code - The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not start with a space or be all spaces. * Must not be all zeros.
      • name

        public TravelAgency name​(String name)
        The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not start with a space or be all spaces. * Must not be all zeros.
        Parameters:
        name - The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not start with a space or be all spaces. * Must not be all zeros.
        Returns:
        the current TravelAgency instance, allowing for method chaining
      • getName

        public String getName()
        The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not start with a space or be all spaces. * Must not be all zeros.
        Returns:
        name The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not start with a space or be all spaces. * Must not be all zeros.
      • setName

        public void setName​(String name)
        The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not start with a space or be all spaces. * Must not be all zeros.
        Parameters:
        name - The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not start with a space or be all spaces. * Must not be all zeros.
      • equals

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

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

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

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