{
  "description": "Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.",
  "properties": {
    "basic": {
      "description": "BasicDevice defines one device instance.",
      "properties": {
        "allNodes": {
          "description": "AllNodes indicates that all nodes have access to the device.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "allowMultipleAllocations": {
          "description": "AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests.\n\nIf AllowMultipleAllocations is set to true, the device can be allocated more than once, and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "attributes": {
          "additionalProperties": {
            "description": "DeviceAttribute must have exactly one field set.",
            "properties": {
              "bool": {
                "description": "BoolValue is a true/false value.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "int": {
                "description": "IntValue is a number.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "string": {
                "description": "StringValue is a string. Must not be longer than 64 characters.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "version": {
                "description": "VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": false
          },
          "description": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
          "type": [
            "object",
            "null"
          ]
        },
        "bindingConditions": {
          "description": "BindingConditions defines the conditions for proceeding with binding. All of these conditions must be set in the per-device status conditions with a value of True to proceed with binding the pod to the node while scheduling the pod.\n\nThe maximum number of binding conditions is 4.\n\nThe conditions must be a valid condition type string.\n\nThis is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates.",
          "items": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": [
            "array",
            "null"
          ],
          "x-kubernetes-list-type": "atomic"
        },
        "bindingFailureConditions": {
          "description": "BindingFailureConditions defines the conditions for binding failure. They may be set in the per-device status conditions. If any is true, a binding failure occurred.\n\nThe maximum number of binding failure conditions is 4.\n\nThe conditions must be a valid condition type string.\n\nThis is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates.",
          "items": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": [
            "array",
            "null"
          ],
          "x-kubernetes-list-type": "atomic"
        },
        "bindsToNode": {
          "description": "BindsToNode indicates if the usage of an allocation involving this device has to be limited to exactly the node that was chosen when allocating the claim. If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector to match the node where the allocation was made.\n\nThis is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "capacity": {
          "additionalProperties": {
            "description": "DeviceCapacity describes a quantity associated with a device.",
            "properties": {
              "requestPolicy": {
                "description": "CapacityRequestPolicy defines how requests consume device capacity.\n\nMust not set more than one ValidRequestValues.",
                "properties": {
                  "default": {
                    "oneOf": [
                      {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      {
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    ]
                  },
                  "validRange": {
                    "description": "CapacityRequestPolicyRange defines a valid range for consumable capacity values.\n\n  - If the requested amount is less than Min, it is rounded up to the Min value.\n  - If Step is set and the requested amount is between Min and Max but not aligned with Step,\n    it will be rounded up to the next value equal to Min + (n * Step).\n  - If Step is not set, the requested amount is used as-is if it falls within the range Min to Max (if set).\n  - If the requested or rounded amount exceeds Max (if set), the request does not satisfy the policy,\n    and the device cannot be allocated.",
                    "properties": {
                      "max": {
                        "oneOf": [
                          {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          {
                            "type": [
                              "number",
                              "null"
                            ]
                          }
                        ]
                      },
                      "min": {
                        "oneOf": [
                          {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          {
                            "type": [
                              "number",
                              "null"
                            ]
                          }
                        ]
                      },
                      "step": {
                        "oneOf": [
                          {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          {
                            "type": [
                              "number",
                              "null"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "min"
                    ],
                    "type": [
                      "object",
                      "null"
                    ],
                    "additionalProperties": false
                  },
                  "validValues": {
                    "description": "ValidValues defines a set of acceptable quantity values in consuming requests.\n\nMust not contain more than 10 entries. Must be sorted in ascending order.\n\nIf this field is set, Default must be defined and it must be included in ValidValues list.\n\nIf the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) \u2208 validValues), where requestedValue \u2264 max(validValues).\n\nIf the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated.",
                    "items": {
                      "oneOf": [
                        {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        {
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      ]
                    },
                    "type": [
                      "array",
                      "null"
                    ],
                    "x-kubernetes-list-type": "atomic"
                  }
                },
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": false
              },
              "value": {
                "oneOf": [
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                ]
              }
            },
            "required": [
              "value"
            ],
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": false
          },
          "description": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
          "type": [
            "object",
            "null"
          ]
        },
        "consumesCounters": {
          "description": "ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets.\n\nThere can only be a single entry per counterSet.\n\nThe maximum number of device counter consumptions per device is 2.",
          "items": {
            "description": "DeviceCounterConsumption defines a set of counters that a device will consume from a CounterSet.",
            "properties": {
              "counterSet": {
                "description": "CounterSet is the name of the set from which the counters defined will be consumed.",
                "type": "string"
              },
              "counters": {
                "additionalProperties": {
                  "description": "Counter describes a quantity associated with a device.",
                  "properties": {
                    "value": {
                      "oneOf": [
                        {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        {
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "value"
                  ],
                  "type": [
                    "object",
                    "null"
                  ],
                  "additionalProperties": false
                },
                "description": "Counters defines the counters that will be consumed by the device.\n\nThe maximum number of counters is 32.",
                "type": "object"
              }
            },
            "required": [
              "counterSet",
              "counters"
            ],
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": false
          },
          "type": [
            "array",
            "null"
          ],
          "x-kubernetes-list-type": "atomic"
        },
        "nodeName": {
          "description": "NodeName identifies the node where the device is available.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.",
          "type": [
            "string",
            "null"
          ]
        },
        "nodeSelector": {
          "description": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.",
          "properties": {
            "nodeSelectorTerms": {
              "description": "Required. A list of node selector terms. The terms are ORed.",
              "items": {
                "description": "A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.",
                "properties": {
                  "matchExpressions": {
                    "description": "A list of node selector requirements by node's labels.",
                    "items": {
                      "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
                      "properties": {
                        "key": {
                          "description": "The label key that the selector applies to.",
                          "type": "string"
                        },
                        "operator": {
                          "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.",
                          "type": "string"
                        },
                        "values": {
                          "description": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.",
                          "items": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "type": [
                            "array",
                            "null"
                          ],
                          "x-kubernetes-list-type": "atomic"
                        }
                      },
                      "required": [
                        "key",
                        "operator"
                      ],
                      "type": [
                        "object",
                        "null"
                      ],
                      "additionalProperties": false
                    },
                    "type": [
                      "array",
                      "null"
                    ],
                    "x-kubernetes-list-type": "atomic"
                  },
                  "matchFields": {
                    "description": "A list of node selector requirements by node's fields.",
                    "items": {
                      "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
                      "properties": {
                        "key": {
                          "description": "The label key that the selector applies to.",
                          "type": "string"
                        },
                        "operator": {
                          "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.",
                          "type": "string"
                        },
                        "values": {
                          "description": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.",
                          "items": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "type": [
                            "array",
                            "null"
                          ],
                          "x-kubernetes-list-type": "atomic"
                        }
                      },
                      "required": [
                        "key",
                        "operator"
                      ],
                      "type": [
                        "object",
                        "null"
                      ],
                      "additionalProperties": false
                    },
                    "type": [
                      "array",
                      "null"
                    ],
                    "x-kubernetes-list-type": "atomic"
                  }
                },
                "type": [
                  "object",
                  "null"
                ],
                "x-kubernetes-map-type": "atomic",
                "additionalProperties": false
              },
              "type": "array",
              "x-kubernetes-list-type": "atomic"
            }
          },
          "required": [
            "nodeSelectorTerms"
          ],
          "type": [
            "object",
            "null"
          ],
          "x-kubernetes-map-type": "atomic",
          "additionalProperties": false
        },
        "taints": {
          "description": "If specified, these are the driver-defined taints.\n\nThe maximum number of taints is 16. If taints are set for any device in a ResourceSlice, then the maximum number of allowed devices per ResourceSlice is 64 instead of 128.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
          "items": {
            "description": "The device this taint is attached to has the \"effect\" on any claim which does not tolerate the taint and, through the claim, to pods using the claim.",
            "properties": {
              "effect": {
                "description": "The effect of the taint on claims that do not tolerate the taint and through such claims on the pods using them.\n\nValid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here. More effects may get added in the future. Consumers must treat unknown effects like None.",
                "type": "string"
              },
              "key": {
                "description": "The taint key to be applied to a device. Must be a label name.",
                "type": "string"
              },
              "timeAdded": {
                "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON.  Wrappers are provided for many of the factory methods that the time package offers.",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "value": {
                "description": "The taint value corresponding to the taint key. Must be a label value.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "key",
              "effect"
            ],
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": false
          },
          "type": [
            "array",
            "null"
          ],
          "x-kubernetes-list-type": "atomic"
        }
      },
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false
    },
    "name": {
      "description": "Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "name"
  ],
  "type": "object",
  "additionalProperties": false,
  "$schema": "http://json-schema.org/schema#"
}