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 class
Rule.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_ID
static String
SERIALIZED_NAME_TAG
static String
SERIALIZED_NAME_VALUE
-
Constructor Summary
Constructors Constructor Description Rule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static Rule
fromJson(String jsonString)
Create an instance of Rule given an JSON stringString
getId()
Unique identifier of this rule.String
getTag()
A tag meant for the labeling of user provided rules.String
getValue()
The filterlang value of the rule.int
hashCode()
Rule
id(String id)
void
setId(String id)
void
setTag(String tag)
void
setValue(String value)
Rule
tag(String tag)
String
toJson()
Convert an instance of Rule to an JSON stringString
toString()
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
Validates the JSON Object and throws an exception if issues foundRule
value(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 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 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
-
-