Class MentionFields


  • @Generated("org.openapitools.codegen.languages.JavaClientCodegen")
    public class MentionFields
    extends Object
    Represent the portion of text recognized as a User mention, and its start and end position within the text.
    • Constructor Detail

      • MentionFields

        public MentionFields()
    • Method Detail

      • getId

        @Nullable
        public String getId()
        Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
        Returns:
        id
      • setId

        public void setId​(String id)
      • getUsername

        @Nonnull
        public String getUsername()
        The Twitter handle (screen name) of this user.
        Returns:
        username
      • setUsername

        public void setUsername​(String username)
      • 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 MentionFields
      • fromJson

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

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