@vectorize-io/vectorize-client
Version:
Client for the Vectorize API
103 lines (88 loc) • 2.42 kB
text/typescript
/* 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 { WEAVIATEAuthConfig } from './WEAVIATEAuthConfig';
import {
WEAVIATEAuthConfigFromJSON,
WEAVIATEAuthConfigFromJSONTyped,
WEAVIATEAuthConfigToJSON,
WEAVIATEAuthConfigToJSONTyped,
} from './WEAVIATEAuthConfig';
/**
*
* @export
* @interface Weaviate
*/
export interface Weaviate {
/**
* Name of the connector
* @type {string}
* @memberof Weaviate
*/
name: string;
/**
* Connector type (must be "WEAVIATE")
* @type {string}
* @memberof Weaviate
*/
type: WeaviateTypeEnum;
/**
*
* @type {WEAVIATEAuthConfig}
* @memberof Weaviate
*/
config: WEAVIATEAuthConfig;
}
/**
* @export
*/
export const WeaviateTypeEnum = {
Weaviate: 'WEAVIATE'
} as const;
export type WeaviateTypeEnum = typeof WeaviateTypeEnum[keyof typeof WeaviateTypeEnum];
/**
* Check if a given object implements the Weaviate interface.
*/
export function instanceOfWeaviate(value: object): value is Weaviate {
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 WeaviateFromJSON(json: any): Weaviate {
return WeaviateFromJSONTyped(json, false);
}
export function WeaviateFromJSONTyped(json: any, ignoreDiscriminator: boolean): Weaviate {
if (json == null) {
return json;
}
return {
'name': json['name'],
'type': json['type'],
'config': WEAVIATEAuthConfigFromJSON(json['config']),
};
}
export function WeaviateToJSON(json: any): Weaviate {
return WeaviateToJSONTyped(json, false);
}
export function WeaviateToJSONTyped(value?: Weaviate | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'name': value['name'],
'type': value['type'],
'config': WEAVIATEAuthConfigToJSON(value['config']),
};
}