/* 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 { 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'; /** * * @export * @interface CreateBookmarkRequest */ export interface CreateBookmarkRequest { /** * * @type {string} * @memberof CreateBookmarkRequest */ 'url': string; /** * * @type {Array} * @memberof CreateBookmarkRequest */ 'tags'?: Array; /** * * @type {CreateBookmarkRequestParentId} * @memberof CreateBookmarkRequest */ 'parentId': CreateBookmarkRequestParentId; /** * * @type {CommentCreate} * @memberof CreateBookmarkRequest */ 'comment'?: CommentCreate | null; /** * * @type {CreateBookmarkRequestLocation} * @memberof CreateBookmarkRequest */ 'location'?: CreateBookmarkRequestLocation | null; /** * * @type {string} * @memberof CreateBookmarkRequest */ 'name'?: string | null; } /** * Check if a given object implements the CreateBookmarkRequest interface. */ export function instanceOfCreateBookmarkRequest(value: object): value is CreateBookmarkRequest { if (!('url' in value) || value['url'] === undefined) return false; if (!('parentId' in value) || value['parentId'] === undefined) return false; return true; } export function CreateBookmarkRequestFromJSON(json: any): CreateBookmarkRequest { return CreateBookmarkRequestFromJSONTyped(json, false); } export function CreateBookmarkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateBookmarkRequest { if (json == null) { return json; } const result = { } as CreateBookmarkRequest; if (json['url'] !== undefined) { result['url'] = json['url']; } if (json['tags'] !== undefined) { result['tags'] = (json['tags'] as Array).map(CreateBookmarkRequestTagsInnerFromJSON); } if (json['parentId'] !== undefined) { result['parentId'] = CreateBookmarkRequestParentIdFromJSON(json['parentId']); } 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['name'] !== undefined) { if (json['name'] === null) { result['name'] = null; } else { result['name'] = json['name']; } } return result; } export function CreateBookmarkRequestToJSON(json: any): CreateBookmarkRequest { return CreateBookmarkRequestToJSONTyped(json, false); } export function CreateBookmarkRequestToJSONTyped(value?: CreateBookmarkRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'url': value['url'], 'tags': value['tags'] == null ? undefined : ((value['tags'] as Array).map(CreateBookmarkRequestTagsInnerToJSON)), 'parentId': CreateBookmarkRequestParentIdToJSON(value['parentId']), 'comment': CommentCreateToJSON(value['comment']), 'location': CreateBookmarkRequestLocationToJSON(value['location']), 'name': value['name'], }; }