{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://api-evangelist.github.io/blueconic/json-schema/connection.json",
  "title": "Connection",
  "type": "object",
  "description": "A connection",
  "properties": {
    "allChannels": {
      "type": "boolean",
      "description": "Indicates whether the executable is active on all channels"
    },
    "creationDate": {
      "type": "string",
      "format": "date-time",
      "description": "The creation date of the object. Datetime in UTC in the https://www.ietf.org/rfc/rfc3339.txt format, example = \"2025-01-22T11:21:33.872Z\".",
      "readOnly": true
    },
    "creator": {
      "$ref": "#/components/schemas/UserBean"
    },
    "description": {
      "type": "string",
      "description": "The description."
    },
    "domains": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/simpleDomain"
      }
    },
    "id": {
      "type": "string",
      "description": "The object ID."
    },
    "isEnabled": {
      "type": "boolean",
      "description": "Indicates whether it is enabled"
    },
    "lastModifiedDate": {
      "type": "string",
      "format": "date-time",
      "description": "The last modified date of the object. Datetime in UTC in the https://www.ietf.org/rfc/rfc3339.txt format, example = \"2025-01-22T11:21:33.872Z\".",
      "readOnly": true
    },
    "lastModifiedUser": {
      "$ref": "#/components/schemas/UserBean"
    },
    "lastRun": {
      "$ref": "#/components/schemas/status"
    },
    "name": {
      "type": "string",
      "description": "The object name."
    },
    "pluginId": {
      "type": "string",
      "description": "The plugin id"
    },
    "requiredPermission": {
      "type": "string",
      "description": "The required permission for this executable"
    },
    "roles": {
      "type": "array",
      "description": "Roles allowed to edit this connection; empty means no role-based restriction",
      "items": {
        "$ref": "#/components/schemas/SimpleRoleBean"
      }
    },
    "scheduleMode": {
      "type": "string",
      "description": "The scheduling mode",
      "enum": [
        "SCHEDULED",
        "CONTINUOUS"
      ]
    },
    "tags": {
      "type": "array",
      "description": "The tags (i.e. labels).",
      "example": "Address",
      "items": {
        "type": "string",
        "description": "The tags (i.e. labels).",
        "example": "Address"
      }
    },
    "targetChannels": {
      "type": "array",
      "description": "The channels.",
      "items": {
        "$ref": "#/components/schemas/targetChannels"
      }
    }
  },
  "required": [
    "roles"
  ]
}