{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/api-evangelist/broadcom/blob/main/json-schema/broadcom-workload-domain-schema.json",
  "title": "Broadcom Workload Domain",
  "description": "A Workload Domain represents a logically isolated group of clusters in VMware Cloud Foundation that provides compute, storage, and networking resources for a specific workload type.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier of the workload domain."
    },
    "name": {
      "type": "string",
      "description": "The name of the workload domain."
    },
    "type": {
      "type": "string",
      "enum": [
        "MANAGEMENT",
        "VI"
      ],
      "description": "The type of workload domain. MANAGEMENT is the initial domain, VI is a Virtual Infrastructure domain."
    },
    "status": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "ERROR",
        "ACTIVATING",
        "DELETING"
      ],
      "description": "The current status of the workload domain."
    },
    "clusters": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The identifier of the cluster."
          },
          "name": {
            "type": "string",
            "description": "The name of the cluster."
          },
          "primaryDatastoreType": {
            "type": "string",
            "enum": [
              "VSAN",
              "VMFS_FC",
              "VMFS_ISCSI",
              "NFS",
              "VVOL"
            ],
            "description": "The primary datastore type of the cluster."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the default cluster in the domain."
          },
          "hosts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The identifier of the host."
                },
                "fqdn": {
                  "type": "string",
                  "description": "The fully qualified domain name of the host."
                }
              }
            },
            "description": "The hosts in the cluster."
          }
        }
      },
      "description": "The clusters that belong to this workload domain."
    },
    "ssoId": {
      "type": "string",
      "description": "The SSO domain identifier associated with this workload domain."
    },
    "vcenter": {
      "type": "object",
      "description": "The vCenter Server associated with this workload domain.",
      "properties": {
        "id": {
          "type": "string",
          "description": "The identifier of the vCenter."
        },
        "fqdn": {
          "type": "string",
          "description": "The fully qualified domain name of the vCenter."
        },
        "version": {
          "type": "string",
          "description": "The version of vCenter Server."
        }
      }
    },
    "nsxTCluster": {
      "type": "object",
      "description": "The NSX-T cluster associated with this workload domain.",
      "properties": {
        "id": {
          "type": "string",
          "description": "The identifier of the NSX-T cluster."
        },
        "vip": {
          "type": "string",
          "description": "The virtual IP address of the NSX-T cluster."
        }
      }
    }
  }
}
