Package com.twitter.clientlib.model
Class UserWithheld
- java.lang.Object
-
- com.twitter.clientlib.model.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).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UserWithheld.CustomTypeAdapterFactory
static class
UserWithheld.ScopeEnum
Indicates that the content being withheld is a `user`.
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_COUNTRY_CODES
static String
SERIALIZED_NAME_SCOPE
-
Constructor Summary
Constructors Constructor Description UserWithheld()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UserWithheld
addCountryCodesItem(String countryCodesItem)
UserWithheld
countryCodes(Set<String> countryCodes)
boolean
equals(Object o)
static UserWithheld
fromJson(String jsonString)
Create an instance of UserWithheld given an JSON stringSet<String>
getCountryCodes()
Provides a list of countries where this content is not available.UserWithheld.ScopeEnum
getScope()
Indicates that the content being withheld is a `user`.int
hashCode()
UserWithheld
scope(UserWithheld.ScopeEnum scope)
void
setCountryCodes(Set<String> countryCodes)
void
setScope(UserWithheld.ScopeEnum scope)
String
toJson()
Convert an instance of UserWithheld 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_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
-
countryCodes
public UserWithheld countryCodes(Set<String> countryCodes)
-
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
-
scope
public UserWithheld scope(UserWithheld.ScopeEnum scope)
-
getScope
@Nullable public UserWithheld.ScopeEnum getScope()
Indicates that the content being withheld is a `user`.- Returns:
- scope
-
setScope
public void setScope(UserWithheld.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 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
-
-