Package ai.shipeasy.admin.model
Class CreateGateRequest
java.lang.Object
ai.shipeasy.admin.model.CreateGateRequest
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class CreateGateRequest
extends Object
Body for `POST /api/admin/gates`. At minimum supply `name`; everything else has sensible defaults.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddRulesItem(ListGatesResponseDataInnerRulesInner rulesItem) addStackItem(ListGatesResponseDataInnerStackInner stackItem) description(String description) booleanstatic CreateGateRequestCreate an instance of CreateGateRequest given an JSON stringReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.Long-form description / runbook.Master switch.Optional folder name grouping items in the dashboard.getGroup()Group label for dashboard organisation (e.g.getName()Stable gate key used by SDKs (`Shipeasy.checkGate(user, '<name>')`).Owner contact.Initial rollout in **basis points** (0–10000 = 0%–100%) — `100` here means **1%**, not 100%.Initial rollout as a **percentage** (0–100, fractional ok).getRules()Targeting predicates.getSalt()Hash salt for percentage bucketing.getStack()Optional gatekeeper stack.getTitle()Human-readable title shown in the dashboard.inthashCode()ownerEmail(String ownerEmail) putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.rolloutPct(Integer rolloutPct) rolloutPercent(BigDecimal rolloutPercent) voidsetDescription(String description) voidsetEnabled(Boolean enabled) voidvoidvoidvoidsetOwnerEmail(String ownerEmail) voidsetRolloutPct(Integer rolloutPct) voidsetRolloutPercent(BigDecimal rolloutPercent) voidvoidvoidvoidtoJson()Convert an instance of CreateGateRequest 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_NAME
- See Also:
-
SERIALIZED_NAME_ENABLED
- See Also:
-
SERIALIZED_NAME_ROLLOUT_PCT
- See Also:
-
SERIALIZED_NAME_ROLLOUT_PERCENT
- See Also:
-
SERIALIZED_NAME_RULES
- See Also:
-
SERIALIZED_NAME_SALT
- See Also:
-
SERIALIZED_NAME_STACK
- See Also:
-
SERIALIZED_NAME_TITLE
- See Also:
-
SERIALIZED_NAME_DESCRIPTION
- See Also:
-
SERIALIZED_NAME_FOLDER
- See Also:
-
SERIALIZED_NAME_GROUP
- See Also:
-
SERIALIZED_NAME_OWNER_EMAIL
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
CreateGateRequest
public CreateGateRequest()
-
-
Method Details
-
name
-
getName
Stable gate key used by SDKs (`Shipeasy.checkGate(user, '<name>')`). Single segment or `folder.name`. Lowercase letters, digits, `_` or `-`; max 128 chars. Immutable after create — rename = delete + recreate.- Returns:
- name
-
setName
-
enabled
-
getEnabled
Master switch. Defaults to `true`. Set `false` to create the gate disabled (evaluates to `false` regardless of rules/rollout); flip on via `POST /{id}/enable` or PATCH.- Returns:
- enabled
-
setEnabled
-
rolloutPct
-
getRolloutPct
Initial rollout in **basis points** (0–10000 = 0%–100%) — `100` here means **1%**, not 100%. Use `rollout_percent` (0–100) below if you'd rather think in percent. Use `0` to create the gate dark and ramp via PATCH after deploy validation. minimum: 0 maximum: 10000- Returns:
- rolloutPct
-
setRolloutPct
-
rolloutPercent
-
getRolloutPercent
Initial rollout as a **percentage** (0–100, fractional ok). Friendlier alias for `rollout_pct`; converted internally to basis points (e.g. `100` here = 10000 bp = 100%). If both `rollout_pct` and `rollout_percent` are set, `rollout_percent` wins. minimum: 0 maximum: 100- Returns:
- rolloutPercent
-
setRolloutPercent
-
rules
-
addRulesItem
-
getRules
Targeting predicates. AND-combined. If non-empty, the gate returns `true` only for callers that satisfy every rule **and** fall under `rollout_pct`.- Returns:
- rules
-
setRules
-
salt
-
getSalt
Hash salt for percentage bucketing. Auto-generated if omitted. Provide explicitly to keep a gate's buckets stable across delete/recreate. **Immutable after create** — there is no PATCH for `salt` because changing it would re-bucket every caller.- Returns:
- salt
-
setSalt
-
stack
-
addStackItem
-
getStack
Optional gatekeeper stack. When provided, takes precedence over `rules` + `rollout_pct` at evaluation time. Omit (or pass `null`) for a flat gate.- Returns:
- stack
-
setStack
-
title
-
getTitle
Human-readable title shown in the dashboard. Free-form, no key format constraint.- Returns:
- title
-
setTitle
-
description
-
getDescription
Long-form description / runbook. Markdown is rendered in the dashboard.- Returns:
- description
-
setDescription
-
folder
-
getFolder
Optional folder name grouping items in the dashboard. Alphanumeric, `_` or `-` (no `/`). Part of the SDK lookup key (`<folder>/<name>`).- Returns:
- folder
-
setFolder
-
group
-
getGroup
Group label for dashboard organisation (e.g. team or product area).- Returns:
- group
-
setGroup
-
ownerEmail
-
getOwnerEmail
Owner contact. Displayed verbatim; not used for auth.- Returns:
- ownerEmail
-
setOwnerEmail
-
putAdditionalProperty
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 CreateGateRequest instance itself
-
getAdditionalProperties
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
Return the additional (undeclared) property with the specified name.- Parameters:
key- name of the property- Returns:
- an object
-
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 CreateGateRequest
-
fromJson
Create an instance of CreateGateRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CreateGateRequest
- Throws:
IOException- if the JSON string is invalid with respect to CreateGateRequest
-
toJson
Convert an instance of CreateGateRequest to an JSON string- Returns:
- JSON string
-