@vectorize-io/vectorize-client
Version:
Client for the Vectorize API
103 lines (88 loc) • 2.26 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 { GROQAuthConfig } from './GROQAuthConfig';
import {
GROQAuthConfigFromJSON,
GROQAuthConfigFromJSONTyped,
GROQAuthConfigToJSON,
GROQAuthConfigToJSONTyped,
} from './GROQAuthConfig';
/**
*
* @export
* @interface Groq
*/
export interface Groq {
/**
* Name of the connector
* @type {string}
* @memberof Groq
*/
name: string;
/**
* Must be "GROQ"
* @type {string}
* @memberof Groq
*/
type: GroqTypeEnum;
/**
*
* @type {GROQAuthConfig}
* @memberof Groq
*/
config: GROQAuthConfig;
}
/**
* @export
*/
export const GroqTypeEnum = {
Groq: 'GROQ'
} as const;
export type GroqTypeEnum = typeof GroqTypeEnum[keyof typeof GroqTypeEnum];
/**
* Check if a given object implements the Groq interface.
*/
export function instanceOfGroq(value: object): value is Groq {
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 GroqFromJSON(json: any): Groq {
return GroqFromJSONTyped(json, false);
}
export function GroqFromJSONTyped(json: any, ignoreDiscriminator: boolean): Groq {
if (json == null) {
return json;
}
return {
'name': json['name'],
'type': json['type'],
'config': GROQAuthConfigFromJSON(json['config']),
};
}
export function GroqToJSON(json: any): Groq {
return GroqToJSONTyped(json, false);
}
export function GroqToJSONTyped(value?: Groq | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'name': value['name'],
'type': value['type'],
'config': GROQAuthConfigToJSON(value['config']),
};
}