{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-firebase/json-schema/google-firebase-service-schema.json",
  "title": "Service",
  "description": "A Firebase SQL Connect service.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-firebase-firebasedataconnect-projects-api-openapi.yml#/components/schemas/Service",
  "type": "object",
  "properties": {
    "sqlSource": {
      "$ref": "#/$defs/Source",
      "description": "Optional. Input only. The SQL source files like `*.sql` for deploying a PostgREST service."
    },
    "labels": {
      "description": "Optional. Labels as key value pairs.",
      "additionalProperties": {
        "type": "string"
      },
      "type": "object"
    },
    "schemas": {
      "type": "array",
      "description": "Optional. The list of schemas in this service. Schemas returned in this collection are a summary view. Authoritative lifecycle metadata and entity tags are omitted from embedded representations. Call `GetSchema` to retrieve the complete resource.",
      "items": {
        "$ref": "#/$defs/Schema"
      }
    },
    "name": {
      "description": "Identifier. The relative resource name of the Firebase SQL Connect service, in the format: ``` projects/{project}/locations/{location}/services/{service} ``` Note that the service ID is specific to Firebase SQL Connect and does not correspond to any of the instance IDs of the underlying data source connections.",
      "type": "string"
    },
    "createTime": {
      "format": "google-datetime",
      "description": "Output only. [Output only] Create time stamp.",
      "type": "string",
      "readOnly": true
    },
    "annotations": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "description": "Optional. Stores small amounts of arbitrary data."
    },
    "uid": {
      "readOnly": true,
      "description": "Output only. System-assigned, unique identifier.",
      "type": "string"
    },
    "connectors": {
      "description": "Output only. The list of connectors in this service. Connectors returned in this collection are a summary view. Authoritative lifecycle metadata and entity tags are omitted from embedded representations. Call `GetConnector` to retrieve the complete resource.",
      "items": {
        "$ref": "#/$defs/Connector"
      },
      "type": "array",
      "readOnly": true
    },
    "graphqlSource": {
      "$ref": "#/$defs/Source",
      "description": "Optional. Input only. The GraphQL source files like `dataconnect.yaml` and `*.gql`."
    },
    "displayName": {
      "description": "Optional. Mutable human-readable name. 63 character limit.",
      "type": "string"
    },
    "source": {
      "$ref": "#/$defs/Source",
      "description": "Optional. Input only. Deprecated: Use `sql_source` or `graphql_source` instead. The source files for service, schemas, and connectors."
    },
    "etag": {
      "description": "Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. [AIP-154](https://google.aip.dev/154)",
      "readOnly": true,
      "type": "string"
    },
    "reconciling": {
      "type": "boolean",
      "readOnly": true,
      "description": "Output only. A field that if true, indicates that the system is working update the service."
    },
    "updateTime": {
      "format": "google-datetime",
      "readOnly": true,
      "type": "string",
      "description": "Output only. [Output only] Update time stamp."
    }
  },
  "$defs": {
    "ClientCache": {
      "type": "object",
      "properties": {
        "strictValidationEnabled": {
          "description": "Optional. A field that, if true, enables stricter validation on the connector source code to make sure the operation response shapes are suitable for client-side caching. This can include additional errors and warnings. For example, using the same alias for different fields is disallowed, as it may cause conflicts or confusion with normalized caching. (This field is off by default for compatibility, but enabling it is highly recommended to catch common caching pitfalls.)",
          "type": "boolean"
        },
        "entityIdIncluded": {
          "type": "boolean",
          "description": "Optional. A field that, if true, means that responses served by this connector will include entityIds in GraphQL response extensions. This helps the client SDK cache responses in an improved way, known as \"normalized caching\", if caching is enabled on the client. Each entityId is a stable key based on primary key values. Therefore, this field should only be set to true if the primary keys of accessed tables do not contain sensitive information."
        }
      },
      "description": "Client caching settings of a connector."
    },
    "CloudSqlInstance": {
      "description": "Settings for CloudSQL instance configuration.",
      "properties": {
        "edition": {
          "enum": [
            "EDITION_UNSPECIFIED",
            "EDITION_ENTERPRISE",
            "EDITION_ENTERPRISE_PLUS",
            "EDITION_DEVELOPER"
          ],
          "readOnly": true,
          "description": "Output only. [Output only] The Cloud SQL instance edition.",
          "type": "string"
        },
        "instance": {
          "description": "Required. Name of the CloudSQL instance, in the format: ``` projects/{project}/locations/{location}/instances/{instance} ```",
          "type": "string"
        }
      },
      "type": "object"
    },
    "Connector": {
      "description": "Connector consists of a set of operations, i.e. queries and mutations.",
      "type": "object",
      "properties": {
        "reconciling": {
          "description": "Output only. A field that if true, indicates that the system is working to compile and deploy the connector.",
          "type": "boolean",
          "readOnly": true
        },
        "uid": {
          "description": "Output only. System-assigned, unique identifier.",
          "readOnly": true,
          "type": "string"
        },
        "createTime": {
          "description": "Output only. [Output only] Create time stamp.",
          "format": "google-datetime",
          "readOnly": true,
          "type": "string"
        },
        "labels": {
          "description": "Optional. Labels as key value pairs.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "etag": {
          "description": "Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. [AIP-154](https://google.aip.dev/154)",
          "type": "string",
          "readOnly": true
        },
        "annotations": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Optional. Stores small amounts of arbitrary data.",
          "type": "object"
        },
        "displayName": {
          "type": "string",
          "description": "Optional. Mutable human-readable name. 63 character limit."
        },
        "updateTime": {
          "readOnly": true,
          "type": "string",
          "format": "google-datetime",
          "description": "Output only. [Output only] Update time stamp."
        },
        "clientCache": {
          "$ref": "#/$defs/ClientCache",
          "description": "Optional. The client cache settings of the connector."
        },
        "name": {
          "type": "string",
          "description": "Identifier. The relative resource name of the connector, in the format: ``` projects/{project}/locations/{location}/services/{service}/connectors/{connector} ```"
        },
        "source": {
          "$ref": "#/$defs/Source",
          "description": "Required. The source files that comprise the connector."
        }
      }
    },
    "Datasource": {
      "type": "object",
      "description": "A data source that backs Firebase SQL Connect services.",
      "properties": {
        "httpGraphql": {
          "$ref": "#/$defs/HttpGraphql",
          "description": "HTTP GraphQL server webhook configurations."
        },
        "postgresql": {
          "$ref": "#/$defs/PostgreSql",
          "description": "PostgreSQL configurations."
        }
      }
    },
    "File": {
      "properties": {
        "path": {
          "type": "string",
          "description": "Required. The file name including folder path, if applicable. The path should be relative to a local workspace (e.g. dataconnect/(schema|connector)/*.gql) and not an absolute path (e.g. /absolute/path/(schema|connector)/*.gql)."
        },
        "content": {
          "type": "string",
          "description": "Required. The file's textual content."
        }
      },
      "description": "Individual files.",
      "type": "object"
    },
    "HttpGraphql": {
      "description": "Settings for HTTP GraphQL server webhook.",
      "type": "object",
      "properties": {
        "timeout": {
          "type": "string",
          "format": "google-duration",
          "description": "Optional. Timeout duration for the HTTP request."
        },
        "uri": {
          "description": "Required. The endpoint of the HTTP GraphQL server.",
          "type": "string"
        }
      }
    },
    "PostgreSql": {
      "description": "Settings for PostgreSQL data source.",
      "properties": {
        "ephemeral": {
          "readOnly": true,
          "description": "Output only. Ephemeral is true if this SQL Connect service is served from temporary in-memory emulation of Postgres. While Cloud SQL is being provisioned, the SQL Connect service provides the ephemeral service to help developers get started. Once the Cloud SQL is provisioned, SQL Connect service will transfer its data on a best-effort basis to the Cloud SQL instance. WARNING: Ephemeral data sources will expire after 24 hour. The data will be lost if they aren't transferred to the Cloud SQL instance. WARNING: When `ephemeral=true`, mutations to the database are not guaranteed to be durably persisted, even if an OK status code is returned. All or parts of the data may be lost or reverted to earlier versions.",
          "type": "boolean"
        },
        "unlinked": {
          "description": "No Postgres data source is linked. If set, don't allow `database` and `schema_validation` to be configured.",
          "type": "boolean",
          "deprecated": true
        },
        "cloudSql": {
          "$ref": "#/$defs/CloudSqlInstance",
          "description": "Cloud SQL configurations."
        },
        "schemaMigration": {
          "enum": [
            "SQL_SCHEMA_MIGRATION_UNSPECIFIED",
            "MIGRATE_COMPATIBLE"
          ],
          "description": "Optional. Configure how to perform automatic PostgreSQL schema migration before deploying the FDC schema. This is an additive-only operation.",
          "type": "string"
        },
        "schema": {
          "type": "string",
          "description": "Optional. User-configured PostgreSQL schema. Defaults to \"public\" if not specified."
        },
        "database": {
          "description": "Required. Name of the PostgreSQL database.",
          "type": "string"
        },
        "schemaValidation": {
          "enum": [
            "SQL_SCHEMA_VALIDATION_UNSPECIFIED",
            "NONE",
            "STRICT",
            "COMPATIBLE"
          ],
          "type": "string",
          "description": "Optional. Configure how much PostgreSQL schema validation to perform against the live database before deploying the FDC schema."
        }
      },
      "type": "object"
    },
    "Schema": {
      "properties": {
        "labels": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "description": "Optional. Labels as key value pairs."
        },
        "datasources": {
          "description": "Required. The data sources linked in the schema.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Datasource"
          }
        },
        "updateTime": {
          "type": "string",
          "format": "google-datetime",
          "description": "Output only. [Output only] Update time stamp.",
          "readOnly": true
        },
        "etag": {
          "description": "Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. [AIP-154](https://google.aip.dev/154)",
          "readOnly": true,
          "type": "string"
        },
        "annotations": {
          "type": "object",
          "description": "Optional. Stores small amounts of arbitrary data.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "displayName": {
          "type": "string",
          "description": "Optional. Mutable human-readable name. 63 character limit."
        },
        "source": {
          "$ref": "#/$defs/Source",
          "description": "Required. The source files that comprise the application schema."
        },
        "uid": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. System-assigned, unique identifier."
        },
        "name": {
          "description": "Identifier. The relative resource name of the schema, in the format: ``` projects/{project}/locations/{location}/services/{service}/schemas/{schema} ``` Right now, the only supported schema is \"main\".",
          "type": "string"
        },
        "reconciling": {
          "readOnly": true,
          "description": "Output only. A field that if true, indicates that the system is working to compile and deploy the schema.",
          "type": "boolean"
        },
        "createTime": {
          "format": "google-datetime",
          "description": "Output only. [Output only] Create time stamp.",
          "type": "string",
          "readOnly": true
        }
      },
      "type": "object",
      "description": "The application schema of a Firebase SQL Connect service."
    },
    "Source": {
      "description": "Used to represent a set of source files.",
      "type": "object",
      "properties": {
        "files": {
          "description": "Required. The files that comprise the source set.",
          "items": {
            "$ref": "#/$defs/File"
          },
          "type": "array"
        }
      }
    }
  }
}