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.
  • Field Details

  • Constructor Details

    • CreateGateRequest

      public CreateGateRequest()
  • Method Details

    • name

      public CreateGateRequest name(@Nonnull String name)
    • getName

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

      public void setName(@Nonnull String name)
    • enabled

      public CreateGateRequest enabled(@Nullable Boolean enabled)
    • getEnabled

      @Nullable public Boolean 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

      public void setEnabled(@Nullable Boolean enabled)
    • rolloutPct

      public CreateGateRequest rolloutPct(@Nullable Integer rolloutPct)
    • getRolloutPct

      @Nullable public Integer 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

      public void setRolloutPct(@Nullable Integer rolloutPct)
    • rolloutPercent

      public CreateGateRequest rolloutPercent(@Nullable BigDecimal rolloutPercent)
    • getRolloutPercent

      @Nullable public BigDecimal 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

      public void setRolloutPercent(@Nullable BigDecimal rolloutPercent)
    • rules

    • addRulesItem

    • getRules

      @Nullable public List<ListGatesResponseDataInnerRulesInner> 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

      public void setRules(@Nullable List<ListGatesResponseDataInnerRulesInner> rules)
    • salt

      public CreateGateRequest salt(@Nullable String salt)
    • getSalt

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

      public void setSalt(@Nullable String salt)
    • stack

    • addStackItem

    • getStack

      @Nullable public List<ListGatesResponseDataInnerStackInner> 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

      public void setStack(@Nullable List<ListGatesResponseDataInnerStackInner> stack)
    • title

      public CreateGateRequest title(@Nullable String title)
    • getTitle

      @Nullable public String getTitle()
      Human-readable title shown in the dashboard. Free-form, no key format constraint.
      Returns:
      title
    • setTitle

      public void setTitle(@Nullable String title)
    • description

      public CreateGateRequest description(@Nullable String description)
    • getDescription

      @Nullable public String getDescription()
      Long-form description / runbook. Markdown is rendered in the dashboard.
      Returns:
      description
    • setDescription

      public void setDescription(@Nullable String description)
    • folder

      public CreateGateRequest folder(@Nullable String folder)
    • getFolder

      @Nullable public String getFolder()
      Optional folder name grouping items in the dashboard. Alphanumeric, `_` or `-` (no `/`). Part of the SDK lookup key (`<folder>/<name>`).
      Returns:
      folder
    • setFolder

      public void setFolder(@Nullable String folder)
    • group

      public CreateGateRequest group(@Nullable String group)
    • getGroup

      @Nullable public String getGroup()
      Group label for dashboard organisation (e.g. team or product area).
      Returns:
      group
    • setGroup

      public void setGroup(@Nullable String group)
    • ownerEmail

      public CreateGateRequest ownerEmail(@Nullable String ownerEmail)
    • getOwnerEmail

      @Nullable public String getOwnerEmail()
      Owner contact. Displayed verbatim; not used for auth.
      Returns:
      ownerEmail
    • setOwnerEmail

      public void setOwnerEmail(@Nullable String ownerEmail)
    • putAdditionalProperty

      public CreateGateRequest putAdditionalProperty(String key, Object value)
      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 property
      value - value of the property
      Returns:
      the CreateGateRequest instance itself
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Return the additional (undeclared) property.
      Returns:
      a map of objects
    • getAdditionalProperty

      public Object getAdditionalProperty(String key)
      Return the additional (undeclared) property with the specified name.
      Parameters:
      key - name of the property
      Returns:
      an object
    • 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 CreateGateRequest
    • fromJson

      public static CreateGateRequest fromJson(String jsonString) throws IOException
      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

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