@vectorize-io/vectorize-client
Version:
Client for the Vectorize API
85 lines (74 loc) • 2.27 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 Discord
* @export
* @interface DISCORDAuthConfig
*/
export interface DISCORDAuthConfig {
/**
* Server ID. Example: Enter Server ID
* @type {string}
* @memberof DISCORDAuthConfig
*/
serverId: string;
/**
* Bot token. Example: Enter Token
* @type {string}
* @memberof DISCORDAuthConfig
*/
botToken: string;
/**
* Channel ID. Example: Enter channel ID
* @type {Array<string>}
* @memberof DISCORDAuthConfig
*/
channelIds: Array<string>;
}
/**
* Check if a given object implements the DISCORDAuthConfig interface.
*/
export function instanceOfDISCORDAuthConfig(value: object): value is DISCORDAuthConfig {
if (!('serverId' in value) || value['serverId'] === undefined) return false;
if (!('botToken' in value) || value['botToken'] === undefined) return false;
if (!('channelIds' in value) || value['channelIds'] === undefined) return false;
return true;
}
export function DISCORDAuthConfigFromJSON(json: any): DISCORDAuthConfig {
return DISCORDAuthConfigFromJSONTyped(json, false);
}
export function DISCORDAuthConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): DISCORDAuthConfig {
if (json == null) {
return json;
}
return {
'serverId': json['server-id'],
'botToken': json['bot-token'],
'channelIds': json['channel-ids'],
};
}
export function DISCORDAuthConfigToJSON(json: any): DISCORDAuthConfig {
return DISCORDAuthConfigToJSONTyped(json, false);
}
export function DISCORDAuthConfigToJSONTyped(value?: DISCORDAuthConfig | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'server-id': value['serverId'],
'bot-token': value['botToken'],
'channel-ids': value['channelIds'],
};
}