{
  "$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",
        "sparkplug_metric",
        "mqtt_topic",
        "modbus_register",
        "dnp3_point",
        "iec61850_object_reference",
        "bacnet_object_identifier",
        "ethernet_ip_tag",
        "s7_address",
        "reference_designation",
        "cim_mrid",
        "aas_global_asset_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",
        "active_power",
        "reactive_power",
        "apparent_power",
        "power_factor",
        "frequency",
        "mass_flow_rate",
        "standard_volumetric_flow_rate",
        "density",
        "dynamic_viscosity",
        "ph",
        "electrical_conductivity",
        "turbidity",
        "relative_humidity",
        "irradiance",
        "illuminance",
        "speed",
        "angle",
        "torque",
        "force",
        "mass",
        "length",
        "duration",
        "count",
        "ratio",
        "number_concentration",
        "event_rate"
      ]
    },
    "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_timestamp",
        "source_representation"
      ],
      "properties": {
        "source_value": {},
        "source_unit": {
          "$ref": "common.json#/$defs/unitReference"
        },
        "source_unit_state": {
          "type": "string",
          "enum": [
            "stated",
            "not_stated",
            "not_applicable",
            "supplied_by_mapping"
          ],
          "description": "`not_stated`: the source gave a number and no unit. `not_applicable`: the value is a state and has no unit. Absent means `stated`. `supplied_by_mapping`: the source gave a number and no unit, and an accepted Vocabulary Mapping named in the provenance supplies the unit."
        },
        "source_timestamp": {
          "type": "string",
          "format": "date-time"
        },
        "source_quality": {
          "$ref": "common.json#/$defs/quality"
        },
        "source_representation": {
          "$ref": "common.json#/$defs/sourceMeasurementRepresentation"
        }
      },
      "additionalProperties": true,
      "allOf": [
        {
          "if": {
            "properties": {
              "source_unit_state": {
                "enum": [
                  "not_stated",
                  "not_applicable",
                  "supplied_by_mapping"
                ]
              }
            },
            "required": [
              "source_unit_state"
            ]
          },
          "then": {
            "not": {
              "required": [
                "source_unit"
              ]
            }
          },
          "else": {
            "required": [
              "source_unit"
            ]
          }
        }
      ]
    },
    "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",
          "description": "The span of values the point is expected to take in normal operation. A percentage deadband is a percentage of this span."
        },
        "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"
        },
        "signal_role": {
          "$ref": "common.json#/$defs/signalRole"
        },
        "value_kind": {
          "$ref": "common.json#/$defs/signalValueKind"
        },
        "counter": {
          "$ref": "common.json#/$defs/counterBehaviour"
        },
        "reporting": {
          "$ref": "common.json#/$defs/reportingBehaviour"
        },
        "state_set": {
          "$ref": "common.json#/$defs/stateSet"
        },
        "limits": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "$ref": "common.json#/$defs/thresholdReference"
              },
              {
                "required": [
                  "limit_id"
                ]
              }
            ]
          },
          "description": "The limits that apply to this signal, each with its level, value, optional persistence, and validity."
        },
        "instrument_range": {
          "$ref": "common.json#/$defs/valueRange",
          "description": "The span of values the instrument can return."
        }
      },
      "additionalProperties": true,
      "allOf": [
        {
          "if": {
            "properties": {
              "value_kind": {
                "const": "accumulating_counter"
              }
            },
            "required": [
              "value_kind"
            ]
          },
          "then": {
            "required": [
              "counter"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "value_kind": {
                "const": "state"
              }
            },
            "required": [
              "value_kind"
            ]
          },
          "then": {
            "required": [
              "state_set"
            ]
          }
        }
      ]
    },
    "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"
        },
        "limit_id": {
          "type": "string",
          "description": "Stable identifier of the limit this threshold is, so an Alarm can name the limit that fired."
        },
        "persistence_duration": {
          "type": "string",
          "pattern": "^P",
          "description": "ISO 8601 duration. The value must stay beyond the threshold for this long before the limit counts as breached."
        },
        "valid_from": {
          "type": "string",
          "format": "date-time"
        },
        "valid_to": {
          "type": "string",
          "format": "date-time"
        },
        "clear_delay_duration": {
          "type": "string",
          "pattern": "^P",
          "description": "ISO 8601 duration. After the value returns inside the threshold, the limit stays breached for this long. `persistence_duration` is the matching delay before the limit counts as breached."
        },
        "hysteresis": {
          "type": "object",
          "required": [
            "value"
          ],
          "properties": {
            "value": {
              "type": "number",
              "minimum": 0
            },
            "unit": {
              "$ref": "common.json#/$defs/unitReference"
            }
          },
          "additionalProperties": false,
          "description": "How far back inside the threshold the value must come before the limit clears."
        }
      },
      "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"
        },
        "suppression_kind": {
          "type": "string",
          "enum": [
            "shelved_timed",
            "shelved_one_shot",
            "suppressed_by_design",
            "out_of_service"
          ],
          "description": "How the alarm is kept from the operator. `shelved_timed`: an operator shelved it for a set time. `shelved_one_shot`: an operator shelved it until it next clears. `suppressed_by_design`: control logic suppresses it under stated plant conditions. `out_of_service`: it was taken out of service, usually for maintenance."
        },
        "max_time_shelved": {
          "type": "string",
          "pattern": "^P",
          "description": "ISO 8601 duration. The longest time this alarm may stay shelved."
        }
      },
      "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"
        },
        "authority_scope": {
          "type": "string",
          "enum": [
            "company",
            "shared_vocabulary"
          ],
          "description": "What the authority may decide for. `company`: one organisation's own records. `shared_vocabulary`: the vocabulary shared by all organisations."
        }
      },
      "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
    },
    "signalRole": {
      "type": "string",
      "enum": [
        "measured",
        "setpoint",
        "command",
        "calculated"
      ],
      "description": "What the series is. `measured` is a value read from the process. `setpoint` is a target the process is asked to hold. `command` is an instruction issued to a device, recorded as evidence only. `calculated` is computed at the source."
    },
    "signalValueKind": {
      "type": "string",
      "enum": [
        "instantaneous",
        "accumulating_counter",
        "interval",
        "state"
      ],
      "description": "How a value of the series is to be read. `accumulating_counter` is a running total that may wrap or reset. `interval` is a value that belongs to a span of time. `state` is one of a listed set of states."
    },
    "counterBehaviour": {
      "type": "object",
      "properties": {
        "rollover_modulus": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "The count at which the register wraps to zero."
        },
        "reset_behaviour": {
          "type": "string",
          "enum": [
            "never",
            "on_rollover",
            "on_power_cycle",
            "on_command",
            "unknown"
          ]
        },
        "discontinuity": {
          "type": "string",
          "enum": [
            "rollover",
            "reset",
            "source_replaced"
          ],
          "description": "Set on the first Observation after the running total fell. Says why it fell."
        }
      },
      "additionalProperties": true
    },
    "reportingBehaviour": {
      "type": "object",
      "required": [
        "mode"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "periodic",
            "report_by_exception",
            "on_demand",
            "manual"
          ]
        },
        "expected_interval": {
          "type": "string",
          "pattern": "^P",
          "description": "ISO 8601 duration between values of a periodic series."
        },
        "deadband": {
          "type": "object",
          "required": [
            "value",
            "basis"
          ],
          "properties": {
            "value": {
              "type": "number",
              "minimum": 0
            },
            "basis": {
              "type": "string",
              "enum": [
                "absolute",
                "percent_of_range",
                "percent_of_value"
              ]
            },
            "unit": {
              "$ref": "common.json#/$defs/unitReference"
            }
          },
          "additionalProperties": true
        },
        "heartbeat_interval": {
          "type": "string",
          "pattern": "^P",
          "description": "ISO 8601 duration. The longest silence before the source sends the value again without a change."
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "mode": {
                "const": "report_by_exception"
              }
            },
            "required": [
              "mode"
            ]
          },
          "then": {
            "required": [
              "deadband"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "mode": {
                "const": "periodic"
              }
            },
            "required": [
              "mode"
            ]
          },
          "then": {
            "required": [
              "expected_interval"
            ]
          }
        }
      ],
      "additionalProperties": true
    },
    "stateSet": {
      "type": "array",
      "minItems": 2,
      "items": {
        "type": "object",
        "required": [
          "state"
        ],
        "properties": {
          "state": {
            "type": "string"
          },
          "source_value": {},
          "description": {
            "type": "string"
          }
        },
        "additionalProperties": true
      }
    },
    "observationInterval": {
      "type": "object",
      "required": [
        "start",
        "end"
      ],
      "properties": {
        "start": {
          "type": "string",
          "format": "date-time"
        },
        "end": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false,
      "description": "The span of time a value belongs to. `event_time` of the Observation equals `end`."
    },
    "sampleSeries": {
      "type": "object",
      "required": [
        "axis",
        "sample_count",
        "axis_start",
        "axis_step",
        "axis_unit",
        "encoding"
      ],
      "properties": {
        "axis": {
          "type": "string",
          "enum": [
            "time",
            "frequency",
            "order",
            "distance",
            "index"
          ]
        },
        "sample_count": {
          "type": "integer",
          "minimum": 1
        },
        "axis_start": {
          "type": "number"
        },
        "axis_step": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "axis_unit": {
          "$ref": "common.json#/$defs/unitReference"
        },
        "encoding": {
          "type": "string",
          "enum": [
            "inline",
            "reference"
          ]
        },
        "payload_ref": {
          "type": "string"
        },
        "payload_hash": {
          "type": "string"
        },
        "payload_media_type": {
          "type": "string"
        },
        "window_function": {
          "type": "string"
        },
        "axis_scale": {
          "type": "string",
          "enum": [
            "linear",
            "log10",
            "ln"
          ],
          "description": "How samples are spaced along the axis. Absent means `linear`: sample k sits at axis_start + k * axis_step. For `log10`, sample k sits at axis_start * 10^(k * axis_step). For `ln`, at axis_start * e^(k * axis_step)."
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "encoding": {
                "const": "reference"
              }
            },
            "required": [
              "encoding"
            ]
          },
          "then": {
            "required": [
              "payload_ref",
              "payload_hash"
            ]
          }
        }
      ],
      "additionalProperties": true,
      "description": "Describes a value that is an ordered series of equally spaced samples: a waveform, a spectrum or a profile."
    },
    "attributeAssertion": {
      "type": "object",
      "required": [
        "attribute_code",
        "value",
        "confidence"
      ],
      "properties": {
        "attribute_code": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9_]*$"
        },
        "attribute_scheme": {
          "type": "string"
        },
        "value": {},
        "unit": {
          "$ref": "common.json#/$defs/unitReference"
        },
        "quantity_kind": {
          "$ref": "common.json#/$defs/quantityKind"
        },
        "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
        },
        "provenance": {
          "$ref": "common.json#/$defs/provenance"
        },
        "extensions": {
          "type": "object",
          "additionalProperties": true
        },
        "dictionary_reference": {
          "$ref": "common.json#/$defs/dictionaryReference"
        }
      },
      "allOf": [
        {
          "if": {
            "required": [
              "quantity_kind"
            ]
          },
          "then": {
            "required": [
              "unit"
            ]
          }
        }
      ],
      "additionalProperties": true,
      "description": "A standing fact about an asset or a model, such as a rating, a design value, or a firmware version, with the period over which it holds."
    },
    "operationalContextRefs": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^urn:ssom:operational-context:"
      },
      "description": "The Operational Contexts in force for the subject at the time of this record."
    },
    "comparability": {
      "type": "object",
      "required": [
        "comparable",
        "comparable_view_eligible"
      ],
      "properties": {
        "comparable": {
          "type": "boolean"
        },
        "comparable_view_eligible": {
          "type": "boolean"
        },
        "reason": {
          "type": "string"
        }
      },
      "additionalProperties": true,
      "description": "Whether this value may be compared with other values of the same quantity kind and admitted to comparable analytical views."
    },
    "derivedMeasurement": {
      "type": "object",
      "required": [
        "quantity_kind",
        "value",
        "unit"
      ],
      "properties": {
        "quantity_kind": {
          "$ref": "common.json#/$defs/quantityKind"
        },
        "value": {
          "type": "number"
        },
        "unit": {
          "$ref": "common.json#/$defs/unitReference"
        }
      },
      "additionalProperties": false,
      "description": "The number a Derived Assertion asserts, with its quantity kind and unit, so a derived value is as comparable as the measurements it was computed from."
    },
    "derivationWindow": {
      "type": "object",
      "required": [
        "start",
        "end"
      ],
      "properties": {
        "start": {
          "type": "string",
          "format": "date-time"
        },
        "end": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false,
      "description": "The period of evidence a derived value summarises, such as the hour of an average or the day of a maximum."
    },
    "valueRange": {
      "type": "object",
      "required": [
        "low",
        "high"
      ],
      "properties": {
        "low": {
          "type": "number"
        },
        "high": {
          "type": "number"
        },
        "unit": {
          "$ref": "common.json#/$defs/unitReference"
        }
      },
      "additionalProperties": false,
      "description": "A span of values with its unit."
    },
    "dictionaryReference": {
      "type": "object",
      "required": [
        "scheme",
        "identifier"
      ],
      "properties": {
        "scheme": {
          "type": "string",
          "enum": [
            "irdi",
            "idta_submodel_template",
            "opc_ua_companion",
            "mimosa_ccom",
            "cfihos",
            "other"
          ],
          "description": "`irdi`: an international registration data identifier, as used by the IEC Common Data Dictionary and ECLASS. The others name a property in a published model."
        },
        "identifier": {
          "type": "string",
          "minLength": 1
        },
        "dictionary_version": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "description": "Where the meaning of an attribute is defined outside SSOM."
    },
    "hierarchyLevel": {
      "type": "object",
      "required": [
        "scheme",
        "level"
      ],
      "properties": {
        "scheme": {
          "type": "string",
          "enum": [
            "iec62264_role_based_equipment",
            "other"
          ]
        },
        "level": {
          "type": "string"
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "scheme": {
                "const": "iec62264_role_based_equipment"
              }
            }
          },
          "then": {
            "properties": {
              "level": {
                "enum": [
                  "enterprise",
                  "site",
                  "area",
                  "process_cell",
                  "production_unit",
                  "production_line",
                  "storage_zone",
                  "work_center",
                  "unit",
                  "work_cell",
                  "storage_unit",
                  "work_unit",
                  "equipment_module",
                  "control_module",
                  "other"
                ]
              }
            }
          }
        }
      ],
      "additionalProperties": false,
      "description": "The level of a place in a published equipment hierarchy."
    }
  }
}
