{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/viridi-parente/main/json-schema/viridi-parente-alarm-comment-schema.json",
  "title": "AlarmComment",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/viridi-parente-alarm-comment-controller-api-openapi.yml#/components/schemas/AlarmComment",
  "properties": {
    "alarmId": {
      "$ref": "#/$defs/AlarmId",
      "description": "JSON object with Alarm id.",
      "readOnly": true
    },
    "userId": {
      "$ref": "#/$defs/UserId",
      "description": "JSON object with User id.",
      "readOnly": true
    },
    "type": {
      "type": "string",
      "description": "Defines origination of comment. System type means comment was created by TB. OTHER type means comment was created by user.",
      "enum": [
        "SYSTEM",
        "OTHER"
      ],
      "readOnly": true
    },
    "comment": {
      "$ref": "#/$defs/JsonNode",
      "description": "JSON object with text of comment."
    },
    "id": {
      "$ref": "#/$defs/AlarmCommentId",
      "description": "JSON object with the alarm comment Id. Specify this field to update the alarm comment. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm.",
      "readOnly": true
    },
    "createdTime": {
      "type": "integer",
      "format": "int64",
      "description": "Timestamp of the alarm comment creation, in milliseconds",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "description": "representing comment text",
      "readOnly": true
    }
  },
  "$defs": {
    "AlarmCommentId": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "string"
        }
      },
      "required": [
        "id"
      ]
    },
    "AlarmId": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "ID of the entity, time-based UUID v1"
        },
        "entityType": {
          "type": "string",
          "description": "string",
          "enum": [
            "ALARM"
          ]
        }
      },
      "required": [
        "entityType",
        "id"
      ]
    },
    "JsonNode": {
      "description": "A value representing the any type (object or primitive)"
    },
    "UserId": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "ID of the entity, time-based UUID v1"
        },
        "entityType": {
          "type": "string",
          "description": "string",
          "enum": [
            "USER"
          ]
        }
      },
      "required": [
        "entityType",
        "id"
      ]
    }
  }
}