/* 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 { CreateSmartCollectionRequestQueriesInner } from './CreateSmartCollectionRequestQueriesInner'; import { CreateSmartCollectionRequestQueriesInnerFromJSON, CreateSmartCollectionRequestQueriesInnerFromJSONTyped, CreateSmartCollectionRequestQueriesInnerToJSON, CreateSmartCollectionRequestQueriesInnerToJSONTyped, } from './CreateSmartCollectionRequestQueriesInner'; /** * * @export * @interface SmartCollection */ export interface SmartCollection { /** * * @type {string} * @memberof SmartCollection */ 'id': string; /** * * @type {string} * @memberof SmartCollection */ 'name': string; /** * * @type {string} * @memberof SmartCollection */ 'description': string | null; /** * * @type {Array} * @memberof SmartCollection */ 'queries': Array; } /** * Check if a given object implements the SmartCollection interface. */ export function instanceOfSmartCollection(value: object): value is SmartCollection { if (!('id' in value) || value['id'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('description' in value) || value['description'] === undefined) return false; if (!('queries' in value) || value['queries'] === undefined) return false; return true; } export function SmartCollectionFromJSON(json: any): SmartCollection { return SmartCollectionFromJSONTyped(json, false); } export function SmartCollectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SmartCollection { if (json == null) { return json; } const result = { } as SmartCollection; if (json['id'] !== undefined) { result['id'] = json['id']; } if (json['name'] !== undefined) { result['name'] = json['name']; } if (json['description'] !== undefined) { if (json['description'] === null) { result['description'] = null; } else { result['description'] = json['description']; } } if (json['queries'] !== undefined) { result['queries'] = (json['queries'] as Array).map(CreateSmartCollectionRequestQueriesInnerFromJSON); } return result; } export function SmartCollectionToJSON(json: any): SmartCollection { return SmartCollectionToJSONTyped(json, false); } export function SmartCollectionToJSONTyped(value?: SmartCollection | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'name': value['name'], 'description': value['description'], 'queries': ((value['queries'] as Array).map(CreateSmartCollectionRequestQueriesInnerToJSON)), }; }