Package ai.shipeasy.admin.model
Class GateTemplateRule
java.lang.Object
ai.shipeasy.admin.model.GateTemplateRule
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class GateTemplateRule
extends Object
Single targeting predicate. Copy a template's rules, substitute the concrete `value`(s), and pass them as the `rules` arg of `release_flags_create`.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumComparison operator. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic GateTemplateRuleCreate an instance of GateTemplateRule given an JSON stringgetAttr()Attribute key on the evaluation context (e.g.getOp()Comparison operator.getValue()Get valueinthashCode()voidvoidvoidsetValue(GateTemplateRuleValue value) toJson()Convert an instance of GateTemplateRule to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues foundvalue(GateTemplateRuleValue value)
-
Field Details
-
SERIALIZED_NAME_ATTR
- See Also:
-
SERIALIZED_NAME_OP
- See Also:
-
SERIALIZED_NAME_VALUE
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
GateTemplateRule
public GateTemplateRule()
-
-
Method Details
-
attr
-
getAttr
Attribute key on the evaluation context (e.g. `country`, `plan`, `email`). Matched case-sensitively against `Shipeasy.checkGate(user, name)` input. May be empty on a built-in template whose attribute is supplied at substitution time (e.g. the `exp_in` \"in any experiment\" preset — you fill in the experiment name).- Returns:
- attr
-
setAttr
-
op
-
getOp
Comparison operator. Equality: `eq`/`neq`. Set membership: `in`/`not_in` (value is an array). Numeric order: `gt`/`gte`/`lt`/`lte`. Semver order: `semver_gt`/`semver_gte`/`semver_lt`/`semver_lte`. String: `contains` (substring), `regex` (JS-flavour pattern). Cross-resource: `gate_pass` (value is another gate's name), `exp_in` (attr is an experiment name, value is a variant / `\"$holdout\"` / `\"$any\"`).- Returns:
- op
-
setOp
-
value
-
getValue
Get value- Returns:
- value
-
setValue
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to GateTemplateRule
-
fromJson
Create an instance of GateTemplateRule given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of GateTemplateRule
- Throws:
IOException- if the JSON string is invalid with respect to GateTemplateRule
-
toJson
Convert an instance of GateTemplateRule to an JSON string- Returns:
- JSON string
-