Class CreateConfigRequest

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class CreateConfigRequest extends Object
Body for `POST /api/admin/configs`. `name` + `schema` required.
  • Field Details

  • Constructor Details

    • CreateConfigRequest

      public CreateConfigRequest()
  • Method Details

    • name

      public CreateConfigRequest name(@Nonnull String name)
    • getName

      @Nonnull public String getName()
      Stable config/killswitch key in `folder.name` form (two lowercase segments separated by a dot, e.g. `pricing.tiers`). Immutable after create.
      Returns:
      name
    • setName

      public void setName(@Nonnull String name)
    • description

      public CreateConfigRequest description(@Nullable String description)
    • getDescription

      @Nullable public String getDescription()
      Optional free-form description shown in the dashboard. Max 512 chars.
      Returns:
      description
    • setDescription

      public void setDescription(@Nullable String description)
    • folder

      public CreateConfigRequest 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)
    • schema

      public CreateConfigRequest schema(@Nonnull Map<String,Object> schema)
    • putSchemaItem

      public CreateConfigRequest putSchemaItem(String key, Object schemaItem)
    • getSchema

      @Nonnull public Map<String,Object> getSchema()
      JSON Schema (draft 2020-12) describing the shape of the config value. Top-level `type` must be `'object'`; every published value is validated against this schema.
      Returns:
      schema
    • setSchema

      public void setSchema(@Nonnull Map<String,Object> schema)
    • value

      public CreateConfigRequest 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 CreateConfigRequest
    • fromJson

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

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