@indexea/sdk
Version:
Indexea JavaScript SDK (indexea.com)
135 lines (122 loc) • 3.77 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Indexea OpenAPI
* 这是 Indexea 搜索服务平台的 OpenAPI,用于描述平台的所有接口信息,你可以通过这个页面来了解和在线验证平台的所有接口信息。 ### Errors 本 API 使用标准的 HTTP 状态码来指示操作成功或者失败,如果失败将会在 body 中以 JSON 格式提供详细的错误信息,如下所示: ``` { \"error\": 404, \"message\": \"page not found\" } ```
*
* The version of the OpenAPI document: 1.0.0
* Contact: indexea.com@gmail.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
/**
* 黑名单详细信息
* @export
* @interface BlacklistBean
*/
export interface BlacklistBean {
/**
*
* @type {number}
* @memberof BlacklistBean
*/
app?: number;
/**
*
* @type {number}
* @memberof BlacklistBean
*/
blockType?: number;
/**
*
* @type {Array<string>}
* @memberof BlacklistBean
*/
badwords?: Array<string>;
/**
*
* @type {Array<string>}
* @memberof BlacklistBean
*/
blackIps?: Array<string>;
/**
*
* @type {Array<string>}
* @memberof BlacklistBean
*/
whiteIps?: Array<string>;
/**
*
* @type {Array<string>}
* @memberof BlacklistBean
*/
blockUserAgents?: Array<string>;
/**
*
* @type {Date}
* @memberof BlacklistBean
*/
updatedAt?: Date;
/**
*
* @type {number}
* @memberof BlacklistBean
*/
status?: BlacklistBeanStatusEnum;
}
/**
* @export
*/
export const BlacklistBeanStatusEnum = {
NUMBER_0: 0,
NUMBER_1: 1,
NUMBER_2: 2,
NUMBER_3: 3
} as const;
export type BlacklistBeanStatusEnum = typeof BlacklistBeanStatusEnum[keyof typeof BlacklistBeanStatusEnum];
/**
* Check if a given object implements the BlacklistBean interface.
*/
export function instanceOfBlacklistBean(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function BlacklistBeanFromJSON(json: any): BlacklistBean {
return BlacklistBeanFromJSONTyped(json, false);
}
export function BlacklistBeanFromJSONTyped(json: any, ignoreDiscriminator: boolean): BlacklistBean {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'app': !exists(json, 'app') ? undefined : json['app'],
'blockType': !exists(json, 'block_type') ? undefined : json['block_type'],
'badwords': !exists(json, 'badwords') ? undefined : json['badwords'],
'blackIps': !exists(json, 'black_ips') ? undefined : json['black_ips'],
'whiteIps': !exists(json, 'white_ips') ? undefined : json['white_ips'],
'blockUserAgents': !exists(json, 'block_user_agents') ? undefined : json['block_user_agents'],
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
'status': !exists(json, 'status') ? undefined : json['status'],
};
}
export function BlacklistBeanToJSON(value?: BlacklistBean | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'app': value.app,
'block_type': value.blockType,
'badwords': value.badwords,
'black_ips': value.blackIps,
'white_ips': value.whiteIps,
'block_user_agents': value.blockUserAgents,
'updated_at': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
'status': value.status,
};
}