@indexea/sdk
Version:
Indexea JavaScript SDK (indexea.com)
75 lines (74 loc) • 3.19 kB
JavaScript
;
/* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.BulletinToJSON = exports.BulletinFromJSONTyped = exports.BulletinFromJSON = exports.instanceOfBulletin = exports.BulletinLevelEnum = void 0;
var runtime_1 = require("../runtime");
/**
* @export
*/
exports.BulletinLevelEnum = {
Success: 'success',
Warning: 'warning',
Danger: 'danger'
};
/**
* Check if a given object implements the Bulletin interface.
*/
function instanceOfBulletin(value) {
var isInstance = true;
return isInstance;
}
exports.instanceOfBulletin = instanceOfBulletin;
function BulletinFromJSON(json) {
return BulletinFromJSONTyped(json, false);
}
exports.BulletinFromJSON = BulletinFromJSON;
function BulletinFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
'level': !(0, runtime_1.exists)(json, 'level') ? undefined : json['level'],
'scope': !(0, runtime_1.exists)(json, 'scope') ? undefined : json['scope'],
'title': !(0, runtime_1.exists)(json, 'title') ? undefined : json['title'],
'content': !(0, runtime_1.exists)(json, 'content') ? undefined : json['content'],
'createdAt': !(0, runtime_1.exists)(json, 'created_at') ? undefined : (new Date(json['created_at'])),
'startAt': !(0, runtime_1.exists)(json, 'start_at') ? undefined : (new Date(json['start_at'])),
'expiredAt': !(0, runtime_1.exists)(json, 'expired_at') ? undefined : (new Date(json['expired_at'])),
'closable': !(0, runtime_1.exists)(json, 'closable') ? undefined : json['closable'],
};
}
exports.BulletinFromJSONTyped = BulletinFromJSONTyped;
function BulletinToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'id': value.id,
'level': value.level,
'scope': value.scope,
'title': value.title,
'content': value.content,
'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
'start_at': value.startAt === undefined ? undefined : (value.startAt.toISOString()),
'expired_at': value.expiredAt === undefined ? undefined : (value.expiredAt.toISOString()),
'closable': value.closable,
};
}
exports.BulletinToJSON = BulletinToJSON;