{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-functions/json-schema/google-cloud-functions-generate-upload-url-response-schema.json",
  "title": "GenerateUploadUrlResponse",
  "description": "Response of `GenerateSourceUploadUrl` method.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-functions-projects-api-openapi.yml#/components/schemas/GenerateUploadUrlResponse",
  "type": "object",
  "properties": {
    "storageSource": {
      "$ref": "#/$defs/StorageSource",
      "description": "The location of the source code in the upload bucket. Once the archive is uploaded using the `upload_url` use this field to set the `function.build_config.source.storage_source` during CreateFunction and UpdateFunction. Generation defaults to 0, as Cloud Storage provides a new generation only upon uploading a new object or version of an object."
    },
    "uploadUrl": {
      "description": "The generated Google Cloud Storage signed URL that should be used for a function source code upload. The uploaded file should be a zip archive which contains a function.",
      "type": "string"
    }
  },
  "$defs": {
    "StorageSource": {
      "type": "object",
      "description": "Location of the source in an archive file in Google Cloud Storage.",
      "properties": {
        "object": {
          "description": "Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.",
          "type": "string"
        },
        "sourceUploadUrl": {
          "description": "When the specified storage bucket is a 1st gen function uploard url bucket, this field should be set as the generated upload url for 1st gen deployment.",
          "type": "string"
        },
        "generation": {
          "format": "int64",
          "type": "string",
          "description": "Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used."
        },
        "bucket": {
          "type": "string",
          "description": "Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements))."
        }
      }
    }
  }
}