{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/assetlab-ca/json-schema/assetlab-ca-asset-lifecycle-event-update-schema.json",
  "title": "AssetLifecycleEventUpdate",
  "description": "Partial update. Changing `impact_method` swaps the paired value automatically\n(the other impact field is nulled). Every write re-confirms the cost\n(`cost_reviewed_on` is server-set).\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/assetlab-ca-asset-lifecycle-events-api-openapi.yml#/components/schemas/AssetLifecycleEventUpdate",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 200
    },
    "asset_type_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "asset_type_group_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "event_class": {
      "type": "string",
      "enum": [
        "preventive",
        "rehabilitation"
      ]
    },
    "trigger_condition_max": {
      "type": "integer",
      "minimum": 1,
      "maximum": 99
    },
    "trigger_condition_min": {
      "type": "integer",
      "minimum": 0,
      "maximum": 98
    },
    "impact_method": {
      "type": "string",
      "enum": [
        "add_years",
        "reset_condition"
      ]
    },
    "impact_add_years": {
      "type": [
        "number",
        "null"
      ],
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "impact_reset_to": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1,
      "maximum": 100
    },
    "fixed_cost": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "description": "Money in the organization's currency - GET /v1/organization-settings for currency_code"
    },
    "cost_source": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 200
    },
    "max_applications": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10
    },
    "min_years_between": {
      "type": "number",
      "minimum": 1,
      "maximum": 100
    },
    "sort_order": {
      "type": "integer",
      "minimum": 0
    },
    "is_active": {
      "type": "boolean"
    },
    "work_generation": {
      "type": "string",
      "enum": [
        "none",
        "work_order",
        "project"
      ],
      "default": "none"
    },
    "work_generation_category_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "work_generation_priority": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "LOW",
        "MEDIUM",
        "HIGH",
        "URGENT"
      ]
    }
  }
}