@vectorize-io/vectorize-client
Version:
Client for the Vectorize API
110 lines (99 loc) • 3.03 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 Amazon S3
* @export
* @interface AWSS3AuthConfig
*/
export interface AWSS3AuthConfig {
/**
* Access Key. Example: Enter Access Key
* @type {string}
* @memberof AWSS3AuthConfig
*/
accessKey: string;
/**
* Secret Key. Example: Enter Secret Key
* @type {string}
* @memberof AWSS3AuthConfig
*/
secretKey: string;
/**
* Bucket Name. Example: Enter your S3 Bucket Name
* @type {string}
* @memberof AWSS3AuthConfig
*/
bucketName: string;
/**
* Endpoint. Example: Enter Endpoint URL
* @type {string}
* @memberof AWSS3AuthConfig
*/
endpoint?: string;
/**
* Region. Example: Region Name
* @type {string}
* @memberof AWSS3AuthConfig
*/
region?: string;
/**
* Allow as archive destination
* @type {boolean}
* @memberof AWSS3AuthConfig
*/
archiver: boolean;
}
/**
* Check if a given object implements the AWSS3AuthConfig interface.
*/
export function instanceOfAWSS3AuthConfig(value: object): value is AWSS3AuthConfig {
if (!('accessKey' in value) || value['accessKey'] === undefined) return false;
if (!('secretKey' in value) || value['secretKey'] === undefined) return false;
if (!('bucketName' in value) || value['bucketName'] === undefined) return false;
if (!('archiver' in value) || value['archiver'] === undefined) return false;
return true;
}
export function AWSS3AuthConfigFromJSON(json: any): AWSS3AuthConfig {
return AWSS3AuthConfigFromJSONTyped(json, false);
}
export function AWSS3AuthConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): AWSS3AuthConfig {
if (json == null) {
return json;
}
return {
'accessKey': json['access-key'],
'secretKey': json['secret-key'],
'bucketName': json['bucket-name'],
'endpoint': json['endpoint'] == null ? undefined : json['endpoint'],
'region': json['region'] == null ? undefined : json['region'],
'archiver': json['archiver'],
};
}
export function AWSS3AuthConfigToJSON(json: any): AWSS3AuthConfig {
return AWSS3AuthConfigToJSONTyped(json, false);
}
export function AWSS3AuthConfigToJSONTyped(value?: AWSS3AuthConfig | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'access-key': value['accessKey'],
'secret-key': value['secretKey'],
'bucket-name': value['bucketName'],
'endpoint': value['endpoint'],
'region': value['region'],
'archiver': value['archiver'],
};
}