Package com.twitter.clientlib.model
Class ContextAnnotation
- java.lang.Object
-
- com.twitter.clientlib.model.ContextAnnotation
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class ContextAnnotation extends Object
Annotation inferred from the Tweet text.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ContextAnnotation.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_DOMAIN
static String
SERIALIZED_NAME_ENTITY
-
Constructor Summary
Constructors Constructor Description ContextAnnotation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ContextAnnotation
domain(ContextAnnotationDomainFields domain)
ContextAnnotation
entity(ContextAnnotationEntityFields entity)
boolean
equals(Object o)
static ContextAnnotation
fromJson(String jsonString)
Create an instance of ContextAnnotation given an JSON stringContextAnnotationDomainFields
getDomain()
Get domainContextAnnotationEntityFields
getEntity()
Get entityint
hashCode()
void
setDomain(ContextAnnotationDomainFields domain)
void
setEntity(ContextAnnotationEntityFields entity)
String
toJson()
Convert an instance of ContextAnnotation 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_DOMAIN
public static final String SERIALIZED_NAME_DOMAIN
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ENTITY
public static final String SERIALIZED_NAME_ENTITY
- See Also:
- Constant Field Values
-
-
Method Detail
-
domain
public ContextAnnotation domain(ContextAnnotationDomainFields domain)
-
getDomain
@Nonnull public ContextAnnotationDomainFields getDomain()
Get domain- Returns:
- domain
-
setDomain
public void setDomain(ContextAnnotationDomainFields domain)
-
entity
public ContextAnnotation entity(ContextAnnotationEntityFields entity)
-
getEntity
@Nonnull public ContextAnnotationEntityFields getEntity()
Get entity- Returns:
- entity
-
setEntity
public void setEntity(ContextAnnotationEntityFields entity)
-
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 ContextAnnotation
-
fromJson
public static ContextAnnotation fromJson(String jsonString) throws IOException
Create an instance of ContextAnnotation given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of ContextAnnotation
- Throws:
IOException
- if the JSON string is invalid with respect to ContextAnnotation
-
toJson
public String toJson()
Convert an instance of ContextAnnotation to an JSON string- Returns:
- JSON string
-
-