{
    "$id": "http://redfish.dmtf.org/schemas/swordfish/v1/Capacity.json",
    "$ref": "#/definitions/CapacitySource",
    "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json",
    "copyright": "Copyright 2015-2026 Storage Networking Industry Association (SNIA), USA. All rights reserved.",
    "definitions": {
        "Capacity": {
            "additionalProperties": false,
            "description": "This is the schema definition for the Capacity of a device. It represents the properties for capacity for any data store.",
            "longDescription": "This composition may be used to represent storage capacity.  The sum of the values in Data, Metadata, and Snapshot shall be equal to the total capacity for the data store.",
            "patternProperties": {
                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
                    "description": "This property shall specify a valid odata or Redfish property.",
                    "type": [
                        "array",
                        "boolean",
                        "integer",
                        "number",
                        "null",
                        "object",
                        "string"
                    ]
                }
            },
            "properties": {
                "Data": {
                    "$ref": "#/definitions/CapacityInfo",
                    "description": "The capacity information relating to the user data.",
                    "longDescription": "The value shall be capacity information relating to provisioned user data."
                },
                "IsThinProvisioned": {
                    "description": "Marks that the capacity is not necessarily fully allocated.",
                    "longDescription": "If the value is false, the capacity shall be fully allocated.  The default value shall be false.",
                    "readonly": true,
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "Metadata": {
                    "$ref": "#/definitions/CapacityInfo",
                    "description": "The capacity information relating to  metadata.",
                    "longDescription": "The value shall be capacity information relating to provisioned system (non-user accessible) data."
                },
                "Snapshot": {
                    "$ref": "#/definitions/CapacityInfo",
                    "description": "The capacity information relating to snapshot or backup data.",
                    "longDescription": "The value shall be capacity information relating to provisioned snapshot or backup data."
                }
            },
            "type": "object"
        },
        "CapacityInfo": {
            "additionalProperties": false,
            "description": "The capacity of specific data type in a data store.",
            "longDescription": "This composition may be used to represent the utilization of storage capacity.",
            "patternProperties": {
                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
                    "description": "This property shall specify a valid odata or Redfish property.",
                    "type": [
                        "array",
                        "boolean",
                        "integer",
                        "number",
                        "null",
                        "object",
                        "string"
                    ]
                }
            },
            "properties": {
                "AllocatedBytes": {
                    "description": "The number of bytes currently allocated by the storage system in this data store for this data type.",
                    "longDescription": "The value shall be the number of bytes currently allocated by the storage system in this data store for this data type.",
                    "readonly": false,
                    "type": [
                        "integer",
                        "null"
                    ],
                    "units": "By"
                },
                "ConsumedBytes": {
                    "description": "The number of bytes consumed in this data store for this data type.",
                    "longDescription": "The value shall be the number of logical bytes currently consumed in this data store for this data type.",
                    "readonly": true,
                    "type": [
                        "integer",
                        "null"
                    ],
                    "units": "By"
                },
                "GuaranteedBytes": {
                    "description": "The number of bytes the storage system guarantees can be allocated in this data store for this data type.",
                    "longDescription": "The value shall be the number of bytes the storage system guarantees can be allocated in this data store for this data type.",
                    "readonly": false,
                    "type": [
                        "integer",
                        "null"
                    ],
                    "units": "By"
                },
                "ProvisionedBytes": {
                    "description": "The maximum number of bytes that can be allocated in this data store for this data type.",
                    "longDescription": "The value shall be the maximum number of bytes that can be allocated in this data store for this data type.",
                    "readonly": false,
                    "type": [
                        "integer",
                        "null"
                    ],
                    "units": "By"
                }
            },
            "type": "object"
        },
        "CapacitySource": {
            "anyOf": [
                {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/idRef"
                },
                {
                    "$ref": "http://redfish.dmtf.org/schemas/swordfish/v1/Capacity.v1_0_5.json#/definitions/CapacitySource"
                },
                {
                    "$ref": "http://redfish.dmtf.org/schemas/swordfish/v1/Capacity.v1_1_5.json#/definitions/CapacitySource"
                },
                {
                    "$ref": "http://redfish.dmtf.org/schemas/swordfish/v1/Capacity.v1_2_2.json#/definitions/CapacitySource"
                }
            ],
            "deletable": true,
            "description": "A description of the type and source of storage.",
            "insertable": false,
            "longDescription": "This type may be used to represent the source and type of storage capacity.  At most one of the ProvidingDrives, ProvidingVolumes or ProvidingPools properties may have a value.  If any of ProvidingDrives, ProvidingVolumes or ProvidingPools reference more than one resource, allocation of capacity across those resources is implementation dependent.",
            "updatable": true,
            "uris": [
                "/redfish/v1/StorageServices/{StorageServiceId}/StoragePools/{StoragePoolId}/CapacitySources/{CapacitySourceId}",
                "/redfish/v1/StorageServices/{StorageServiceId}/Volumes/{VolumeId}/CapacitySources/{CapacitySourceId}",
                "/redfish/v1/StorageServices/{StorageServiceId}/FileSystems/{FileSystemId}/CapacitySources/{CapacitySourceId}",
                "/redfish/v1/Storage/{StorageId}/StoragePools/{StoragePoolId}/CapacitySources/{CapacitySourceId}",
                "/redfish/v1/Storage/{StorageId}/StoragePools/{StoragePoolId}/AllocatedVolumes/{VolumeId}/CapacitySources/{CapacitySourceId}",
                "/redfish/v1/Storage/{StorageId}/Volumes/{VolumeId}/CapacitySources/{CapacitySourceId}",
                "/redfish/v1/Storage/{StorageId}/FileSystems/{FileSystemId}/CapacitySources/{CapacitySourceId}",
                "/redfish/v1/Systems/{ComputerSystemId}/Storage/{StorageId}/StoragePools/{StoragePoolId}/CapacitySources/{CapacitySourceId}",
                "/redfish/v1/Systems/{ComputerSystemId}/Storage/{StorageId}/Volumes/{VolumeId}/CapacitySources/{CapacitySourceId}",
                "/redfish/v1/Systems/{ComputerSystemId}/Storage/{StorageId}/FileSystems/{FileSystemId}/CapacitySources/{CapacitySourceId}"
            ]
        }
    },
    "language": "en",
    "owningEntity": "SNIA",
    "title": "#Capacity.CapacitySource"
}