Class UserWithheld


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

      • UserWithheld

        public UserWithheld()
    • Method Detail

      • addCountryCodesItem

        public UserWithheld addCountryCodesItem​(String countryCodesItem)
      • 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 UserWithheld
      • fromJson

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

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