@vectorize-io/vectorize-client
Version:
Client for the Vectorize API
76 lines (65 loc) • 2.02 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 GCP Cloud Storage
* @export
* @interface GCSAuthConfig
*/
export interface GCSAuthConfig {
/**
* Service Account JSON. Example: Enter the JSON key file for the service account
* @type {string}
* @memberof GCSAuthConfig
*/
serviceAccountJson: string;
/**
* Bucket. Example: Enter bucket name
* @type {string}
* @memberof GCSAuthConfig
*/
bucketName: string;
}
/**
* Check if a given object implements the GCSAuthConfig interface.
*/
export function instanceOfGCSAuthConfig(value: object): value is GCSAuthConfig {
if (!('serviceAccountJson' in value) || value['serviceAccountJson'] === undefined) return false;
if (!('bucketName' in value) || value['bucketName'] === undefined) return false;
return true;
}
export function GCSAuthConfigFromJSON(json: any): GCSAuthConfig {
return GCSAuthConfigFromJSONTyped(json, false);
}
export function GCSAuthConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): GCSAuthConfig {
if (json == null) {
return json;
}
return {
'serviceAccountJson': json['service-account-json'],
'bucketName': json['bucket-name'],
};
}
export function GCSAuthConfigToJSON(json: any): GCSAuthConfig {
return GCSAuthConfigToJSONTyped(json, false);
}
export function GCSAuthConfigToJSONTyped(value?: GCSAuthConfig | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'service-account-json': value['serviceAccountJson'],
'bucket-name': value['bucketName'],
};
}