@vectorize-io/vectorize-client
Version:
Client for the Vectorize API
76 lines (65 loc) • 2.11 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 Azure AI Search
* @export
* @interface AZUREAISEARCHAuthConfig
*/
export interface AZUREAISEARCHAuthConfig {
/**
* Azure AI Search Service Name. Example: Enter your Azure AI Search service name
* @type {string}
* @memberof AZUREAISEARCHAuthConfig
*/
serviceName: string;
/**
* API Key. Example: Enter your API key
* @type {string}
* @memberof AZUREAISEARCHAuthConfig
*/
apiKey: string;
}
/**
* Check if a given object implements the AZUREAISEARCHAuthConfig interface.
*/
export function instanceOfAZUREAISEARCHAuthConfig(value: object): value is AZUREAISEARCHAuthConfig {
if (!('serviceName' in value) || value['serviceName'] === undefined) return false;
if (!('apiKey' in value) || value['apiKey'] === undefined) return false;
return true;
}
export function AZUREAISEARCHAuthConfigFromJSON(json: any): AZUREAISEARCHAuthConfig {
return AZUREAISEARCHAuthConfigFromJSONTyped(json, false);
}
export function AZUREAISEARCHAuthConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): AZUREAISEARCHAuthConfig {
if (json == null) {
return json;
}
return {
'serviceName': json['service-name'],
'apiKey': json['api-key'],
};
}
export function AZUREAISEARCHAuthConfigToJSON(json: any): AZUREAISEARCHAuthConfig {
return AZUREAISEARCHAuthConfigToJSONTyped(json, false);
}
export function AZUREAISEARCHAuthConfigToJSONTyped(value?: AZUREAISEARCHAuthConfig | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'service-name': value['serviceName'],
'api-key': value['apiKey'],
};
}