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 ObjectAnnotation inferred from the tweet text.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classContextAnnotation.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_DOMAINstatic StringSERIALIZED_NAME_ENTITY
-
Constructor Summary
Constructors Constructor Description ContextAnnotation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ContextAnnotationdomain(ContextAnnotationDomainFields domain)ContextAnnotationentity(ContextAnnotationEntityFields entity)booleanequals(Object o)static ContextAnnotationfromJson(String jsonString)Create an instance of ContextAnnotation given an JSON stringContextAnnotationDomainFieldsgetDomain()Get domainContextAnnotationEntityFieldsgetEntity()Get entityinthashCode()voidsetDomain(ContextAnnotationDomainFields domain)voidsetEntity(ContextAnnotationEntityFields entity)StringtoJson()Convert an instance of ContextAnnotation 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_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 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 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
-
-