{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-firebase/json-schema/google-firebase-google-firebase-appdistro-v1-upload-release-request-schema.json",
  "title": "GoogleFirebaseAppdistroV1UploadReleaseRequest",
  "description": "Request message for `UploadRelease`.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-firebase-firebaseappdistribution-media-api-openapi.yml#/components/schemas/GoogleFirebaseAppdistroV1UploadReleaseRequest",
  "type": "object",
  "properties": {
    "blob": {
      "$ref": "#/$defs/GdataMedia",
      "description": "Binary to upload"
    }
  },
  "$defs": {
    "GdataBlobstore2Info": {
      "properties": {
        "uploadFragmentListCreationInfo": {
          "description": "A serialized Object Fragment List Creation Info passed from Bigstore -> Scotty for a GCS upload. This field must never be consumed outside of Bigstore, and is not applicable to non-GCS media uploads.",
          "type": "string",
          "format": "byte"
        },
        "blobId": {
          "type": "string",
          "description": "The blob id, e.g., /blobstore/prod/playground/scotty"
        },
        "downloadExternalReadToken": {
          "format": "byte",
          "description": "A serialized External Read Token passed from Bigstore -> Scotty for a GCS download. This field must never be consumed outside of Bigstore, and is not applicable to non-GCS media uploads.",
          "type": "string"
        },
        "uploadMetadataContainer": {
          "type": "string",
          "format": "byte",
          "description": "Metadata passed from Blobstore -> Scotty for a new GCS upload. This is a signed, serialized blobstore2.BlobMetadataContainer proto which must never be consumed outside of Bigstore, and is not applicable to non-GCS media uploads."
        },
        "blobGeneration": {
          "description": "The blob generation id.",
          "format": "int64",
          "type": "string"
        },
        "downloadReadHandle": {
          "format": "byte",
          "description": "Read handle passed from Bigstore -> Scotty for a GCS download. This is a signed, serialized blobstore2.ReadHandle proto which must never be set outside of Bigstore, and is not applicable to non-GCS media downloads.",
          "type": "string"
        },
        "readToken": {
          "description": "The blob read token. Needed to read blobs that have not been replicated. Might not be available until the final call.",
          "type": "string"
        }
      },
      "description": "Information to read/write to blobstore2.",
      "type": "object"
    },
    "GdataCompositeMedia": {
      "description": "A sequence of media data references representing composite data. Introduced to support Bigstore composite objects. For details, visit http://go/bigstore-composites.",
      "properties": {
        "referenceType": {
          "description": "Describes what the field reference contains.",
          "enum": [
            "PATH",
            "BLOB_REF",
            "INLINE",
            "BIGSTORE_REF",
            "COSMO_BINARY_REFERENCE"
          ],
          "type": "string"
        },
        "objectId": {
          "$ref": "#/$defs/GdataObjectId",
          "description": "Reference to a TI Blob, set if reference_type is BIGSTORE_REF."
        },
        "crc32cHash": {
          "format": "uint32",
          "type": "integer",
          "description": "crc32.c hash for the payload."
        },
        "length": {
          "description": "Size of the data, in bytes",
          "type": "string",
          "format": "int64"
        },
        "inline": {
          "description": "Media data, set if reference_type is INLINE",
          "format": "byte",
          "type": "string"
        },
        "blobstore2Info": {
          "$ref": "#/$defs/GdataBlobstore2Info",
          "description": "Blobstore v2 info, set if reference_type is BLOBSTORE_REF and it refers to a v2 blob."
        },
        "path": {
          "description": "Path to the data, set if reference_type is PATH",
          "type": "string"
        },
        "blobRef": {
          "format": "byte",
          "type": "string",
          "description": "Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should be the byte representation of a blobstore.BlobRef. Since Blobstore is deprecating v1, use blobstore2_info instead. For now, any v2 blob will also be represented in this field as v1 BlobRef.",
          "deprecated": true
        },
        "cosmoBinaryReference": {
          "format": "byte",
          "type": "string",
          "description": "A binary data reference for a media download. Serves as a technology-agnostic binary reference in some Google infrastructure. This value is a serialized storage_cosmo.BinaryReference proto. Storing it as bytes is a hack to get around the fact that the cosmo proto (as well as others it includes) doesn't support JavaScript. This prevents us from including the actual type of this field."
        },
        "md5Hash": {
          "description": "MD5 hash for the payload.",
          "type": "string",
          "format": "byte"
        },
        "sha1Hash": {
          "format": "byte",
          "type": "string",
          "description": "SHA-1 hash for the payload."
        }
      },
      "type": "object"
    },
    "GdataContentTypeInfo": {
      "type": "object",
      "description": "Detailed Content-Type information from Scotty. The Content-Type of the media will typically be filled in by the header or Scotty's best_guess, but this extended information provides the backend with more information so that it can make a better decision if needed. This is only used on media upload requests from Scotty.",
      "properties": {
        "fromHeader": {
          "description": "The content type of the file as specified in the request headers, multipart headers, or RUPIO start request.",
          "type": "string"
        },
        "fromFusionId": {
          "type": "string",
          "description": "The content type of the file detected by Fusion ID. go/fusionid"
        },
        "bestGuess": {
          "type": "string",
          "description": "Scotty's best guess of what the content type of the file is."
        },
        "fromFileName": {
          "description": "The content type of the file derived from the file extension of the original file name used by the client.",
          "type": "string"
        },
        "fusionIdDetectionMetadata": {
          "type": "string",
          "format": "byte",
          "description": "Metadata information from Fusion ID detection. Serialized FusionIdDetectionMetadata proto. Only set if from_fusion_id is set."
        },
        "fromUrlPath": {
          "description": "The content type of the file derived from the file extension of the URL path. The URL path is assumed to represent a file name (which is typically only true for agents that are providing a REST API).",
          "type": "string"
        },
        "fromBytes": {
          "type": "string",
          "description": "The content type of the file derived by looking at specific bytes (i.e. \"magic bytes\") of the actual file."
        }
      }
    },
    "GdataDiffChecksumsResponse": {
      "properties": {
        "chunkSizeBytes": {
          "type": "string",
          "description": "The chunk size of checksums. Must be a multiple of 256KB.",
          "format": "int64"
        },
        "objectSizeBytes": {
          "description": "The total size of the server object.",
          "type": "string",
          "format": "int64"
        },
        "objectLocation": {
          "$ref": "#/$defs/GdataCompositeMedia",
          "description": "If set, calculate the checksums based on the contents and return them to the caller."
        },
        "checksumsLocation": {
          "$ref": "#/$defs/GdataCompositeMedia",
          "description": "Exactly one of these fields must be populated. If checksums_location is filled, the server will return the corresponding contents to the user. If object_location is filled, the server will calculate the checksums based on the content there and return that to the user. For details on the format of the checksums, see http://go/scotty-diff-protocol."
        },
        "objectVersion": {
          "description": "The object version of the object the checksums are being returned for.",
          "type": "string"
        }
      },
      "type": "object",
      "description": "Backend response for a Diff get checksums response. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol."
    },
    "GdataDiffDownloadResponse": {
      "type": "object",
      "properties": {
        "objectLocation": {
          "$ref": "#/$defs/GdataCompositeMedia",
          "description": "The original object location."
        }
      },
      "description": "Backend response for a Diff download response. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol."
    },
    "GdataDiffUploadRequest": {
      "type": "object",
      "properties": {
        "checksumsInfo": {
          "$ref": "#/$defs/GdataCompositeMedia",
          "description": "The location of the checksums for the new object. Agents must clone the object located here, as the upload server will delete the contents once a response is received. For details on the format of the checksums, see http://go/scotty-diff-protocol."
        },
        "objectVersion": {
          "type": "string",
          "description": "The object version of the object that is the base version the incoming diff script will be applied to. This field will always be filled in."
        },
        "objectInfo": {
          "$ref": "#/$defs/GdataCompositeMedia",
          "description": "The location of the new object. Agents must clone the object located here, as the upload server will delete the contents once a response is received."
        }
      },
      "description": "A Diff upload request. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol."
    },
    "GdataDiffUploadResponse": {
      "type": "object",
      "properties": {
        "objectVersion": {
          "type": "string",
          "description": "The object version of the object at the server. Must be included in the end notification response. The version in the end notification response must correspond to the new version of the object that is now stored at the server, after the upload."
        },
        "originalObject": {
          "$ref": "#/$defs/GdataCompositeMedia",
          "description": "The location of the original file for a diff upload request. Must be filled in if responding to an upload start notification."
        }
      },
      "description": "Backend response for a Diff upload request. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol."
    },
    "GdataDiffVersionResponse": {
      "properties": {
        "objectVersion": {
          "description": "The version of the object stored at the server.",
          "type": "string"
        },
        "objectSizeBytes": {
          "description": "The total size of the server object.",
          "format": "int64",
          "type": "string"
        }
      },
      "description": "Backend response for a Diff get version response. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.",
      "type": "object"
    },
    "GdataDownloadParameters": {
      "description": "Parameters specific to media downloads.",
      "properties": {
        "ignoreRange": {
          "description": "Determining whether or not Apiary should skip the inclusion of any Content-Range header on its response to Scotty.",
          "type": "boolean"
        },
        "allowGzipCompression": {
          "description": "A boolean to be returned in the response to Scotty. Allows/disallows gzip encoding of the payload content when the server thinks it's advantageous (hence, does not guarantee compression) which allows Scotty to GZip the response to the client.",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "GdataMedia": {
      "properties": {
        "blobstore2Info": {
          "$ref": "#/$defs/GdataBlobstore2Info",
          "description": "Blobstore v2 info, set if reference_type is BLOBSTORE_REF and it refers to a v2 blob."
        },
        "hashVerified": {
          "type": "boolean",
          "description": "For Scotty uploads only. If a user sends a hash code and the backend has requested that Scotty verify the upload against the client hash, Scotty will perform the check on behalf of the backend and will reject it if the hashes don't match. This is set to true if Scotty performed this verification."
        },
        "mediaId": {
          "type": "string",
          "format": "byte",
          "description": "Media id to forward to the operation GetMedia. Can be set if reference_type is GET_MEDIA."
        },
        "hash": {
          "description": "Deprecated, use one of explicit hash type fields instead. These two hash related fields will only be populated on Scotty based media uploads and will contain the content of the hash group in the NotificationRequest: http://cs/#google3/blobstore2/api/scotty/service/proto/upload_listener.proto&q=class:Hash Hex encoded hash value of the uploaded media.",
          "type": "string",
          "deprecated": true
        },
        "length": {
          "description": "Size of the data, in bytes",
          "format": "int64",
          "type": "string"
        },
        "sha1Hash": {
          "format": "byte",
          "type": "string",
          "description": "Scotty-provided SHA1 hash for an upload."
        },
        "contentTypeInfo": {
          "$ref": "#/$defs/GdataContentTypeInfo",
          "description": "Extended content type information provided for Scotty uploads."
        },
        "algorithm": {
          "type": "string",
          "description": "Deprecated, use one of explicit hash type fields instead. Algorithm used for calculating the hash. As of 2011/01/21, \"MD5\" is the only possible value for this field. New values may be added at any time.",
          "deprecated": true
        },
        "blobRef": {
          "description": "Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should be the byte representation of a blobstore.BlobRef. Since Blobstore is deprecating v1, use blobstore2_info instead. For now, any v2 blob will also be represented in this field as v1 BlobRef.",
          "type": "string",
          "format": "byte",
          "deprecated": true
        },
        "diffUploadResponse": {
          "$ref": "#/$defs/GdataDiffUploadResponse",
          "description": "Set if reference_type is DIFF_UPLOAD_RESPONSE."
        },
        "sha256Hash": {
          "description": "Scotty-provided SHA256 hash for an upload.",
          "format": "byte",
          "type": "string"
        },
        "diffDownloadResponse": {
          "$ref": "#/$defs/GdataDiffDownloadResponse",
          "description": "Set if reference_type is DIFF_DOWNLOAD_RESPONSE."
        },
        "isPotentialRetry": {
          "description": "|is_potential_retry| is set false only when Scotty is certain that it has not sent the request before. When a client resumes an upload, this field must be set true in agent calls, because Scotty cannot be certain that it has never sent the request before due to potential failure in the session state persistence.",
          "type": "boolean"
        },
        "cosmoBinaryReference": {
          "description": "A binary data reference for a media download. Serves as a technology-agnostic binary reference in some Google infrastructure. This value is a serialized storage_cosmo.BinaryReference proto. Storing it as bytes is a hack to get around the fact that the cosmo proto (as well as others it includes) doesn't support JavaScript. This prevents us from including the actual type of this field.",
          "type": "string",
          "format": "byte"
        },
        "contentType": {
          "type": "string",
          "description": "MIME type of the data"
        },
        "path": {
          "description": "Path to the data, set if reference_type is PATH",
          "type": "string"
        },
        "bigstoreObjectRef": {
          "type": "string",
          "format": "byte",
          "description": "Use object_id instead.",
          "deprecated": true
        },
        "diffVersionResponse": {
          "$ref": "#/$defs/GdataDiffVersionResponse",
          "description": "Set if reference_type is DIFF_VERSION_RESPONSE."
        },
        "objectId": {
          "$ref": "#/$defs/GdataObjectId",
          "description": "Reference to a TI Blob, set if reference_type is BIGSTORE_REF."
        },
        "diffChecksumsResponse": {
          "$ref": "#/$defs/GdataDiffChecksumsResponse",
          "description": "Set if reference_type is DIFF_CHECKSUMS_RESPONSE."
        },
        "md5Hash": {
          "description": "Scotty-provided MD5 hash for an upload.",
          "format": "byte",
          "type": "string"
        },
        "crc32cHash": {
          "type": "integer",
          "description": "For Scotty Uploads: Scotty-provided hashes for uploads For Scotty Downloads: (WARNING: DO NOT USE WITHOUT PERMISSION FROM THE SCOTTY TEAM.) A Hash provided by the agent to be used to verify the data being downloaded. Currently only supported for inline payloads. Further, only crc32c_hash is currently supported.",
          "format": "uint32"
        },
        "downloadParameters": {
          "$ref": "#/$defs/GdataDownloadParameters",
          "description": "Parameters for a media download."
        },
        "timestamp": {
          "description": "Time at which the media data was last updated, in milliseconds since UNIX epoch",
          "type": "string",
          "format": "uint64"
        },
        "token": {
          "description": "A unique fingerprint/version id for the media data",
          "type": "string"
        },
        "sha512Hash": {
          "format": "byte",
          "description": "Scotty-provided SHA512 hash for an upload.",
          "type": "string"
        },
        "referenceType": {
          "description": "Describes what the field reference contains.",
          "enum": [
            "PATH",
            "BLOB_REF",
            "INLINE",
            "GET_MEDIA",
            "COMPOSITE_MEDIA",
            "BIGSTORE_REF",
            "DIFF_VERSION_RESPONSE",
            "DIFF_CHECKSUMS_RESPONSE",
            "DIFF_DOWNLOAD_RESPONSE",
            "DIFF_UPLOAD_REQUEST",
            "DIFF_UPLOAD_RESPONSE",
            "COSMO_BINARY_REFERENCE",
            "ARBITRARY_BYTES"
          ],
          "type": "string"
        },
        "inline": {
          "description": "Media data, set if reference_type is INLINE",
          "format": "byte",
          "type": "string"
        },
        "filename": {
          "type": "string",
          "description": "Original file name"
        },
        "diffUploadRequest": {
          "$ref": "#/$defs/GdataDiffUploadRequest",
          "description": "Set if reference_type is DIFF_UPLOAD_REQUEST."
        },
        "compositeMedia": {
          "description": "A composite media composed of one or more media objects, set if reference_type is COMPOSITE_MEDIA. The media length field must be set to the sum of the lengths of all composite media objects. Note: All composite media must have length specified.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/GdataCompositeMedia"
          }
        }
      },
      "type": "object",
      "description": "A reference to data stored on the filesystem, on GFS or in blobstore."
    },
    "GdataObjectId": {
      "type": "object",
      "properties": {
        "objectName": {
          "description": "The name of the object.",
          "type": "string"
        },
        "generation": {
          "description": "Generation of the object. Generations are monotonically increasing across writes, allowing them to be be compared to determine which generation is newer. If this is omitted in a request, then you are requesting the live object. See http://go/bigstore-versions",
          "format": "int64",
          "type": "string"
        },
        "bucketName": {
          "description": "The name of the bucket to which this object belongs.",
          "type": "string"
        }
      },
      "description": "This is a copy of the tech.blob.ObjectId proto, which could not be used directly here due to transitive closure issues with JavaScript support; see http://b/8801763."
    }
  }
}