@indexea/sdk
Version:
Indexea JavaScript SDK (indexea.com)
154 lines (144 loc) • 4.3 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 RecommendBean
*/
export interface RecommendBean {
/**
* 编号
* @type {number}
* @memberof RecommendBean
*/
id?: number;
/**
* 推荐标识
* @type {string}
* @memberof RecommendBean
*/
ident?: string;
/**
* 应用编号
* @type {number}
* @memberof RecommendBean
*/
app?: number;
/**
* 账号
* @type {number}
* @memberof RecommendBean
*/
account?: number;
/**
* 关联的索引编号
* @type {number}
* @memberof RecommendBean
*/
index?: number;
/**
* 名称
* @type {string}
* @memberof RecommendBean
*/
name?: string;
/**
* 简介
* @type {string}
* @memberof RecommendBean
*/
intro?: string;
/**
* 类型
* @type {string}
* @memberof RecommendBean
*/
type?: string;
/**
* 推荐设定
* @type {object}
* @memberof RecommendBean
*/
settings?: object;
/**
* 状态
* @type {number}
* @memberof RecommendBean
*/
status?: number;
/**
* 创建时间
* @type {Date}
* @memberof RecommendBean
*/
createdAt?: Date;
/**
* 最后更新时间
* @type {Date}
* @memberof RecommendBean
*/
updatedAt?: Date;
}
/**
* Check if a given object implements the RecommendBean interface.
*/
export function instanceOfRecommendBean(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function RecommendBeanFromJSON(json: any): RecommendBean {
return RecommendBeanFromJSONTyped(json, false);
}
export function RecommendBeanFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecommendBean {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'ident': !exists(json, 'ident') ? undefined : json['ident'],
'app': !exists(json, 'app') ? undefined : json['app'],
'account': !exists(json, 'account') ? undefined : json['account'],
'index': !exists(json, 'index') ? undefined : json['index'],
'name': !exists(json, 'name') ? undefined : json['name'],
'intro': !exists(json, 'intro') ? undefined : json['intro'],
'type': !exists(json, 'type') ? undefined : json['type'],
'settings': !exists(json, 'settings') ? undefined : json['settings'],
'status': !exists(json, 'status') ? undefined : json['status'],
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
};
}
export function RecommendBeanToJSON(value?: RecommendBean | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'id': value.id,
'ident': value.ident,
'app': value.app,
'account': value.account,
'index': value.index,
'name': value.name,
'intro': value.intro,
'type': value.type,
'settings': value.settings,
'status': value.status,
'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
'updated_at': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
};
}