Class TweetWithheld


  • @Generated("org.openapitools.codegen.languages.JavaClientCodegen")
    public class TweetWithheld
    extends Object
    Indicates withholding details for [withheld content](https://help.twitter.com/en/rules-and-policies/tweet-withheld-by-country).
    • Constructor Detail

      • TweetWithheld

        public TweetWithheld()
    • Method Detail

      • getCopyright

        @Nonnull
        public Boolean getCopyright()
        Indicates if the content is being withheld for on the basis of copyright infringement.
        Returns:
        copyright
      • setCopyright

        public void setCopyright​(Boolean copyright)
      • getCountryCodes

        @Nonnull
        public Set<String> getCountryCodes()
        Provides a list of countries where this content is not available.
        Returns:
        countryCodes
      • setCountryCodes

        public void setCountryCodes​(Set<String> countryCodes)
      • 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 TweetWithheld
      • fromJson

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

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