/* 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 { EmailMessageMetadataBlockEmailPreview } from './EmailMessageMetadataBlockEmailPreview'; import { EmailMessageMetadataBlockEmailPreviewFromJSON, EmailMessageMetadataBlockEmailPreviewFromJSONTyped, EmailMessageMetadataBlockEmailPreviewToJSON, EmailMessageMetadataBlockEmailPreviewToJSONTyped, } from './EmailMessageMetadataBlockEmailPreview'; import type { DocumentMetadataBlockPdfRender } from './DocumentMetadataBlockPdfRender'; import { DocumentMetadataBlockPdfRenderFromJSON, DocumentMetadataBlockPdfRenderFromJSONTyped, DocumentMetadataBlockPdfRenderToJSON, DocumentMetadataBlockPdfRenderToJSONTyped, } from './DocumentMetadataBlockPdfRender'; import type { DocumentMetadataBlockAttributes } from './DocumentMetadataBlockAttributes'; import { DocumentMetadataBlockAttributesFromJSON, DocumentMetadataBlockAttributesFromJSONTyped, DocumentMetadataBlockAttributesToJSON, DocumentMetadataBlockAttributesToJSONTyped, } from './DocumentMetadataBlockAttributes'; /** * * @export * @interface DocumentMetadataBlock */ export interface DocumentMetadataBlock { /** * Whether the resource is infected with malware * @type {boolean} * @memberof DocumentMetadataBlock */ 'infected': boolean; /** * * @type {EmailMessageMetadataBlockEmailPreview} * @memberof DocumentMetadataBlock */ 'documentPreview'?: EmailMessageMetadataBlockEmailPreview; /** * * @type {string} * @memberof DocumentMetadataBlock */ 'caption': string | null; /** * * @type {Array} * @memberof DocumentMetadataBlock */ 'keywords'?: Array | null; /** * * @type {DocumentMetadataBlockAttributes} * @memberof DocumentMetadataBlock */ 'attributes': DocumentMetadataBlockAttributes; /** * * @type {DocumentMetadataBlockPdfRender} * @memberof DocumentMetadataBlock */ 'pdfRender'?: DocumentMetadataBlockPdfRender | null; } /** * Check if a given object implements the DocumentMetadataBlock interface. */ export function instanceOfDocumentMetadataBlock(value: object): value is DocumentMetadataBlock { if (!('infected' in value) || value['infected'] === undefined) return false; if (!('caption' in value) || value['caption'] === undefined) return false; if (!('attributes' in value) || value['attributes'] === undefined) return false; return true; } export function DocumentMetadataBlockFromJSON(json: any): DocumentMetadataBlock { return DocumentMetadataBlockFromJSONTyped(json, false); } export function DocumentMetadataBlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentMetadataBlock { if (json == null) { return json; } const result = { } as DocumentMetadataBlock; if (json['infected'] !== undefined) { result['infected'] = json['infected']; } if (json['documentPreview'] !== undefined) { result['documentPreview'] = EmailMessageMetadataBlockEmailPreviewFromJSON(json['documentPreview']); } 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['attributes'] !== undefined) { result['attributes'] = DocumentMetadataBlockAttributesFromJSON(json['attributes']); } if (json['pdfRender'] !== undefined) { if (json['pdfRender'] === null) { result['pdfRender'] = null; } else { result['pdfRender'] = DocumentMetadataBlockPdfRenderFromJSON(json['pdfRender']); } } return result; } export function DocumentMetadataBlockToJSON(json: any): DocumentMetadataBlock { return DocumentMetadataBlockToJSONTyped(json, false); } export function DocumentMetadataBlockToJSONTyped(value?: DocumentMetadataBlock | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'infected': value['infected'], 'documentPreview': EmailMessageMetadataBlockEmailPreviewToJSON(value['documentPreview']), 'caption': value['caption'], 'keywords': value['keywords'], 'attributes': DocumentMetadataBlockAttributesToJSON(value['attributes']), 'pdfRender': DocumentMetadataBlockPdfRenderToJSON(value['pdfRender']), }; }