{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/queue/v1/artifact-created-message.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "additionalProperties": false,
  "description": "Message reporting a new artifact has been created for a given task.\n",
  "properties": {
    "artifact": {
      "additionalProperties": false,
      "description": "Information about the artifact that was created\n",
      "properties": {
        "contentType": {
          "description": "Expected content-type of the artifact.  This is informational only:\nit is suitable for use to choose an icon for the artifact, for example.\nThe accurate content-type of the artifact can only be determined by\ndownloading it.\n",
          "maxLength": 255,
          "title": "Content-Type",
          "type": "string"
        },
        "expires": {
          "description": "Date and time after which the artifact created will be automatically\ndeleted by the queue.\n",
          "format": "date-time",
          "title": "Artifact Expiration",
          "type": "string"
        },
        "name": {
          "description": "Name of the artifact that was created, this is useful if you want to\nattempt to fetch the artifact. But keep in mind that just because an\nartifact is created doesn't mean that it's immediately available.\n",
          "maxLength": 1024,
          "title": "Artifact Name",
          "type": "string"
        },
        "storageType": {
          "description": "This is the `storageType` for the request that was used to create the\nartifact.  Note that artifacts with the `s3` storage type do not produce\nthis message.\n",
          "enum": [
            "reference",
            "link",
            "error",
            "object"
          ],
          "title": "Artifact Storage-Type",
          "type": "string"
        }
      },
      "required": [
        "storageType",
        "name",
        "expires",
        "contentType"
      ],
      "title": "Artifact",
      "type": "object"
    },
    "runId": {
      "description": "Id of the run on which artifact was created.\n",
      "maximum": 1000,
      "minimum": 0,
      "type": "integer"
    },
    "status": {
      "$ref": "task-status.json#"
    },
    "version": {
      "description": "Message version",
      "enum": [
        1
      ],
      "type": "integer"
    },
    "workerGroup": {
      "description": "Identifier for the worker-group within which the run with the created\nartifacted is running.\n",
      "maxLength": 38,
      "minLength": 1,
      "pattern": "^([a-zA-Z0-9-_]*)$",
      "type": "string"
    },
    "workerId": {
      "description": "Identifier for the worker within which the run with the created artifact\nis running.\n",
      "maxLength": 38,
      "minLength": 1,
      "pattern": "^([a-zA-Z0-9-_]*)$",
      "type": "string"
    }
  },
  "required": [
    "version",
    "status",
    "runId",
    "workerGroup",
    "workerId",
    "artifact"
  ],
  "title": "Artifact Created Message",
  "type": "object"
}