{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openssom.org/schema/common.json",
  "title": "SSOM Common Types",
  "type": "object",
  "$defs": {
    "assetForm": {
      "type": "string",
      "enum": [
        "system",
        "unit",
        "machine",
        "assembly",
        "component",
        "instrument",
        "controller",
        "software",
        "logical_asset"
      ]
    },
    "operationalBoundaryKind": {
      "type": "string",
      "enum": [
        "system",
        "subsystem",
        "functional_system",
        "process_segment",
        "production_unit",
        "control_entity"
      ]
    },
    "coreEntityKind": {
      "type": "string",
      "enum": [
        "asset_instance",
        "equipment_asset",
        "device_asset",
        "component_asset",
        "assembly_asset",
        "instrument_asset",
        "controller_asset",
        "logical_asset_instance",
        "asset_class",
        "equipment_model",
        "system",
        "subsystem",
        "functional_system",
        "functional_location",
        "process_segment",
        "production_unit",
        "control_entity",
        "condition",
        "failure_mode",
        "work_execution"
      ]
    },
    "coreRelationshipTerm": {
      "type": "string",
      "enum": [
        "contains",
        "is_contained_in",
        "has_part",
        "is_part_of",
        "part_of",
        "is_installed_in",
        "is_installed_on",
        "hosts",
        "is_hosted_on",
        "is_connected_to",
        "communicates_with",
        "controls",
        "is_controlled_by",
        "measures",
        "is_measured_by",
        "monitors",
        "is_monitored_by",
        "actuates",
        "is_actuated_by",
        "protects",
        "is_protected_by",
        "drives",
        "is_driven_by",
        "powers",
        "powered_by",
        "is_powered_by",
        "feeds",
        "is_fed_by",
        "is_upstream_of",
        "is_downstream_of",
        "supports",
        "is_supported_by",
        "has_failure_mode",
        "is_failure_mode_of",
        "has_condition",
        "is_condition_of",
        "is_affected_by_work",
        "affects",
        "replaces",
        "replaced_by",
        "is_replaced_by",
        "succeeds",
        "preceded_by",
        "is_preceded_by",
        "split_into",
        "merged_from",
        "decommissioned_as",
        "recommissioned_as"
      ]
    },
    "extensionRelationshipCode": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)*:[a-z0-9]+(?:[._-][a-z0-9]+)*$"
    },
    "relationshipDirection": {
      "type": "string",
      "enum": [
        "directed",
        "undirected",
        "bidirectional"
      ]
    },
    "relationshipMapping": {
      "type": "object",
      "required": [
        "source_relationship_type",
        "mapping_status"
      ],
      "properties": {
        "source_relationship_type": {
          "type": "string"
        },
        "mapping_status": {
          "type": "string",
          "enum": [
            "core_exact",
            "core_alias",
            "source_preserved_unmapped",
            "source_preserved_mapped",
            "candidate_core_extension"
          ]
        },
        "normalized_relationship_type": {
          "type": "string"
        },
        "extension_namespace": {
          "type": "string"
        },
        "steward": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "relationshipRegistryEntry": {
      "type": "object",
      "required": [
        "canonical_code",
        "label",
        "inverse_code",
        "relationship_family",
        "permitted_subject_types",
        "permitted_object_types",
        "direction",
        "cardinality_guidance",
        "temporal_validity",
        "profile_applicability"
      ],
      "properties": {
        "canonical_code": {
          "$ref": "common.json#/$defs/coreRelationshipTerm"
        },
        "label": {
          "type": "string"
        },
        "inverse_code": {
          "$ref": "common.json#/$defs/coreRelationshipTerm"
        },
        "relationship_family": {
          "type": "string"
        },
        "permitted_subject_types": {
          "type": "array",
          "items": {
            "$ref": "common.json#/$defs/coreEntityKind"
          },
          "minItems": 1,
          "uniqueItems": true
        },
        "permitted_object_types": {
          "type": "array",
          "items": {
            "$ref": "common.json#/$defs/coreEntityKind"
          },
          "minItems": 1,
          "uniqueItems": true
        },
        "direction": {
          "$ref": "common.json#/$defs/relationshipDirection"
        },
        "cardinality_guidance": {
          "type": "string"
        },
        "temporal_validity": {
          "type": "string"
        },
        "profile_applicability": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "uniqueItems": true
        },
        "aliases": {
          "type": "array",
          "items": {
            "$ref": "common.json#/$defs/coreRelationshipTerm"
          },
          "uniqueItems": true
        },
        "deprecated": {
          "type": "boolean"
        },
        "deprecation_note": {
          "type": "string"
        },
        "allow_self_reference": {
          "type": "boolean"
        }
      },
      "additionalProperties": true
    },
    "equipmentRole": {
      "type": "string",
      "enum": [
        "process_equipment",
        "utility_equipment",
        "material_handling_equipment",
        "facility_equipment",
        "production_equipment"
      ]
    },
    "deviceRole": {
      "type": "string",
      "enum": [
        "sensing_device",
        "measurement_device",
        "actuation_device",
        "control_device",
        "protection_device",
        "communication_device",
        "compute_device"
      ]
    },
    "lifecycleRole": {
      "type": "string",
      "enum": [
        "serialized_asset",
        "maintainable_asset",
        "replaceable_unit",
        "monitored_asset",
        "critical_asset",
        "cyber_managed_asset",
        "safety_related_asset"
      ]
    },
    "identifierRole": {
      "type": "string",
      "enum": [
        "canonical_ssom_id",
        "manufacturer_serial_number",
        "manufacturer_model_identifier",
        "engineering_tag",
        "asset_tag",
        "functional_location_reference",
        "eam_equipment_id",
        "cmdb_ci_id",
        "historian_tag",
        "opc_ua_node_id",
        "opc_ua_namespace_uri",
        "scada_object_id",
        "bms_object_id",
        "oem_cloud_id",
        "network_identity",
        "finance_asset_id",
        "maintenance_vendor_id",
        "digital_twin_id"
      ]
    },
    "identifierSemanticUsage": {
      "type": "string",
      "enum": [
        "external_identity",
        "alias",
        "contextual_reference"
      ]
    },
    "identifierVerificationStatus": {
      "type": "string",
      "enum": [
        "observed",
        "verified",
        "unverified",
        "disputed",
        "superseded"
      ]
    },
    "identifierScope": {
      "type": "object",
      "required": [
        "scope_type",
        "scope_value"
      ],
      "properties": {
        "scope_type": {
          "type": "string",
          "enum": [
            "enterprise",
            "site",
            "area",
            "source_system",
            "namespace",
            "oem_tenant",
            "functional_location",
            "network_domain",
            "custom"
          ]
        },
        "scope_value": {
          "type": "string"
        },
        "scope_path": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "identifierAuthority": {
      "type": "object",
      "required": [
        "authority_id"
      ],
      "properties": {
        "authority_id": {
          "type": "string"
        },
        "authority_type": {
          "type": "string",
          "enum": [
            "source_system",
            "organization",
            "vendor",
            "namespace",
            "registry",
            "custom"
          ]
        },
        "display_name": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "identifierAssignment": {
      "type": "object",
      "required": [
        "assignment_id",
        "identifier_value",
        "identifier_role",
        "semantic_usage",
        "identifier_scope",
        "identifier_authority",
        "verification_status",
        "confidence",
        "provenance"
      ],
      "properties": {
        "assignment_id": {
          "type": "string"
        },
        "identifier_value": {
          "type": "string"
        },
        "identifier_role": {
          "$ref": "common.json#/$defs/identifierRole"
        },
        "semantic_usage": {
          "$ref": "common.json#/$defs/identifierSemanticUsage"
        },
        "identifier_scope": {
          "$ref": "common.json#/$defs/identifierScope"
        },
        "identifier_authority": {
          "$ref": "common.json#/$defs/identifierAuthority"
        },
        "verification_status": {
          "$ref": "common.json#/$defs/identifierVerificationStatus"
        },
        "assigned_by": {
          "type": "string"
        },
        "valid_from": {
          "type": "string",
          "format": "date-time"
        },
        "valid_to": {
          "type": "string",
          "format": "date-time"
        },
        "confidence": {
          "$ref": "common.json#/$defs/confidenceScore"
        },
        "source_assertion_ref": {
          "type": "string"
        },
        "provenance": {
          "$ref": "common.json#/$defs/provenance"
        },
        "extensions": {
          "type": "object",
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    },
    "identityLifecycleEventType": {
      "type": "string",
      "enum": [
        "commissioning",
        "decommissioning",
        "replacement",
        "recommissioning",
        "relocation",
        "tag_reassignment",
        "merge",
        "split",
        "source_system_migration"
      ]
    },
    "assetSuccessionType": {
      "type": "string",
      "enum": [
        "replaces",
        "replaced_by",
        "succeeds",
        "preceded_by",
        "split_into",
        "merged_from",
        "decommissioned_as",
        "recommissioned_as"
      ]
    },
    "quantityKind": {
      "type": "string",
      "enum": [
        "pressure",
        "temperature",
        "volumetric_flow_rate",
        "vibration_velocity",
        "vibration_acceleration",
        "voltage",
        "current",
        "rotational_speed",
        "energy",
        "level",
        "concentration",
        "position",
        "valve_position_fraction_open",
        "valve_travel_length"
      ]
    },
    "unitReference": {
      "type": "object",
      "required": [
        "unit_code",
        "vocabulary_id"
      ],
      "properties": {
        "unit_code": {
          "type": "string"
        },
        "vocabulary_id": {
          "type": "string"
        },
        "symbol": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "dimension": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "sourceMeasurementRepresentation": {
      "type": "string",
      "enum": [
        "numeric_scalar",
        "boolean_state",
        "string_state",
        "structured_payload"
      ]
    },
    "originalMeasurement": {
      "type": "object",
      "required": [
        "source_value",
        "source_unit",
        "source_timestamp",
        "source_representation"
      ],
      "properties": {
        "source_value": {},
        "source_unit": {
          "$ref": "common.json#/$defs/unitReference"
        },
        "source_timestamp": {
          "type": "string",
          "format": "date-time"
        },
        "source_quality": {
          "$ref": "common.json#/$defs/quality"
        },
        "source_representation": {
          "$ref": "common.json#/$defs/sourceMeasurementRepresentation"
        }
      },
      "additionalProperties": true
    },
    "canonicalMeasurement": {
      "type": "object",
      "required": [
        "quantity_kind",
        "canonical_value",
        "canonical_unit"
      ],
      "properties": {
        "quantity_kind": {
          "$ref": "common.json#/$defs/quantityKind"
        },
        "canonical_value": {},
        "canonical_unit": {
          "$ref": "common.json#/$defs/unitReference"
        }
      },
      "additionalProperties": true
    },
    "conversionLineage": {
      "type": "object",
      "required": [
        "source_unit",
        "canonical_unit",
        "conversion_method",
        "conversion_service",
        "conversion_version",
        "conversion_timestamp"
      ],
      "properties": {
        "source_unit": {
          "$ref": "common.json#/$defs/unitReference"
        },
        "canonical_unit": {
          "$ref": "common.json#/$defs/unitReference"
        },
        "formula_reference": {
          "type": "string"
        },
        "conversion_method": {
          "type": "string"
        },
        "conversion_service": {
          "type": "string"
        },
        "conversion_version": {
          "type": "string"
        },
        "conversion_timestamp": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": true
    },
    "measurementQuality": {
      "type": "object",
      "required": [
        "quality_code",
        "communication_quality",
        "validity_status",
        "missing_data_state",
        "stale_data_state"
      ],
      "properties": {
        "quality_code": {
          "type": "string",
          "enum": [
            "good",
            "degraded",
            "bad",
            "estimated",
            "missing"
          ]
        },
        "communication_quality": {
          "type": "string",
          "enum": [
            "good",
            "degraded",
            "lost",
            "unknown"
          ]
        },
        "validity_status": {
          "type": "string",
          "enum": [
            "valid",
            "invalid",
            "suspect",
            "interpolated",
            "substituted"
          ]
        },
        "uncertainty": {
          "type": "number",
          "minimum": 0
        },
        "accuracy": {
          "type": "number",
          "minimum": 0
        },
        "precision": {
          "type": "number",
          "minimum": 0
        },
        "missing_data_state": {
          "type": "string",
          "enum": [
            "present",
            "partially_missing",
            "missing"
          ]
        },
        "stale_data_state": {
          "type": "string",
          "enum": [
            "fresh",
            "stale",
            "unknown"
          ]
        }
      },
      "additionalProperties": true
    },
    "calibrationContext": {
      "type": "object",
      "required": [
        "calibration_status"
      ],
      "properties": {
        "calibration_reference": {
          "type": "string"
        },
        "calibration_status": {
          "type": "string",
          "enum": [
            "calibrated",
            "due",
            "overdue",
            "out_of_service",
            "unknown"
          ]
        },
        "last_known_calibration_date": {
          "type": "string",
          "format": "date-time"
        },
        "next_due_status": {
          "type": "string",
          "enum": [
            "not_due",
            "due_soon",
            "overdue",
            "unknown"
          ]
        },
        "sensor_ref": {
          "type": "string"
        },
        "instrument_ref": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "measurementRange": {
      "type": "object",
      "required": [
        "low",
        "high",
        "unit"
      ],
      "properties": {
        "low": {
          "type": "number"
        },
        "high": {
          "type": "number"
        },
        "unit": {
          "$ref": "common.json#/$defs/unitReference"
        }
      },
      "additionalProperties": true
    },
    "measurementPoint": {
      "type": "object",
      "required": [
        "value",
        "unit"
      ],
      "properties": {
        "value": {},
        "unit": {
          "$ref": "common.json#/$defs/unitReference"
        },
        "basis": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "aggregationMethod": {
      "type": "string",
      "enum": [
        "raw_sample",
        "average",
        "min",
        "max",
        "median",
        "rms",
        "sum",
        "delta"
      ]
    },
    "signalContext": {
      "type": "object",
      "required": [
        "measurement_target_ref"
      ],
      "properties": {
        "measurement_target_ref": {
          "type": "string"
        },
        "source_device_ref": {
          "type": "string"
        },
        "source_signal_ref": {
          "type": "string"
        },
        "engineering_unit": {
          "$ref": "common.json#/$defs/unitReference"
        },
        "display_unit": {
          "$ref": "common.json#/$defs/unitReference"
        },
        "engineering_range": {
          "$ref": "common.json#/$defs/measurementRange"
        },
        "operational_range": {
          "$ref": "common.json#/$defs/measurementRange"
        },
        "setpoint": {
          "$ref": "common.json#/$defs/measurementPoint"
        },
        "alarm_threshold": {
          "$ref": "common.json#/$defs/measurementPoint"
        },
        "baseline": {
          "$ref": "common.json#/$defs/measurementPoint"
        },
        "sampling_interval": {
          "type": "string"
        },
        "aggregation_method": {
          "$ref": "common.json#/$defs/aggregationMethod"
        },
        "operating_mode_context": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "timeSynchronizationContext": {
      "type": "object",
      "required": [
        "source_timestamp",
        "ingestion_timestamp"
      ],
      "properties": {
        "source_timestamp": {
          "type": "string",
          "format": "date-time"
        },
        "ingestion_timestamp": {
          "type": "string",
          "format": "date-time"
        },
        "clock_source_context": {
          "type": "string"
        },
        "clock_reference": {
          "type": "string"
        },
        "ordering_state": {
          "type": "string",
          "enum": [
            "in_order",
            "out_of_order",
            "late_arrival",
            "replayed"
          ]
        },
        "clock_offset_ms": {
          "type": "number"
        }
      },
      "additionalProperties": true
    },
    "governedTermReference": {
      "type": "object",
      "required": [
        "scheme",
        "code"
      ],
      "properties": {
        "scheme": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "diagnosticStatus": {
      "type": "string",
      "enum": [
        "suspected",
        "confirmed",
        "ruled_out",
        "superseded"
      ]
    },
    "prognosticStatus": {
      "type": "string",
      "enum": [
        "projected",
        "watch",
        "escalated",
        "expired",
        "superseded"
      ]
    },
    "failureEventStatus": {
      "type": "string",
      "enum": [
        "detected",
        "confirmed",
        "active",
        "mitigated",
        "resolved"
      ]
    },
    "maintenanceStrategyType": {
      "type": "string",
      "enum": [
        "corrective",
        "preventive",
        "predictive",
        "condition_based",
        "run_to_failure",
        "proof_test"
      ]
    },
    "workRequestStatus": {
      "type": "string",
      "enum": [
        "requested",
        "approved",
        "rejected",
        "deferred",
        "cancelled"
      ]
    },
    "workPlanStatus": {
      "type": "string",
      "enum": [
        "draft",
        "approved",
        "revised",
        "cancelled"
      ]
    },
    "verificationStatus": {
      "type": "string",
      "enum": [
        "verified",
        "rejected",
        "inconclusive",
        "pending"
      ]
    },
    "restorationStatus": {
      "type": "string",
      "enum": [
        "restored",
        "not_restored",
        "partially_restored",
        "inconclusive"
      ]
    },
    "workOutcomeDisposition": {
      "type": "string",
      "enum": [
        "positive",
        "neutral",
        "negative",
        "inconclusive",
        "ineffective",
        "unresolved"
      ]
    },
    "recurrenceStatus": {
      "type": "string",
      "enum": [
        "none",
        "suspected",
        "confirmed",
        "open",
        "closed"
      ]
    },
    "materialUsage": {
      "type": "object",
      "required": [
        "material_ref",
        "quantity"
      ],
      "properties": {
        "material_ref": {
          "$ref": "common.json#/$defs/governedTermReference"
        },
        "quantity": {
          "type": "number",
          "minimum": 0
        },
        "unit": {
          "$ref": "common.json#/$defs/unitReference"
        },
        "serial_number": {
          "type": "string"
        },
        "batch_id": {
          "type": "string"
        },
        "warranty_reference": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "laborParticipation": {
      "type": "object",
      "required": [
        "participant_type",
        "participant_ref"
      ],
      "properties": {
        "participant_type": {
          "type": "string",
          "enum": [
            "employee",
            "contractor",
            "vendor",
            "team"
          ]
        },
        "participant_ref": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "labor_hours": {
          "type": "number",
          "minimum": 0
        },
        "organization": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "serviceInterruption": {
      "type": "object",
      "required": [
        "interruption_type",
        "duration_hours"
      ],
      "properties": {
        "interruption_type": {
          "type": "string",
          "enum": [
            "full_outage",
            "partial_outage",
            "degraded_service",
            "planned_shutdown",
            "none"
          ]
        },
        "duration_hours": {
          "type": "number",
          "minimum": 0
        },
        "production_loss_estimate": {
          "type": "number"
        },
        "unit": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "operatingContextSnapshot": {
      "type": "object",
      "required": [
        "asset_class"
      ],
      "properties": {
        "asset_class": {
          "type": "string"
        },
        "operating_mode": {
          "type": "string"
        },
        "load_band": {
          "type": "string"
        },
        "environmental_context": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "impactAssessment": {
      "type": "object",
      "required": [
        "direction",
        "description"
      ],
      "properties": {
        "direction": {
          "type": "string",
          "enum": [
            "improved",
            "unchanged",
            "degraded",
            "unknown"
          ]
        },
        "description": {
          "type": "string"
        },
        "magnitude": {
          "type": "number"
        },
        "unit": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "reliabilityImpact": {
      "type": "object",
      "required": [
        "direction",
        "description",
        "asset_class",
        "operating_context",
        "measurement_evidence_refs",
        "work_history_refs"
      ],
      "properties": {
        "direction": {
          "type": "string",
          "enum": [
            "improved",
            "unchanged",
            "degraded",
            "unknown"
          ]
        },
        "description": {
          "type": "string"
        },
        "asset_class": {
          "type": "string"
        },
        "operating_context": {
          "$ref": "common.json#/$defs/operatingContextSnapshot"
        },
        "measurement_evidence_refs": {
          "$ref": "common.json#/$defs/evidenceRefs"
        },
        "work_history_refs": {
          "$ref": "common.json#/$defs/evidenceRefs"
        },
        "magnitude": {
          "type": "number"
        },
        "unit": {
          "type": "string"
        },
        "assessment_basis": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "warrantyCoverage": {
      "type": "object",
      "required": [
        "coverage_status"
      ],
      "properties": {
        "coverage_status": {
          "type": "string",
          "enum": [
            "active",
            "expired",
            "unknown"
          ]
        },
        "coverage_reference": {
          "type": "string"
        },
        "coverage_end": {
          "type": "string",
          "format": "date-time"
        },
        "provider": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "recurrenceContext": {
      "type": "object",
      "required": [
        "recurrence_status"
      ],
      "properties": {
        "recurrence_status": {
          "$ref": "common.json#/$defs/recurrenceStatus"
        },
        "prior_failure_event_refs": {
          "$ref": "common.json#/$defs/evidenceRefs"
        },
        "prior_work_refs": {
          "$ref": "common.json#/$defs/evidenceRefs"
        },
        "notes": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "eventCategory": {
      "type": "string",
      "enum": [
        "operational_occurrence",
        "state_transition",
        "fault",
        "communication",
        "work_lifecycle",
        "safety",
        "data_quality",
        "asset_lifecycle"
      ]
    },
    "eventSourcePayload": {
      "type": "object",
      "required": [
        "payload_format"
      ],
      "properties": {
        "payload_format": {
          "type": "string"
        },
        "payload": {
          "type": "object",
          "additionalProperties": true
        },
        "payload_reference": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "alarmState": {
      "type": "string",
      "enum": [
        "active",
        "acknowledged",
        "cleared",
        "suppressed",
        "shelved",
        "unknown"
      ]
    },
    "alarmStateTransitionType": {
      "type": "string",
      "enum": [
        "raised",
        "acknowledged",
        "cleared",
        "suppressed",
        "unsuppressed",
        "shelved",
        "unshelved",
        "reclassified",
        "state_change"
      ]
    },
    "stateTransitionContext": {
      "type": "object",
      "required": [
        "from_state",
        "to_state",
        "transition_type",
        "event_time",
        "confidence"
      ],
      "properties": {
        "from_state": {
          "type": "string"
        },
        "to_state": {
          "type": "string"
        },
        "transition_type": {
          "$ref": "common.json#/$defs/alarmStateTransitionType"
        },
        "event_time": {
          "type": "string",
          "format": "date-time"
        },
        "valid_from": {
          "type": "string",
          "format": "date-time"
        },
        "valid_to": {
          "type": "string",
          "format": "date-time"
        },
        "confidence": {
          "$ref": "common.json#/$defs/confidenceScore"
        },
        "source_event_ref": {
          "type": "string"
        },
        "evidence_refs": {
          "$ref": "common.json#/$defs/evidenceRefs"
        }
      },
      "additionalProperties": true
    },
    "thresholdReference": {
      "type": "object",
      "required": [
        "threshold_type",
        "threshold_value"
      ],
      "properties": {
        "threshold_type": {
          "type": "string",
          "enum": [
            "high",
            "high_high",
            "low",
            "low_low",
            "deviation",
            "rate_of_change",
            "custom"
          ]
        },
        "threshold_value": {},
        "unit": {
          "$ref": "common.json#/$defs/unitReference"
        },
        "setpoint_value": {},
        "setpoint_unit": {
          "$ref": "common.json#/$defs/unitReference"
        },
        "source_reference": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "alarmDerivationType": {
      "type": "string",
      "enum": [
        "observation_threshold_breach",
        "event_driven",
        "condition_driven",
        "rule_evaluation",
        "source_alarm_projection"
      ]
    },
    "alarmLifecycleContext": {
      "type": "object",
      "required": [
        "canonical_alarm_state"
      ],
      "properties": {
        "canonical_alarm_state": {
          "$ref": "common.json#/$defs/alarmState"
        },
        "original_source_alarm_state": {
          "type": "string"
        },
        "state_transitions": {
          "type": "array",
          "items": {
            "$ref": "common.json#/$defs/stateTransitionContext"
          },
          "minItems": 1
        }
      },
      "additionalProperties": true
    },
    "suppressionContext": {
      "type": "object",
      "required": [
        "suppression_reason",
        "provenance"
      ],
      "properties": {
        "suppression_reason": {
          "type": "string"
        },
        "shelving_reason": {
          "type": "string"
        },
        "policy_reference": {
          "type": "string"
        },
        "valid_from": {
          "type": "string",
          "format": "date-time"
        },
        "valid_to": {
          "type": "string",
          "format": "date-time"
        },
        "work_context_ref": {
          "type": "string"
        },
        "provenance": {
          "$ref": "common.json#/$defs/provenance"
        }
      },
      "additionalProperties": true
    },
    "classificationAssertion": {
      "type": "object",
      "required": [
        "classification_scheme",
        "classification_category",
        "classification_code",
        "confidence"
      ],
      "properties": {
        "classification_scheme": {
          "type": "string"
        },
        "classification_category": {
          "type": "string",
          "enum": [
            "asset_form",
            "equipment_role",
            "device_role",
            "lifecycle_role",
            "asset_class",
            "equipment_model",
            "source_type",
            "derived_role",
            "extension"
          ]
        },
        "classification_code": {
          "type": "string"
        },
        "asserted_by": {
          "type": "string"
        },
        "source_reference": {
          "type": "string"
        },
        "valid_from": {
          "type": "string",
          "format": "date-time"
        },
        "valid_to": {
          "type": "string",
          "format": "date-time"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "derivation_method": {
          "type": "string"
        },
        "semantic_profile_version": {
          "type": "string"
        },
        "provenance": {
          "$ref": "common.json#/$defs/provenance"
        },
        "extensions": {
          "type": "object",
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    },
    "provenance": {
      "type": "object",
      "required": [
        "source_platform",
        "source_authority_id",
        "source_reference",
        "lineage_id",
        "ingest_time",
        "processing_time"
      ],
      "properties": {
        "source_platform": {
          "type": "string"
        },
        "source_authority_id": {
          "type": "string"
        },
        "source_reference": {
          "type": "string"
        },
        "source_message_identity": {
          "type": "string"
        },
        "mapping_package_id": {
          "type": "string"
        },
        "mapping_version": {
          "type": "string"
        },
        "adapter_version": {
          "type": "string"
        },
        "lineage_id": {
          "type": "string"
        },
        "ingest_time": {
          "type": "string",
          "format": "date-time"
        },
        "processing_time": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": true
    },
    "quality": {
      "type": "object",
      "required": [
        "status",
        "validation_status"
      ],
      "properties": {
        "status": {
          "enum": [
            "good",
            "uncertain",
            "bad",
            "estimated",
            "missing"
          ]
        },
        "score": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "reasons": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "source_quality": {},
        "mapping_confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "identity_confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "validation_status": {
          "enum": [
            "valid",
            "invalid",
            "partial",
            "quarantined"
          ]
        }
      },
      "additionalProperties": true
    },
    "temporalIntegrity": {
      "type": "object",
      "required": [
        "event_time",
        "receive_time",
        "processing_time",
        "delivery_classification"
      ],
      "properties": {
        "event_time": {
          "type": "string",
          "format": "date-time"
        },
        "source_time": {
          "type": "string",
          "format": "date-time"
        },
        "receive_time": {
          "type": "string",
          "format": "date-time"
        },
        "processing_time": {
          "type": "string",
          "format": "date-time"
        },
        "time_confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "ordering_scope": {
          "type": "string"
        },
        "delivery_classification": {
          "enum": [
            "live",
            "retained_snapshot",
            "replay",
            "backfill",
            "late_arrival",
            "reconstructed",
            "manual_entry"
          ]
        }
      },
      "additionalProperties": true
    },
    "confidenceScore": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "evidenceRefs": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "minItems": 1
    },
    "stateLineage": {
      "type": "object",
      "properties": {
        "valid_from": {
          "type": "string",
          "format": "date-time"
        },
        "valid_to": {
          "type": "string",
          "format": "date-time"
        },
        "correction_of_ref": {
          "type": "string"
        },
        "supersedes_refs": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 1
        },
        "superseded_by_ref": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "responsibleParty": {
      "type": "object",
      "properties": {
        "actor_ref": {
          "type": "string"
        },
        "actor_name": {
          "type": "string"
        },
        "model_id": {
          "type": "string"
        },
        "model_version": {
          "type": "string"
        },
        "authority_ref": {
          "type": "string"
        }
      },
      "anyOf": [
        {
          "required": [
            "actor_ref"
          ]
        },
        {
          "required": [
            "model_id"
          ]
        }
      ],
      "additionalProperties": true
    },
    "decisionAuthority": {
      "type": "object",
      "required": [
        "authority_id",
        "authority_type"
      ],
      "properties": {
        "authority_id": {
          "type": "string"
        },
        "authority_type": {
          "type": "string",
          "enum": [
            "human",
            "team",
            "workflow",
            "policy_engine",
            "model",
            "system"
          ]
        },
        "display_name": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "predictionHorizon": {
      "type": "object",
      "required": [
        "target_time"
      ],
      "properties": {
        "target_time": {
          "type": "string",
          "format": "date-time"
        },
        "horizon_start": {
          "type": "string",
          "format": "date-time"
        },
        "horizon_end": {
          "type": "string",
          "format": "date-time"
        },
        "horizon_duration": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "expectedOutcome": {
      "type": "object",
      "required": [
        "description"
      ],
      "properties": {
        "description": {
          "type": "string"
        },
        "target_metric": {
          "type": "string"
        },
        "target_value": {},
        "unit": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "observedOutcome": {
      "type": "object",
      "required": [
        "description"
      ],
      "properties": {
        "description": {
          "type": "string"
        },
        "result_class": {
          "type": "string",
          "enum": [
            "improved",
            "unchanged",
            "degraded",
            "successful",
            "unsuccessful",
            "mixed",
            "unknown"
          ]
        },
        "measured_metric": {
          "type": "string"
        },
        "measured_value": {},
        "unit": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "sourceAssertionState": {
      "type": "string",
      "enum": [
        "reported",
        "confirmed",
        "contradicted",
        "superseded",
        "retracted",
        "stale"
      ]
    },
    "decisionStatus": {
      "type": "string",
      "enum": [
        "approved",
        "rejected",
        "deferred",
        "selected",
        "overridden"
      ]
    },
    "actionStatus": {
      "type": "string",
      "enum": [
        "planned",
        "authorized",
        "in_progress",
        "completed",
        "cancelled",
        "failed",
        "partial"
      ]
    },
    "priorityLevel": {
      "type": "string",
      "enum": [
        "critical",
        "high",
        "medium",
        "low"
      ]
    },
    "policyEvidence": {
      "type": "object",
      "properties": {
        "classification": {
          "type": "string"
        },
        "purpose": {
          "type": "string"
        },
        "retention_class": {
          "type": "string"
        },
        "sharing_eligibility": {
          "type": "string"
        },
        "decision_ref": {
          "type": "string"
        },
        "evaluated_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": true
    }
  }
}
