UNPKG

@vectorize-io/vectorize-client

Version:
103 lines (88 loc) 2.5 kB
/* tslint:disable */ /* eslint-disable */ /** * Vectorize API * API for Vectorize services (Beta) * * The version of the OpenAPI document: 0.1.2 * * * 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 { WEBCRAWLERAuthConfig } from './WEBCRAWLERAuthConfig'; import { WEBCRAWLERAuthConfigFromJSON, WEBCRAWLERAuthConfigFromJSONTyped, WEBCRAWLERAuthConfigToJSON, WEBCRAWLERAuthConfigToJSONTyped, } from './WEBCRAWLERAuthConfig'; /** * * @export * @interface WebCrawler */ export interface WebCrawler { /** * Name of the connector * @type {string} * @memberof WebCrawler */ name: string; /** * Connector type (must be "WEB_CRAWLER") * @type {string} * @memberof WebCrawler */ type: WebCrawlerTypeEnum; /** * * @type {WEBCRAWLERAuthConfig} * @memberof WebCrawler */ config: WEBCRAWLERAuthConfig; } /** * @export */ export const WebCrawlerTypeEnum = { WebCrawler: 'WEB_CRAWLER' } as const; export type WebCrawlerTypeEnum = typeof WebCrawlerTypeEnum[keyof typeof WebCrawlerTypeEnum]; /** * Check if a given object implements the WebCrawler interface. */ export function instanceOfWebCrawler(value: object): value is WebCrawler { if (!('name' in value) || value['name'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('config' in value) || value['config'] === undefined) return false; return true; } export function WebCrawlerFromJSON(json: any): WebCrawler { return WebCrawlerFromJSONTyped(json, false); } export function WebCrawlerFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebCrawler { if (json == null) { return json; } return { 'name': json['name'], 'type': json['type'], 'config': WEBCRAWLERAuthConfigFromJSON(json['config']), }; } export function WebCrawlerToJSON(json: any): WebCrawler { return WebCrawlerToJSONTyped(json, false); } export function WebCrawlerToJSONTyped(value?: WebCrawler | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'type': value['type'], 'config': WEBCRAWLERAuthConfigToJSON(value['config']), }; }