{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-dataproc/json-schema/google-cloud-dataproc-federation-schema.json",
  "title": "Federation",
  "description": "Represents a federation of multiple backend metastores.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-dataproc-metastore-projects-api-openapi.yml#/components/schemas/Federation",
  "type": "object",
  "properties": {
    "stateMessage": {
      "type": "string",
      "readOnly": true,
      "description": "Output only. Additional information about the current state of the metastore federation, if available."
    },
    "version": {
      "description": "Immutable. The Apache Hive metastore version of the federation. All backend metastore versions must be compatible with the federation version.",
      "type": "string"
    },
    "name": {
      "type": "string",
      "description": "Immutable. The relative resource name of the federation, of the form: projects/{project_number}/locations/{location_id}/federations/{federation_id}`."
    },
    "updateTime": {
      "format": "google-datetime",
      "readOnly": true,
      "description": "Output only. The time when the metastore federation was last updated.",
      "type": "string"
    },
    "uid": {
      "type": "string",
      "description": "Output only. The globally unique resource identifier of the metastore federation.",
      "readOnly": true
    },
    "state": {
      "enum": [
        "STATE_UNSPECIFIED",
        "CREATING",
        "ACTIVE",
        "UPDATING",
        "DELETING",
        "ERROR"
      ],
      "readOnly": true,
      "type": "string",
      "description": "Output only. The current state of the federation."
    },
    "labels": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "User-defined labels for the metastore federation.",
      "type": "object"
    },
    "createTime": {
      "type": "string",
      "description": "Output only. The time when the metastore federation was created.",
      "format": "google-datetime",
      "readOnly": true
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: \"123/environment\": \"production\", \"123/costCenter\": \"marketing\""
    },
    "backendMetastores": {
      "description": "A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/BackendMetastore"
      }
    },
    "endpointUri": {
      "type": "string",
      "readOnly": true,
      "description": "Output only. The federation endpoint."
    }
  },
  "$defs": {
    "BackendMetastore": {
      "description": "Represents a backend metastore for the federation.",
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The relative resource name of the metastore that is being federated. The formats of the relative resource names for the currently supported metastores are listed below: BigQuery projects/{project_id} Dataproc Metastore projects/{project_id}/locations/{location}/services/{service_id}"
        },
        "metastoreType": {
          "type": "string",
          "enum": [
            "METASTORE_TYPE_UNSPECIFIED",
            "BIGQUERY",
            "DATAPROC_METASTORE"
          ],
          "description": "The type of the backend metastore."
        }
      }
    }
  }
}