/* 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 { IoK8sApiResourceV1alpha3DeviceClaimConfiguration, IoK8sApiResourceV1alpha3DeviceClaimConfigurationFromJSON, IoK8sApiResourceV1alpha3DeviceClaimConfigurationToJSON, IoK8sApiResourceV1alpha3DeviceConstraint, IoK8sApiResourceV1alpha3DeviceConstraintFromJSON, IoK8sApiResourceV1alpha3DeviceConstraintToJSON, IoK8sApiResourceV1alpha3DeviceRequest, IoK8sApiResourceV1alpha3DeviceRequestFromJSON, IoK8sApiResourceV1alpha3DeviceRequestToJSON, } from './'; /** * DeviceClaim defines how to request devices with a ResourceClaim. * @export * @interface IoK8sApiResourceV1alpha3DeviceClaim */ export interface IoK8sApiResourceV1alpha3DeviceClaim { /** * 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 IoK8sApiResourceV1alpha3DeviceClaim */ config?: Array; /** * These constraints must be satisfied by the set of devices that get allocated for the claim. * @type {Array} * @memberof IoK8sApiResourceV1alpha3DeviceClaim */ constraints?: Array; /** * Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated. * @type {Array} * @memberof IoK8sApiResourceV1alpha3DeviceClaim */ requests?: Array; } export function IoK8sApiResourceV1alpha3DeviceClaimFromJSON( json: any, ): IoK8sApiResourceV1alpha3DeviceClaim { return IoK8sApiResourceV1alpha3DeviceClaimFromJSONTyped(json, false); } export function IoK8sApiResourceV1alpha3DeviceClaimFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiResourceV1alpha3DeviceClaim { if (json === undefined || json === null) { return json; } return { config: !exists(json, 'config') ? undefined : (json['config'] as Array).map( IoK8sApiResourceV1alpha3DeviceClaimConfigurationFromJSON, ), constraints: !exists(json, 'constraints') ? undefined : (json['constraints'] as Array).map(IoK8sApiResourceV1alpha3DeviceConstraintFromJSON), requests: !exists(json, 'requests') ? undefined : (json['requests'] as Array).map(IoK8sApiResourceV1alpha3DeviceRequestFromJSON), }; } export function IoK8sApiResourceV1alpha3DeviceClaimToJSON( value?: IoK8sApiResourceV1alpha3DeviceClaim | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { config: value.config === undefined ? undefined : (value.config as Array).map(IoK8sApiResourceV1alpha3DeviceClaimConfigurationToJSON), constraints: value.constraints === undefined ? undefined : (value.constraints as Array).map(IoK8sApiResourceV1alpha3DeviceConstraintToJSON), requests: value.requests === undefined ? undefined : (value.requests as Array).map(IoK8sApiResourceV1alpha3DeviceRequestToJSON), }; }