/* 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 { CreateBookmarkRequestLocation } from './CreateBookmarkRequestLocation'; import { CreateBookmarkRequestLocationFromJSON, CreateBookmarkRequestLocationFromJSONTyped, CreateBookmarkRequestLocationToJSON, CreateBookmarkRequestLocationToJSONTyped, } from './CreateBookmarkRequestLocation'; import type { FileCreationMetadata } from './FileCreationMetadata'; import { FileCreationMetadataFromJSON, FileCreationMetadataFromJSONTyped, FileCreationMetadataToJSON, FileCreationMetadataToJSONTyped, } from './FileCreationMetadata'; import type { CreateBookmarkRequestTagsInner } from './CreateBookmarkRequestTagsInner'; import { CreateBookmarkRequestTagsInnerFromJSON, CreateBookmarkRequestTagsInnerFromJSONTyped, CreateBookmarkRequestTagsInnerToJSON, CreateBookmarkRequestTagsInnerToJSONTyped, } from './CreateBookmarkRequestTagsInner'; import type { CommentCreate } from './CommentCreate'; import { CommentCreateFromJSON, CommentCreateFromJSONTyped, CommentCreateToJSON, CommentCreateToJSONTyped, } from './CommentCreate'; import type { CreateBookmarkRequestParentId } from './CreateBookmarkRequestParentId'; import { CreateBookmarkRequestParentIdFromJSON, CreateBookmarkRequestParentIdFromJSONTyped, CreateBookmarkRequestParentIdToJSON, CreateBookmarkRequestParentIdToJSONTyped, } from './CreateBookmarkRequestParentId'; import type { FileCreationAttachment } from './FileCreationAttachment'; import { FileCreationAttachmentFromJSON, FileCreationAttachmentFromJSONTyped, FileCreationAttachmentToJSON, FileCreationAttachmentToJSONTyped, } from './FileCreationAttachment'; /** * * @export * @interface FileCreation */ export interface FileCreation { /** * * @type {string} * @memberof FileCreation */ 'name'?: string | null; /** * * @type {FileCreationAttachment} * @memberof FileCreation */ 'attachment': FileCreationAttachment; /** * * @type {CreateBookmarkRequestParentId} * @memberof FileCreation */ 'parentId': CreateBookmarkRequestParentId; /** * * @type {Array} * @memberof FileCreation */ 'tags'?: Array; /** * * @type {CommentCreate} * @memberof FileCreation */ 'comment'?: CommentCreate | null; /** * * @type {CreateBookmarkRequestLocation} * @memberof FileCreation */ 'location'?: CreateBookmarkRequestLocation | null; /** * * @type {string} * @memberof FileCreation */ 'url'?: string; /** * * @type {string} * @memberof FileCreation */ 'mimeType': string; /** * * @type {FileCreationMetadata} * @memberof FileCreation */ 'metadata'?: FileCreationMetadata; } /** * Check if a given object implements the FileCreation interface. */ export function instanceOfFileCreation(value: object): value is FileCreation { if (!('attachment' in value) || value['attachment'] === undefined) return false; if (!('parentId' in value) || value['parentId'] === undefined) return false; if (!('mimeType' in value) || value['mimeType'] === undefined) return false; return true; } export function FileCreationFromJSON(json: any): FileCreation { return FileCreationFromJSONTyped(json, false); } export function FileCreationFromJSONTyped(json: any, ignoreDiscriminator: boolean): FileCreation { if (json == null) { return json; } const result = { } as FileCreation; if (json['name'] !== undefined) { if (json['name'] === null) { result['name'] = null; } else { result['name'] = json['name']; } } if (json['attachment'] !== undefined) { result['attachment'] = FileCreationAttachmentFromJSON(json['attachment']); } if (json['parentId'] !== undefined) { result['parentId'] = CreateBookmarkRequestParentIdFromJSON(json['parentId']); } if (json['tags'] !== undefined) { result['tags'] = (json['tags'] as Array).map(CreateBookmarkRequestTagsInnerFromJSON); } if (json['comment'] !== undefined) { if (json['comment'] === null) { result['comment'] = null; } else { result['comment'] = CommentCreateFromJSON(json['comment']); } } if (json['location'] !== undefined) { if (json['location'] === null) { result['location'] = null; } else { result['location'] = CreateBookmarkRequestLocationFromJSON(json['location']); } } if (json['url'] !== undefined) { result['url'] = json['url']; } if (json['mimeType'] !== undefined) { result['mimeType'] = json['mimeType']; } if (json['metadata'] !== undefined) { result['metadata'] = FileCreationMetadataFromJSON(json['metadata']); } return result; } export function FileCreationToJSON(json: any): FileCreation { return FileCreationToJSONTyped(json, false); } export function FileCreationToJSONTyped(value?: FileCreation | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'attachment': FileCreationAttachmentToJSON(value['attachment']), 'parentId': CreateBookmarkRequestParentIdToJSON(value['parentId']), 'tags': value['tags'] == null ? undefined : ((value['tags'] as Array).map(CreateBookmarkRequestTagsInnerToJSON)), 'comment': CommentCreateToJSON(value['comment']), 'location': CreateBookmarkRequestLocationToJSON(value['location']), 'url': value['url'], 'mimeType': value['mimeType'], 'metadata': FileCreationMetadataToJSON(value['metadata']), }; }