{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-create-occ-capacity-request-details-schema.json",
  "title": "CreateOccCapacityRequestDetails",
  "description": "Details about the create request for the capacity request.\n",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-capacitymanagement-api-openapi.yml#/components/schemas/CreateOccCapacityRequestDetails",
  "properties": {
    "availabilityDomain": {
      "description": "The availability domain (AD) in which the new resource is to be placed. If this is specified then the capacity will be validated and fulfilled within the scope of this AD. Note that this field is NOT required for Capacity request Transfer requests.",
      "type": "string"
    },
    "compartmentId": {
      "description": "Since all resources are at tenancy level hence this will be the ocid of the tenancy where operation is to be performed.",
      "type": "string"
    },
    "dateExpectedCapacityHandover": {
      "description": "The date by which the capacity requested by customers before dateFinalCustomerOrder needs to be fulfilled.",
      "format": "date-time",
      "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": "Meaningful text about the capacity request.",
      "type": "string"
    },
    "details": {
      "description": "A list of different resources requested by the user.",
      "items": {
        "$ref": "#/$defs/OccCapacityRequestBaseDetails"
      },
      "maxItems": 100,
      "type": "array"
    },
    "displayName": {
      "description": "An user-friendly name for the capacity request. Does not have to be unique, and it's changeable. Avoid entering confidential information.",
      "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"
    },
    "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"
    },
    "namespace": {
      "description": "The name of the OCI service in consideration. For example, Compute, Exadata, and so on.",
      "enum": [
        "COMPUTE"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/Namespace"
    },
    "occAvailabilityCatalogId": {
      "description": "The OCID of the availability catalog against which capacity request is made.",
      "type": "string"
    },
    "region": {
      "description": "The name of the region for which the capacity request is made.",
      "type": "string"
    },
    "requestState": {
      "default": "CREATED",
      "description": "The subset of request states available for creating the capacity request.",
      "enum": [
        "CREATED",
        "SUBMITTED"
      ],
      "type": "string"
    },
    "requestType": {
      "description": "Type of Capacity Request(New or Transfer)",
      "type": "string",
      "x-obmcs-enumref": "#/definitions/OccCapacityRequest/requestType"
    }
  },
  "required": [
    "compartmentId",
    "namespace",
    "region",
    "displayName",
    "dateExpectedCapacityHandover",
    "details"
  ],
  "type": "object",
  "x-example": "Example 1\n  {\n      \"compartmentId\": \"ocid1.compartment.oc1..examplea4ssrz2joq66nyomcvb4ydlbfmn2qg7wow5neo2ytcdznohhsyca4\",\n      \"occAvailabilityCatalogId\": \"ocid1.availabilityCatalog.oc1..examplea4ssrz2joq66nyomcvb4ydlbfmn2qg7wow5neo2ytcdznohhsyca6\",\n      \"namespace\": \"COMPUTE\",\n      \"region\": \"US-ASHBURN-1\",\n      \"availabilityDomain\": \"US-ASHBURN-AD-1\"\n      \"dateExpectedCapacityHandover\": \"2023-03-16T00:00:00Z\",\n      \"displayName\": \"Test Request\",\n      \"description\": \"This request is for testing the CREATE API\",\n      \"details\": [\n        {\n          \"resourceType\": \"SERVER_HW\",\n          \"workloadType\": \"GENERIC\",\n          \"resourceName\": \"BM.Standard2.52\",\n          \"demandQuantity\": 135\n        }\n      ]\n  }\n",
  "$defs": {
    "AssociatedOccHandoverResourceBlock": {
      "description": "Details about the resource block that was handed over.\n",
      "properties": {
        "handoverQuantity": {
          "description": "The total quantity of the resource that was made available to the customer as part of this resource block\n",
          "format": "int64",
          "type": "integer"
        },
        "occHandoverResourceBlockId": {
          "description": "The OCID of the handed over resource block.\n",
          "type": "string"
        }
      },
      "type": "object"
    },
    "OccCapacityRequestBaseDetails": {
      "description": "The details of the create capacity request. This model serves as a base for different namespaces.",
      "properties": {
        "actualHandoverQuantity": {
          "description": "The actual handed over quantity of resources at the time of request resolution.",
          "format": "int64",
          "type": "integer"
        },
        "associatedOccHandoverResourceBlockList": {
          "description": "A list containing details about occHandoverResourceBlocks which were handed over for the corresponding resource name.\n",
          "items": {
            "$ref": "#/$defs/AssociatedOccHandoverResourceBlock"
          },
          "maxItems": 100,
          "type": "array"
        },
        "availabilityDomain": {
          "description": "The availability domain of the resource which is to be transferred. Note that this is only required for Capacity Request Transfer requests.",
          "type": "string"
        },
        "dateActualHandover": {
          "description": "The date on which the actual handover quantity of resources is delivered.",
          "format": "date-time",
          "type": "string"
        },
        "dateExpectedHandover": {
          "description": "The date on which the latest increment to supplied quantity of resources was delivered.",
          "format": "date-time",
          "type": "string"
        },
        "demandQuantity": {
          "description": "The number of compute server's with name <resourceName> required by the user.",
          "format": "int64",
          "type": "integer"
        },
        "expectedHandoverQuantity": {
          "description": "The incremental quantity of resources supplied as the provisioning is underway.",
          "format": "int64",
          "type": "integer"
        },
        "resourceName": {
          "description": "The name of the COMPUTE server shape for which the request is made. Do not use CAPACITY_CONSTRAINT as the resource name.",
          "type": "string"
        },
        "resourceType": {
          "description": "The type of the resource against which the user wants to place a capacity request.",
          "type": "string"
        },
        "sourceWorkloadType": {
          "description": "The WorkloadType from where capacity request are to be transferred.",
          "type": "string"
        },
        "workloadType": {
          "description": "The type of the workload (Generic/ROW).",
          "type": "string"
        }
      },
      "required": [
        "resourceType",
        "workloadType",
        "resourceName",
        "demandQuantity"
      ],
      "x-example": "Example 1\n{\n  \"resourceType\": \"SERVER_HW\",\n  \"workloadType\": \"GENERIC\",\n  \"expectedHandoverQuantity\": null,\n  \"dateExpectedHandover\": null,\n  \"actualHandoverQuantity\": null,\n  \"dateActualHandover\": null,\n  \"resourceName\": \"BM.Standard2.52\",\n  \"demandQuantity\": 135\n}\nExample 2\n{\n  \"resourceType\": \"SERVER_HW\",\n  \"workloadType\": \"ROW\",\n  \"expectedHandoverQuantity\": null,\n  \"dateExpectedHandover\": null,\n  \"actualHandoverQuantity\": null,\n  \"dateActualHandover\": null,\n  \"sourceWorkloadType\": \"US_PROD\",\n  \"availabilityDomain\": \"US-ASHBURN-1-AD-1\",\n  \"associatedOccHandoverResourceBlocks\": [{\n    \"occHandoverResourceBlockId\": \"ocid1.occhandoverresourceblock.oc1..examplea4ssrz2joq66nyomcvb4ydlbfmn2qg7wow5neo2ytcdznohhsyca4\",\n    \"handoverQuantity\": 23\n  }],\n  \"resourceName\": \"BM.Standard2.52\",\n  \"demandQuantity\": 135\n}\n"
    }
  }
}