{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rork/json-schema/rork-alternative-distribution-package-response-schema.json",
  "title": "AlternativeDistributionPackageResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rork-alternativedistributionpackages-api-openapi.yml#/components/schemas/AlternativeDistributionPackageResponse",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/AlternativeDistributionPackage"
    },
    "included": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AlternativeDistributionPackageVersion"
      }
    },
    "links": {
      "$ref": "#/$defs/DocumentLinks"
    }
  },
  "required": [
    "data",
    "links"
  ],
  "$defs": {
    "AlternativeDistributionPackage": {
      "type": "object",
      "title": "AlternativeDistributionPackage",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "alternativeDistributionPackages"
          ]
        },
        "id": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "sourceFileChecksum": {
              "$ref": "#/$defs/Checksums"
            }
          }
        },
        "relationships": {
          "type": "object",
          "properties": {
            "versions": {
              "type": "object",
              "properties": {
                "links": {
                  "$ref": "#/$defs/RelationshipLinks"
                },
                "meta": {
                  "$ref": "#/$defs/PagingInformation"
                },
                "data": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "alternativeDistributionPackageVersions"
                        ]
                      },
                      "id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "type"
                    ]
                  }
                }
              }
            }
          }
        },
        "links": {
          "$ref": "#/$defs/ResourceLinks"
        }
      },
      "required": [
        "id",
        "type"
      ]
    },
    "AlternativeDistributionPackageVersion": {
      "type": "object",
      "title": "AlternativeDistributionPackageVersion",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "alternativeDistributionPackageVersions"
          ]
        },
        "id": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "format": "uri"
            },
            "urlExpirationDate": {
              "type": "string",
              "format": "date-time"
            },
            "version": {
              "type": "string"
            },
            "fileChecksum": {
              "type": "string"
            },
            "state": {
              "type": "string",
              "enum": [
                "COMPLETED",
                "REPLACED"
              ]
            }
          }
        },
        "relationships": {
          "type": "object",
          "properties": {
            "variants": {
              "type": "object",
              "properties": {
                "links": {
                  "$ref": "#/$defs/RelationshipLinks"
                },
                "meta": {
                  "$ref": "#/$defs/PagingInformation"
                },
                "data": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "alternativeDistributionPackageVariants"
                        ]
                      },
                      "id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "type"
                    ]
                  }
                }
              }
            },
            "deltas": {
              "type": "object",
              "properties": {
                "links": {
                  "$ref": "#/$defs/RelationshipLinks"
                },
                "meta": {
                  "$ref": "#/$defs/PagingInformation"
                },
                "data": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "alternativeDistributionPackageDeltas"
                        ]
                      },
                      "id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "type"
                    ]
                  }
                }
              }
            },
            "alternativeDistributionPackage": {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "alternativeDistributionPackages"
                      ]
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "type"
                  ]
                }
              }
            }
          }
        },
        "links": {
          "$ref": "#/$defs/ResourceLinks"
        }
      },
      "required": [
        "id",
        "type"
      ]
    },
    "ChecksumAlgorithm": {
      "type": "string",
      "enum": [
        "MD5",
        "SHA_256"
      ]
    },
    "Checksums": {
      "type": "object",
      "properties": {
        "file": {
          "type": "object",
          "properties": {
            "hash": {
              "type": "string"
            },
            "algorithm": {
              "$ref": "#/$defs/ChecksumAlgorithm"
            }
          }
        },
        "composite": {
          "type": "object",
          "properties": {
            "hash": {
              "type": "string"
            },
            "algorithm": {
              "type": "string",
              "enum": [
                "MD5"
              ]
            }
          }
        }
      }
    },
    "DocumentLinks": {
      "type": "object",
      "properties": {
        "self": {
          "type": "string",
          "format": "uri-reference"
        }
      },
      "required": [
        "self"
      ]
    },
    "PagingInformation": {
      "type": "object",
      "properties": {
        "paging": {
          "type": "object",
          "properties": {
            "total": {
              "type": "integer"
            },
            "limit": {
              "type": "integer"
            },
            "nextCursor": {
              "type": "string"
            }
          },
          "required": [
            "limit"
          ]
        }
      },
      "required": [
        "paging"
      ]
    },
    "RelationshipLinks": {
      "type": "object",
      "properties": {
        "self": {
          "type": "string",
          "format": "uri-reference"
        },
        "related": {
          "type": "string",
          "format": "uri-reference"
        }
      }
    },
    "ResourceLinks": {
      "type": "object",
      "properties": {
        "self": {
          "type": "string",
          "format": "uri-reference"
        }
      }
    }
  }
}