{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/figma/json-schema/figma-variable-mode-change-schema.json",
  "title": "VariableModeChange",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/figma-variables-api-openapi.yml#/components/schemas/VariableModeChange",
  "oneOf": [
    {
      "$ref": "#/$defs/VariableModeCreate"
    },
    {
      "$ref": "#/$defs/VariableModeUpdate"
    },
    {
      "$ref": "#/$defs/VariableModeDelete"
    }
  ],
  "$defs": {
    "VariableModeCreate": {
      "type": "object",
      "description": "An object that contains details about creating a `VariableMode`.",
      "properties": {
        "action": {
          "type": "string",
          "description": "The action to perform for the variable mode.",
          "enum": [
            "CREATE"
          ]
        },
        "id": {
          "type": "string",
          "description": "A temporary id for this variable mode."
        },
        "name": {
          "type": "string",
          "description": "The name of this variable mode."
        },
        "variableCollectionId": {
          "type": "string",
          "description": "The variable collection that will contain the mode. You can use the temporary id of a variable collection. New modes cannot be created on extended collections."
        }
      },
      "required": [
        "action",
        "name",
        "variableCollectionId"
      ]
    },
    "VariableModeDelete": {
      "type": "object",
      "description": "An object that contains details about deleting a `VariableMode`.",
      "properties": {
        "action": {
          "type": "string",
          "description": "The action to perform for the variable mode.",
          "enum": [
            "DELETE"
          ]
        },
        "id": {
          "type": "string",
          "description": "The id of the variable mode to delete. Modes cannot be deleted on extended collections unless its parent mode has been deleted."
        }
      },
      "required": [
        "action",
        "id"
      ]
    },
    "VariableModeUpdate": {
      "type": "object",
      "description": "An object that contains details about updating a `VariableMode`.",
      "properties": {
        "action": {
          "type": "string",
          "description": "The action to perform for the variable mode.",
          "enum": [
            "UPDATE"
          ]
        },
        "id": {
          "type": "string",
          "description": "The id of the variable mode to update."
        },
        "name": {
          "type": "string",
          "description": "The name of this variable mode."
        },
        "variableCollectionId": {
          "type": "string",
          "description": "The variable collection that contains the mode. Modes cannot be updated on extended collections."
        }
      },
      "required": [
        "action",
        "id",
        "variableCollectionId"
      ]
    }
  }
}