{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cisco-xdr/json-schema/cisco-xdr-one-click-module-wrapper-result-schema.json",
  "title": "OneClickModuleWrapperResult",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cisco-xdr-one-click-api-openapi.yml#/components/schemas/OneClickModuleWrapperResult",
  "type": "object",
  "properties": {
    "created_new_module?": {
      "type": "boolean"
    },
    "updated_module_to_one_click?": {
      "type": "boolean"
    },
    "error": {
      "type": "string",
      "enum": [
        "already_has_one_click",
        "multiple_module_instances",
        "one_click_update_not_supported",
        "unable_to_create_module",
        "one_click_not_supported_by_module"
      ]
    },
    "module_instances": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ModuleInstance"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "created_new_module?"
  ],
  "$defs": {
    "ModuleInstance": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "module_type_id": {
          "type": "string"
        },
        "org_id": {
          "type": "string"
        },
        "settings": {
          "$ref": "#/$defs/ModuleInstanceSettings"
        },
        "state": {
          "type": "string",
          "enum": [
            "restricted",
            "active"
          ]
        },
        "external_references": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ModuleInstanceExternalReference"
          }
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "parent_id": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "user_id": {
          "type": "string"
        },
        "client_id": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "global",
            "org",
            "user"
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false,
      "required": [
        "name",
        "module_type_id",
        "org_id",
        "id",
        "user_id",
        "enabled",
        "visibility",
        "created_at"
      ]
    },
    "ModuleInstanceExternalReference": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string"
        },
        "link": {
          "type": "string"
        },
        "external_id": {
          "type": "string"
        },
        "class": {
          "description": "Class to distinguish external references",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "label"
      ]
    },
    "ModuleInstanceSettings": {
      "type": "object",
      "additionalProperties": {
        "x-oneOf": [
          {
            "x-oneOf": [
              {
                "type": "string"
              },
              {
                "type": "boolean"
              },
              {
                "type": "number",
                "format": "double"
              },
              {
                "type": "string"
              }
            ]
          },
          {
            "type": "array",
            "items": {
              "x-oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "number",
                  "format": "double"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "$ref": "#/$defs/ModuleInstanceSettings"
          }
        ]
      }
    }
  }
}