{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "artifact_code": {
          "type": [
            "string",
            "null"
          ]
        },
        "artifact_type_id": {
          "type": "integer"
        },
        "download_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "download_uri": {
          "format": "uri",
          "type": "string"
        },
        "expires_at": {
          "format": "date-time",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
          "type": "string"
        },
        "expires_in_seconds": {
          "minimum": 1,
          "type": "integer"
        },
        "media_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "mime_type": {
          "type": [
            "string",
            "null"
          ]
        },
        "ok": {
          "const": true,
          "type": "boolean"
        },
        "order_code": {
          "type": [
            "string",
            "null"
          ]
        },
        "project_code": {
          "type": [
            "string",
            "null"
          ]
        },
        "range_supported": {
          "type": "boolean"
        },
        "size_bytes": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "ok",
        "order_code",
        "project_code",
        "artifact_type_id",
        "artifact_code",
        "mime_type",
        "download_name",
        "size_bytes",
        "expires_at",
        "expires_in_seconds",
        "range_supported",
        "download_uri"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "type": "string"
            },
            "correlation_id": {
              "type": "string"
            },
            "retryable": {
              "type": "boolean"
            }
          },
          "required": [
            "code",
            "retryable",
            "correlation_id"
          ],
          "type": "object"
        },
        "ok": {
          "const": false,
          "type": "boolean"
        }
      },
      "required": [
        "ok",
        "error"
      ],
      "type": "object"
    }
  ],
  "properties": {
    "artifact_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "artifact_type_id": {
      "type": "integer"
    },
    "download_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "download_uri": {
      "format": "uri",
      "type": "string"
    },
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "correlation_id": {
          "type": "string"
        },
        "retryable": {
          "type": "boolean"
        }
      },
      "required": [
        "code",
        "retryable",
        "correlation_id"
      ],
      "type": "object"
    },
    "expires_at": {
      "format": "date-time",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
      "type": "string"
    },
    "expires_in_seconds": {
      "minimum": 1,
      "type": "integer"
    },
    "media_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "mime_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "ok": {
      "type": "boolean"
    },
    "order_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "project_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "range_supported": {
      "type": "boolean"
    },
    "size_bytes": {
      "type": [
        "integer",
        "null"
      ]
    }
  },
  "type": "object"
}