/* 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 { IoK8sApiResourceV1alpha3DeviceClassConfiguration, IoK8sApiResourceV1alpha3DeviceClassConfigurationFromJSON, IoK8sApiResourceV1alpha3DeviceClassConfigurationToJSON, IoK8sApiResourceV1alpha3DeviceSelector, IoK8sApiResourceV1alpha3DeviceSelectorFromJSON, IoK8sApiResourceV1alpha3DeviceSelectorToJSON, } from './'; /** * DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it. * @export * @interface IoK8sApiResourceV1alpha3DeviceClassSpec */ export interface IoK8sApiResourceV1alpha3DeviceClassSpec { /** * Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver. * * They are passed to the driver, but are not considered while allocating the claim. * @type {Array} * @memberof IoK8sApiResourceV1alpha3DeviceClassSpec */ config?: Array; /** * Each selector must be satisfied by a device which is claimed via this class. * @type {Array} * @memberof IoK8sApiResourceV1alpha3DeviceClassSpec */ selectors?: Array; } export function IoK8sApiResourceV1alpha3DeviceClassSpecFromJSON( json: any, ): IoK8sApiResourceV1alpha3DeviceClassSpec { return IoK8sApiResourceV1alpha3DeviceClassSpecFromJSONTyped(json, false); } export function IoK8sApiResourceV1alpha3DeviceClassSpecFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiResourceV1alpha3DeviceClassSpec { if (json === undefined || json === null) { return json; } return { config: !exists(json, 'config') ? undefined : (json['config'] as Array).map( IoK8sApiResourceV1alpha3DeviceClassConfigurationFromJSON, ), selectors: !exists(json, 'selectors') ? undefined : (json['selectors'] as Array).map(IoK8sApiResourceV1alpha3DeviceSelectorFromJSON), }; } export function IoK8sApiResourceV1alpha3DeviceClassSpecToJSON( value?: IoK8sApiResourceV1alpha3DeviceClassSpec | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { config: value.config === undefined ? undefined : (value.config as Array).map(IoK8sApiResourceV1alpha3DeviceClassConfigurationToJSON), selectors: value.selectors === undefined ? undefined : (value.selectors as Array).map(IoK8sApiResourceV1alpha3DeviceSelectorToJSON), }; }