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 class
TweetWithheld.CustomTypeAdapterFactory
static class
TweetWithheld.ScopeEnum
Indicates whether the content being withheld is the `tweet` or a `user`.
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_COPYRIGHT
static String
SERIALIZED_NAME_COUNTRY_CODES
static String
SERIALIZED_NAME_SCOPE
-
Constructor Summary
Constructors Constructor Description TweetWithheld()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TweetWithheld
addCountryCodesItem(String countryCodesItem)
TweetWithheld
copyright(Boolean copyright)
TweetWithheld
countryCodes(Set<String> countryCodes)
boolean
equals(Object o)
static TweetWithheld
fromJson(String jsonString)
Create an instance of TweetWithheld given an JSON stringBoolean
getCopyright()
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.ScopeEnum
getScope()
Indicates whether the content being withheld is the `tweet` or a `user`.int
hashCode()
TweetWithheld
scope(TweetWithheld.ScopeEnum scope)
void
setCopyright(Boolean copyright)
void
setCountryCodes(Set<String> countryCodes)
void
setScope(TweetWithheld.ScopeEnum scope)
String
toJson()
Convert an instance of TweetWithheld to an JSON stringString
toString()
static void
validateJsonObject(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 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
-
-