{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/assetlab-ca/json-schema/assetlab-ca-asset-replacement-plan-create-schema.json",
  "title": "AssetReplacementPlanCreate",
  "description": "Exactly one of asset_id or infrastructure_asset_id must be provided.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/assetlab-ca-asset-replacement-plans-api-openapi.yml#/components/schemas/AssetReplacementPlanCreate",
  "type": "object",
  "properties": {
    "asset_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Required unless infrastructure_asset_id is set"
    },
    "infrastructure_asset_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Infrastructure feature target (mutually exclusive with asset_id)"
    },
    "planned_replacement_year": {
      "type": [
        "integer",
        "null"
      ]
    },
    "planned_replacement_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "estimated_cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "Money in the organization's currency - GET /v1/organization-settings for currency_code"
    },
    "funding_source": {
      "type": [
        "string",
        "null"
      ]
    },
    "priority": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "CRITICAL",
        "HIGH",
        "MEDIUM",
        "LOW"
      ]
    },
    "status": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "PLANNED",
        "BUDGETED",
        "APPROVED",
        "COMPLETED",
        "CANCELLED"
      ]
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}