@vectorize-io/vectorize-client
Version:
Client for the Vectorize API
94 lines (80 loc) • 2.43 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 CreateSourceConnector
*/
export interface CreateSourceConnector {
/**
*
* @type {string}
* @memberof CreateSourceConnector
*/
name: string;
/**
*
* @type {SourceConnectorType}
* @memberof CreateSourceConnector
*/
type: SourceConnectorType;
/**
*
* @type {{ [key: string]: any | null; }}
* @memberof CreateSourceConnector
*/
config?: { [key: string]: any | null; };
}
/**
* Check if a given object implements the CreateSourceConnector interface.
*/
export function instanceOfCreateSourceConnector(value: object): value is CreateSourceConnector {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
return true;
}
export function CreateSourceConnectorFromJSON(json: any): CreateSourceConnector {
return CreateSourceConnectorFromJSONTyped(json, false);
}
export function CreateSourceConnectorFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSourceConnector {
if (json == null) {
return json;
}
return {
'name': json['name'],
'type': SourceConnectorTypeFromJSON(json['type']),
'config': json['config'] == null ? undefined : json['config'],
};
}
export function CreateSourceConnectorToJSON(json: any): CreateSourceConnector {
return CreateSourceConnectorToJSONTyped(json, false);
}
export function CreateSourceConnectorToJSONTyped(value?: CreateSourceConnector | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'name': value['name'],
'type': SourceConnectorTypeToJSON(value['type']),
'config': value['config'],
};
}