@vectorize-io/vectorize-client
Version:
Client for the Vectorize API
102 lines (91 loc) • 2.85 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';
/**
* Authentication configuration for PostgreSQL
* @export
* @interface POSTGRESQLAuthConfig
*/
export interface POSTGRESQLAuthConfig {
/**
* Host. Example: Enter the host of the deployment
* @type {string}
* @memberof POSTGRESQLAuthConfig
*/
host: string;
/**
* Port. Example: Enter the port of the deployment
* @type {number}
* @memberof POSTGRESQLAuthConfig
*/
port?: number;
/**
* Database. Example: Enter the database name
* @type {string}
* @memberof POSTGRESQLAuthConfig
*/
database: string;
/**
* Username. Example: Enter the username
* @type {string}
* @memberof POSTGRESQLAuthConfig
*/
username: string;
/**
* Password. Example: Enter the username's password
* @type {string}
* @memberof POSTGRESQLAuthConfig
*/
password: string;
}
/**
* Check if a given object implements the POSTGRESQLAuthConfig interface.
*/
export function instanceOfPOSTGRESQLAuthConfig(value: object): value is POSTGRESQLAuthConfig {
if (!('host' in value) || value['host'] === undefined) return false;
if (!('database' in value) || value['database'] === undefined) return false;
if (!('username' in value) || value['username'] === undefined) return false;
if (!('password' in value) || value['password'] === undefined) return false;
return true;
}
export function POSTGRESQLAuthConfigFromJSON(json: any): POSTGRESQLAuthConfig {
return POSTGRESQLAuthConfigFromJSONTyped(json, false);
}
export function POSTGRESQLAuthConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): POSTGRESQLAuthConfig {
if (json == null) {
return json;
}
return {
'host': json['host'],
'port': json['port'] == null ? undefined : json['port'],
'database': json['database'],
'username': json['username'],
'password': json['password'],
};
}
export function POSTGRESQLAuthConfigToJSON(json: any): POSTGRESQLAuthConfig {
return POSTGRESQLAuthConfigToJSONTyped(json, false);
}
export function POSTGRESQLAuthConfigToJSONTyped(value?: POSTGRESQLAuthConfig | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'host': value['host'],
'port': value['port'],
'database': value['database'],
'username': value['username'],
'password': value['password'],
};
}