Files
recipes/vue3/src/openapi/models/PatchedUser.ts
2025-04-11 15:49:11 +02:00

112 lines
2.9 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* 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';
/**
* Adds nested create feature
* @export
* @interface PatchedUser
*/
export interface PatchedUser {
/**
*
* @type {number}
* @memberof PatchedUser
*/
id?: number;
/**
* Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
* @type {string}
* @memberof PatchedUser
*/
readonly username?: string;
/**
*
* @type {string}
* @memberof PatchedUser
*/
firstName?: string;
/**
*
* @type {string}
* @memberof PatchedUser
*/
lastName?: string;
/**
*
* @type {string}
* @memberof PatchedUser
*/
readonly displayName?: string;
/**
* Designates whether the user can log into this admin site.
* @type {boolean}
* @memberof PatchedUser
*/
readonly isStaff?: boolean;
/**
* Designates that this user has all permissions without explicitly assigning them.
* @type {boolean}
* @memberof PatchedUser
*/
readonly isSuperuser?: boolean;
/**
* Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
* @type {boolean}
* @memberof PatchedUser
*/
readonly isActive?: boolean;
}
/**
* Check if a given object implements the PatchedUser interface.
*/
export function instanceOfPatchedUser(value: object): value is PatchedUser {
return true;
}
export function PatchedUserFromJSON(json: any): PatchedUser {
return PatchedUserFromJSONTyped(json, false);
}
export function PatchedUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUser {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'username': json['username'] == null ? undefined : json['username'],
'firstName': json['first_name'] == null ? undefined : json['first_name'],
'lastName': json['last_name'] == null ? undefined : json['last_name'],
'displayName': json['display_name'] == null ? undefined : json['display_name'],
'isStaff': json['is_staff'] == null ? undefined : json['is_staff'],
'isSuperuser': json['is_superuser'] == null ? undefined : json['is_superuser'],
'isActive': json['is_active'] == null ? undefined : json['is_active'],
};
}
export function PatchedUserToJSON(value?: Omit<PatchedUser, 'username'|'displayName'|'isStaff'|'isSuperuser'|'isActive'> | null): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'first_name': value['firstName'],
'last_name': value['lastName'],
};
}