@vectorize-io/vectorize-client
Version:
Client for the Vectorize API
103 lines (88 loc) • 2.33 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 { VERTEXAuthConfig } from './VERTEXAuthConfig';
import {
VERTEXAuthConfigFromJSON,
VERTEXAuthConfigFromJSONTyped,
VERTEXAuthConfigToJSON,
VERTEXAuthConfigToJSONTyped,
} from './VERTEXAuthConfig';
/**
*
* @export
* @interface Vertex
*/
export interface Vertex {
/**
* Name of the connector
* @type {string}
* @memberof Vertex
*/
name: string;
/**
* Must be "VERTEX"
* @type {string}
* @memberof Vertex
*/
type: VertexTypeEnum;
/**
*
* @type {VERTEXAuthConfig}
* @memberof Vertex
*/
config: VERTEXAuthConfig;
}
/**
* @export
*/
export const VertexTypeEnum = {
Vertex: 'VERTEX'
} as const;
export type VertexTypeEnum = typeof VertexTypeEnum[keyof typeof VertexTypeEnum];
/**
* Check if a given object implements the Vertex interface.
*/
export function instanceOfVertex(value: object): value is Vertex {
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 VertexFromJSON(json: any): Vertex {
return VertexFromJSONTyped(json, false);
}
export function VertexFromJSONTyped(json: any, ignoreDiscriminator: boolean): Vertex {
if (json == null) {
return json;
}
return {
'name': json['name'],
'type': json['type'],
'config': VERTEXAuthConfigFromJSON(json['config']),
};
}
export function VertexToJSON(json: any): Vertex {
return VertexToJSONTyped(json, false);
}
export function VertexToJSONTyped(value?: Vertex | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'name': value['name'],
'type': value['type'],
'config': VERTEXAuthConfigToJSON(value['config']),
};
}