{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-functions/json-schema/google-cloud-functions-setup-function-upgrade-config-request-schema.json",
  "title": "SetupFunctionUpgradeConfigRequest",
  "description": "Request for the `SetupFunctionUpgradeConfig` 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/SetupFunctionUpgradeConfigRequest",
  "properties": {
    "triggerServiceAccount": {
      "description": "Optional. The trigger's service account. The service account must have permission to invoke Cloud Run services, the permission is `run.routes.invoke`. If empty, defaults to the Compute Engine default service account: `{project_number}-compute@developer.gserviceaccount.com`.",
      "type": "string"
    },
    "buildConfigOverrides": {
      "$ref": "#/$defs/BuildConfigOverrides",
      "description": "Optional. Specifies overrides for the build process."
    },
    "serviceConfigOverrides": {
      "$ref": "#/$defs/ServiceConfigOverrides",
      "description": "Optional. Specifies overrides for the service configuration."
    }
  },
  "type": "object",
  "$defs": {
    "BuildConfigOverrides": {
      "type": "object",
      "description": "Contains overrides related to the function's build configuration.",
      "properties": {
        "runtime": {
          "description": "Optional. Specifies the desired runtime for the new Cloud Run function. (e.g., `\"nodejs20\"`, `\"python312\"`). Constraints: 1. This field CANNOT be used to change the runtime language (e.g., from `NODEJS` to `PYTHON`). The backend will enforce this. 2. This field can ONLY be used to upgrade the runtime version (e.g., `nodejs18` to `nodejs20`). Downgrading the version is not permitted. The backend will validate the version change. If provided and valid, this overrides the runtime of the Gen1 function.",
          "type": "string"
        }
      }
    },
    "ServiceConfigOverrides": {
      "properties": {
        "maxInstanceCount": {
          "format": "int32",
          "type": "integer",
          "description": "Optional. Specifies the maximum number of instances for the new Cloud Run function. If provided, this overrides the max_instance_count setting of the Gen1 function."
        }
      },
      "description": "Contains overrides related to the function's service configuration.",
      "type": "object"
    }
  }
}