{
    "$id": "http://redfish.dmtf.org/schemas/v1/Key.v1_0_0.json",
    "$ref": "#/definitions/Key",
    "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json",
    "copyright": "Copyright 2014-2021 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright",
    "definitions": {
        "Actions": {
            "additionalProperties": false,
            "description": "The available actions for this resource.",
            "longDescription": "This type shall contain the available actions for this resource.",
            "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": {
                "Oem": {
                    "$ref": "#/definitions/OemActions",
                    "description": "The available OEM-specific actions for this resource.",
                    "longDescription": "This property shall contain the available OEM-specific actions for this resource."
                }
            },
            "type": "object"
        },
        "Key": {
            "additionalProperties": false,
            "description": "The Key schema describes sensitive data for accessing devices or services.",
            "longDescription": "This resource shall represent a key for a Redfish implementation.",
            "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": {
                "@odata.context": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/context"
                },
                "@odata.etag": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/etag"
                },
                "@odata.id": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/id"
                },
                "@odata.type": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/type"
                },
                "Actions": {
                    "$ref": "#/definitions/Actions",
                    "description": "The available actions for this resource.",
                    "longDescription": "This property shall contain the available actions for this resource."
                },
                "Description": {
                    "anyOf": [
                        {
                            "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "readonly": true
                },
                "Id": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Id",
                    "readonly": true
                },
                "KeyString": {
                    "description": "The string for the key.",
                    "longDescription": "This property shall contain the key, and the format shall follow the requirements specified by the KeyType property value.",
                    "readonly": true,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "KeyType": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/KeyType"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "The format of the key.",
                    "longDescription": "This property shall contain the format type for the key.",
                    "readonly": true
                },
                "NVMeoF": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/NVMeoF"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "NVMe-oF specific properties.",
                    "longDescription": "This property shall contain NVMe-oF specific properties for this key.  This property shall be present if KeyType contains the value `NVMeoF`."
                },
                "Name": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Name",
                    "readonly": true
                },
                "Oem": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Oem",
                    "description": "The OEM extension property.",
                    "longDescription": "This property shall contain the OEM extensions.  All values for properties that this object contains shall conform to the Redfish Specification-described requirements."
                }
            },
            "required": [
                "@odata.id",
                "@odata.type",
                "Id",
                "Name"
            ],
            "requiredOnCreate": [
                "KeyString",
                "KeyType"
            ],
            "type": "object"
        },
        "KeyType": {
            "enum": [
                "NVMeoF"
            ],
            "enumDescriptions": {
                "NVMeoF": "An NVMe-oF key."
            },
            "enumLongDescriptions": {
                "NVMeoF": "This value shall indicate the format of the key is defined by one of the NVMe specifications."
            },
            "type": "string"
        },
        "NVMeoF": {
            "additionalProperties": false,
            "description": "NVMe-oF specific properties.",
            "longDescription": "This type shall contain NVMe-oF specific properties for a key.",
            "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": {
                "HostKeyId": {
                    "description": "The identifier of the host key paired with this target key.",
                    "longDescription": "This property shall contain the value of the Id property of the Key resource representing the host key paired with this target key.  An empty string shall indicate the key is not paired.  This property shall be absent for host keys.",
                    "readonly": false,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "NQN": {
                    "description": "The NVMe Qualified Name (NQN) of the host or target subsystem associated with this key.",
                    "longDescription": "This property shall contain the NVMe Qualified Name (NQN) of the host or target subsystem associated with this key.  The value of this property shall follow the NQN format defined by the NVMe Base Specification.",
                    "readonly": true,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "OEMSecurityProtocolType": {
                    "description": "The OEM security protocol that this key uses.",
                    "longDescription": "This property shall contain the OEM-defined security protocol that this key uses.  The value shall be derived from the contents of the KeyString property.  This property shall be present if SecurityProtocolType contains the value `OEM`.",
                    "readonly": true,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "SecureHashAllowList": {
                    "description": "The secure hash algorithms allowed with the usage of this key.",
                    "items": {
                        "anyOf": [
                            {
                                "$ref": "#/definitions/NVMeoFSecureHashType"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "longDescription": "This property shall contain the secure hash algorithms allowed with the usage of this key.  An empty list or the absence of this property shall indicate any secure hash algorithms are allowed with this key.",
                    "readonly": true,
                    "type": "array"
                },
                "SecurityProtocolType": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/NVMeoFSecurityProtocolType"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "The security protocol that this key uses.",
                    "longDescription": "This property shall contain the security protocol that this key uses.  The value shall be derived from the contents of the KeyString property.",
                    "readonly": true
                }
            },
            "requiredOnCreate": [
                "NQN"
            ],
            "type": "object"
        },
        "NVMeoFSecureHashType": {
            "description": "The NVMe secure hash algorithms that a key is allowed to use.",
            "enum": [
                "SHA256",
                "SHA384",
                "SHA512"
            ],
            "enumDescriptions": {
                "SHA256": "SHA-256.",
                "SHA384": "SHA-384.",
                "SHA512": "SHA-512."
            },
            "enumLongDescriptions": {
                "SHA256": "This value shall indicate the SHA-256 hash function as defined by the 'DH-HMAC-CHAP hash function identifiers' figure in the NVMe Base Specification.",
                "SHA384": "This value shall indicate the SHA-384 hash function as defined by the 'DH-HMAC-CHAP hash function identifiers' figure in the NVMe Base Specification.",
                "SHA512": "This value shall indicate the SHA-512 hash function as defined by the 'DH-HMAC-CHAP hash function identifiers' figure in the NVMe Base Specification."
            },
            "longDescription": "This enumeration shall list the NVMe secure hash algorithms that a key is allowed to use.",
            "type": "string"
        },
        "NVMeoFSecurityProtocolType": {
            "description": "The NVMe security protocols that a key protects.",
            "enum": [
                "DHHC",
                "TLS_PSK",
                "OEM"
            ],
            "enumDescriptions": {
                "DHHC": "Diffie-Hellman Hashed Message Authentication Code Challenge Handshake Authentication Protocol (DH-HMAC-CHAP).",
                "OEM": "OEM.",
                "TLS_PSK": "Transport Layer Security Pre-Shared Key (TLS PSK)."
            },
            "enumLongDescriptions": {
                "DHHC": "This value shall indicate the Diffie-Hellman Hashed Message Authentication Code Challenge Handshake Authentication Protocol (DH-HMAC-CHAP) as defined by the NVMe Base Specification.",
                "OEM": "This value shall indicate an OEM-defined security protocol.  The OEMSecurityProtocolType property shall contain the specific OEM protocol.",
                "TLS_PSK": "This value shall indicate Transport Layer Security Pre-Shared Key (TLS PSK) as defined by the NVMe TCP Transport Specification."
            },
            "longDescription": "This enumeration shall list the NVMe security protocols that a key protects.",
            "type": "string"
        },
        "OemActions": {
            "additionalProperties": true,
            "description": "The available OEM-specific actions for this resource.",
            "longDescription": "This type shall contain the available OEM-specific actions for this resource.",
            "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": {},
            "type": "object"
        }
    },
    "owningEntity": "DMTF",
    "release": "2021.2",
    "title": "#Key.v1_0_0.Key"
}