type: object
description: |
  A snapshot is represents an app with its parts in a locked state.

  Snapshots are used to lock what an app looks like at the moment the snapshot
  is created. A snapshot can be used to create a reproducible build.
required:
  - app
  - id
  - parts
additionalProperties: false
properties:
  # This should be defined using #ref, but this is not yet supported by us.
  app: {}
  id:
    type: string
    description: |
      An incremental identifier for app builds.
  parts:
    type: array
    # This should be defined using #ref, but this is not yet supported by us.
    items: {}
  builds:
    type: object
    additionalProperties: false
    properties:
      android:
        type: object
        additionalProperties: false
        required:
          - status
        properties:
          status:
            description: |
              | Status    | Description
              | --------- | -----------
              | `QUEUED`  | The build has been pushed to the build server, \
                            but it is still in the queue.
              | `STARTED` | The build server has started processing the build \
                            request.
              | `SUCCESS` | The build was successful. A downloadable app is \
                            available in the `result` field.
              | `ERROR`   | An error has occurred. Error details are available \
                            in the `error` field.
            enum:
              - QUEUED
              - STARTED
              - SUCCESS
              - ERROR
          result:
            type: string
            format: binary
            description: |
              The APK that was built.
          error:
            type: string
            description: |
              Details on why a build has errored.
