@vectorize-io/vectorize-client
Version:
Client for the Vectorize API
94 lines (80 loc) • 2.42 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Vectorize API (Beta)
* API for Vectorize services
*
* The version of the OpenAPI document: 0.0.1
*
*
* 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 { SourceConnectorType } from './SourceConnectorType';
import {
SourceConnectorTypeFromJSON,
SourceConnectorTypeFromJSONTyped,
SourceConnectorTypeToJSON,
SourceConnectorTypeToJSONTyped,
} from './SourceConnectorType';
/**
*
* @export
* @interface SourceConnectorSchema
*/
export interface SourceConnectorSchema {
/**
*
* @type {string}
* @memberof SourceConnectorSchema
*/
id: string;
/**
*
* @type {SourceConnectorType}
* @memberof SourceConnectorSchema
*/
type: SourceConnectorType;
/**
*
* @type {{ [key: string]: any | null; }}
* @memberof SourceConnectorSchema
*/
config?: { [key: string]: any | null; };
}
/**
* Check if a given object implements the SourceConnectorSchema interface.
*/
export function instanceOfSourceConnectorSchema(value: object): value is SourceConnectorSchema {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
return true;
}
export function SourceConnectorSchemaFromJSON(json: any): SourceConnectorSchema {
return SourceConnectorSchemaFromJSONTyped(json, false);
}
export function SourceConnectorSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceConnectorSchema {
if (json == null) {
return json;
}
return {
'id': json['id'],
'type': SourceConnectorTypeFromJSON(json['type']),
'config': json['config'] == null ? undefined : json['config'],
};
}
export function SourceConnectorSchemaToJSON(json: any): SourceConnectorSchema {
return SourceConnectorSchemaToJSONTyped(json, false);
}
export function SourceConnectorSchemaToJSONTyped(value?: SourceConnectorSchema | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'type': SourceConnectorTypeToJSON(value['type']),
'config': value['config'],
};
}