mirror of
https://github.com/tribufu/sdk-js
synced 2025-09-23 14:34:27 +00:00
Generate code with openapi-generator (#5)
This commit is contained in:
131
src/models/Account.ts
Normal file
131
src/models/Account.ts
Normal file
@@ -0,0 +1,131 @@
|
||||
/* 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 { LoginProvider } from './LoginProvider';
|
||||
import {
|
||||
LoginProviderFromJSON,
|
||||
LoginProviderFromJSONTyped,
|
||||
LoginProviderToJSON,
|
||||
LoginProviderToJSONTyped,
|
||||
} from './LoginProvider';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface Account
|
||||
*/
|
||||
export interface Account {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Account
|
||||
*/
|
||||
id?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Account
|
||||
*/
|
||||
name?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {LoginProvider}
|
||||
* @memberof Account
|
||||
*/
|
||||
provider?: LoginProvider;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Account
|
||||
*/
|
||||
userId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Account
|
||||
*/
|
||||
authorized?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof Account
|
||||
*/
|
||||
fields?: any | null;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof Account
|
||||
*/
|
||||
created?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof Account
|
||||
*/
|
||||
updated?: Date | null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the Account interface.
|
||||
*/
|
||||
export function instanceOfAccount(value: object): value is Account {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function AccountFromJSON(json: any): Account {
|
||||
return AccountFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): Account {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'provider': json['provider'] == null ? undefined : LoginProviderFromJSON(json['provider']),
|
||||
'userId': json['user_id'] == null ? undefined : json['user_id'],
|
||||
'authorized': json['authorized'] == null ? undefined : json['authorized'],
|
||||
'fields': json['fields'] == null ? undefined : json['fields'],
|
||||
'created': json['created'] == null ? undefined : (new Date(json['created'])),
|
||||
'updated': json['updated'] == null ? undefined : (new Date(json['updated'])),
|
||||
};
|
||||
}
|
||||
|
||||
export function AccountToJSON(json: any): Account {
|
||||
return AccountToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AccountToJSONTyped(value?: Account | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'provider': LoginProviderToJSON(value['provider']),
|
||||
'user_id': value['userId'],
|
||||
'authorized': value['authorized'],
|
||||
'fields': value['fields'],
|
||||
'created': value['created'] == null ? undefined : ((value['created']).toISOString()),
|
||||
'updated': value['updated'] == null ? undefined : ((value['updated'] as any).toISOString()),
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user