guichet-sdk-ts/src/models/Quota.ts
2025-02-20 19:34:51 +01:00

89 lines
2 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* Guichet API
* Programmatic API for managing a user account in Deuxfleurs\' Guichet. *Disclaimer: this API is currently unstable and does not yet cover all the features availble from Guichet\'s web interface.*
*
* The version of the OpenAPI document: v0.1.0
*
*
* 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';
/**
*
* @export
* @interface Quota
*/
export interface Quota {
/**
*
* @type {number}
* @memberof Quota
*/
current?: number;
/**
*
* @type {number}
* @memberof Quota
*/
max?: number;
/**
*
* @type {number}
* @memberof Quota
*/
ratio?: number;
/**
*
* @type {boolean}
* @memberof Quota
*/
burstable?: boolean;
}
/**
* Check if a given object implements the Quota interface.
*/
export function instanceOfQuota(value: object): value is Quota {
return true;
}
export function QuotaFromJSON(json: any): Quota {
return QuotaFromJSONTyped(json, false);
}
export function QuotaFromJSONTyped(json: any, ignoreDiscriminator: boolean): Quota {
if (json == null) {
return json;
}
return {
'current': json['current'] == null ? undefined : json['current'],
'max': json['max'] == null ? undefined : json['max'],
'ratio': json['ratio'] == null ? undefined : json['ratio'],
'burstable': json['burstable'] == null ? undefined : json['burstable'],
};
}
export function QuotaToJSON(json: any): Quota {
return QuotaToJSONTyped(json, false);
}
export function QuotaToJSONTyped(value?: Quota | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'current': value['current'],
'max': value['max'],
'ratio': value['ratio'],
'burstable': value['burstable'],
};
}