mirror of
https://github.com/tribufu/tribufu-js
synced 2026-05-06 06:47:27 +00:00
201 lines
5.2 KiB
TypeScript
201 lines
5.2 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Tribufu API
|
|
* API to access Tribufu services.
|
|
*
|
|
* The version of the OpenAPI document: 1.2.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';
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface Profile
|
|
*/
|
|
export interface Profile {
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Profile
|
|
*/
|
|
id?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Profile
|
|
*/
|
|
uuid?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Profile
|
|
*/
|
|
name?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Profile
|
|
*/
|
|
displayName?: string | null;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof Profile
|
|
*/
|
|
verified?: boolean;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Profile
|
|
*/
|
|
level?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Profile
|
|
*/
|
|
experience?: number;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof Profile
|
|
*/
|
|
publicBirthday?: boolean;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof Profile
|
|
*/
|
|
birthday?: Date | null;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Profile
|
|
*/
|
|
points?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Profile
|
|
*/
|
|
location?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Profile
|
|
*/
|
|
photoUrl?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Profile
|
|
*/
|
|
bannerUrl?: string | null;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof Profile
|
|
*/
|
|
lastOnline?: Date | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Profile
|
|
*/
|
|
biography?: string | null;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Profile
|
|
*/
|
|
viewCount?: number;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof Profile
|
|
*/
|
|
created?: Date;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof Profile
|
|
*/
|
|
updated?: Date | null;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the Profile interface.
|
|
*/
|
|
export function instanceOfProfile(value: object): value is Profile {
|
|
return true;
|
|
}
|
|
|
|
export function ProfileFromJSON(json: any): Profile {
|
|
return ProfileFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function ProfileFromJSONTyped(json: any, ignoreDiscriminator: boolean): Profile {
|
|
if (json == null) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': json['id'] == null ? undefined : json['id'],
|
|
'uuid': json['uuid'] == null ? undefined : json['uuid'],
|
|
'name': json['name'] == null ? undefined : json['name'],
|
|
'displayName': json['display_name'] == null ? undefined : json['display_name'],
|
|
'verified': json['verified'] == null ? undefined : json['verified'],
|
|
'level': json['level'] == null ? undefined : json['level'],
|
|
'experience': json['experience'] == null ? undefined : json['experience'],
|
|
'publicBirthday': json['public_birthday'] == null ? undefined : json['public_birthday'],
|
|
'birthday': json['birthday'] == null ? undefined : (new Date(json['birthday'])),
|
|
'points': json['points'] == null ? undefined : json['points'],
|
|
'location': json['location'] == null ? undefined : json['location'],
|
|
'photoUrl': json['photo_url'] == null ? undefined : json['photo_url'],
|
|
'bannerUrl': json['banner_url'] == null ? undefined : json['banner_url'],
|
|
'lastOnline': json['last_online'] == null ? undefined : (new Date(json['last_online'])),
|
|
'biography': json['biography'] == null ? undefined : json['biography'],
|
|
'viewCount': json['view_count'] == null ? undefined : json['view_count'],
|
|
'created': json['created'] == null ? undefined : (new Date(json['created'])),
|
|
'updated': json['updated'] == null ? undefined : (new Date(json['updated'])),
|
|
};
|
|
}
|
|
|
|
export function ProfileToJSON(json: any): Profile {
|
|
return ProfileToJSONTyped(json, false);
|
|
}
|
|
|
|
export function ProfileToJSONTyped(value?: Profile | null, ignoreDiscriminator: boolean = false): any {
|
|
if (value == null) {
|
|
return value;
|
|
}
|
|
|
|
return {
|
|
|
|
'id': value['id'],
|
|
'uuid': value['uuid'],
|
|
'name': value['name'],
|
|
'display_name': value['displayName'],
|
|
'verified': value['verified'],
|
|
'level': value['level'],
|
|
'experience': value['experience'],
|
|
'public_birthday': value['publicBirthday'],
|
|
'birthday': value['birthday'] == null ? undefined : ((value['birthday'] as any).toISOString().substring(0,10)),
|
|
'points': value['points'],
|
|
'location': value['location'],
|
|
'photo_url': value['photoUrl'],
|
|
'banner_url': value['bannerUrl'],
|
|
'last_online': value['lastOnline'] == null ? undefined : ((value['lastOnline'] as any).toISOString()),
|
|
'biography': value['biography'],
|
|
'view_count': value['viewCount'],
|
|
'created': value['created'] == null ? undefined : ((value['created']).toISOString()),
|
|
'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()),
|
|
};
|
|
}
|
|
|