Files
recipes/vue3/src/openapi/models/PaginatedViewLogList.ts
2024-12-01 12:32:16 +01:00

108 lines
2.8 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.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 { ViewLog } from './ViewLog';
import {
ViewLogFromJSON,
ViewLogFromJSONTyped,
ViewLogToJSON,
ViewLogToJSONTyped,
} from './ViewLog';
/**
*
* @export
* @interface PaginatedViewLogList
*/
export interface PaginatedViewLogList {
/**
*
* @type {number}
* @memberof PaginatedViewLogList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedViewLogList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedViewLogList
*/
previous?: string | null;
/**
*
* @type {Array<ViewLog>}
* @memberof PaginatedViewLogList
*/
results: Array<ViewLog>;
/**
*
* @type {Date}
* @memberof PaginatedViewLogList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedViewLogList interface.
*/
export function instanceOfPaginatedViewLogList(value: object): value is PaginatedViewLogList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedViewLogListFromJSON(json: any): PaginatedViewLogList {
return PaginatedViewLogListFromJSONTyped(json, false);
}
export function PaginatedViewLogListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedViewLogList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(ViewLogFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedViewLogListToJSON(json: any): PaginatedViewLogList {
return PaginatedViewLogListToJSONTyped(json, false);
}
export function PaginatedViewLogListToJSONTyped(value?: PaginatedViewLogList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(ViewLogToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}