/* tslint:disable */ /* eslint-disable */ /** * Fabric API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * 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 { WikiDocumentCategory } from './WikiDocumentCategory'; import { WikiDocumentCategoryFromJSON, WikiDocumentCategoryFromJSONTyped, WikiDocumentCategoryToJSON, WikiDocumentCategoryToJSONTyped, } from './WikiDocumentCategory'; import type { NotepadMetadataBlockPreview } from './NotepadMetadataBlockPreview'; import { NotepadMetadataBlockPreviewFromJSON, NotepadMetadataBlockPreviewFromJSONTyped, NotepadMetadataBlockPreviewToJSON, NotepadMetadataBlockPreviewToJSONTyped, } from './NotepadMetadataBlockPreview'; import type { NotepadMetadataBlockAttributes } from './NotepadMetadataBlockAttributes'; import { NotepadMetadataBlockAttributesFromJSON, NotepadMetadataBlockAttributesFromJSONTyped, NotepadMetadataBlockAttributesToJSON, NotepadMetadataBlockAttributesToJSONTyped, } from './NotepadMetadataBlockAttributes'; /** * * @export * @interface WikiMetadataBlock */ export interface WikiMetadataBlock { /** * * @type {NotepadMetadataBlockAttributes} * @memberof WikiMetadataBlock */ 'attributes': NotepadMetadataBlockAttributes; /** * * @type {NotepadMetadataBlockPreview} * @memberof WikiMetadataBlock */ 'preview': NotepadMetadataBlockPreview | null; /** * * @type {boolean} * @memberof WikiMetadataBlock */ 'exceedsSize'?: boolean | null; /** * * @type {string} * @memberof WikiMetadataBlock */ 'caption': string | null; /** * * @type {Array} * @memberof WikiMetadataBlock */ 'keywords'?: Array | null; /** * * @type {boolean} * @memberof WikiMetadataBlock */ 'isMemory'?: boolean | null; /** * * @type {WikiDocumentCategory} * @memberof WikiMetadataBlock */ 'category'?: WikiDocumentCategory | null; /** * * @type {string} * @memberof WikiMetadataBlock */ 'customDescription'?: string | null; } /** * Check if a given object implements the WikiMetadataBlock interface. */ export function instanceOfWikiMetadataBlock(value: object): value is WikiMetadataBlock { if (!('attributes' in value) || value['attributes'] === undefined) return false; if (!('preview' in value) || value['preview'] === undefined) return false; if (!('caption' in value) || value['caption'] === undefined) return false; return true; } export function WikiMetadataBlockFromJSON(json: any): WikiMetadataBlock { return WikiMetadataBlockFromJSONTyped(json, false); } export function WikiMetadataBlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): WikiMetadataBlock { if (json == null) { return json; } const result = { } as WikiMetadataBlock; if (json['attributes'] !== undefined) { result['attributes'] = NotepadMetadataBlockAttributesFromJSON(json['attributes']); } if (json['preview'] !== undefined) { if (json['preview'] === null) { result['preview'] = null; } else { result['preview'] = NotepadMetadataBlockPreviewFromJSON(json['preview']); } } if (json['exceedsSize'] !== undefined) { if (json['exceedsSize'] === null) { result['exceedsSize'] = null; } else { result['exceedsSize'] = json['exceedsSize']; } } if (json['caption'] !== undefined) { if (json['caption'] === null) { result['caption'] = null; } else { result['caption'] = json['caption']; } } if (json['keywords'] !== undefined) { if (json['keywords'] === null) { result['keywords'] = null; } else { result['keywords'] = json['keywords']; } } if (json['isMemory'] !== undefined) { if (json['isMemory'] === null) { result['isMemory'] = null; } else { result['isMemory'] = json['isMemory']; } } if (json['category'] !== undefined) { if (json['category'] === null) { result['category'] = null; } else { result['category'] = WikiDocumentCategoryFromJSON(json['category']); } } if (json['customDescription'] !== undefined) { if (json['customDescription'] === null) { result['customDescription'] = null; } else { result['customDescription'] = json['customDescription']; } } return result; } export function WikiMetadataBlockToJSON(json: any): WikiMetadataBlock { return WikiMetadataBlockToJSONTyped(json, false); } export function WikiMetadataBlockToJSONTyped(value?: WikiMetadataBlock | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'attributes': NotepadMetadataBlockAttributesToJSON(value['attributes']), 'preview': NotepadMetadataBlockPreviewToJSON(value['preview']), 'exceedsSize': value['exceedsSize'], 'caption': value['caption'], 'keywords': value['keywords'], 'isMemory': value['isMemory'], 'category': WikiDocumentCategoryToJSON(value['category']), 'customDescription': value['customDescription'], }; }