/* tslint:disable */ /* eslint-disable */ /** * attachmentAV * An SDK to integrate virus and malware scan capabilities into JavaScript / TypeScript applications. Scan files for viruses, trojans, and other kinds of malware with attachmentAV powered by Sophos. * * The version of the OpenAPI document: 1.0.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'; import type { UsageQuota } from './UsageQuota'; import { UsageQuotaFromJSON, UsageQuotaFromJSONTyped, UsageQuotaToJSON, UsageQuotaToJSONTyped, } from './UsageQuota'; /** * * @export * @interface Usage */ export interface Usage { /** * * @type {number} * @memberof Usage */ credits: number; /** * * @type {UsageQuota} * @memberof Usage */ quota: UsageQuota; } /** * Check if a given object implements the Usage interface. */ export function instanceOfUsage(value: object): value is Usage { if (!('credits' in value) || value['credits'] === undefined) return false; if (!('quota' in value) || value['quota'] === undefined) return false; return true; } export function UsageFromJSON(json: any): Usage { return UsageFromJSONTyped(json, false); } export function UsageFromJSONTyped(json: any, ignoreDiscriminator: boolean): Usage { if (json == null) { return json; } return { 'credits': json['credits'], 'quota': UsageQuotaFromJSON(json['quota']), }; } export function UsageToJSON(json: any): Usage { return UsageToJSONTyped(json, false); } export function UsageToJSONTyped(value?: Usage | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'credits': value['credits'], 'quota': UsageQuotaToJSON(value['quota']), }; }