{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-occ-availability-catalog-schema.json",
  "title": "OccAvailabilityCatalog",
  "description": "Details of the availability catalog resource.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-capacitymanagement-api-openapi.yml#/components/schemas/OccAvailabilityCatalog",
  "properties": {
    "catalogState": {
      "description": "The different states associated with the availability catalog.",
      "enum": [
        "NOT_UPLOADED",
        "UPLOAD_FAILED",
        "STAGED",
        "PUBLISHED",
        "OUTDATED",
        "DELETED"
      ],
      "type": "string"
    },
    "compartmentId": {
      "description": "The OCID of the tenancy where the availability catalog resides.",
      "type": "string"
    },
    "definedTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only string type is supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing predefined tags' keys and values scoped to a namespace.\nExample: `{\"bar-key\": \"value\"}`\n",
        "type": "object"
      },
      "description": "Defined tags for this resource. Each key is predefined and scoped to a namespace.\nExample: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`\n",
      "type": "object"
    },
    "description": {
      "description": "Text information about the availability catalog.",
      "type": "string"
    },
    "details": {
      "description": "Details about capacity available for different resources in catalog.",
      "items": {
        "$ref": "#/$defs/OccAvailabilitySummary"
      },
      "maxItems": 100,
      "type": "array"
    },
    "displayName": {
      "description": "A user-friendly name for the availability catalog.",
      "type": "string"
    },
    "freeformTags": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.\nExample: `{\"bar-key\": \"value\"}`\n",
      "type": "object"
    },
    "id": {
      "description": "The OCID of the availability catalog.",
      "type": "string"
    },
    "lifecycleDetails": {
      "description": "A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed State.",
      "type": "string"
    },
    "lifecycleState": {
      "description": "The current lifecycle state of the resource.",
      "enum": [
        "CREATING",
        "UPDATING",
        "ACTIVE",
        "DELETING",
        "DELETED",
        "FAILED"
      ],
      "type": "string"
    },
    "metadataDetails": {
      "$ref": "#/$defs/MetadataDetails"
    },
    "namespace": {
      "description": "The name of the OCI service in consideration. For example, Compute, Exadata, and so on.\n",
      "enum": [
        "COMPUTE"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/Namespace"
    },
    "occCustomerGroupId": {
      "description": "The customer group OCID to which the availability catalog belongs.",
      "type": "string"
    },
    "systemTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only string type is supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing system tags' keys and values scoped to a namespace.\nExample: `{\"bar-key\": \"value\"}`\n",
        "type": "object"
      },
      "description": "System tags for this resource. Each key is predefined and scoped to a namespace.\nExample: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}`\n",
      "type": "object"
    },
    "timeCreated": {
      "description": "The time when the availability catalog was created.",
      "format": "date-time",
      "type": "string"
    },
    "timeUpdated": {
      "description": "The time when the availability catalog was last updated.",
      "format": "date-time",
      "type": "string"
    }
  },
  "required": [
    "id",
    "namespace",
    "compartmentId",
    "displayName",
    "occCustomerGroupId",
    "catalogState",
    "metadataDetails",
    "timeCreated",
    "timeUpdated",
    "lifecycleState"
  ],
  "type": "object",
  "x-example": "Example 1\n  {\n    id\": \"ocid1.availabilityCatalog.oc1..examplea4ssrz2joq66nyomcvb4ydlbfmn2qg7wow5neo2ytcdznohhsyca4\",\n    \"namespace\": \"COMPUTE\",\n    \"displayName\": \"Catalog 1\",\n    \"occCustomerGroupId\": \"ocid1.customerGroup.oc1.examplea4ssrz2joq66nyomcvb4ydlbfmn2qg7wow5neo2ytcdznohhsyca4\",\n    \"catalogState\": \"PUBLISHED\",\n    \"metadataDetails\": {\n      \"version\": \"V1\"\n    },\n    \"lifecycleState\": \"ACTIVE\",\n    \"lifecycleDetails\": null,\n    \"definedTags\": null,\n    \"freeformTags\": null,\n    \"timeCreated\": \"2023-06-03T17:32:28Z\",\n    \"timeUpdated\": \"2023-06-03T17:32:28Z\",\n    \"details\": [\n      {\n         \"catalogId\": \"ocid1.availabilityCatalog.oc1..examplea4ssrz2joq66nyomcvb4ydlbfmn2qg7wow5neo2ytcdznohhsyca4\",\n         \"namespace\": \"COMPUTE\",\n         \"dateFinalCustomerOrder\": \"2023-02-02T00:00:00Z\",\n         \"dateExpectedCapacityHandover\": \"2023-03-16T00:00:00Z\",\n         \"resourceType\": \"CAPACITY_CONSTRAINT\",\n         \"workloadType\": \"ROW\",\n         \"resourceName\": \"US-ASHBURN-1-AD-1\",\n         \"availableQuantity\": 4864,\n         \"totalAvailableQuantity\": 4864,\n         \"demandedQuantity\": 0,\n         \"unit\": \"Servers\"\n      }\n    ]\n  }\n",
  "$defs": {
    "MetadataDetails": {
      "description": "Used for representing the metadata of the catalog. This denotes the version and format of the CSV file for parsing.",
      "properties": {
        "formatVersion": {
          "default": "V2",
          "description": "The version for the format of the catalog file being uploaded.",
          "enum": [
            "V1",
            "V2"
          ],
          "type": "string"
        }
      },
      "required": [
        "formatVersion"
      ],
      "type": "object",
      "x-example": "Example 1\n{\n    \"formatVersion\": \"V2\"\n}\n"
    },
    "OccAvailabilitySummary": {
      "description": "The details about the available capacity and constraints for different resource types present in the availability catalog.",
      "properties": {
        "availableQuantity": {
          "description": "The quantity of resource currently available that the customer can request.",
          "format": "int64",
          "type": "integer"
        },
        "catalogId": {
          "description": "The OCID of the availability catalog.",
          "type": "string"
        },
        "dateExpectedCapacityHandover": {
          "description": "The date by which the capacity requested by customers before dateFinalCustomerOrder needs to be fulfilled.",
          "format": "date-time",
          "type": "string"
        },
        "dateFinalCustomerOrder": {
          "description": "The date by which the customer must place the order to have their capacity requirements met by the customer handover date.",
          "format": "date-time",
          "type": "string"
        },
        "demandedQuantity": {
          "description": "The quantity of resource currently demanded by the customer.",
          "format": "int64",
          "type": "integer"
        },
        "namespace": {
          "description": "The name of the OCI service in consideration. For example, Compute, Exadata, and so on.\n",
          "enum": [
            "COMPUTE"
          ],
          "type": "string",
          "x-obmcs-top-level-enum": "#/definitions/Namespace"
        },
        "resourceName": {
          "description": "The name of the resource that the customer can request.",
          "type": "string"
        },
        "resourceType": {
          "description": "The different types of resources against which customers can place capacity requests.",
          "type": "string"
        },
        "systemTags": {
          "additionalProperties": {
            "additionalProperties": {
              "description": "The value of the tag. Only string type is supported.\n",
              "type": "object"
            },
            "description": "Key-value pair representing system tags' keys and values scoped to a namespace.\nExample: `{\"bar-key\": \"value\"}`\n",
            "type": "object"
          },
          "description": "System tags for this resource. Each key is predefined and scoped to a namespace.\nExample: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}`\n",
          "type": "object"
        },
        "totalAvailableQuantity": {
          "description": "The total quantity of resource that the customer can request.",
          "format": "int64",
          "type": "integer"
        },
        "unit": {
          "description": "The unit in which the resource available is measured.",
          "type": "string"
        },
        "workloadType": {
          "description": "The type of workload (Generic/ROW).",
          "type": "string"
        }
      },
      "required": [
        "catalogId",
        "namespace",
        "dateFinalCustomerOrder",
        "dateExpectedCapacityHandover",
        "resourceType",
        "workloadType",
        "resourceName",
        "availableQuantity",
        "totalAvailableQuantity",
        "demandedQuantity",
        "unit"
      ],
      "type": "object",
      "x-example": "Example 1\n  {\n    \"catalogId\": \"ocid1.availabilityCatalog.oc1..examplea4ssrz2joq66nyomcvb4ydlbfmn2qg7wow5neo2ytcdznohhsyca4\",\n    \"namespace\": \"COMPUTE\",\n    \"dateFinalCustomerOrder\": \"2023-02-02T00:00:00Z\",\n    \"dateExpectedCapacityHandover\": \"2023-03-16T00:00:00Z\",\n    \"resourceType\": \"SERVER_HW\",\n    \"workloadType\": \"GENERIC\",\n    \"name\": \"BM.DenseO.E4.128\",\n    \"availableQuantity\": 235,\n    \"totalAvailableQuantity\": 235,\n    \"demandedQuantity\": 0,\n    \"unit\": \"Servers\"\n  }\n"
    }
  }
}