Package ai.shipeasy.admin.model
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum`condition` = rule-based predicate, `rollout` = percentage bucket.static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddRulesItem(GateTemplateRuleResponse rulesItem) category(GateTemplate.CategoryEnum category) description(String description) booleanstatic GateTemplateCreate an instance of GateTemplate given an JSON stringgetAuto()True when the attribute is request-derived (country/browser/…) and resolved at the SDK edge, so the caller need not pass it.Read-only built-in (`true`) vs editable customer template (`false`).`condition` = rule-based predicate, `rollout` = percentage bucket.ISO-8601 creation timestamp; `null` for built-ins.One-liner — feeds the list `query` filter.Display-only icon hint.getId()Stable slug for built-ins (`country`), `gtpl_…` for customer templates.getName()Human label shown in pickers (`Country is`).getRules()The rule definition — copy, substitute the value(s), pass as `rules`.ISO-8601 last-mutation timestamp; `null` for built-ins.inthashCode()rules(List<GateTemplateRuleResponse> rules) voidvoidsetBuiltin(Boolean builtin) voidsetCategory(GateTemplate.CategoryEnum category) voidsetCreatedAt(String createdAt) voidsetDescription(String description) voidsetIconKey(String iconKey) voidvoidvoidsetRules(List<GateTemplateRuleResponse> rules) voidsetUpdatedAt(String updatedAt) toJson()Convert an instance of GateTemplate to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_DESCRIPTION
- See Also:
-
SERIALIZED_NAME_CATEGORY
- See Also:
-
SERIALIZED_NAME_AUTO
- See Also:
-
SERIALIZED_NAME_BUILTIN
- See Also:
-
SERIALIZED_NAME_ICON_KEY
- See Also:
-
SERIALIZED_NAME_RULES
- See Also:
-
SERIALIZED_NAME_CREATED_AT
- See Also:
-
SERIALIZED_NAME_UPDATED_AT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
GateTemplate
public GateTemplate()
-
-
Method Details
-
id
-
getId
Stable slug for built-ins (`country`), `gtpl_…` for customer templates.- Returns:
- id
-
setId
-
name
-
getName
Human label shown in pickers (`Country is`).- Returns:
- name
-
setName
-
description
-
getDescription
One-liner — feeds the list `query` filter.- Returns:
- description
-
setDescription
-
category
-
getCategory
`condition` = rule-based predicate, `rollout` = percentage bucket.- Returns:
- category
-
setCategory
-
auto
-
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
-
builtin
-
getBuiltin
Read-only built-in (`true`) vs editable customer template (`false`).- Returns:
- builtin
-
setBuiltin
-
iconKey
-
getIconKey
Display-only icon hint.- Returns:
- iconKey
-
setIconKey
-
rules
-
addRulesItem
-
getRules
The rule definition — copy, substitute the value(s), pass as `rules`.- Returns:
- rules
-
setRules
-
createdAt
-
getCreatedAt
ISO-8601 creation timestamp; `null` for built-ins.- Returns:
- createdAt
-
setCreatedAt
-
updatedAt
-
getUpdatedAt
ISO-8601 last-mutation timestamp; `null` for built-ins.- Returns:
- updatedAt
-
setUpdatedAt
-
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 GateTemplate
-
fromJson
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
Convert an instance of GateTemplate to an JSON string- Returns:
- JSON string
-