Package com.twitter.clientlib.model
Class Rule
- java.lang.Object
-
- com.twitter.clientlib.model.Rule
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class Rule extends Object
A user-provided stream filtering rule.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRule.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_IDstatic StringSERIALIZED_NAME_TAGstatic StringSERIALIZED_NAME_VALUE
-
Constructor Summary
Constructors Constructor Description Rule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static RulefromJson(String jsonString)Create an instance of Rule given an JSON stringStringgetId()Unique identifier of this rule.StringgetTag()A tag meant for the labeling of user provided rules.StringgetValue()The filterlang value of the rule.inthashCode()Ruleid(String id)voidsetId(String id)voidsetTag(String tag)voidsetValue(String value)Ruletag(String tag)StringtoJson()Convert an instance of Rule to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues foundRulevalue(String value)
-
-
-
Field Detail
-
SERIALIZED_NAME_ID
public static final String SERIALIZED_NAME_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TAG
public static final String SERIALIZED_NAME_TAG
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_VALUE
public static final String SERIALIZED_NAME_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setId
public void setId(String id)
-
getTag
@Nullable public String getTag()
A tag meant for the labeling of user provided rules.- Returns:
- tag
-
setTag
public void setTag(String tag)
-
setValue
public void setValue(String value)
-
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 Rule
-
fromJson
public static Rule fromJson(String jsonString) throws IOException
Create an instance of Rule given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Rule
- Throws:
IOException- if the JSON string is invalid with respect to Rule
-
toJson
public String toJson()
Convert an instance of Rule to an JSON string- Returns:
- JSON string
-
-