UNPKG

@space-cow-media/spellbook-client

Version:

An Open Api generated client for the Commander Spellbook backend REST API.

102 lines (90 loc) 2.71 kB
/* tslint:disable */ /* eslint-disable */ /** * Commander Spellbook API * API for Commander Spellbook, the combo database engine for Magic: The Gathering * * The version of the OpenAPI document: 4.8.19 * * * 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 { Template } from './template'; import { TemplateFromJSON, TemplateFromJSONTyped, TemplateToJSON, TemplateToJSONTyped, } from './template'; /** * * @export * @interface PaginatedTemplateList */ export interface PaginatedTemplateList { /** * * @type {number} * @memberof PaginatedTemplateList */ count: number; /** * * @type {string} * @memberof PaginatedTemplateList */ next: string | null; /** * * @type {string} * @memberof PaginatedTemplateList */ previous: string | null; /** * * @type {Array<Template>} * @memberof PaginatedTemplateList */ results: Array<Template>; } /** * Check if a given object implements the PaginatedTemplateList interface. */ export function instanceOfPaginatedTemplateList(value: object): value is PaginatedTemplateList { if (!('count' in value) || value['count'] === undefined) return false; if (!('next' in value) || value['next'] === undefined) return false; if (!('previous' in value) || value['previous'] === undefined) return false; if (!('results' in value) || value['results'] === undefined) return false; return true; } export function PaginatedTemplateListFromJSON(json: any): PaginatedTemplateList { return PaginatedTemplateListFromJSONTyped(json, false); } export function PaginatedTemplateListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTemplateList { if (json == null) { return json; } return { 'count': json['count'], 'next': json['next'], 'previous': json['previous'], 'results': ((json['results'] as Array<any>).map(TemplateFromJSON)), }; } export function PaginatedTemplateListToJSON(json: any): PaginatedTemplateList { return PaginatedTemplateListToJSONTyped(json, false); } export function PaginatedTemplateListToJSONTyped(value?: PaginatedTemplateList | 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(TemplateToJSON)), }; }