Class TargetingRuleModel
- java.lang.Object
-
- com.configcat.publicapi.java.client.model.TargetingRuleModel
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments="Generator version: 7.7.0") public class TargetingRuleModel extends java.lang.ObjectTargetingRuleModel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTargetingRuleModel.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static java.util.HashSet<java.lang.String>openapiFieldsstatic java.util.HashSet<java.lang.String>openapiRequiredFieldsstatic java.lang.StringSERIALIZED_NAME_CONDITIONSstatic java.lang.StringSERIALIZED_NAME_PERCENTAGE_OPTIONSstatic java.lang.StringSERIALIZED_NAME_VALUE
-
Constructor Summary
Constructors Constructor Description TargetingRuleModel()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TargetingRuleModeladdConditionsItem(ConditionModel conditionsItem)TargetingRuleModeladdPercentageOptionsItem(PercentageOptionModel percentageOptionsItem)TargetingRuleModelconditions(java.util.List<ConditionModel> conditions)booleanequals(java.lang.Object o)static TargetingRuleModelfromJson(java.lang.String jsonString)Create an instance of TargetingRuleModel given an JSON stringjava.util.Map<java.lang.String,java.lang.Object>getAdditionalProperties()Return the additional (undeclared) property.java.lang.ObjectgetAdditionalProperty(java.lang.String key)Return the additional (undeclared) property with the specified name.java.util.List<ConditionModel>getConditions()The list of conditions that are combined with logical AND operators.java.util.List<PercentageOptionModel>getPercentageOptions()The percentage options from where the evaluation process will choose a value based on the flag's percentage evaluation attribute.ValueModelgetValue()Get valueinthashCode()TargetingRuleModelpercentageOptions(java.util.List<PercentageOptionModel> percentageOptions)TargetingRuleModelputAdditionalProperty(java.lang.String key, java.lang.Object value)Set the additional (undeclared) property with the specified name and value.voidsetConditions(java.util.List<ConditionModel> conditions)voidsetPercentageOptions(java.util.List<PercentageOptionModel> percentageOptions)voidsetValue(ValueModel value)java.lang.StringtoJson()Convert an instance of TargetingRuleModel to an JSON stringjava.lang.StringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement)Validates the JSON Element and throws an exception if issues foundTargetingRuleModelvalue(ValueModel value)
-
-
-
Field Detail
-
SERIALIZED_NAME_CONDITIONS
public static final java.lang.String SERIALIZED_NAME_CONDITIONS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PERCENTAGE_OPTIONS
public static final java.lang.String SERIALIZED_NAME_PERCENTAGE_OPTIONS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_VALUE
public static final java.lang.String SERIALIZED_NAME_VALUE
- See Also:
- Constant Field Values
-
openapiFields
public static java.util.HashSet<java.lang.String> openapiFields
-
openapiRequiredFields
public static java.util.HashSet<java.lang.String> openapiRequiredFields
-
-
Method Detail
-
conditions
public TargetingRuleModel conditions(java.util.List<ConditionModel> conditions)
-
addConditionsItem
public TargetingRuleModel addConditionsItem(ConditionModel conditionsItem)
-
getConditions
@Nonnull public java.util.List<ConditionModel> getConditions()
The list of conditions that are combined with logical AND operators. It can be one of the following: - User condition - Segment condition - Prerequisite flag condition- Returns:
- conditions
-
setConditions
public void setConditions(java.util.List<ConditionModel> conditions)
-
percentageOptions
public TargetingRuleModel percentageOptions(java.util.List<PercentageOptionModel> percentageOptions)
-
addPercentageOptionsItem
public TargetingRuleModel addPercentageOptionsItem(PercentageOptionModel percentageOptionsItem)
-
getPercentageOptions
@Nonnull public java.util.List<PercentageOptionModel> getPercentageOptions()
The percentage options from where the evaluation process will choose a value based on the flag's percentage evaluation attribute.- Returns:
- percentageOptions
-
setPercentageOptions
public void setPercentageOptions(java.util.List<PercentageOptionModel> percentageOptions)
-
value
public TargetingRuleModel value(ValueModel value)
-
getValue
@Nullable public ValueModel getValue()
Get value- Returns:
- value
-
setValue
public void setValue(ValueModel value)
-
putAdditionalProperty
public TargetingRuleModel putAdditionalProperty(java.lang.String key, java.lang.Object value)
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.- Parameters:
key- name of the propertyvalue- value of the property- Returns:
- the TargetingRuleModel instance itself
-
getAdditionalProperties
public java.util.Map<java.lang.String,java.lang.Object> getAdditionalProperties()
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
public java.lang.Object getAdditionalProperty(java.lang.String key)
Return the additional (undeclared) property with the specified name.- Parameters:
key- name of the property- Returns:
- an object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
validateJsonElement
public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws java.io.IOExceptionValidates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
java.io.IOException- if the JSON Element is invalid with respect to TargetingRuleModel
-
fromJson
public static TargetingRuleModel fromJson(java.lang.String jsonString) throws java.io.IOException
Create an instance of TargetingRuleModel given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of TargetingRuleModel
- Throws:
java.io.IOException- if the JSON string is invalid with respect to TargetingRuleModel
-
toJson
public java.lang.String toJson()
Convert an instance of TargetingRuleModel to an JSON string- Returns:
- JSON string
-
-