/* 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 { mapValues } from '../runtime'; import { IoK8sApiResourceV1alpha3Counter, IoK8sApiResourceV1alpha3CounterFromJSON, IoK8sApiResourceV1alpha3CounterToJSON, } from './'; /** * DeviceCounterConsumption defines a set of counters that a device will consume from a CounterSet. * @export * @interface IoK8sApiResourceV1alpha3DeviceCounterConsumption */ export interface IoK8sApiResourceV1alpha3DeviceCounterConsumption { /** * CounterSet defines the set from which the counters defined will be consumed. * @type {string} * @memberof IoK8sApiResourceV1alpha3DeviceCounterConsumption */ counterSet: string; /** * Counters defines the Counter that will be consumed by the device. * * The maximum number counters in a device is 32. In addition, the maximum number of all counters in all devices is 1024 (for example, 64 devices with 16 counters each). * @type {{ [key: string]: IoK8sApiResourceV1alpha3Counter; }} * @memberof IoK8sApiResourceV1alpha3DeviceCounterConsumption */ counters: { [key: string]: IoK8sApiResourceV1alpha3Counter }; } export function IoK8sApiResourceV1alpha3DeviceCounterConsumptionFromJSON( json: any, ): IoK8sApiResourceV1alpha3DeviceCounterConsumption { return IoK8sApiResourceV1alpha3DeviceCounterConsumptionFromJSONTyped(json, false); } export function IoK8sApiResourceV1alpha3DeviceCounterConsumptionFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiResourceV1alpha3DeviceCounterConsumption { if (json === undefined || json === null) { return json; } return { counterSet: json['counterSet'], counters: mapValues(json['counters'], IoK8sApiResourceV1alpha3CounterFromJSON), }; } export function IoK8sApiResourceV1alpha3DeviceCounterConsumptionToJSON( value?: IoK8sApiResourceV1alpha3DeviceCounterConsumption | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { counterSet: value.counterSet, counters: mapValues(value.counters, IoK8sApiResourceV1alpha3CounterToJSON), }; }