Class GateTemplateRuleResponse

java.lang.Object
ai.shipeasy.admin.model.GateTemplateRuleResponse

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class GateTemplateRuleResponse extends Object
Single targeting predicate as returned by the API. `value` is optional here — read-only built-in templates (e.g. `@owner`, or presets whose operand is supplied at substitution time) legitimately omit it. Request bodies still require `value`.
  • Field Details

  • Constructor Details

    • GateTemplateRuleResponse

      public GateTemplateRuleResponse()
  • Method Details

    • attr

      public GateTemplateRuleResponse attr(@Nonnull String attr)
    • getAttr

      @Nonnull public String 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

      public void setAttr(@Nonnull String attr)
    • op

    • getOp

      @Nonnull public GateTemplateRuleResponse.OpEnum 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

      public void setOp(@Nonnull GateTemplateRuleResponse.OpEnum op)
    • value

      public GateTemplateRuleResponse value(@Nullable Object value)
    • getValue

      @Nullable public Object getValue()
      Get value
      Returns:
      value
    • setValue

      public void setValue(@Nullable Object value)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      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 GateTemplateRuleResponse
    • fromJson

      public static GateTemplateRuleResponse fromJson(String jsonString) throws IOException
      Create an instance of GateTemplateRuleResponse given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of GateTemplateRuleResponse
      Throws:
      IOException - if the JSON string is invalid with respect to GateTemplateRuleResponse
    • toJson

      public String toJson()
      Convert an instance of GateTemplateRuleResponse to an JSON string
      Returns:
      JSON string