Class Media

    • Constructor Detail

      • Media

        public Media()
    • Method Detail

      • getHeight

        @Nullable
        public Integer getHeight()
        The height of the media in pixels. minimum: 0
        Returns:
        height
      • setHeight

        public void setHeight​(Integer height)
      • mediaKey

        public Media mediaKey​(String mediaKey)
      • getMediaKey

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

        public void setMediaKey​(String mediaKey)
      • setType

        public void setType​(String type)
      • getWidth

        @Nullable
        public Integer getWidth()
        The width of the media in pixels. minimum: 0
        Returns:
        width
      • setWidth

        public void setWidth​(Integer width)
      • 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 Media
      • fromJson

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

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