/* 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 { IoK8sApiResourceV1beta1DeviceClaimConfiguration, IoK8sApiResourceV1beta1DeviceClaimConfigurationFromJSON, IoK8sApiResourceV1beta1DeviceClaimConfigurationToJSON, IoK8sApiResourceV1beta1DeviceConstraint, IoK8sApiResourceV1beta1DeviceConstraintFromJSON, IoK8sApiResourceV1beta1DeviceConstraintToJSON, IoK8sApiResourceV1beta1DeviceRequest, IoK8sApiResourceV1beta1DeviceRequestFromJSON, IoK8sApiResourceV1beta1DeviceRequestToJSON, } from './'; /** * DeviceClaim defines how to request devices with a ResourceClaim. * @export * @interface IoK8sApiResourceV1beta1DeviceClaim */ export interface IoK8sApiResourceV1beta1DeviceClaim { /** * This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim. * @type {Array} * @memberof IoK8sApiResourceV1beta1DeviceClaim */ config?: Array; /** * These constraints must be satisfied by the set of devices that get allocated for the claim. * @type {Array} * @memberof IoK8sApiResourceV1beta1DeviceClaim */ constraints?: Array; /** * Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated. * @type {Array} * @memberof IoK8sApiResourceV1beta1DeviceClaim */ requests?: Array; } export function IoK8sApiResourceV1beta1DeviceClaimFromJSON( json: any, ): IoK8sApiResourceV1beta1DeviceClaim { return IoK8sApiResourceV1beta1DeviceClaimFromJSONTyped(json, false); } export function IoK8sApiResourceV1beta1DeviceClaimFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiResourceV1beta1DeviceClaim { if (json === undefined || json === null) { return json; } return { config: !exists(json, 'config') ? undefined : (json['config'] as Array).map(IoK8sApiResourceV1beta1DeviceClaimConfigurationFromJSON), constraints: !exists(json, 'constraints') ? undefined : (json['constraints'] as Array).map(IoK8sApiResourceV1beta1DeviceConstraintFromJSON), requests: !exists(json, 'requests') ? undefined : (json['requests'] as Array).map(IoK8sApiResourceV1beta1DeviceRequestFromJSON), }; } export function IoK8sApiResourceV1beta1DeviceClaimToJSON( value?: IoK8sApiResourceV1beta1DeviceClaim | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { config: value.config === undefined ? undefined : (value.config as Array).map(IoK8sApiResourceV1beta1DeviceClaimConfigurationToJSON), constraints: value.constraints === undefined ? undefined : (value.constraints as Array).map(IoK8sApiResourceV1beta1DeviceConstraintToJSON), requests: value.requests === undefined ? undefined : (value.requests as Array).map(IoK8sApiResourceV1beta1DeviceRequestToJSON), }; }