Class GateTemplate

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class GateTemplate extends Object
A reusable targeting-rule template. Built-ins are read-only (`builtin: true`, stable slug `id`); per-project customer templates are `builtin: false` with a `gtpl_…` id.
  • Field Details

  • Constructor Details

    • GateTemplate

      public GateTemplate()
  • Method Details

    • id

      public GateTemplate id(@Nonnull String id)
    • getId

      @Nonnull public String getId()
      Stable slug for built-ins (`country`), `gtpl_…` for customer templates.
      Returns:
      id
    • setId

      public void setId(@Nonnull String id)
    • name

      public GateTemplate name(@Nonnull String name)
    • getName

      @Nonnull public String getName()
      Human label shown in pickers (`Country is`).
      Returns:
      name
    • setName

      public void setName(@Nonnull String name)
    • description

      public GateTemplate description(@Nonnull String description)
    • getDescription

      @Nonnull public String getDescription()
      One-liner — feeds the list `query` filter.
      Returns:
      description
    • setDescription

      public void setDescription(@Nonnull String description)
    • category

      public GateTemplate category(@Nonnull GateTemplate.CategoryEnum category)
    • getCategory

      @Nonnull public GateTemplate.CategoryEnum getCategory()
      `condition` = rule-based predicate, `rollout` = percentage bucket.
      Returns:
      category
    • setCategory

      public void setCategory(@Nonnull GateTemplate.CategoryEnum category)
    • auto

      public GateTemplate auto(@Nonnull Boolean auto)
    • getAuto

      @Nonnull public Boolean getAuto()
      True when the attribute is request-derived (country/browser/…) and resolved at the SDK edge, so the caller need not pass it.
      Returns:
      auto
    • setAuto

      public void setAuto(@Nonnull Boolean auto)
    • builtin

      public GateTemplate builtin(@Nonnull Boolean builtin)
    • getBuiltin

      @Nonnull public Boolean getBuiltin()
      Read-only built-in (`true`) vs editable customer template (`false`).
      Returns:
      builtin
    • setBuiltin

      public void setBuiltin(@Nonnull Boolean builtin)
    • iconKey

      public GateTemplate iconKey(@Nullable String iconKey)
    • getIconKey

      @Nullable public String getIconKey()
      Display-only icon hint.
      Returns:
      iconKey
    • setIconKey

      public void setIconKey(@Nullable String iconKey)
    • rules

      public GateTemplate rules(@Nonnull List<GateTemplateRuleResponse> rules)
    • addRulesItem

      public GateTemplate addRulesItem(GateTemplateRuleResponse rulesItem)
    • getRules

      @Nonnull public List<GateTemplateRuleResponse> getRules()
      The rule definition — copy, substitute the value(s), pass as `rules`.
      Returns:
      rules
    • setRules

      public void setRules(@Nonnull List<GateTemplateRuleResponse> rules)
    • createdAt

      public GateTemplate createdAt(@Nullable String createdAt)
    • getCreatedAt

      @Nullable public String getCreatedAt()
      ISO-8601 creation timestamp; `null` for built-ins.
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(@Nullable String createdAt)
    • updatedAt

      public GateTemplate updatedAt(@Nullable String updatedAt)
    • getUpdatedAt

      @Nullable public String getUpdatedAt()
      ISO-8601 last-mutation timestamp; `null` for built-ins.
      Returns:
      updatedAt
    • setUpdatedAt

      public void setUpdatedAt(@Nullable String updatedAt)
    • 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 GateTemplate
    • fromJson

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

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