/* 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 { IoK8sApiResourceV1beta2Counter, IoK8sApiResourceV1beta2CounterFromJSON, IoK8sApiResourceV1beta2CounterToJSON, } from './'; /** * DeviceCounterConsumption defines a set of counters that a device will consume from a CounterSet. * @export * @interface IoK8sApiResourceV1beta2DeviceCounterConsumption */ export interface IoK8sApiResourceV1beta2DeviceCounterConsumption { /** * CounterSet is the name of the set from which the counters defined will be consumed. * @type {string} * @memberof IoK8sApiResourceV1beta2DeviceCounterConsumption */ counterSet: string; /** * Counters defines the counters 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]: IoK8sApiResourceV1beta2Counter; }} * @memberof IoK8sApiResourceV1beta2DeviceCounterConsumption */ counters: { [key: string]: IoK8sApiResourceV1beta2Counter }; } export function IoK8sApiResourceV1beta2DeviceCounterConsumptionFromJSON( json: any, ): IoK8sApiResourceV1beta2DeviceCounterConsumption { return IoK8sApiResourceV1beta2DeviceCounterConsumptionFromJSONTyped(json, false); } export function IoK8sApiResourceV1beta2DeviceCounterConsumptionFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiResourceV1beta2DeviceCounterConsumption { if (json === undefined || json === null) { return json; } return { counterSet: json['counterSet'], counters: mapValues(json['counters'], IoK8sApiResourceV1beta2CounterFromJSON), }; } export function IoK8sApiResourceV1beta2DeviceCounterConsumptionToJSON( value?: IoK8sApiResourceV1beta2DeviceCounterConsumption | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { counterSet: value.counterSet, counters: mapValues(value.counters, IoK8sApiResourceV1beta2CounterToJSON), }; }