Package com.twitter.clientlib.model
Class TweetWithheld
- java.lang.Object
-
- com.twitter.clientlib.model.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).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTweetWithheld.CustomTypeAdapterFactorystatic classTweetWithheld.ScopeEnumIndicates whether the content being withheld is the `tweet` or a `user`.
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_COPYRIGHTstatic StringSERIALIZED_NAME_COUNTRY_CODESstatic StringSERIALIZED_NAME_SCOPE
-
Constructor Summary
Constructors Constructor Description TweetWithheld()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TweetWithheldaddCountryCodesItem(String countryCodesItem)TweetWithheldcopyright(Boolean copyright)TweetWithheldcountryCodes(Set<String> countryCodes)booleanequals(Object o)static TweetWithheldfromJson(String jsonString)Create an instance of TweetWithheld given an JSON stringBooleangetCopyright()Indicates if the content is being withheld for on the basis of copyright infringement.Set<String>getCountryCodes()Provides a list of countries where this content is not available.TweetWithheld.ScopeEnumgetScope()Indicates whether the content being withheld is the `tweet` or a `user`.inthashCode()TweetWithheldscope(TweetWithheld.ScopeEnum scope)voidsetCopyright(Boolean copyright)voidsetCountryCodes(Set<String> countryCodes)voidsetScope(TweetWithheld.ScopeEnum scope)StringtoJson()Convert an instance of TweetWithheld to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_COPYRIGHT
public static final String SERIALIZED_NAME_COPYRIGHT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_COUNTRY_CODES
public static final String SERIALIZED_NAME_COUNTRY_CODES
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SCOPE
public static final String SERIALIZED_NAME_SCOPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
copyright
public TweetWithheld copyright(Boolean copyright)
-
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)
-
countryCodes
public TweetWithheld countryCodes(Set<String> countryCodes)
-
addCountryCodesItem
public TweetWithheld addCountryCodesItem(String countryCodesItem)
-
getCountryCodes
@Nonnull public Set<String> getCountryCodes()
Provides a list of countries where this content is not available.- Returns:
- countryCodes
-
scope
public TweetWithheld scope(TweetWithheld.ScopeEnum scope)
-
getScope
@Nullable public TweetWithheld.ScopeEnum getScope()
Indicates whether the content being withheld is the `tweet` or a `user`.- Returns:
- scope
-
setScope
public void setScope(TweetWithheld.ScopeEnum scope)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates 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
-
-