/* 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 './'; /** * CounterSet defines a named set of counters that are available to be used by devices defined in the ResourceSlice. * * The counters are not allocatable by themselves, but can be referenced by devices. When a device is allocated, the portion of counters it uses will no longer be available for use by other devices. * @export * @interface IoK8sApiResourceV1alpha3CounterSet */ export interface IoK8sApiResourceV1alpha3CounterSet { /** * Counters defines the counters that will be consumed by the device. The name of each counter must be unique in that set and must be a DNS label. * * To ensure this uniqueness, capacities defined by the vendor must be listed without the driver name as domain prefix in their name. All others must be listed with their domain prefix. * * The maximum number of counters is 32. * @type {{ [key: string]: IoK8sApiResourceV1alpha3Counter; }} * @memberof IoK8sApiResourceV1alpha3CounterSet */ counters: { [key: string]: IoK8sApiResourceV1alpha3Counter }; /** * CounterSet is the name of the set from which the counters defined will be consumed. * @type {string} * @memberof IoK8sApiResourceV1alpha3CounterSet */ name: string; } export function IoK8sApiResourceV1alpha3CounterSetFromJSON( json: any, ): IoK8sApiResourceV1alpha3CounterSet { return IoK8sApiResourceV1alpha3CounterSetFromJSONTyped(json, false); } export function IoK8sApiResourceV1alpha3CounterSetFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiResourceV1alpha3CounterSet { if (json === undefined || json === null) { return json; } return { counters: mapValues(json['counters'], IoK8sApiResourceV1alpha3CounterFromJSON), name: json['name'], }; } export function IoK8sApiResourceV1alpha3CounterSetToJSON( value?: IoK8sApiResourceV1alpha3CounterSet | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { counters: mapValues(value.counters, IoK8sApiResourceV1alpha3CounterToJSON), name: value.name, }; }