/* tslint:disable */ /* eslint-disable */ /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: unversioned * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists } from '../runtime'; import { IoK8sApiResourceV1beta2DeviceToleration, IoK8sApiResourceV1beta2DeviceTolerationFromJSON, IoK8sApiResourceV1beta2DeviceTolerationToJSON, } from './'; /** * DeviceRequestAllocationResult contains the allocation result for one request. * @export * @interface IoK8sApiResourceV1beta2DeviceRequestAllocationResult */ export interface IoK8sApiResourceV1beta2DeviceRequestAllocationResult { /** * AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode. * * This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled. * @type {boolean} * @memberof IoK8sApiResourceV1beta2DeviceRequestAllocationResult */ adminAccess?: boolean; /** * Device references one device instance via its name in the driver's resource pool. It must be a DNS label. * @type {string} * @memberof IoK8sApiResourceV1beta2DeviceRequestAllocationResult */ device: string; /** * Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node. * * Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. * @type {string} * @memberof IoK8sApiResourceV1beta2DeviceRequestAllocationResult */ driver: string; /** * This name together with the driver name and the device name field identify which device was allocated (`//`). * * Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes. * @type {string} * @memberof IoK8sApiResourceV1beta2DeviceRequestAllocationResult */ pool: string; /** * Request is the name of the request in the claim which caused this device to be allocated. If it references a subrequest in the firstAvailable list on a DeviceRequest, this field must include both the name of the main request and the subrequest using the format
/. * * Multiple devices may have been allocated per request. * @type {string} * @memberof IoK8sApiResourceV1beta2DeviceRequestAllocationResult */ request: string; /** * A copy of all tolerations specified in the request at the time when the device got allocated. * * The maximum number of tolerations is 16. * * This is an alpha field and requires enabling the DRADeviceTaints feature gate. * @type {Array} * @memberof IoK8sApiResourceV1beta2DeviceRequestAllocationResult */ tolerations?: Array; } export function IoK8sApiResourceV1beta2DeviceRequestAllocationResultFromJSON( json: any, ): IoK8sApiResourceV1beta2DeviceRequestAllocationResult { return IoK8sApiResourceV1beta2DeviceRequestAllocationResultFromJSONTyped(json, false); } export function IoK8sApiResourceV1beta2DeviceRequestAllocationResultFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiResourceV1beta2DeviceRequestAllocationResult { if (json === undefined || json === null) { return json; } return { adminAccess: !exists(json, 'adminAccess') ? undefined : json['adminAccess'], device: json['device'], driver: json['driver'], pool: json['pool'], request: json['request'], tolerations: !exists(json, 'tolerations') ? undefined : (json['tolerations'] as Array).map(IoK8sApiResourceV1beta2DeviceTolerationFromJSON), }; } export function IoK8sApiResourceV1beta2DeviceRequestAllocationResultToJSON( value?: IoK8sApiResourceV1beta2DeviceRequestAllocationResult | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { adminAccess: value.adminAccess, device: value.device, driver: value.driver, pool: value.pool, request: value.request, tolerations: value.tolerations === undefined ? undefined : (value.tolerations as Array).map(IoK8sApiResourceV1beta2DeviceTolerationToJSON), }; }