mirror of
https://github.com/tribufu/tribufu-js
synced 2026-05-06 14:57:26 +00:00
227 lines
6 KiB
TypeScript
227 lines
6 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Tribufu API
|
|
* REST API to access Tribufu services.
|
|
*
|
|
* The version of the OpenAPI document: 1.1.0
|
|
* Contact: contact@tribufu.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 { mapValues } from '../runtime';
|
|
import type { ApplicationType } from './ApplicationType';
|
|
import {
|
|
ApplicationTypeFromJSON,
|
|
ApplicationTypeFromJSONTyped,
|
|
ApplicationTypeToJSON,
|
|
ApplicationTypeToJSONTyped,
|
|
} from './ApplicationType';
|
|
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface Application
|
|
*/
|
|
export interface Application {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Application
|
|
*/
|
|
id?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Application
|
|
*/
|
|
name?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Application
|
|
*/
|
|
description?: string | null;
|
|
/**
|
|
*
|
|
* @type {ApplicationType}
|
|
* @memberof Application
|
|
*/
|
|
type?: ApplicationType;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Application
|
|
*/
|
|
organizationId?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Application
|
|
*/
|
|
iconUrl?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Application
|
|
*/
|
|
bannerUrl?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Application
|
|
*/
|
|
capsuleImageUrl?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Application
|
|
*/
|
|
libraryImageUrl?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Application
|
|
*/
|
|
parentId?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Application
|
|
*/
|
|
slug?: string | null;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Application
|
|
*/
|
|
visibility?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Application
|
|
*/
|
|
password?: string | null;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Application
|
|
*/
|
|
primary?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Application
|
|
*/
|
|
userCount?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Application
|
|
*/
|
|
achievementCount?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Application
|
|
*/
|
|
badgeCount?: number | null;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Application
|
|
*/
|
|
downloadCount?: number;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof Application
|
|
*/
|
|
created?: Date;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof Application
|
|
*/
|
|
updated?: Date | null;
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Check if a given object implements the Application interface.
|
|
*/
|
|
export function instanceOfApplication(value: object): value is Application {
|
|
return true;
|
|
}
|
|
|
|
export function ApplicationFromJSON(json: any): Application {
|
|
return ApplicationFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function ApplicationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Application {
|
|
if (json == null) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': json['id'] == null ? undefined : json['id'],
|
|
'name': json['name'] == null ? undefined : json['name'],
|
|
'description': json['description'] == null ? undefined : json['description'],
|
|
'type': json['type'] == null ? undefined : ApplicationTypeFromJSON(json['type']),
|
|
'organizationId': json['organization_id'] == null ? undefined : json['organization_id'],
|
|
'iconUrl': json['icon_url'] == null ? undefined : json['icon_url'],
|
|
'bannerUrl': json['banner_url'] == null ? undefined : json['banner_url'],
|
|
'capsuleImageUrl': json['capsule_image_url'] == null ? undefined : json['capsule_image_url'],
|
|
'libraryImageUrl': json['library_image_url'] == null ? undefined : json['library_image_url'],
|
|
'parentId': json['parent_id'] == null ? undefined : json['parent_id'],
|
|
'slug': json['slug'] == null ? undefined : json['slug'],
|
|
'visibility': json['visibility'] == null ? undefined : json['visibility'],
|
|
'password': json['password'] == null ? undefined : json['password'],
|
|
'primary': json['primary'] == null ? undefined : json['primary'],
|
|
'userCount': json['user_count'] == null ? undefined : json['user_count'],
|
|
'achievementCount': json['achievement_count'] == null ? undefined : json['achievement_count'],
|
|
'badgeCount': json['badge_count'] == null ? undefined : json['badge_count'],
|
|
'downloadCount': json['download_count'] == null ? undefined : json['download_count'],
|
|
'created': json['created'] == null ? undefined : (new Date(json['created'])),
|
|
'updated': json['updated'] == null ? undefined : (new Date(json['updated'])),
|
|
};
|
|
}
|
|
|
|
export function ApplicationToJSON(json: any): Application {
|
|
return ApplicationToJSONTyped(json, false);
|
|
}
|
|
|
|
export function ApplicationToJSONTyped(value?: Application | null, ignoreDiscriminator: boolean = false): any {
|
|
if (value == null) {
|
|
return value;
|
|
}
|
|
|
|
return {
|
|
|
|
'id': value['id'],
|
|
'name': value['name'],
|
|
'description': value['description'],
|
|
'type': ApplicationTypeToJSON(value['type']),
|
|
'organization_id': value['organizationId'],
|
|
'icon_url': value['iconUrl'],
|
|
'banner_url': value['bannerUrl'],
|
|
'capsule_image_url': value['capsuleImageUrl'],
|
|
'library_image_url': value['libraryImageUrl'],
|
|
'parent_id': value['parentId'],
|
|
'slug': value['slug'],
|
|
'visibility': value['visibility'],
|
|
'password': value['password'],
|
|
'primary': value['primary'],
|
|
'user_count': value['userCount'],
|
|
'achievement_count': value['achievementCount'],
|
|
'badge_count': value['badgeCount'],
|
|
'download_count': value['downloadCount'],
|
|
'created': value['created'] == null ? undefined : ((value['created']).toISOString()),
|
|
'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()),
|
|
};
|
|
}
|
|
|