Class UrlEntity


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

      • UrlEntity

        public UrlEntity()
    • Method Detail

      • getEnd

        @Nonnull
        public Integer getEnd()
        Index (zero-based) at which position this entity ends. The index is exclusive. minimum: 0
        Returns:
        end
      • setEnd

        public void setEnd​(Integer end)
      • getStart

        @Nonnull
        public Integer getStart()
        Index (zero-based) at which position this entity starts. The index is inclusive. minimum: 0
        Returns:
        start
      • setStart

        public void setStart​(Integer start)
      • getDescription

        @Nullable
        public String getDescription()
        Description of the URL landing page.
        Returns:
        description
      • setDescription

        public void setDescription​(String description)
      • getDisplayUrl

        @Nullable
        public String getDisplayUrl()
        The URL as displayed in the Twitter client.
        Returns:
        displayUrl
      • setDisplayUrl

        public void setDisplayUrl​(String displayUrl)
      • expandedUrl

        public UrlEntity expandedUrl​(URL expandedUrl)
      • getExpandedUrl

        @Nullable
        public URL getExpandedUrl()
        A validly formatted URL.
        Returns:
        expandedUrl
      • setExpandedUrl

        public void setExpandedUrl​(URL expandedUrl)
      • setImages

        public void setImages​(List<UrlImage> images)
      • getMediaKey

        @Nullable
        public String getMediaKey()
        The Media Key identifier for this attachment.
        Returns:
        mediaKey
      • setMediaKey

        public void setMediaKey​(String mediaKey)
      • getStatus

        @Nullable
        public Integer getStatus()
        HTTP Status Code. minimum: 100 maximum: 599
        Returns:
        status
      • setStatus

        public void setStatus​(Integer status)
      • getTitle

        @Nullable
        public String getTitle()
        Title of the page the URL points to.
        Returns:
        title
      • setTitle

        public void setTitle​(String title)
      • unwoundUrl

        public UrlEntity unwoundUrl​(URL unwoundUrl)
      • getUnwoundUrl

        @Nullable
        public URL getUnwoundUrl()
        Fully resolved url.
        Returns:
        unwoundUrl
      • setUnwoundUrl

        public void setUnwoundUrl​(URL unwoundUrl)
      • getUrl

        @Nonnull
        public URL getUrl()
        A validly formatted URL.
        Returns:
        url
      • setUrl

        public void setUrl​(URL url)
      • 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 UrlEntity
      • fromJson

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

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