Package com.launchdarkly.api.model
Class Rule
- java.lang.Object
-
- com.launchdarkly.api.model.Rule
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2026-03-05T10:45:26.516033Z[Etc/UTC]", comments="Generator version: 7.18.0") public class Rule extends java.lang.ObjectRule
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRule.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_CLAUSESstatic java.lang.StringSERIALIZED_NAME_DESCRIPTIONstatic java.lang.StringSERIALIZED_NAME_DISABLEDstatic java.lang.StringSERIALIZED_NAME_IDstatic java.lang.StringSERIALIZED_NAME_REFstatic java.lang.StringSERIALIZED_NAME_ROLLOUTstatic java.lang.StringSERIALIZED_NAME_TRACK_EVENTSstatic java.lang.StringSERIALIZED_NAME_VARIATION
-
Constructor Summary
Constructors Constructor Description Rule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RuleaddClausesItem(Clause clausesItem)Ruleclauses(java.util.List<Clause> clauses)Ruledescription(java.lang.String description)Ruledisabled(java.lang.Boolean disabled)booleanequals(java.lang.Object o)static RulefromJson(java.lang.String jsonString)Create an instance of Rule 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<Clause>getClauses()An array of clauses used for individual targeting based on attributesjava.lang.StringgetDescription()The rule descriptionjava.lang.BooleangetDisabled()Whether the rule is disabledjava.lang.StringgetId()The flag rule IDjava.lang.StringgetRef()Get refRolloutgetRollout()Get rolloutjava.lang.BooleangetTrackEvents()Whether LaunchDarkly tracks events for this rulejava.lang.IntegergetVariation()The index of the variation, from the array of variations for this flaginthashCode()Ruleid(java.lang.String id)RuleputAdditionalProperty(java.lang.String key, java.lang.Object value)Set the additional (undeclared) property with the specified name and value.Ruleref(java.lang.String ref)Rulerollout(Rollout rollout)voidsetClauses(java.util.List<Clause> clauses)voidsetDescription(java.lang.String description)voidsetDisabled(java.lang.Boolean disabled)voidsetId(java.lang.String id)voidsetRef(java.lang.String ref)voidsetRollout(Rollout rollout)voidsetTrackEvents(java.lang.Boolean trackEvents)voidsetVariation(java.lang.Integer variation)java.lang.StringtoJson()Convert an instance of Rule to an JSON stringjava.lang.StringtoString()RuletrackEvents(java.lang.Boolean trackEvents)static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement)Validates the JSON Element and throws an exception if issues foundRulevariation(java.lang.Integer variation)
-
-
-
Field Detail
-
SERIALIZED_NAME_ID
public static final java.lang.String SERIALIZED_NAME_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DISABLED
public static final java.lang.String SERIALIZED_NAME_DISABLED
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_VARIATION
public static final java.lang.String SERIALIZED_NAME_VARIATION
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ROLLOUT
public static final java.lang.String SERIALIZED_NAME_ROLLOUT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CLAUSES
public static final java.lang.String SERIALIZED_NAME_CLAUSES
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TRACK_EVENTS
public static final java.lang.String SERIALIZED_NAME_TRACK_EVENTS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DESCRIPTION
public static final java.lang.String SERIALIZED_NAME_DESCRIPTION
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_REF
public static final java.lang.String SERIALIZED_NAME_REF
- 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
-
id
public Rule id(@Nullable java.lang.String id)
-
getId
@Nullable public java.lang.String getId()
The flag rule ID- Returns:
- id
-
setId
public void setId(@Nullable java.lang.String id)
-
disabled
public Rule disabled(@Nullable java.lang.Boolean disabled)
-
getDisabled
@Nullable public java.lang.Boolean getDisabled()
Whether the rule is disabled- Returns:
- disabled
-
setDisabled
public void setDisabled(@Nullable java.lang.Boolean disabled)
-
variation
public Rule variation(@Nullable java.lang.Integer variation)
-
getVariation
@Nullable public java.lang.Integer getVariation()
The index of the variation, from the array of variations for this flag- Returns:
- variation
-
setVariation
public void setVariation(@Nullable java.lang.Integer variation)
-
getRollout
@Nullable public Rollout getRollout()
Get rollout- Returns:
- rollout
-
setRollout
public void setRollout(@Nullable Rollout rollout)
-
getClauses
@Nonnull public java.util.List<Clause> getClauses()
An array of clauses used for individual targeting based on attributes- Returns:
- clauses
-
setClauses
public void setClauses(@Nonnull java.util.List<Clause> clauses)
-
trackEvents
public Rule trackEvents(@Nonnull java.lang.Boolean trackEvents)
-
getTrackEvents
@Nonnull public java.lang.Boolean getTrackEvents()
Whether LaunchDarkly tracks events for this rule- Returns:
- trackEvents
-
setTrackEvents
public void setTrackEvents(@Nonnull java.lang.Boolean trackEvents)
-
description
public Rule description(@Nullable java.lang.String description)
-
getDescription
@Nullable public java.lang.String getDescription()
The rule description- Returns:
- description
-
setDescription
public void setDescription(@Nullable java.lang.String description)
-
ref
public Rule ref(@Nullable java.lang.String ref)
-
getRef
@Nullable public java.lang.String getRef()
Get ref- Returns:
- ref
-
setRef
public void setRef(@Nullable java.lang.String ref)
-
putAdditionalProperty
public Rule 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 Rule 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 Rule
-
fromJson
public static Rule fromJson(java.lang.String jsonString) throws java.io.IOException
Create an instance of Rule given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Rule
- Throws:
java.io.IOException- if the JSON string is invalid with respect to Rule
-
toJson
public java.lang.String toJson()
Convert an instance of Rule to an JSON string- Returns:
- JSON string
-
-