{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-firebase/json-schema/google-firebase-domain-schema.json",
  "title": "Domain",
  "description": "A domain name that is associated with a backend.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-firebase-firebaseapphosting-projects-api-openapi.yml#/components/schemas/Domain",
  "properties": {
    "reconciling": {
      "type": "boolean",
      "readOnly": true,
      "description": "Output only. A field that, if true, indicates that the build has an ongoing LRO."
    },
    "disabled": {
      "type": "boolean",
      "description": "Optional. Whether the domain is disabled. Defaults to false."
    },
    "name": {
      "description": "Identifier. The resource name of the domain, e.g. `/projects/p/locations/l/backends/b/domains/foo.com`",
      "type": "string"
    },
    "updateTime": {
      "readOnly": true,
      "format": "google-datetime",
      "type": "string",
      "description": "Output only. Time at which the domain was last updated."
    },
    "customDomainStatus": {
      "$ref": "#/$defs/CustomDomainStatus",
      "description": "Output only. Represents the state and configuration of a `CUSTOM` type domain. It is only present on Domains of that type."
    },
    "uid": {
      "type": "string",
      "description": "Output only. System-assigned, unique identifier.",
      "readOnly": true
    },
    "deleteTime": {
      "readOnly": true,
      "description": "Output only. Time at which the domain was deleted.",
      "type": "string",
      "format": "google-datetime"
    },
    "displayName": {
      "type": "string",
      "description": "Optional. Mutable human-readable name for the domain. 63 character limit. e.g. `prod domain`."
    },
    "type": {
      "readOnly": true,
      "type": "string",
      "description": "Output only. The type of the domain.",
      "enum": [
        "TYPE_UNSPECIFIED",
        "DEFAULT",
        "CUSTOM"
      ]
    },
    "etag": {
      "description": "Output only. Server-computed checksum based on other values; may be sent on update or delete to ensure operation is done on expected resource.",
      "type": "string",
      "readOnly": true
    },
    "labels": {
      "description": "Optional. Labels as key value pairs.",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "createTime": {
      "description": "Output only. Time at which the domain was created.",
      "format": "google-datetime",
      "readOnly": true,
      "type": "string"
    },
    "annotations": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "description": "Optional. Annotations as key value pairs."
    },
    "serve": {
      "$ref": "#/$defs/ServingBehavior",
      "description": "Optional. The serving behavior of the domain. If specified, the domain will serve content other than its backend's live content."
    }
  },
  "type": "object",
  "$defs": {
    "CustomDomainStatus": {
      "description": "The status of a custom domain's linkage to a backend.",
      "properties": {
        "hostState": {
          "description": "Output only. Tracks whether a custom domain is detected as appropriately directing traffic to App Hosting.",
          "readOnly": true,
          "enum": [
            "HOST_STATE_UNSPECIFIED",
            "HOST_UNHOSTED",
            "HOST_UNREACHABLE",
            "HOST_NON_FAH",
            "HOST_CONFLICT",
            "HOST_WRONG_SHARD",
            "HOST_ACTIVE"
          ],
          "type": "string"
        },
        "requiredDnsUpdates": {
          "items": {
            "$ref": "#/$defs/DnsUpdates"
          },
          "readOnly": true,
          "description": "Output only. Lists the records that must added or removed to a custom domain's DNS in order to finish setup and start serving content. Field is present during onboarding. Also present after onboarding if one or more of the above states is not *_ACTIVE, indicating the domain's DNS records are in a bad state.",
          "type": "array"
        },
        "ownershipState": {
          "readOnly": true,
          "description": "Output only. Tracks whether the backend is permitted to serve content on the domain, based off the domain's DNS records.",
          "type": "string",
          "enum": [
            "OWNERSHIP_STATE_UNSPECIFIED",
            "OWNERSHIP_MISSING",
            "OWNERSHIP_UNREACHABLE",
            "OWNERSHIP_MISMATCH",
            "OWNERSHIP_CONFLICT",
            "OWNERSHIP_PENDING",
            "OWNERSHIP_ACTIVE"
          ]
        },
        "issues": {
          "items": {
            "$ref": "#/$defs/Status"
          },
          "readOnly": true,
          "type": "array",
          "description": "Output only. A list of issues with domain configuration. Allows users to self-correct problems with DNS records."
        },
        "certState": {
          "readOnly": true,
          "description": "Output only. Tracks SSL certificate status for the domain.",
          "enum": [
            "CERT_STATE_UNSPECIFIED",
            "CERT_PREPARING",
            "CERT_VALIDATING",
            "CERT_PROPAGATING",
            "CERT_ACTIVE",
            "CERT_EXPIRING_SOON",
            "CERT_EXPIRED"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "DnsRecord": {
      "properties": {
        "domainName": {
          "description": "Output only. The domain the record pertains to, e.g. `foo.bar.com.`.",
          "type": "string",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. The record's type, which determines what data the record contains.",
          "enum": [
            "TYPE_UNSPECIFIED",
            "A",
            "CNAME",
            "TXT",
            "AAAA",
            "CAA"
          ]
        },
        "rdata": {
          "description": "Output only. The data of the record. The meaning of the value depends on record type: - A and AAAA: IP addresses for the domain. - CNAME: Another domain to check for records. - TXT: Arbitrary text strings associated with the domain. App Hosting uses TXT records to determine which Firebase projects have permission to act on the domain's behalf. - CAA: The record's flags, tag, and value, e.g. `0 issue \"pki.goog\"`.",
          "readOnly": true,
          "type": "string"
        },
        "relevantState": {
          "items": {
            "type": "string",
            "enum": [
              "CUSTOM_DOMAIN_STATE_UNSPECIFIED",
              "HOST_STATE",
              "OWNERSHIP_STATE",
              "CERT_STATE"
            ]
          },
          "readOnly": true,
          "description": "Output only. An enum that indicates which state(s) this DNS record applies to. Populated for all records with an `ADD` or `REMOVE` required action.",
          "type": "array"
        },
        "requiredAction": {
          "description": "Output only. An enum that indicates the a required action for this record. Populated when the record is part of a required change in a `DnsUpdates` `discovered` or `desired` record set.",
          "readOnly": true,
          "enum": [
            "NONE",
            "ADD",
            "REMOVE"
          ],
          "type": "string"
        }
      },
      "description": "A representation of a DNS records for a domain. DNS records are resource records that define how systems and services should behave when handling requests for a domain. For example, when you add `A` records to your domain's DNS records, you're informing other systems (such as your users' web browsers) to contact those IPv4 addresses to retrieve resources relevant to your domain (such as your App Hosting files).",
      "type": "object"
    },
    "DnsRecordSet": {
      "description": "A set of DNS records relevant to the setup and maintenance of a custom domain in App Hosting.",
      "properties": {
        "checkError": {
          "$ref": "#/$defs/Status",
          "description": "Output only. An error App Hosting services encountered when querying your domain's DNS records. Note: App Hosting ignores `NXDOMAIN` errors, as those generally just mean that a domain name hasn't been set up yet."
        },
        "records": {
          "items": {
            "$ref": "#/$defs/DnsRecord"
          },
          "readOnly": true,
          "description": "Output only. Records on the domain.",
          "type": "array"
        },
        "domainName": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. The domain name the record set pertains to."
        }
      },
      "type": "object"
    },
    "DnsUpdates": {
      "properties": {
        "discovered": {
          "items": {
            "$ref": "#/$defs/DnsRecordSet"
          },
          "description": "Output only. The set of DNS records App Hosting discovered when inspecting a domain.",
          "type": "array",
          "readOnly": true
        },
        "domainName": {
          "description": "Output only. The domain name the DNS updates pertain to.",
          "readOnly": true,
          "type": "string"
        },
        "desired": {
          "readOnly": true,
          "description": "Output only. The set of DNS records App Hosting needs in order to be able to serve secure content on the domain.",
          "items": {
            "$ref": "#/$defs/DnsRecordSet"
          },
          "type": "array"
        },
        "checkTime": {
          "readOnly": true,
          "format": "google-datetime",
          "type": "string",
          "description": "Output only. The last time App Hosting checked your custom domain's DNS records."
        }
      },
      "description": "A set of DNS record updates that you should make to allow App Hosting to serve secure content in response to requests against your domain. These updates present the current state of your domain's and related subdomains' DNS records when App Hosting last queried them, and the desired set of records that App Hosting needs to see before your custom domain can be fully active.",
      "type": "object"
    },
    "Redirect": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "description": "Optional. The status code to use in a redirect response. Must be a valid HTTP 3XX status code. Defaults to 302 if not present.",
          "format": "int64"
        },
        "uri": {
          "description": "Required. The URI of the redirect's intended destination. This URI will be prepended to the original request path. URI without a scheme are assumed to be HTTPS.",
          "type": "string"
        }
      },
      "description": "Specifies redirect behavior for a domain."
    },
    "ServingBehavior": {
      "type": "object",
      "properties": {
        "redirect": {
          "$ref": "#/$defs/Redirect",
          "description": "Optional. Redirect behavior for a domain, if provided."
        }
      },
      "description": "Indicates whether App Hosting will serve content on the domain."
    },
    "Status": {
      "properties": {
        "message": {
          "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.",
          "type": "string"
        },
        "code": {
          "type": "integer",
          "description": "The status code, which should be an enum value of google.rpc.Code.",
          "format": "int32"
        },
        "details": {
          "type": "array",
          "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
          "items": {
            "additionalProperties": {
              "description": "Properties of the object. Contains field @type with type URL."
            },
            "type": "object"
          }
        }
      },
      "type": "object",
      "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors)."
    }
  }
}