Class Phone


  • public class Phone
    extends Object
    Phone
    • Constructor Detail

      • Phone

        public Phone()
    • Method Detail

      • getCc

        public String getCc()
        Country code. Length: 1–3 characters.
        Returns:
        cc
      • setCc

        public void setCc​(String cc)
      • subscriber

        public Phone subscriber​(String subscriber)
      • getSubscriber

        public String getSubscriber()
        Subscriber number. Maximum length: 15 characters.
        Returns:
        subscriber
      • setSubscriber

        public void setSubscriber​(String subscriber)
      • hashCode

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

        public static void validateJsonObject​(com.google.gson.JsonObject jsonObj)
                                       throws IOException
        Validates the JSON Object and throws an exception if issues found
        Parameters:
        jsonObj - JSON Object
        Throws:
        IOException - if the JSON Object is invalid with respect to Phone
      • fromJson

        public static Phone fromJson​(String jsonString)
                              throws IOException
        Create an instance of Phone given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of Phone
        Throws:
        IOException - if the JSON string is invalid with respect to Phone
      • toJson

        public String toJson()
        Convert an instance of Phone to an JSON string
        Returns:
        JSON string