@vectorize-io/vectorize-client
Version:
Client for the Vectorize API
103 lines (88 loc) • 2.5 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 { POSTGRESQLAuthConfig } from './POSTGRESQLAuthConfig';
import {
POSTGRESQLAuthConfigFromJSON,
POSTGRESQLAuthConfigFromJSONTyped,
POSTGRESQLAuthConfigToJSON,
POSTGRESQLAuthConfigToJSONTyped,
} from './POSTGRESQLAuthConfig';
/**
*
* @export
* @interface Postgresql
*/
export interface Postgresql {
/**
* Name of the connector
* @type {string}
* @memberof Postgresql
*/
name: string;
/**
* Connector type (must be "POSTGRESQL")
* @type {string}
* @memberof Postgresql
*/
type: PostgresqlTypeEnum;
/**
*
* @type {POSTGRESQLAuthConfig}
* @memberof Postgresql
*/
config: POSTGRESQLAuthConfig;
}
/**
* @export
*/
export const PostgresqlTypeEnum = {
Postgresql: 'POSTGRESQL'
} as const;
export type PostgresqlTypeEnum = typeof PostgresqlTypeEnum[keyof typeof PostgresqlTypeEnum];
/**
* Check if a given object implements the Postgresql interface.
*/
export function instanceOfPostgresql(value: object): value is Postgresql {
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 PostgresqlFromJSON(json: any): Postgresql {
return PostgresqlFromJSONTyped(json, false);
}
export function PostgresqlFromJSONTyped(json: any, ignoreDiscriminator: boolean): Postgresql {
if (json == null) {
return json;
}
return {
'name': json['name'],
'type': json['type'],
'config': POSTGRESQLAuthConfigFromJSON(json['config']),
};
}
export function PostgresqlToJSON(json: any): Postgresql {
return PostgresqlToJSONTyped(json, false);
}
export function PostgresqlToJSONTyped(value?: Postgresql | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'name': value['name'],
'type': value['type'],
'config': POSTGRESQLAuthConfigToJSON(value['config']),
};
}