@vectorize-io/vectorize-client
Version:
Client for the Vectorize API
128 lines (114 loc) • 3.53 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';
/**
* Configuration for GCP Cloud Storage connector
* @export
* @interface GCSConfig
*/
export interface GCSConfig {
/**
* File Extensions
* @type {Array<string>}
* @memberof GCSConfig
*/
fileExtensions: GCSConfigFileExtensionsEnum;
/**
* Check for updates every (seconds)
* @type {number}
* @memberof GCSConfig
*/
idleTime: number;
/**
* Recursively scan all folders in the bucket
* @type {boolean}
* @memberof GCSConfig
*/
recursive?: boolean;
/**
* Path Prefix
* @type {string}
* @memberof GCSConfig
*/
pathPrefix?: string;
/**
* Path Metadata Regex
* @type {string}
* @memberof GCSConfig
*/
pathMetadataRegex?: string;
/**
* Path Regex Group Names. Example: Enter Group Name
* @type {Array<string>}
* @memberof GCSConfig
*/
pathRegexGroupNames?: Array<string>;
}
/**
* @export
*/
export const GCSConfigFileExtensionsEnum = {
Pdf: 'pdf',
Docdocxgdocodtrtfepub: 'doc,docx,gdoc,odt,rtf,epub',
Pptpptxgslides: 'ppt,pptx,gslides',
Xlsxlsxgsheetsods: 'xls,xlsx,gsheets,ods',
Emlmsg: 'eml,msg',
Txt: 'txt',
Htmlhtm: 'html,htm',
Md: 'md',
Jpgjpegpngwebpsvggif: 'jpg,jpeg,png,webp,svg,gif',
Json: 'json',
Csv: 'csv'
} as const;
export type GCSConfigFileExtensionsEnum = typeof GCSConfigFileExtensionsEnum[keyof typeof GCSConfigFileExtensionsEnum];
/**
* Check if a given object implements the GCSConfig interface.
*/
export function instanceOfGCSConfig(value: object): value is GCSConfig {
if (!('fileExtensions' in value) || value['fileExtensions'] === undefined) return false;
if (!('idleTime' in value) || value['idleTime'] === undefined) return false;
return true;
}
export function GCSConfigFromJSON(json: any): GCSConfig {
return GCSConfigFromJSONTyped(json, false);
}
export function GCSConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): GCSConfig {
if (json == null) {
return json;
}
return {
'fileExtensions': json['file-extensions'],
'idleTime': json['idle-time'],
'recursive': json['recursive'] == null ? undefined : json['recursive'],
'pathPrefix': json['path-prefix'] == null ? undefined : json['path-prefix'],
'pathMetadataRegex': json['path-metadata-regex'] == null ? undefined : json['path-metadata-regex'],
'pathRegexGroupNames': json['path-regex-group-names'] == null ? undefined : json['path-regex-group-names'],
};
}
export function GCSConfigToJSON(json: any): GCSConfig {
return GCSConfigToJSONTyped(json, false);
}
export function GCSConfigToJSONTyped(value?: GCSConfig | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'file-extensions': value['fileExtensions'],
'idle-time': value['idleTime'],
'recursive': value['recursive'],
'path-prefix': value['pathPrefix'],
'path-metadata-regex': value['pathMetadataRegex'],
'path-regex-group-names': value['pathRegexGroupNames'],
};
}