{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Set Stash Entry",
  "description": "Set the value of a key in a stash. Setting a key that has a value replaces the value and every other setting of the entry.",
  "type": "object",
  "required": ["value"],
  "properties": {
    "value": {
      "type": "string",
      "title": "Value",
      "description": "The value to store. Massdriver returns it exactly as written. The size limit is 65536 bytes unless your installation sets another.",
      "examples": ["1.4.2", "{\"replicas\": 3}"]
    },
    "label": {
      "type": "string",
      "title": "Label",
      "description": "A human-readable name for the entry, shown in the Massdriver UI. Up to 255 characters. An empty label is the same as no label. The label is not encrypted and is shown even when the entry is sensitive, so do not put secrets in it.",
      "maxLength": 255,
      "examples": ["Database schema version"]
    },
    "format": {
      "type": "string",
      "x-gql-type": "stash_format",
      "title": "Format",
      "description": "TEXT stores any string. JSON requires a JSON object, and the entry's `data` field returns it parsed. Defaults to TEXT.",
      "enum": ["TEXT", "JSON"],
      "default": "TEXT"
    },
    "ttl": {
      "type": "integer",
      "title": "Time to Live",
      "description": "Seconds until the entry expires. An expired entry is not returned and is deleted soon after. At most 315360000 (10 years). Leave empty to keep the entry until you delete it.",
      "minimum": 1,
      "maximum": 315360000,
      "examples": [3600]
    },
    "immutable": {
      "type": "boolean",
      "title": "Immutable",
      "description": "When true, the key cannot be set again until the entry expires or is deleted. Setting an immutable entry fails if the key already has a value.",
      "default": false
    },
    "sensitive": {
      "type": "boolean",
      "title": "Sensitive",
      "description": "When true, the value is encrypted and is returned only to callers who can change the stash.",
      "default": false
    }
  }
}
