{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/broad-institute/json-schema/broad-institute-rawls-billing-project-response-schema.json",
  "title": "RawlsBillingProjectResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/broad-institute-billingv2-api-openapi.yml#/components/schemas/RawlsBillingProjectResponse",
  "required": [
    "id",
    "projectName",
    "invalidBillingAccount",
    "roles"
  ],
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "the uuid of the project"
    },
    "projectName": {
      "type": "string",
      "description": "the name of the project"
    },
    "billingAccount": {
      "type": "string",
      "description": "the billing account to use in google projects"
    },
    "servicePerimeter": {
      "type": "string",
      "description": "the name of the service parameters for google project"
    },
    "invalidBillingAccount": {
      "type": "boolean",
      "description": "whether or not the billing account is usable by Terra"
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "the roles the caller has on the project"
    },
    "status": {
      "type": "string",
      "enum": [
        "Creating",
        "Ready",
        "Error",
        "Deleting",
        "DeletionFailed",
        "AddingToPerimeter",
        "CreatingLandingZone"
      ],
      "description": "the status of allocating the billing project's resources."
    },
    "message": {
      "type": "string",
      "description": "informational message about the project"
    },
    "azureManagedAppCoordinates": {
      "$ref": "#/$defs/AzureManagedAppCoordinates"
    },
    "cloudPlatform": {
      "type": "string",
      "enum": [
        "GCP",
        "AZURE",
        "UNKNOWN"
      ]
    },
    "landingZoneId": {
      "type": "string",
      "format": "uuid",
      "description": "the UUID of the landing zone associated with the project (cloudPlatform AZURE only)"
    },
    "organization": {
      "$ref": "#/$defs/RawlsBillingProjectOrganization"
    }
  },
  "$defs": {
    "AzureManagedAppCoordinates": {
      "required": [
        "tenantId",
        "subscriptionId",
        "managedResourceGroupId"
      ],
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string",
          "format": "uuid",
          "description": "UUID of the Azure tenant for this managed application deployment"
        },
        "subscriptionId": {
          "type": "string",
          "format": "uuid",
          "description": "UUID of the Azure subscription for this managed application deployment."
        },
        "managedResourceGroupId": {
          "type": "string",
          "description": "ID of the Azure managed resource group for this managed application deployment."
        }
      }
    },
    "RawlsBillingProjectOrganization": {
      "required": [
        "enterprise"
      ],
      "type": "object",
      "description": "Details about billing project's organization. Only present if billing project is backed by a billing profile.",
      "properties": {
        "enterprise": {
          "type": "boolean",
          "description": "whether this billing project is part of an enterprise organization i.e. they have a signed business associate agreement (BAA)"
        }
      }
    }
  }
}