1
0
mirror of https://github.com/TandoorRecipes/recipes.git synced 2026-01-11 09:07:12 -05:00

working on model select

This commit is contained in:
vabene1111
2024-03-11 19:46:37 +01:00
parent 09dc35228f
commit 18767c54ce
140 changed files with 7676 additions and 5949 deletions

View File

@@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
/**
* Adds nested create feature
* @export
@@ -51,36 +51,42 @@ export interface User {
readonly displayName: string;
}
/**
* Check if a given object implements the User interface.
*/
export function instanceOfUser(value: object): boolean {
if (!('id' in value)) return false;
if (!('username' in value)) return false;
if (!('displayName' in value)) return false;
return true;
}
export function UserFromJSON(json: any): User {
return UserFromJSONTyped(json, false);
}
export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
'id': json['id'],
'username': json['username'],
'firstName': !exists(json, 'first_name') ? undefined : json['first_name'],
'lastName': !exists(json, 'last_name') ? undefined : json['last_name'],
'firstName': json['first_name'] == null ? undefined : json['first_name'],
'lastName': json['last_name'] == null ? undefined : json['last_name'],
'displayName': json['display_name'],
};
}
export function UserToJSON(value?: User | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'first_name': value.firstName,
'last_name': value.lastName,
'first_name': value['firstName'],
'last_name': value['lastName'],
};
}