{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/goblet/latest.json",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/goblet/goblet/main/goblet.schema.json",
    "sourceSha256": "2d0bedccb5c2d2fc0c0c06ca7e5a9389bc6e3b1fe96d386d59dec1dfa004137e",
    "fileMatch": [
      "**/.goblet/config.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "object",
  "properties": {
    "stages": {
      "type": "object",
      "patternProperties": {
        "^.+$": {
          "$ref": "#/$defs/goblet"
        }
      }
    }
  },
  "$defs": {
    "goblet": {
      "properties": {
        "apiConfig": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/goblet/_shared/latest--apigateway.v1.json#/schemas/ApigatewayApiConfig"
        },
        "bindings": {
          "items": {
            "$ref": "https://catalog.lintel.tools/schemas/schemastore/goblet/_shared/latest--cloudfunctions.v1.json#/schemas/Binding"
          },
          "type": "array"
        },
        "cloudbuild": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/goblet/_shared/latest--cloudbuild.v1.json#/schemas/Build"
        },
        "cloudfunction": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/goblet/_shared/latest--cloudfunctions.v1.json#/schemas/CloudFunction"
        },
        "cloudfunction_v2": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/goblet/_shared/latest--cloudfunctions.v2.json#/schemas/Function"
        },
        "cloudrun": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/goblet/_shared/latest--run.v2.json#/schemas/GoogleCloudRunV2Service"
        },
        "cloudrun_container": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/goblet/_shared/latest--run.v2.json#/schemas/GoogleCloudRunV2Container"
        },
        "cloudrun_container_extra": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/goblet/_shared/latest--run.v2.json#/schemas/GoogleCloudRunV2Container"
        },
        "cloudrun_revision": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/goblet/_shared/latest--run.v2.json#/schemas/GoogleCloudRunV2Revision"
        },
        "cloudtask": {
          "properties": {
            "serviceAccount": {
              "description": "cloudtask@{PROJECT}.iam.gserviceaccount.com",
              "type": "string"
            }
          },
          "type": "object"
        },
        "cloudtaskqueue": {
          "type": "object",
          "patternProperties": {
            "^.+$": {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/goblet/_shared/latest--cloudtasks.v2.json#/schemas/Queue"
            }
          }
        },
        "custom_files": {
          "properties": {
            "exclude": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "include": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "deploy": {
          "properties": {
            "artifact_registry": {
              "type": "string"
            },
            "artifact_tag": {
              "type": "string"
            },
            "cloudbuild_cache": {
              "enum": [
                "KANIKO",
                "DOCKER_LATEST"
              ],
              "type": "string"
            },
            "environmentVariables": {
              "type": "object",
              "patternProperties": {
                "^.+$": {
                  "type": "string"
                }
              }
            }
          },
          "type": "object"
        },
        "dockerfile": {
          "type": "string"
        },
        "eventarc": {
          "properties": {
            "serviceAccount": {
              "description": "eventarc@{PROJECT}.iam.gserviceaccount.com",
              "type": "string"
            }
          },
          "type": "object"
        },
        "function_name": {
          "type": "string"
        },
        "job_container": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/goblet/_shared/latest--run.v2.json#/schemas/GoogleCloudRunV2Container"
        },
        "job_spec": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/goblet/_shared/latest--run.v2.json#/schemas/GoogleCloudRunV2TaskTemplate"
        },
        "redis": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/goblet/_shared/latest--redis.v1.json#/schemas/Instance"
        },
        "scheduler": {
          "properties": {
            "serviceAccount": {
              "description": "scheduler@{PROJECT}.iam.gserviceaccount.com",
              "type": "string"
            }
          },
          "type": "object"
        },
        "securityDefinitions": {
          "properties": {
            "firebase": {
              "$ref": "#/$defs/securityDefinitions"
            },
            "service-account": {
              "$ref": "#/$defs/securityDefinitions"
            }
          },
          "type": "object"
        },
        "vpcconnector": {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/goblet/_shared/latest--vpcaccess.v1.json#/schemas/Connector"
        }
      },
      "type": "object"
    },
    "securityDefinitions": {
      "oneOf": [
        {
          "$ref": "https://json.schemastore.org/swagger-2.0.json#/$defs/basicAuthenticationSecurity"
        },
        {
          "$ref": "https://json.schemastore.org/swagger-2.0.json#/$defs/apiKeySecurity"
        },
        {
          "$ref": "https://json.schemastore.org/swagger-2.0.json#/$defs/oauth2ImplicitSecurity"
        },
        {
          "$ref": "https://json.schemastore.org/swagger-2.0.json#/$defs/oauth2PasswordSecurity"
        },
        {
          "$ref": "https://json.schemastore.org/swagger-2.0.json#/$defs/oauth2ApplicationSecurity"
        },
        {
          "$ref": "https://json.schemastore.org/swagger-2.0.json#/$defs/oauth2AccessCodeSecurity"
        }
      ],
      "type": "object"
    }
  },
  "anyOf": [
    {
      "$ref": "#/$defs/goblet"
    }
  ]
}
